STEP1: Open Terminal
SETP2: Run setup.py
SETP3: Run source /Users/your_user/.bash_profile( so that environment variables are actually updated)
SETP4: Run cocos new my game -p com.your_company.mygame -l cpp -d /diretory_to_your_game
Open Terminal
R...
分类:
其他好文 时间:
2014-06-16 12:22:35
阅读次数:
178
在java中可有两种方式实现多线程,一种是继承Thread类,一种是实现Runnable接口;Thread类是在java.lang包中定义的。一个类只要继承了Thread类同时覆写了本类中的run()方法就可以实现多线程操作了,但是一个类只能继承一个父类,这是此方法的局限,
下面看例子: pack....
分类:
其他好文 时间:
2014-06-16 07:15:16
阅读次数:
221
报错的代码为protected void buttonPressed(int buttonId) {Display.getDefault().syncExec(new Runnable() { public void run() { localpmtsStreamViewsAction.r...
tomcat 有错误时 启动startup.bat一闪就退出的解决办法
打开 startup.bat 文件 最后 把start 改为run...
分类:
其他好文 时间:
2014-06-15 17:26:33
阅读次数:
242
经过大牛同事的一句指点立刻明白的代理实现方式,Spring Aop应该也是这么去做的。直接上代码
实现在Car的run方法之前调用star方法,在run方法之后调用stop方法。
Car类
package com.lubby.test;
public class Car {
public void run() {
System.out.println("I am running......
分类:
编程语言 时间:
2014-06-15 08:48:20
阅读次数:
240
java定时器的使用定时器类Timer在java.util包中。使用时,先实例化,然后使用实例的schedule(TimerTask task, long delay)方法,设定指定的任务task在指定的延迟delay后运行。定时器任务类TimerTask是抽象类,继承并重写其run()方法,可实....
分类:
编程语言 时间:
2014-06-14 21:47:18
阅读次数:
300
题目
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
原题链接(点我)
解题思路
这题和Search in Rotated Sorted Array问题类似,...
分类:
其他好文 时间:
2014-06-14 12:44:18
阅读次数:
266
1、继承Thread类,实现run方法
class TestThread
{
public static void main(String[] args)
{
Thread1 t1=new Thread1();
t1.start();
int index=0;
while(true)
{
if(index++==500)
{
t1.stopThread...
分类:
编程语言 时间:
2014-06-14 10:25:58
阅读次数:
317
To make a Scheduled Task run in the background, change the User running
the task to "SYSTEM",
and nothing will appear on your screen....
分类:
移动开发 时间:
2014-06-14 09:33:39
阅读次数:
395
Fabric是Python的远程SSH命令行工具,常用来实现服务远程管理及持续化部署。最近需要在集群中执行离线任务,在官方文档中有例子:
run("nohup yes >& /dev/null < /dev/null &")...
分类:
其他好文 时间:
2014-06-14 00:44:28
阅读次数:
333