上一页 1 ··· 7 8 9 10 11
摘要: 在Ubuntu系统下执行命令:sudo apt-get install openssh-server然后,在Xshell中新建会话,输入Ubuntu系统的IP,以及用户名、密码。但是经常会出现连接失败的情况:网上查找原因之后,当出问题后执行命令:sudo service ssh restart可是好... 阅读全文
posted @ 2015-06-14 09:33 Acode 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 刚开始并未考虑越界的问题,以及当个位数是0时会造成程序的错误,经过仔细审视,AC代码:int reverse(int x){ int res = 0; int temp = abs(x); int flag = 0; if (x=0 && yu>=0) { ... 阅读全文
posted @ 2015-06-01 16:04 Acode 阅读(163) 评论(0) 推荐(0) 编辑
摘要: string CommonPrefix(string str1,string str2){ int len_1=str1.length(); int len_2=str2.length(); int min_len=len_1>len_2 ? len_2:len_1; str... 阅读全文
posted @ 2015-06-01 11:25 Acode 阅读(137) 评论(0) 推荐(0) 编辑
摘要: ListNode* removeElements(ListNode* head, int val){ if (head == NULL) return head; ListNode *p = head; while (p && p->val==val) ... 阅读全文
posted @ 2015-06-01 10:51 Acode 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 某些数据挖掘方法能够直接处理分类自变量,但很多数据挖掘方法都只能处理数值自变量,如线性回归、神经网络等,使用这些方法时就需要把分类自变量转换为数值自变量。对于定序自变量,最常用的一种转换是按各类别的序号直接将该变量转换为数值自变量。对于名义自变量,最常用的转换是将该变量转换为哑变量。例如,对于性别而... 阅读全文
posted @ 2015-04-26 15:54 Acode 阅读(2376) 评论(0) 推荐(0) 编辑
摘要: 今天打开百度首页,突然发现,百度的网址变为 https://www.baidu.com/,如下图:好嘛,以后再也不怕别人使用抓包工具查看我在百度的搜索数据了。当年的Duck Duck Go就是因为是https,还尝试过几次呢。现在百度也变为全站https了,但是对于HTTPS的认识仅仅局限于是:ht... 阅读全文
posted @ 2015-03-21 09:42 Acode 阅读(1970) 评论(0) 推荐(0) 编辑
摘要: 有时候我们需要把其他网站的链接爬取到自己网站,比如各种信息集成网站。有些网站会有防盗链的措施,我们无法“引用”他人链接(这种情况暂时不考虑),如果网站没有防盗链措施,那就恭喜了!但是,为了不让“被引用”网站管理者发现异常,我觉得还是把http中的referer给修改了,不让浏览器发送referer。... 阅读全文
posted @ 2015-03-15 19:39 Acode 阅读(2989) 评论(0) 推荐(0) 编辑
摘要: Referrer的重要性HTTP请求中有一个referer的报文头,用来指明当前流量的来源参考页。例如在www.sina.com.cn/sports/上点击一个链接到达cctv.com首页,那么就referrer就是www.sina.com.cn/sports/了。在Javascript中,我们可以... 阅读全文
posted @ 2015-03-15 19:14 Acode 阅读(21668) 评论(0) 推荐(0) 编辑
摘要: Python读取txt文件,有两种方式:(1)逐行读取1 data=open("data.txt")2 line=data.readline()3 while line:4 print line5 line=data.readline()(2)一次全部读入内存1 data=o... 阅读全文
posted @ 2014-11-17 22:16 Acode 阅读(9407) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11
您是本站第访问量位访问者!