2017年8月9日
摘要:
在实现distcc客户端时,需要首先实现该功能dcc_expand_preprocessor_options,该函数对gcc的-wp参数进行了处理 查看linux的帮助手册可以看到 把后面的参数传给预处理,distcc的主要功能是,先在本地完成预处理,即展开头文件,然后发送到远端编译,远端编译完成后
阅读全文
posted @ 2017-08-09 01:05
xgcode
阅读(350)
推荐(0)
2017年8月8日
摘要:
1、distcc分为server端和client端,其中client端,是在执行make命令编译的时候调用,而server端,是程序接受client端的请求,完成编译的任务 在dameon.c中可以找到main函数,是server函数的入口 distccd_parse_options函数解析入参,d
阅读全文
posted @ 2017-08-08 00:27
xgcode
阅读(620)
推荐(0)
2017年8月6日
摘要:
在用go语言调用系统命令时,需要设置不确定多个参数时,可以采用如下技巧 其中,os.Args 本身就是strings的切片,采用这个方法可以直接把多个参数传入要执行的命令
阅读全文
posted @ 2017-08-06 22:09
xgcode
阅读(1293)
推荐(0)
2015年12月13日
摘要:
在学习python,看到一篇获取天气的python脚本,http://xianglong.me/article/get-city-weather-using-python-script/,这个太麻烦了,用beautifulsoup写了一个简单的脚本,# -*- coding: cp936 -*-i...
阅读全文
posted @ 2015-12-13 13:23
xgcode
阅读(441)
推荐(0)
2015年6月21日
摘要:
没想到哈希表insert插入是性能这么差,把哈希表该为数组后,运行时间减少了100msclass Solution {public: typedef pair Sdata; string intToRoman(int num) { Sdata pattern[] = { ...
阅读全文
posted @ 2015-06-21 13:54
xgcode
阅读(133)
推荐(0)
摘要:
class Solution {public: int romanToInt(string s) { int data[26] = {0}; data['I'-'A'] = 1; data['V'-'A'] = 5; data['X'-'A'] = 10; data['L'-'...
阅读全文
posted @ 2015-06-21 12:12
xgcode
阅读(130)
推荐(0)
2015年6月20日
摘要:
class Solution {public: enum { down = 0, up = 1, }; string convert(string s, int numRows) { string result; int index = 0; in...
阅读全文
posted @ 2015-06-20 11:07
xgcode
阅读(105)
推荐(0)
2015年5月31日
摘要:
class Solution {public: vector> result; vector> levelOrderBottom(TreeNode* root) { vector thisleveldata; vector topleveldata; if(root == N...
阅读全文
posted @ 2015-05-31 10:29
xgcode
阅读(95)
推荐(0)
2015年5月24日
摘要:
class Solution {public: int rowlen; int collen; bool searchMatrix(vector>& matrix, int target) { rowlen = matrix[0].size(); ...
阅读全文
posted @ 2015-05-24 16:12
xgcode
阅读(112)
推荐(0)
摘要:
class Solution {public: int findKthLargest(vector& nums, int k) { int index=0; int backindex = nums.size()-1, forindex = 0; while(1)...
阅读全文
posted @ 2015-05-24 15:31
xgcode
阅读(184)
推荐(0)