Linux
AledaLee
个人博客已经迁移到了https://sites.google.com/site/lishuo02wiki/,主要是一些技术的分享,有需要的可以访问。
展开
-
Singleton
#include using namespace std; /* 考虑多线程的Singleto实现方式,用局部静态变量也可以实现单例模型。单例模型就是解决创建对象时,只用维护一个对象的情况。 */ class Singleton { public: static Singleton* getInstance(); //静态函数 private: Singleton(); vir原创 2014-04-12 13:46:50 · 637 阅读 · 0 评论 -
解题报告
#!/bin/bash 2 3 #function: crawl the webpage, and get urls 4 #data: 2015/5/19 5 #author: Aleda 6 7 #$1 is the website 8 9 function curlLinks() 10 { 11 for ((i=0; i<63; i++原创 2014-05-20 20:04:18 · 1194 阅读 · 0 评论