代码改变世界

阅读排行榜

切分和组合图片(二)

2013-05-10 13:19 by java20130722, 181 阅读, 收藏,
摘要: 切分和组合图片(二)组合步骤:1. 初始化有多少小图片2. 加载小图片到缓存中3. 初始化大图片存储器4. 组合小图片到大图片5. 生成大图片文件小图片源:int rows = 4; //初始化有小图片的数量 int cols = 4; int chunks = rows * cols; int chunkWidth, chunkHeight; int type; //读取图片文件 File[] imgFiles = new File[chunks]; ... 阅读全文

Android BroadcastReceiver(一)

2013-04-15 11:36 by java20130722, 180 阅读, 收藏,
摘要: Android BroadcastReceiver介绍: broadcastReceiver是android的四大组件之一,大部分的广播是系统发出来的。例如,屏幕关闭,电池电量不足等等。应用同样可以创建广播,例如:当下载完成的时候,要让其他的应用知道这个情况,需要用到broadcastreceiver,receiver没有界面,它可能会创建一个status bar notification通知用户。broadcastreceiver 只是会做一些非常小的工作,例如,它可以出发一个service工作。基类的代码会收到sendBroadcast()发送过来的Intents.如果不需要在应用之间发送 阅读全文

解决SQL Server 2008安装时提示:重新启动计算机 失败

2013-01-18 23:38 by java20130722, 180 阅读, 收藏,
摘要: a、重启机器,再进行安装,如果发现还有该错误,请按下面步骤:b、在开始->运行中输入regeditc、到HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession Manager 位置d、在右边窗口右击PendingFileRenameOperations,选择删除,然后确认,迅速点重新运行e、重启安装,问题解决PS:自己没有测试过,记下以后备用。转自:http://blog.chinaunix.net/uid-28483822-id-3475072.html 阅读全文

Head Fisrt Android Development读书笔记(1)Adding Behavior

2012-10-07 23:10 by java20130722, 180 阅读, 收藏,
摘要: Make a button action1. use the Button onClick attribute to declare the name of the action method2.Open the Activity that displays the layout with the Button3.Add a method with a name matching the onClick attribute value4.Make sure that method takes in a single View as a parameter@string/haiku:find i 阅读全文

一个简单的Trie树实现

2013-07-19 15:46 by java20130722, 179 阅读, 收藏,
摘要: header file#ifndef TRIE_H_INCLUDED #define TRIE_H_INCLUDED #include #include typedef struct trie { int words; int prefixes; struct trie *edges[26]; } trie; trie * initialize(trie *node); trie * addWord(trie *ver,char *str); int countWords(trie *ver,char *str); int countPrefix(trie *ve... 阅读全文
上一页 1 ··· 93 94 95 96 97 98 99 100 101 ··· 115 下一页