# Definition for a binary tree node# class
TreeNode:# def __init__(self, x):# self.val = x# self.left = None# self.right
...
分类:
其他好文 时间:
2014-05-05 22:56:23
阅读次数:
419
要在开发板上的Linux开机启动自己的程序,想着简单,却改了很久,绕了一圈下来确实很简单,只是自己一开始太过迂腐吧!
如果不想看完全文,这一段应该就够了,从我使用的开发板的角度讲,一般只要在/etc/init.d/rcS中加入你的程序或者脚本命令就可以实现开机自动运行;想在超级终端输入回车,登录后执行,则可以在/etc/profile中加入命令;如果想去掉每次开机完后的“Please press...
分类:
系统相关 时间:
2014-05-05 13:04:14
阅读次数:
525
不可变数组 ——NSArray常用的初始化一个数组: NSArray *array1 =
[[NSArray alloc] init]; NSArray *array2 = [NSArray array];
//对于上述两个方法,在NSArray中用的很少,因为这是一个空数组,它的值是不可...
分类:
其他好文 时间:
2014-05-05 11:25:12
阅读次数:
272
UIImagePickerController#pragma mark 从用户相册获取活动图片-
(void)pickImageFromAlbum{ imagePicker = [[UIImagePickerController alloc] init];
imagePicker.del...
分类:
其他好文 时间:
2014-05-04 10:41:38
阅读次数:
337
测试中出错出错一# ./helloworld
-qwsQWSServerSocket::init: Function not implementedQWSServerSocket: unable to
create socket.QWSServerPrivate::initServer: serve...
分类:
其他好文 时间:
2014-05-04 09:56:40
阅读次数:
322
转载请注明出处:
进入游戏开始界面效果图:
源码分析:
StartMenu场景--进入游戏开始界面
初始化场景,包括初始Android按键,添加背景图片,添加logo图片,创建游戏菜单开始/设置/关于并添加其响应事件,
初始化飞船漂移动画,背景音乐
程序分析:
bool StartMenu::init()
{
if ( !CCLayer::init() )
{...
分类:
其他好文 时间:
2014-05-04 09:49:15
阅读次数:
318
Python中怎么编写类
Last Edit 2013/5/2
先看一个例子:
#person.py
class person:
"""class to representaion a person"""
def __init__(self,name,age):
self.name=name
if 0<age<=150:
...
分类:
编程语言 时间:
2014-05-03 15:48:31
阅读次数:
390
http://acm.hdu.edu.cn/showproblem.php?pid=1228
分析:
我只是想练习一下map的用法,不然又忘了。。。
代码:
//hdu 1228
#include
#include
#include
#include
#include
using namespace std;
map d;
void init()...
分类:
其他好文 时间:
2014-05-03 15:40:58
阅读次数:
232
Linux服务器限制ssh登录,查看登录日志1.查看端口占用情况$sudosu
#lsof-i:<NUM>
netstat-apn|grep<NUM>2.修改默认端口号22/etc/ssh/sshd_configPort22最好先添加一个端口号,然后启用成功之后再关闭端口22。然后重启sshd:sudo/etc/init.d/sshrestart没有反应,使..
分类:
其他好文 时间:
2014-05-03 14:43:53
阅读次数:
403
1.安装samba包。2.开启samba/etc/init.d/smbstart#启动Samba服务器/etc/init.d/smbstop#关闭Samba服务器/etc/init.d/smbstatus#查看服务器状态在RedHatEnterpriseLinux下,输入:smbclient-L//localhost查看共享的文件等信息3.配置/etc/samba/smb.com写入要共享的目录及用户访问..
分类:
系统相关 时间:
2014-05-03 14:43:14
阅读次数:
581