上一页 1 ··· 12 13 14 15 16
摘要: 1 public class MyThread extends Thread { 2 public static int i=0; 3 4 public static synchronized void test(int x){ 5 System.out.println(i+"::::"); 6 i=x+i; 7 } 8 9 public void run(){10 //the method is overwritten 11 // int i=0;12 whil... 阅读全文
posted @ 2013-05-11 10:09 Levi.duan 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 1 import java.util.Arrays; 2 4 public class Work { 7 public static void main(String[] args) { 8 int num[]=new int [10]; 9 // 扩容因子 为 20% 10 12 14 17 10 for(int i=0;i<100;i++){11 //***12 /**13 * 14 * 1.什么情况下需要扩容,什么情况不需要?15... 阅读全文
posted @ 2013-05-10 17:34 Levi.duan 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Python 发送微博 1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 4 from weibo import * 5 6 def press_sina_weibo(): 7 8 APP_KEY = 'XXXX' 9 APP_SECRET = 'XXXX'10 11 CALLBACK_URL = 'https://api.weibo.com/oauth2/default.html'12 13 client = APIClient(app_key=APP_KEY, app_secret=... 阅读全文
posted @ 2013-05-10 14:37 Levi.duan 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 最近,我的朋友斯考特·杨(Scott Young)成就了一个惊人的壮举:他在一年之内,完成了传说中的MIT计算机科学课程表的全部33门课,从线性代数到计算理论。最重要的是,他是自学的,观看在线教程讲座,并用实际的考试作自我评估。(到斯考特的FAQ页面,看看他如何完成这个挑战)按照他的进度,读完一门课程大概只需要1.5个星期。我坚信,能快速掌握复杂信息,对成就卓越事业至关重要。因此,我很自然地问起斯考特,让他给我们分享他的学习奥秘。所幸他答应了。接下来是一份斯考特的详细解说稿,深入剖析他的学习技巧(包括具体例子),展示他如何拿下这MIT挑战。以下时间交给斯考特……看我怎么驾驭MIT计算 阅读全文
posted @ 2013-05-09 08:26 Levi.duan 阅读(1502) 评论(0) 推荐(1) 编辑
摘要: Linux vi: 1 " F5编译和运行C程序,C++程序,Python程序,shell程序,F9 gdb调试 2 " 请注意,下述代码在windows下使用会报错,需要去掉./这两个字符 3 4 " <F5> 编译和运行C 5 map <F5> :call CompileRunGcc()<CR> 6 func! CompileRunGcc() 7 exec "w" 8 exec "!gcc % -o %<" 9 exec "! ./%<"10 endfu 阅读全文
posted @ 2013-05-08 07:45 Levi.duan 阅读(1140) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 3 /* count lines in input */ 4 int 5 main() 6 { 7 int c, pc; /* c = character, pc = previous character */ 8 9 /* set pc to a value that wouldn't match any character, in case10 this program is ever modified to get rid of multiples of other11 ... 阅读全文
posted @ 2013-05-02 15:31 Levi.duan 阅读(220) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <string.h> 3 #define MAX 1000 4 5 int p[MAX]; 6 int rank[MAX]; 7 void init(int n){ 8 int i; 9 // memset(rank, 0, sizeof(rank));10 for(i=1;i<n;i++) {p[i]=i;rank[i]=0;}11 }12 13 14 int find_root_digui(int x){15 if(x!=p[x])16 return p[x]=find_roo... 阅读全文
posted @ 2013-05-02 10:34 Levi.duan 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 写下需要看的书籍: 1.语言学习:《C程序设计语言(第2版·新版)》 2.算法和数据结构:《算法:C语言实现》、《算法导论》 3.系统编程: 1>《Windows 程序设计》和《Windows核心编程》 2>Unix/Linux下推荐两本书——《Unix高级环境编程》和《Unix网络编程卷1,套接字》《Unix网络编程卷2,进程间通信》 4.系统设计: 《Unix编程艺术》 需要C编程能力,通过SZOJ练习 。 SZOJ:http://acm.szu.edu.cn/wiki/index.php/Main_Page FIRST1: A34(funny),H22(fun... 阅读全文
posted @ 2013-04-26 23:13 Levi.duan 阅读(276) 评论(0) 推荐(0) 编辑
上一页 1 ··· 12 13 14 15 16