当前位置: 编程技术>移动开发
本页文章导读:
▪map编辑器Mappy上载 地图编辑器Mappy下载
简单的手机游戏地图编辑器,共享之。。。eclipseme下载http://sourceforge.net/projects/eclipseme/files/
......
▪ Trie 字典树 Objective-c 算法兑现 Trie 字典树 Objective-c 算法实现
下载地址: http://github.com/nathanday/ndtrieNDTrie was developed for text completion, using the method -[NDTrie everyObjectForKeyWithPrefix:] will return every string with the given prefix. For example.........
▪ 上载网络图片 下载网络图片
class DownloadThread extends AsyncTask<URL,Integer,List<Bitmap>>{ protected List<Bitmap> doInBackground(URL... urls){ InputStream in=null; try{ List<Bitmap> out=new ArrayList<Bitmap>();.........
[1]map编辑器Mappy上载
来源: 互联网 发布时间: 2014-02-18
地图编辑器Mappy下载
简单的手机游戏地图编辑器,共享之。。。
eclipseme下载
http://sourceforge.net/projects/eclipseme/files/
简单的手机游戏地图编辑器,共享之。。。
eclipseme下载
http://sourceforge.net/projects/eclipseme/files/
[2] Trie 字典树 Objective-c 算法兑现
来源: 互联网 发布时间: 2014-02-18
Trie 字典树 Objective-c 算法实现
下载地址: http://github.com/nathanday/ndtrie
NDTrie was developed for text completion, using the method -[NDTrie everyObjectForKeyWithPrefix:] will return every
string with the given prefix. For example an NDTrie with the strings {cat, catalog, category, cow, dog} for
everyObjectForKeyWithPrefix:@"cat" return the strings {cat, catalog, category}.
The NDTrie project contains two classes NDTrie and a subclass NDMutableTrie, which work the same way Apples mutable and
non-mutable classes work.
Though initially developed to contain strings that act as the key and value using methods like -[NSMutableTrie
addString:], NDTrie can also contain any object with a string key using methods like -[NSMutableTrie
setObject:forKey:].
之所以选择这个开源组件,是我着手开发一个英文字段软件。
词库量较大,有4W条记录,通过sqlite的like查询,效率很低。使用了这个组件之后,效果更差!
最终的解决方法还是在数据库上做文章,首先根据单词顺序进行排序,分别记录不同字母开头单词所在区域,其次创建索引,查询时,根据用户输入的关键字,再给定范围内进行模糊查询。目前速度还算满意。
下载地址: http://github.com/nathanday/ndtrie
NDTrie was developed for text completion, using the method -[NDTrie everyObjectForKeyWithPrefix:] will return every
string with the given prefix. For example an NDTrie with the strings {cat, catalog, category, cow, dog} for
everyObjectForKeyWithPrefix:@"cat" return the strings {cat, catalog, category}.
The NDTrie project contains two classes NDTrie and a subclass NDMutableTrie, which work the same way Apples mutable and
non-mutable classes work.
Though initially developed to contain strings that act as the key and value using methods like -[NSMutableTrie
addString:], NDTrie can also contain any object with a string key using methods like -[NSMutableTrie
setObject:forKey:].
之所以选择这个开源组件,是我着手开发一个英文字段软件。
词库量较大,有4W条记录,通过sqlite的like查询,效率很低。使用了这个组件之后,效果更差!
最终的解决方法还是在数据库上做文章,首先根据单词顺序进行排序,分别记录不同字母开头单词所在区域,其次创建索引,查询时,根据用户输入的关键字,再给定范围内进行模糊查询。目前速度还算满意。
[3] 上载网络图片
来源: 互联网 发布时间: 2014-02-18
下载网络图片
class DownloadThread extends AsyncTask<URL,Integer,List<Bitmap>>{
protected List<Bitmap> doInBackground(URL... urls){
InputStream in=null;
try{
List<Bitmap> out=new ArrayList<Bitmap>();
for(int i=0;i<urls.length;i++){
URL url=urls[i];
url = new URL("/myimage.png");
in=url.openStream();
Bitmap b=BitmapFactory.decodeStream(in);
out.add(b);
publishProgress(i);
}
return out;
}catch(IOException e){
Log.w("networking","Downloading image failed");
return null;
}
finally{
try {
if(in!=null)in.close();
} catch (IOException e) {
Log.w("networking","Closing stream failed");
}
}
}
}
最新技术文章: