摘要:
yum install fcgi-devapt-get install libfcgi-dev 阅读全文
摘要:
网上有人发布的博客介绍说要使用z-index 必须设置 position:absolute;把我给害苦了。其实只需要设置position 属性即可。不需要关心它的值必须是 relative,absolute,fix ...告诫自己:网上发博客得注意点,尽量到可信度高的地方去查找信息,尽量避免查到这种... 阅读全文
摘要:
step 1 download tar.gz packagestep2 unpack tar -zxvf xxx.tar.gzstep3 cd ruby2.1.1.dirstep4 .configurestep5 makestep6 sudo make installstep7 remove 1.8... 阅读全文
摘要:
把之前的项目移除再重新启动即可。 阅读全文
摘要:
备份数据库:创建一个文件 :testDB.sql把文件的所有者和所有组改好: sudo chown postgres:postgres testDB.sql给文件赋予写权限: chmod 755 testDB.sql改变文件主: chown postgresql:postgresql testDB.... 阅读全文
摘要:
js阻止事件冒泡的DEMO最外层div上的onclick事件中间层div上的onclick事件最内层div上的onclick事件” 摘自: http://hxsdit.com/1246 阅读全文
摘要:
A server typically has more than one interface, at least one private and one public.Since all the answers here deal with this simple scenario, a cleaner way is to ask Socket for the current ip_address_list() as in:require 'socket'def my_first_private_ipv4 Socket.ip_address_list.detect{|intf| 阅读全文
摘要:
目前,无论是网页游戏、论坛博客、电子商场,随处都可以看到web聊天室。 web聊天室的实现方法有多种,包括:基于ajax技术的实现,基于Comet(Pushlet)技术的实现,基于XMPP协议的实现,以及基于flash的XmlSocket和远程共享对象的实现。 (1) 基于ajax技术的实现。 ajax(异步JavaScript和XML,Asynchronous javascript and xml),它的作用就是可以实现页面与服务器端的无刷新交互。用ajax来实现web聊天室的基本原理是:在页面上每隔一段时间就通过ajax从服务器中获取数据,然后更新页面显示。这种方法简单明了,缺点是实时性不 阅读全文
摘要:
#ruby数组可以容纳不同的对象,并且没有多维数组的概念#数组的定义===========a = Array.newa = Array.new(5) #创建 5个nil 元素的数组 [nil,nil,nil,nil,nil]a = Array.new(5,1) #创建5个 元素都是1的数组 [1,1,1,1,1]a = [] #创建一个空数组a = [1,"a",3,2]%w(one two three) #返回的是 ["one","two","three"]#数组小妙用: 利用数组并行赋值a,b,c,d = [1 阅读全文
摘要:
rails demo #create app called demoruby demo/script/server #start server#browser http://127.1:3000 to view you first app#创建一个 say 的控制器ruby demo/scr... 阅读全文