- 博客(17)
- 资源 (1)
- 收藏
- 关注
原创 daily notes 2203
22Daily Notes:We had a nice day at school. We are sad to say goodbye to teacher Alice (her last day) but happy to say hello to teacher Julie who will be our new life teacher.We had fun cooking in the morning. Hope our Qing Tuan(sticky green balls wi.
2022-03-23 09:41:12
103
原创 ttttt
teddyatsatnetfootballbootsshortsteethtrainersponytailstripesshirtrooftopstrousers
2022-03-10 15:55:52
249
原创 tmp
空格 1.if, switch, case, for, do, while后有空格2.sizeof、typeof、alignof或者__attribute__这些关键字之后放空格。例如s = sizeof(struct file);3.不要在小括号里的表达式两侧加空格。4.指针靠近变量名 char *linux_banner; unsigned long long mem
2013-03-01 00:10:48
435
原创 数组溢出(1)
下面的程序段有什么问题?int i;int a[N];for(i = 0; i <= N; i++){ a[i] = 0}一眼就可以看出数组溢出了,但是这个程序还隐藏着一个难以察觉的问题。有可能造成死循环。为什么?内存地址递减”的方式分配内存==>a[N]的地址和i的地址相同==>i=0。
2012-07-30 10:01:21
366
原创 C语言就像菜刀一样
菜刀经常会切到手,但你想过要对它进行改进么?菜刀的好处在于它的简单,灵活性,但同时也很容易切到自己。厨师可以用它切出任意形状的菜。我们要的是把菜刀而不是一个食品处理机器。用好菜刀 ,需要不断的提高我们的技能。。
2012-07-30 09:54:58
912
原创 经典的“Hello world”
#includemain(){ printf("Hello worlld\n"); return 0;} 1.printf 中的'\n';2.return 0;main函数和其他函数一样,如果没有规定返回类型,默认返回类型为整形数据,如果没有写返回值,会返回任意数据,如果系统关注这个函数的返回值,会造成任意结果。
2012-07-30 09:31:17
382
原创 linux kill
kill(pid_t pid, 9);//9 尽快退出在另外一个进程里调用这个函数,杀掉另外一个进程,但是返回-1,不知道为什么会失败,怀疑是权限问题?? 返回值说明: 成功执行时,返回0。失败返回-1,errno被设为以下的某个值 EINVAL:指定的信号码无效(参数 sig 不合法) EPERM;权限不够无法传送信号给指定进程 ESRCH:参数 pid 所指定的进程或进程组不存在
2012-01-09 20:28:21
328
原创 get_pid_by_name
Linux 通过名字获得一个thread 的Pid,/proc中保存的所有thread的信息,可以通过ls看到,各个进程的目录以PID命名,/proc/PID/stat 文件记录了thread的信息,通过遍历这个文件,就可以通过名字找到对应的PID。stat文件中的内容:cat stat1400 (rild) S 1 1400 0 0 -1 4194560 288 9108 3 2 10 15
2012-01-09 20:06:27
1943
原创 init.rc 说明
1.如果自己添加一个service,在init时启动## Daemon processes to be run by init.##service [/path/.../threadname]一定要放在这个注释的后面,才能运行起来,不知道为什么。2.oneshot仅运行一次
2012-01-09 09:03:50
582
原创 [Android]read file examples
private String getStringFromFile(){ String getStringFromFile= ""; String cmdline = ""; String cmdline_path = "/sy
2011-08-06 18:11:16
682
原创 [Android]RIL的启动流程
RIL模块加载后,会主动上报:[UNSL]UNSOL_RESPONSE_RADIO_STATE_CHANGED {RADIO_OFF}Ril.java收到这个主动上报后会调用setRadioStateFromRILInt, setRadioStateFromRILI
2011-08-06 18:03:12
1557
1
原创 Linux Ubuntu ssh start
1. 首先在服务器上安装ssh的服务器端。$ sudo aptitude install openssh-server2. 启动ssh-server。$ /etc/init.d/ssh restart3. 确认ssh-server已经正常工作。$ netstat -tlptcp6 0 0 *:ssh *:* LISTEN -看到上面这一行输出说明ssh-server已经在运行了。
2011-05-05 17:23:00
357
原创 Linux samba set
sudo apt-get install sambasudo apt-get install smbfssudo apt-get install system-config-samba
2011-05-05 09:09:00
370
原创 Linux chang system PATH
<br />1.#PATH=$PATH:/home/user/Tool/gcc/bin<br />everytime logout PATH will recover<br />2.#vi /etc/profile<br />add PATH=$PATH:/home/user/Tool/gcc/bin<br />The best way change PATH,will never change except change the profile<br />3.#vi ~/.bash_profile<br
2011-04-25 14:17:00
382
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人