上一页 1 2 3 4 5 6 ··· 9 下一页
  2013年7月12日
摘要: 列出表名直接 \d 不加参数或SELECT tablename FROM pg_tablesWHERE tablename NOT LIKE 'pg%'AND tablename NOT LIKE 'sql_%'ORDER BY tablename;列出数据库名\l或SELECT datname FROM pg_database;切换数据库\c 数据库名 阅读全文
posted @ 2013-07-12 11:55 宇睿 阅读(6975) 评论(0) 推荐(0) 编辑
  2013年7月11日
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 class Egalitarianism 7 { 8 public: 9 void DFS(vector &v,int p,char flag[]) 10 { 11 int i,j; 12 for (i=0;i v) 25 { 26 char flag[50]; 27 int i,j; 28 memset(flag,0,50);... 阅读全文
posted @ 2013-07-11 18:14 宇睿 阅读(240) 评论(0) 推荐(0) 编辑
  2013年7月10日
摘要: 1 #include 2 #include 3 using namespace std; 4 5 6 7 class SwappingDigits 8 { 9 public:10 bool notBiggest(string &s,int pos)11 {12 int len=s.length();13 int i=0;14 for (i=pos+1;ipos;i--)30 {31 if (s[i]>s;64 cout<<sol.minNumber(s)<<end... 阅读全文
posted @ 2013-07-10 17:59 宇睿 阅读(178) 评论(0) 推荐(0) 编辑
  2013年7月4日
摘要: The Data Cannot be displayed,there is no viewpoint available for data1. In a console, run your application without VTune(TM) Amplifier XE - does it work smoothly?2. In same console, run "/opt/intel/vtune_xe_2013/amplifier-var.sh"3. Run "amplxe-cl -collect hotspots -- app" or &quo 阅读全文
posted @ 2013-07-04 17:57 宇睿 阅读(461) 评论(0) 推荐(0) 编辑
摘要: 将一个用户添加到用户组中,千万不能直接用:usermod -G groupA这样做会使你离开其他用户组,仅仅做为 这个用户组 groupA 的成员。应该用 加上 -a 选项:usermod -a -G groupA user(FC4: usermod -G groupA,groupB,groupC user)-a 代表 append, 也就是 将自己添加到 用户组groupA 中,而不必离开 其他用户组。命令的所有的选项,及其含义:Options:-c, --comment COMMENT new value of the GECOS field-d, --home HOME_DIR new 阅读全文
posted @ 2013-07-04 17:32 宇睿 阅读(416) 评论(0) 推荐(0) 编辑
  2013年7月1日
摘要: 1 dd if=/dev/zero of=file1.img bs=1k count=10000 2 dd if=/dev/zero of=file2.img bs=1k count=10000 3 dd if=/dev/zero of=file3.img bs=1k count=10000 4 5 losetup /dev/loop1 file1.img 6 losetup /dev/loop2 file2.img 7 losetup /dev/loop3 file3.img 8 9 mkfs -t ext4 /dev/loop110 mkfs -t ext4 /dev/loop211... 阅读全文
posted @ 2013-07-01 19:25 宇睿 阅读(867) 评论(0) 推荐(0) 编辑
  2013年6月10日
摘要: // 20ms 1 struct Node 2 { 3 int num; 4 int pos; 5 }; 6 bool cmp(const Node &a,const Node &b) 7 { 8 return a.num<b.num; 9 }10 class Solution {11 public:12 vector<int> twoSum(vector<int> &numbers, int target) {13 // Start typing your C/C++ solution below14 // DO NOT w... 阅读全文
posted @ 2013-06-10 15:42 宇睿 阅读(141) 评论(0) 推荐(0) 编辑
  2013年6月7日
摘要: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *next; 6 * ListNode(int x) : val(x), next(NULL) {} 7 * }; 8 */ 9 class Solution {10 public:11 ListNode *mergeTwoLists(ListNode *l1, ListNode *l2) {12 // Start typing your C/C+... 阅读全文
posted @ 2013-06-07 20:36 宇睿 阅读(151) 评论(0) 推荐(0) 编辑
摘要: // 8ms 1 class Solution { 2 public: 3 string addBinary(string a, string b) { 4 // Start typing your C/C++ solution below 5 // DO NOT write int main() function 6 reverse(a.begin(),a.end()); 7 reverse(b.begin(),b.end()); 8 int c=0; 9 string s;10 ... 阅读全文
posted @ 2013-06-07 16:48 宇睿 阅读(126) 评论(0) 推荐(0) 编辑
摘要: // 12ms 1 class Solution { 2 public: 3 int numTrees(int n) { 4 // Start typing your C/C++ solution below 5 // DO NOT write int main() function 6 int *f=new int[n+1]; 7 int i,j,sum; 8 f[0]=f[1]=1; 9 if(n<2)10 return 1;11 for(i=2... 阅读全文
posted @ 2013-06-07 10:14 宇睿 阅读(131) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页