$ gem sources --remove https://rubygems.org/ $ gem sources -a https://ruby.taobao.org/ $ gem sources -l *** CURRENT SOURCES *** https://ruby.taobao.org # 请确保只有 ruby.taobao.org $ gem install ra...
分类:
其他好文 时间:
2014-10-16 06:18:52
阅读次数:
158
#include?<stdio.h>
#include?<string.h>
#define?unsigned?int?u32
#define?MACSTR?"%02x:%02x:%02x:%02x:%02x:%02x"
#define?MACSTOL(a)??(a)[0],?(a)[1],?(a)[2],?(a)[3],?(a)[4],?(a)[5]
#d...
分类:
系统相关 时间:
2014-10-16 05:45:22
阅读次数:
281
本节取自part I chapter 2的后半部分,跳过了关于request与response具体交互设计细节内容。主要通过Flask-Script插件让读者对于插件系统有个简单认识。 Flask注重拓展性,社区里已经有很多插件可供选择,当然也可...
分类:
Web程序 时间:
2014-10-16 07:25:12
阅读次数:
267
上一篇写了打包脚本中设置安装时开机启动,这一篇写由node.js来控制程序是否随windows系统开机启动. ?首页在项目package.json中加入对windows-shortcuts的引用(手动下载地址https://github.com/j201/windows-sho...
分类:
Web程序 时间:
2014-10-16 05:28:22
阅读次数:
287
当浏览器发展到第四代时(IE4和Netscape Communicator 4),浏览器团队遇到一个很有意思的问题:页面的哪一部分会拥有特定的事件?想象下在一张纸上有一组同心圆,如果你把手指放在圆心上,那么你的手指指...
分类:
编程语言 时间:
2014-10-16 06:01:32
阅读次数:
210
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity...
分类:
其他好文 时间:
2014-10-16 05:43:32
阅读次数:
160
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:
其他好文 时间:
2014-10-16 06:33:22
阅读次数:
238
/** * Return whether the given throwable is a checked exception: * that is, neither a RuntimeException nor an Error. * @param ex the t...
分类:
编程语言 时间:
2014-10-16 06:49:52
阅读次数:
259
/** * Return whether the given throwable is a checked exception: * that is, neither a RuntimeException nor an Error. * @param ex the t...
分类:
编程语言 时间:
2014-10-16 06:16:22
阅读次数:
207
http://blog.csdn.net/liups/article/details/14646663一、首先是win8.1的安装本人选择的是win 8.1简体中文专业N版,文件名: cn_windows_8_1_pro_vl_x64_dvd_2791218.iso,SHA1:61C00255176...
题目链接:Uva 167思路: 八皇后问题,采用回溯法解决问题。代码:#include #include using namespace std;const int MAX_N = 10;int A[MAX_N];int M[MAX_N][MAX_N];int num, Max = 0;int i....
分类:
其他好文 时间:
2014-10-16 05:28:32
阅读次数:
164
我阅读的是《代码大全》(第二版)的中文版本,在阅读过程中有一些问题,有的在后续的阅读中得到了解决,有的通过查找资料和询问寻求解答。下面是问题的举例:从“代码大全”这个名字来看,这本书似乎是各种各样代码的集合,但是粗略翻了翻此书之后,我发现并非如我所想,那么这本书到底讲了些什么内容?“代码大全”这个书...
分类:
其他好文 时间:
2014-10-16 04:38:21
阅读次数:
165
很简单的递推题。d[n]=d[n-1]+d[n-k]注意每次输入a和b时,如果每次都累加,就做了很多重复性工作,会超时。所以用预处理前缀和来解决重复累加问题。最后一个细节坑了我多次:printf("%I64d\n",(s[b]-s[a-1]+mod)%mod);这句话中加mod万万不能少,因为理论上...
分类:
其他好文 时间:
2014-10-16 04:54:52
阅读次数:
168
AIX系统学习之--卸载软件错误系统环境:操作系统:AIX5.3.8Oracle:Oracle10gR2案例分析:HACMP安装失败,卸载hacmp出现以下错误:[root@aix213/]#smitremoveRemoveInstalledSoftwareTypeorselectvaluesinentryfields.PressEnterAFTERmakingalldesiredchanges.[EntryFields]*SOF..
分类:
其他好文 时间:
2014-10-16 03:20:02
阅读次数:
209
环境:centos6.5,mysql5.6.19问题:在用telnetl0.0.1.1203306数据库时,报错kHost‘l0.0.1.120‘isblockedbecauseofmanyconnectionerrors;unblockwith‘mysqladminflush-hosts‘Connectionclosedbyforeignhost.原因:是同一IP的connectionerrors超出默认的最大值了。解决方法1:重..
分类:
数据库 时间:
2014-10-16 05:16:32
阅读次数:
358
Ubuntu无法mount解决办法:mount:cannotmountblockdevice//10.0.0.2/mingread-only解决办法:$sudoapt-getinstallcifs-utils(或下载下来deb包安装)也可直接用下面方法解决(即mount命令中加入sec=ntlm)mounterror(13):Permissiondenied解决办法:在mount命令中加入sec=ntlm例..
分类:
系统相关 时间:
2014-10-16 04:59:12
阅读次数:
257
虚拟机linux扩展硬盘分原有硬盘上增加及新增硬盘,二者实现差不多。fdisk-l后显示为:/dev/sdb为新添加的硬盘;fdisk/dev/sda增加新分区按n,再按p,回车二次;再按w,保存后fdisk-l可看新分区,此时要重启重启后,将sda生成pvpvcreate/dev/sda4,再把把pv加到VG中vgextendvg_t..
分类:
系统相关 时间:
2014-10-16 03:35:42
阅读次数:
283