现在位置: 首页 > ridgeway发表的所有文章
 开发与运行(卸载)第一个ANDROID应用 1.第一个android程序:HelloWorld   新建:android Project   填写project name,选择安卓平台 2.a.application name:第一个应用   b.package name:cn.credream.app   c.create activity :MainActivity,相当于一个form窗口,applicationName代表着这个窗口的Title,这个MainActivity就是这个程序的入口窗口;   d.min sdk version:最低可以适用的版本,比如如果写5,那么只能在2.0及以上的版本使用,     如果不写的话,那么代表可以在任意的android版本运行.     https://dl-ssl.google.com/android/ecl......
阅读全文
  • 04月
  • 13日
算法 ⁄ 共 3809字 评论关闭
Coins Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 26605   Accepted: 9026 Description People in Silverland use coins.They have coins of value A1,A2,A3...An Silverland dollar.One day Tony opened his money-box and found there were some coins.He decided to buy a very nice watch in a nearby shop. He wanted to pay the exact price(without change) and he known the price would not more than m.But he didn't know the exact price of the watch.  You are to write a pro......
阅读全文
  • 12月
  • 24日
综合 ⁄ 共 383字 评论关闭
给出一些正方形,让你求这些正方形顶点之间的最大距离的平方。 //返回点集直径的平方 int diameter2(vector<Point> & points) { vector<Point> p = ConvexHull(points); int n = p.size(); if(n==1) return 0; if(n==2) return Dist2(p[0], p[1]); p.push_back(p[0]); int ans = 0; for(int u = 0, v = 1; u < n; ++u) { for(;;) { int diff = Cross(p[u+1]-p[u], p[v+1]-p[v]); if(diff<=0) { ans = max(ans, Dist2(p[u],......
阅读全文
  • 06月
  • 06日
综合 ⁄ 共 195字 评论关闭
半年前的消息了。。呵呵。 首先访问:www.scootersoftware.com/ 在download下面找到对应的安装包,新的版本哦。 或者用wget也行拉。看看版本的。 下载后安装就行了。 然后呢, 根据网上说的,删除掉 ~ 下面的 .beyondcompare 就能和谐掉30天的试用期。不过,每个30天来一次.. rm -rf ~/.beyondcompare 呵呵。不错啦已经~ 应该比 Kompare 好些把?
阅读全文
1.    自定义字体 可以使用setTypeface(Typeface)方法来设置文本框内文本的字体,而android的Typeface又使用TTF字体文件来设置字体 所以,我们可以在程序中放入TTF字体文件,在程序中使用Typeface来设置字体:第一步,在assets目录下新建fonts目录,把TTF字体文件放到这里。第二步,程序中调用: TextViewtv = (TextView)findViewById(R.id.textView); AssetManagermgr=getAssets();//得到AssetManager Typefacetf=Typeface.createFromAsset(mgr, "fonts/mini.TTF");//根据路径得到Typeface tv.setTypeface(tf);//设置字体 效果如......
阅读全文
  • 05月
  • 17日
综合 ⁄ 共 8009字 评论关闭
原文链接:http://www.phonesdevelopers.com/1791266/ The stringstream main has two functions: to simplify the type conversion and one-time read data: Stringstream object to simplify the type conversion The C + + standard library <sstream> the than ANSI C <stdio.h> more advanced features, simple, type-safe, and scalability. In this article, I'll show you how to use these libraries to implement security and automatic type conversion. Why learn If you have been accustomed t......
阅读全文
  • 05月
  • 15日
搜索技术 ⁄ 共 610字 评论关闭
国外英文目录索引  Yahoo — 最著名的目录索引,搜索引擎开山鼻祖之一。 Dmoz.com/ODP — 由义务编辑维护的目录索引。 Ask Jeeves — 著名的自然语言搜索引擎,2002年初收购Teoma全文搜索引擎。 LookSmart — 点击付费索引目录,2002年收购WiseNut全文搜索引擎。 About.com — 有其自身特色的目录索引。    国外英文搜索引擎  Google — 以搜索精度高、速度快成为最受欢迎的搜索引擎,是目前搜索界的领军人物。 Fast/AllTheWeb — 总部位于挪威的搜索引擎后起之秀,风头直逼google。 AltaVista — 曾经的搜索引擎巨人,目前......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 1288字 评论关闭
#include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #define inf 0x7fffffff using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f; } struct edge{int from,to,next,v,c;}e[200001]; int n,m,ans1,ans2,cnt=1,S,T,head[1001],from[1001],dis[1001]; inline void ins......
阅读全文
  • 04月
  • 08日
综合 ⁄ 共 3347字 评论关闭
原文:  Traveling, Writing and Programming,编译:外刊IT评论 概括起来,今年到目前为止,我所做的事情包括: ▲ 花了10个月的时间做世界环游,途经非洲,东南亚,澳洲,中南美洲里的17个国家和地区。这次旅行的主题就是冲浪和摄影。 ▲ 出席在香港,日本,美国和伦敦举行的会议 ▲ 启程时给O’Reilly出版公司写了一本书,书名叫做《JavaScript Web Applications》 ▲ 另外写了一本关于CoffeeScript的书,很快就会由O’Reilly公司出版。 ▲ 写了大量的开源库,例如Spine, Spine.Mobile, GFX, 和 Juggernaut. ▲ 筹划了一个创......
阅读全文
  • 03月
  • 31日
综合 ⁄ 共 13348字 评论关闭
本文主要内容包括:如何根据百度地图接口实现定位,并实现从A到B的路径规划功能(驾车,公交,步行)。本文主要提供给新手参考,如果有错误希望博友们指出以便及时改正。 1.申请百度地图SDK的密钥(填写安全码是一定注意:Android SDK安全码组成:数字签名+;+包名)。 2.在 http://lbsyun.baidu.com/sdk/download 下载示例代码。 3.Eclipse中导入实例代码。 4.在AndroidManifest.xml中 把申请的密钥填进去(如图). 5.这样就可以运行我们刚刚下载的百度地图demo. 我们下面要做的就是把demo里面能用的代码改成我们需要的功能: 我们需要的功能就......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 3291字 评论关闭
Common Substrings Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 7082   Accepted: 2355 Description A substring of a string T is defined as: T(i, k)=TiTi+1...Ti+k-1, 1≤i≤i+k-1≤|T|. Given two strings A, B and one integer K, we define S, a set of triples (i, j, k): S = {(i, j, k) | k≥K, A(i, k)=B(j, k)}. You are to give the value of |S| for specific A, B and K. Input The input file contains several blocks of data. For each block, the first line contains one ......
阅读全文
  • 02月
  • 17日
综合 ⁄ 共 1540字 评论关闭
通常,Tree是Tree,List是List,两者不太可能混在一起。但apache-commons库却用tree实现了实现了List的接口,也就是TreeList类。与标准的LinkedList相比,TreeList稍微浪费一点空间,但常用操作的时间复杂度均降低到了O(log N),值得在开发中权衡利弊、合理应用。 内部数据结构 TreeList内部包含了一个Thread AVL Tree。AVL Tree很常见了,是一种典型的Balanced Binary Tree,但下面简单介绍下Thread Binary Tree。 Thread Binary Tree对Binary Tree增加了以下特性:(1)如果一个节点X没有左子树,则把本来应指向左子树的指针,指向......
阅读全文