前面两篇与大家一起研究了unix下的文件系统,本篇将和大家一起分析 文件的属性和文件夹。ok,废话不说,先来段代码#include #include #include void do_ls(char[]); void main(int ac,char *av[]){ if(ac==1) do_...
分类:
编程语言 时间:
2014-07-08 23:48:51
阅读次数:
281
ios -11.main.m 应用程序主入口2.UIApplicationMain函数 为App提供主入口点创建新的应用程序实例和它的委托 ,委托负责处理应用程序状态变更,并为那些变更提供响应3.main() ---> 应用程序委托(AppDelegate) ----> 视图控制器(UIViewCo...
分类:
移动开发 时间:
2014-07-08 23:18:50
阅读次数:
257
以 alien_8.87.tar.gz 为例:下载、安装 alien_8.87.tar.gz [root@shyn ~]# wget http://ftp.de.debian.org/debian/pool/main/a/alien/alien_8.87.tar.gz [root@shyn ~...
分类:
系统相关 时间:
2014-07-08 23:14:47
阅读次数:
349
题目大意:求二进制的a加到b的进位数。思路:列出前几个2进制,找规律模拟。#include #include #include #include #include #include #include using namespace std;int main(){ int a,b,id; ...
分类:
其他好文 时间:
2014-07-08 22:58:23
阅读次数:
295
仔细研究我们的之前Makefile发现,我们还有改进的地方,就是此处:
target_bin : main.o debug.o ipc.o timer.o tools.o
>---gcc -o target_bin main.o debug.o ipc.o timer.o tools.o
如果增加一个源文件xx.c的话,需要在两处或多处增加xx.o文件。我们可以使用变量来解决这个问题。之前说...
分类:
其他好文 时间:
2014-07-08 19:51:12
阅读次数:
213
题目:给定一个整数数组,把最右端的元素作为基准,对这个数组进行整理,其中大于这个基准的元素放到它的右边,小于这个基准的元素放到它的左边。不得使用临时数组。
思路:先找一个大于基准的元素与基准进行交换位置,此时基准元素已经在数组的中部(不是最右/中间),从基准开始向后扫描,小于基准则交换。
public class ArrayPivot {
public static void main(St...
分类:
其他好文 时间:
2014-07-08 18:14:57
阅读次数:
166
public static void main(String[] args) {
/*普通对象与json相互转换*/
User u = new User("miquan", "000");
//{"@type":"testjava.User","password":"000","userName":"miquan"}
String jsonUser = JSON.toJSON...
分类:
Web程序 时间:
2014-07-08 16:38:47
阅读次数:
240
ZOJ 3406
Another Very Easy Task
#include
#include
const int N = 100005;
char s[N];
int main() {
bool f = 0;
int size = 0;
char ch;
while(scanf("%c", &ch)!=EOF) {
if( !(ch >= 'a' && c...
分类:
其他好文 时间:
2014-07-08 13:52:14
阅读次数:
265
Interesting enough to find out the Reader function in Safari is actually Javascript and there are many interesting stuff from the 2000 line code:
* 5 main parts in the file:
* 1. define const
* 2...
分类:
其他好文 时间:
2014-07-08 13:11:46
阅读次数:
469
官网看api,如何使用,对于第一次使用go语言的我略显吃力,嘿嘿,看了个demo就会了,而且超简单
package main
import (
"fmt"
. "github.com/qiniu/api/conf"
"github.com/qiniu/api/fop"//这个地方是坑,网上的api。如果下载下来,请改本地地址,这里是网络地址,而且官网没提示...