同步解决了线程中数据存取不一致的问题,而Object类中的等待与唤醒方法解决了重复存取的问题以下的生产者消费者Java源代码例子,很好的说明了这一点。其中包括Info类、Producter类、Consumer类、Test类。 Info类如下: 1 package per.producterconsu...
分类:
编程语言 时间:
2014-07-07 11:48:41
阅读次数:
221
在angular的controller中有时候会使用到自定义的回调,比如异步请求的回调函数一般返回之后都需要更新页面的数据,即更新$scope.xx但是如果直接 $scope.xx = data.info这样根本不会有任何的影响解决方案this.callback = function (status...
分类:
其他好文 时间:
2014-07-07 11:16:45
阅读次数:
135
1在Info.plist中设置UIViewControllerBasedStatusBarAppearance 为NO2 在需要改变状态栏颜色的ViewController中在ViewDidLoad方法中增加:[UIApplication sharedApplication] setStatusBa...
分类:
移动开发 时间:
2014-07-05 19:48:18
阅读次数:
259
在使用git pull、git push、git clone会报类似如下的错误:
error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/zemo/demo.git/info/refs
fatal: HTTP request failed
一般...
分类:
系统相关 时间:
2014-07-04 09:27:03
阅读次数:
589
调用系统相册、相机发现是英文的系统相簿界面后标题显示“photos”,但是手机语言已经设置显示中文,纠结半天,最终在info.plist设置解决问题。
只需要改三个地方:
1、plist文件中:
2、info里面-->Custom iOS Target Properites
3、info-->Localizations
至此ok。...
分类:
移动开发 时间:
2014-07-04 09:06:32
阅读次数:
431
Slave crash-safe replication
mysql的slave启动时,error.log中出现Warning警告:
[Warning] Slave SQL: If a crash happensthis configuration does not guarantee that the relay log info will beconsistent, Error_code: 0...
分类:
移动开发 时间:
2014-07-03 18:15:13
阅读次数:
278
<insertid="insertbatchinfotoemploees"parameterType="java.util.List">insertintoINFOTOEMPLOEEselectINFO_EMPLOEES.NEXTVAL,A.*from(<!--INFO_EMPLOEES为自增序列--><foreachcollection="list"item="item"index="index"separator="UNION">SELECT#{item.in..
分类:
数据库 时间:
2014-07-03 13:58:35
阅读次数:
232
运行mvn eclipse:eclipse时,经常会出现因为maven项目过大,导致内存不足java栈溢出的error, 信息如下:[INFO] ------------------------------------------------------------------------[ERRO...
分类:
其他好文 时间:
2014-07-02 18:56:30
阅读次数:
251
(www.|[a-zA-Z].)[a-zA-Z0-9\-\.]+\.(com|edu|gov|mil|net|org|biz|info|name|museum|us|ca|uk)www.xx00.com^(((ht|f)tp(s?))\://)?(www.|[a-zA-Z].)[a-zA-Z0-9\...
分类:
Web程序 时间:
2014-07-02 14:12:06
阅读次数:
216
1.错误提示:
03-31 16:48:43.740: INFO/ActivityManager(59): Start proc com.android.packageinstaller for activity com.android.packageinstaller/.PackageInstallerActivity: pid=620 uid=10026 gids={}
03-31 16:4...
分类:
移动开发 时间:
2014-07-02 11:13:56
阅读次数:
844