nginx + unicorn 部署 rails 项目,顾名思义要先安装nginx和unicorn一 安装安装nginx: sudo apt-get install nginx安装unicorn: gem install unicorn二 配置1 在你项目的config文件夹下添加一个unicorn...
分类:
其他好文 时间:
2014-07-24 09:53:43
阅读次数:
257
public static string Str2Hex(string s) { string result = string.Empty; byte[] arrByte = System.Text.Encoding.GetEncoding("GB2312").GetBytes(s); for(in...
分类:
其他好文 时间:
2014-07-24 09:53:33
阅读次数:
304
MVC 即模型视图控制器(Model View Controller) 利于团队开发、便于管理与维护。代码易读性强。未来的主流开发框架结构。 当然,缺点也显而易见,与传统开发框架相比有很大的不同。需要抛弃以前的观念来进行学习。
分类:
Web程序 时间:
2014-07-24 09:53:23
阅读次数:
239
题目:Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2-....
分类:
编程语言 时间:
2014-07-24 09:53:16
阅读次数:
219
直接使用例如:http://www.abc.php?name=中文符 ,客户端调用,在服务端修改后,会出现乱码, 而windows phone 又不能直接支持gb2312, 经过大量分析和验证,发现 凡事 经过”从汉字转换到16进制”后, 即可成功实现转码,代码如下: string text = "...
分类:
其他好文 时间:
2014-07-24 09:52:43
阅读次数:
264
在PHP学习之中数组【1】中学会怎么创建一个数组,如果PHP学习之中数组【1】中的元素多的话,我们访问元素又是一个问题了,下面我们就使用for语句while,foreach来遍历我们的数组: 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] =.....
分类:
Web程序 时间:
2014-07-24 09:52:23
阅读次数:
208
A method and apparatus for managing remote devices. In one embodiment of the present invention, there is provided a method of managing a remote device...
分类:
其他好文 时间:
2014-07-24 09:52:13
阅读次数:
252
在PHP中数组的定义有三种写法,分别是: 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 [6] => 6 [7] => 7 [8] => 8 [9] => 9 [10] => 10 ) *///对于这个创建的这一组数组我们还可以指定他的步长;$...
分类:
Web程序 时间:
2014-07-24 09:52:03
阅读次数:
289
Apache 和 Tomcat 都是web网络服务器,两者既有联系又有区别,在进行HTML、PHP、JSP、Perl等开发过程中,需要准确掌握其各自特点,选择最佳的服务器配置。 Apache是web服务器(静态解析,如HTML),tomcat是java应用服务器(动态解析,如JSP、PHP) ...
分类:
其他好文 时间:
2014-07-24 09:51:43
阅读次数:
201
做过网页的人都知道,html表单控件十分重要。基本上我们注册会员、登录用户,都需要填写用户名、密码,那些框框都是表单控件。本来今天就想写一些常用的html表单控件,于是开始搜资料,找到了一个网页,作者的写作思路和我的基本相同,不过不足的是缺少效果图。我打算结合着这位仁兄的文章补充一下,增加一些...
分类:
Web程序 时间:
2014-07-24 09:51:33
阅读次数:
445
ZigZag ConversionThe string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern i...
分类:
其他好文 时间:
2014-07-24 09:51:13
阅读次数:
244
这个是去年遗留历史问题,之前思路混乱,搞了好多发都是WA,就没做了自从上次做了大白书上那个双重懒惰标记的题目,做这个就思路很清晰了跟上次大白上那个差不多,这个也是有一个sets标记,代表这个区间全部置为0或者1,没有置位的时候为-1还有个rev标记,代表翻转操作,0代表当前不翻,1代表当前翻要注意一...
分类:
其他好文 时间:
2014-07-24 09:50:13
阅读次数:
522
需要经常ssh到其它机器上,但如果每次都使用主机命名或ip地址,那挺难受的。这里有2个方法可以在ssh登陆时缩写(简写)主机名。1. 在~/.ssh中添加config文件[toughhou@hd1 ~]$ vi ~/.ssh/config#C3 HostHost hd1Hostname ...
分类:
其他好文 时间:
2014-07-24 09:50:03
阅读次数:
267
在我们用ArrayList类调用add或者remove方法后,特别要注意:此时ArrayList的对象的列表的元素个数以及指定索引位置的元素值已经发生了变化。下面我们举代码进行详细说明。调用remove方法后发生的的变化package personal.hushunfeng;/** * @autho...
分类:
其他好文 时间:
2014-07-24 09:49:53
阅读次数:
279
题目:Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->....
分类:
编程语言 时间:
2014-07-24 09:49:43
阅读次数:
204
http://www.cnblogs.com/lauleoi/p/3864309.htmlhttp://www.cnblogs.com/lauleoi/p/3864330.htmlhttp://www.cnblogs.com/lauleoi/p/3864329.htmlhttp://www.cnbl...
分类:
数据库 时间:
2014-07-24 09:49:23
阅读次数:
264
当界面上有 两个Button按钮 假设他们的id 分别为btn1 , btn2先让 Activity 实现接口 implements OnClickListener声明 两个 Button b1, Button b2在onCreate方法里 对应找到这两个 Buttonfindviewbyid......
分类:
移动开发 时间:
2014-07-24 09:49:03
阅读次数:
312