1、为了开发“天地币”这个Android手机项目,需要用到Socket编程。
2、天地币是一种类似于比特币的虚拟货币。
3、为了赚取CSDN的C币,需要写篇博客。
4、干脆将调试Socket的项目发出来跟网友分享。
闲话休提,直接上代码,首先是字符串的定义:
xyzSocket
Hello world!
Settings
本机IP:
...
分类:
移动开发 时间:
2014-11-08 16:49:22
阅读次数:
267
在层的头文件定义一个变量和一个方法class HelloWorld : public cocos2d::Layer{public: ... //physics world cocos2d::PhysicsWorld *m_physicsWorld; void setPhysicsWorld(coco...
分类:
其他好文 时间:
2014-11-08 16:33:47
阅读次数:
197
先来看下本篇博客索要达到的效果:
找到源码下的gov.nasa.worldwind.util下的StatusBar.java文件,可以看到状态栏显示的信息主要包括视点高度以及对应空间点三维坐标以及是否使用网络等信息。在后续的开发中采用离线模式,因此不需要联网,也不显示网络状态信息。代码依次如下面几幅图所示:
修改完源代码后,将源代码文件导出为jar包,在我们的工程下引用即可。后...
分类:
编程语言 时间:
2014-11-08 15:19:15
阅读次数:
221
Dinner
时间限制:100 ms | 内存限制:65535 KB
难度:1
描述Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have one meal. As bowl, ...
分类:
其他好文 时间:
2014-11-08 13:42:53
阅读次数:
201
1.什么是ContentProvider数据库在Android其中是私有的,当然这些数据包含文件数据和数据库数据以及一些其它类型的数据。不能将数据库设为WORLD_READABLE,每一个数据库都仅仅能创建它的包訪问,这意味着仅仅有由创建数据库的进程可訪问它。假设须要在进程间传递数据,则能够使用AI...
分类:
其他好文 时间:
2014-11-08 13:33:16
阅读次数:
219
呵呵哈嘿!public class Helloworld { public static void main(String[] args){ System.out.println("hello world!"); System.out.println("I'm coming!"); ...
分类:
其他好文 时间:
2014-11-08 11:52:21
阅读次数:
154
HTML5 是如何起步的? HTML5 是 W3C 与 WHATWG 合作的结果。 注:W3C 指 World Wide Web Consortium,万维网联盟。 注:WHATWG 指 Web Hypertext Application Technology Working Group。 ...
分类:
Web程序 时间:
2014-11-08 09:14:06
阅读次数:
160
期望DP的一般做法是从末状态開始递推:Problem DescriptionAkemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl).Homura wants to help her friend Madoka save the world....
分类:
其他好文 时间:
2014-11-07 18:51:47
阅读次数:
283
查找特定字符串并颜色显示
[root@fwq test]# grep -n 'the' regular_express.txt --color=auto
8:I can't finish the test.
12:the symbol '*' is represented as start.
15:You are the best is mean you are the no. 1.
16:The world is the same with "glad".
18:google is the...
分类:
系统相关 时间:
2014-11-07 17:08:59
阅读次数:
251
在eclipse中使用WindowsBuildes可以像在VS中一样,拖拽用户图形界面。离线安装包下载地址见:http://download.csdn.net/detail/liushuo_whu/8132231
使用方法见:http://www.blogjava.net/pengo/archive/2010/09/19/332482.html
开发界面如下图所示,选择绝对布局后,在palet...
分类:
编程语言 时间:
2014-11-07 17:06:37
阅读次数:
260