自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(100)
  • 收藏
  • 关注

原创 Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE

eclipse调试安装时报错: Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package xxxxxxxxxxxxxxxxxxxxxxxx signatures do not match the previously installed version; ignoring! 原因签名不同了。   使用adb unins...

2017-04-05 22:27:54 428

原创 grails-2.4.4 + java1.8.0_45 报错

grails-2.4.4 + java1.8.0_45 报错:Problems copying method. Incompatible JVM? 改用java1.7 OK     groovy-grails-tool-suite-3.6.4.RELEASE-e4.4.2-win32    

2017-03-16 14:15:46 344

原创 windows load a DLL from memory

https://github.com/fancycode/MemoryModule   https://github.com/fdiskyou/malware

2016-07-12 08:42:01 281

原创 nodejs和java中的des/3des加密解密

http://mygo.iteye.com/blog/2018882

2016-07-07 12:34:36 595

原创 vc++ capture exception

最简单的方法直接集成BugTrap: http://www.codeproject.com/Articles/14618/Catch-All-Bugs-with-BugTrap https://github.com/bchavez/BugTrap   https://msdn.microsoft.com/en-us/library/windows/desktop/bb204633(v=v...

2016-06-22 10:44:49 159

原创 Interlocked Variable Access

Add,  And, Or, Xor,  BitTestAndComplement, BitTestAndReset, BitTestAndSet,  CompareExchange, Exchange, ExchangeAdd,  Increment, Decrement,   https://msdn.microsoft.com/zh-cn/data/ms684122 htt...

2016-06-13 10:48:18 161

原创 RxJava subscribeOn and observeOn

The SubscribeOn operator changes this behavior by specifying a different Scheduler on which the Observable should operate. The ObserveOn operator specifies a different Scheduler that the Observabl...

2016-04-27 11:43:44 94

原创 mesos + marathon + zookeeper in one vagrant

  虚拟机使用ubuntu/trusty64镜像 vagrant init ubuntu/trusty64 vagrant up 启动后安装docker, 参见https://docs.docker.com/engine/installation/linux/ubuntulinux/ # docker version Version:      1.10.3   拉取mesos...

2016-04-20 11:55:41 136

原创 java.security.NoSuchAlgorithmException: DES SecretKeyFactory not available

Eclipse Java EE IDE for Web Developers. Version: Juno Service Release 2  Build id: 20130225-0426 apache-tomcat-7.0.42 jdk1.6.0_38 调试一个web程序,SecretKeyFactory keyFactory = SecretKeyFactory.getInstan...

2016-04-15 12:42:24 1374

原创 cas自定义登录异常

cas版本4.0  定义异常类com.xxx.MyLoginException 在认证时根据实际情况抛出MyLoginException: public class MyDatabaseAuthenticationHandler extends AbstractJdbcUsernamePasswordAuthenticationHandler { /** {@inheritDo...

2016-03-23 11:18:41 572

原创 rust中的ownership, references-and-borrowing, ifetimes

We call the &T type a ‘reference’, and rather than owning the resource, it borrows ownership    error: cannot borrow `v` as mutable more than once at a time [E0499] fn main() { let mut v...

2016-03-17 09:31:48 137

原创 android 当ListView滚动时自动调用 onCheckedChanged 导致CheckBox 状态不停变化

http://blog.sina.com.cn/s/blog_93bca7340102uzmq.html   final CheckBox cb = (CheckBox)view.findViewById(R.id.checkBox1); cb.setOnCheckedChangeListener(null); cb.setChecked(mSelectedItems.getBoole...

2016-02-24 09:53:40 144

原创 Java Atomic Access

http://docs.oracle.com/javase/tutorial/essential/concurrency/atomic.html   Reads and writes are atomic for reference variables and for most primitive variables (all types except long and double). ...

2015-11-30 16:41:57 115

原创 android ndk 找不到 getpwuid_r

需要android-21, 之前的版本有getpwuid

2015-08-20 09:25:22 381

原创 golang的http关闭问题

 测试版本go1.4.2 resp, err := http.Get("http://example.com/") if resp != nil { defer resp.Body.Close() } if err != nil { fmt.Println("err: ", err) return } _, err = ioutil.ReadA...

2015-07-02 15:08:49 772

原创 使用Docker registry镜像创建私有仓库

#文件存储在/root/my_registry docker run -d -p 5000:5000 -v /root/my_registry:/tmp/registry --name registry registry docker pull nginx docker tag nginx 172.16.41.200:5000/nginx docker push 172.16.41.2...

2015-04-09 15:29:14 168

原创 golang misc

ch1 := make(chan string) fmt.Println("1@", time.Now()) for { select { case <-ch1: fmt.Println("2@", time.Now()) case <-time.After(time.Second * 3): fmt.Println("3@", ti...

2015-03-19 15:24:26 143

原创 生产环境性能分析工具TProfiler

TProfiler   同类对比

2015-03-18 15:48:55 353

原创 hbase rowkey

大数据性能调优之HBase的RowKey设计  

2015-03-05 10:30:53 378

原创 scala misc

视界(view bounds)  T1 <% T2    T1 <:T2或者能隐式转为T2    

2015-03-04 11:25:42 86

原创 ios misc

gen_entitlements.py: No such file or directory http://blog.sina.com.cn/s/blog_63e26d560100ve0c.html   图标 https://developer.apple.com/library/ios/qa/qa1686/_index.html   百度定位(v2.4.1)ios8问题 htt...

2014-10-04 15:58:04 100

原创 simple test QT and libvlc

win7 32位系统测试: Qt Creator向导创建GUI程序 增加libvlc播放代码 修改工程文件(pro)增加vlc头文件路径和lib libvlc.dll,libvlccore.dll,plugins拷贝到debug或release目录 运行 参考: http://blog.chinaunix.net/uid-26611383-id-3789962.html ...

2014-05-14 16:44:06 86

原创 分布式系统的事务处理

http://coolshell.cn/articles/10910.html

2014-05-12 10:20:15 77

原创 android AlarmManager

http://developer.android.com/reference/android/app/AlarmManager.html   The Alarm Manager holds a CPU wake lock as long as the alarm receiver's onReceive() method is executing. This guarantees that ...

2014-02-11 14:04:12 62

原创 swig/java

摘自  http://www.swig.org/translations/chinese/tutorial.html   /* File : example.c */ #include <time.h> double My_variable = 3.0; int fact(int n) { if (n <= 1) return 1; ...

2014-02-08 09:51:12 85

原创 (zz071007)GetLastError()错误信息

LPSTR lpBuffer;      DWORD nErrorNo = GetLastError ( ); FormatMessage ( FORMAT_MESSAGE_ALLOCATE_BUFFER   |           FORMAT_MESSAGE_IGNORE_INSERTS   |           FORMAT_MESSAGE_FROM_SYSTEM,      ...

2014-01-16 22:19:17 69

原创 (zz071028)用PHP以16进制显示文件

<?php if( count($argv) < 2 ){ print "usage: $argv[0] filename"; return; } $filename = $argv[1]; $filesize = filesize( $filename ); $file = fopen( $filename, 'rb'); $contents = fread($f...

2014-01-16 22:18:09 406

原创 zz070531计算帧率

/*       calculate the frame rate:       frame rate = (sample count * media time scale) / media duration */ frameRate = sampleCount*(double)timeScale/(double)duration;

2014-01-16 22:13:36 75

原创 Exceptions

org.codehaus.jackson.map.JsonMappingException: No serializer found for class org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer and no properties discovered to create BeanSerializer (to avoi...

2013-12-11 11:50:26 76

原创 YUV格式

http://www.fourcc.org/

2013-11-21 13:47:32 63

原创 maven package

把资源文件放到jar包外,依赖的jar放到lib目录下,最终生成一个zip包发布,如下: zip  |--xxx.jar  |--log4j.xml  |--config  |    |  |    |--xxx.xml  |    |--xxx.properties  |  |--lib  |    |--a.jar  |    |--b.jar   pom &...

2013-05-15 10:42:24 89

原创 android模块化开发

多个apk设置相同的android:sharedUserId, 使用相同的key签名 关键代码:    LocalActivityManager lam = getLocalActivityManager();//Activity使用ActivityGroup Intent itt = new Intent(); itt.se...

2013-05-04 21:11:48 98

原创 castor Date date-format

TODO   package mytest.utils.castor; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Properties; import org.exolab.castor.mappin...

2013-04-28 09:45:48 125

原创 简单通用的ContentProvider

常用简单的ContentProvider的实现差不多,整理了个通用的(基于com.example.android.supportv4.app.LoaderThrottleSupport.SimpleProvider修改), 从这个类继承,再重写几个方法就可以了,测试代码见附件。     package com.sh2600.test.contentprovider; impor...

2013-02-22 16:38:49 84

原创 Jasmin simple example

.bytecode 50.0 .class public cn/test/Hello .super java/lang/Object ;private String title = "test" .field private 'title' Ljava/lang/String; ;public Hello() .method public <init>...

2013-02-06 13:10:12 87

原创 android FragmentTabHost

使用FragmentTabHost的tab页面, TabWidget在底部, TabWidget设置背景在xml中写好像不行,可在代码中设置。     参考: http://stackoverflow.com/questions/13804287/fragmenttabhost-bottom-tabwidget http://ondrejcermak.info/programov...

2013-02-02 20:22:26 75

原创 jQuery.form.js使用ajaxForm提交表单,IE浏览器提示保存文件

  response.setContentType("text/html;charset=UTF-8");   http://stackoverflow.com/questions/6114360/stupid-ie-prompts-to-open-or-save-json-result-which-comes-from-server http://blog.degree.no/201...

2013-01-05 17:54:27 232

原创 CCSpriteFrameCache的用法

  原文: CCSpriteFrameCache的用法 先用zwoptexapp.com制作文件AnimBear.plist和AnimBear.png cocos2d-x代码: CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("AnimBear.plist"); CCSpr...

2012-12-14 22:36:16 81

原创 chrome扩展:打开google搜索结果避免再次访问google

经常地,google出来结果却打不开 https://github.com/simplehappy2600/SkipGoogle    

2012-12-09 19:22:25 140

原创 Good artists copy. Great artists steal.

Good artists copy. Great artists steal.

2012-11-30 22:56:28 190

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除