Posts filed under “Program”

Blog修改记录

最近有其他其他事要忙,修改工作稍微暂停一下,这里记录一下进度。。 1.添加了对Gravatar头像的支持 2.修改了footer的结构,加上最近回复 3.正文的font-size单位都调整为em,使用的字体都修改了一下 4.添加read more的样式 5.添加了一个留言板(功能部分尚未实现) 6.logo部分加上链接 7.部分图标和背景修改 修改计划 1.背景修改 2.留言板功能实现 3.single page样式修改 4.对pagenav的支持 5.若干个独立页面的制作

Udolpho v2.03的预告…

1.添加了对Gravatar头像的支持 2.修改了footer的结构,加上最近回复(感觉增加footer的高度时用户点击下一页和上一页会比较方便) 3.添加了对pagenav的支持 4.修改了一些细节的设计 5.添加中。。。。。 另外有许多有趣的插件正在研究当中,代码都写得七七八八了,剩下就是设计的问题了。(发布时间未知= =) 最近的事真多,杂七杂八的都挤一块,什么东西都要推迟,由于某个特殊原因还要重温忘得干干净净的sql、ror。啊,真希望这个月可以把所有的事都解决啊T.T

昨晚的JS心得。。

(风浦同学和系色望的loading图片,用AI重新描了遍,动态的迟点再弄。。) 昨天弄JS弄到5点才sleep -_-b 其实写代码的时间很少。。主要花的时间是搜索资料。。然后就是解决IE各个版本和FF的标准问题。 。 一些主要的事情还是记录一下: 1.图层移动的制作 鼠标偏移量的计算、父节点的移动、三个主要event(onmousemove、onmousedown、onmouseup)、clientX和clientY的IE和FF计算、触发事件对象的捕获 参考文章:http://www.webreference.com/programming/javascript/mk/column2/index.html webreference是一个很不错的网站,帮助偶解决了许多JS问题 效果演示:http://im.ceilwoo.cn 存在的问题:在FF中的transitional.dtd不能run。。期待达人解答疑惑。。 2.img的loading制作 img的onload、DOM操作 刚开始找资料的时候看到很多人都说检测readystate属性还有用opreadystatechange触发loading事件,弄了老半天还是没看懂。。。 哪有这些属性啊。。。还好有onload,但是用onload问题有出现了。。IE(#$^#$^$)中图片如果在缓存中,那么就不会触发onload事件,天哪。。。无奈只能在IE中用JS把相关图片的缓存禁掉。。。其他达人是怎么解决这个问题的呢? 效果演示:http://works.ceilwoo.cn 近段时间学习javascript的总结: 大部分时间是花在搜索资料上,T-T怎么认识的人没有一个是JS达人呢, 然后还要感谢一下的书籍 《JavaScript.The.Definitive.Guide.》 《Web Design with Javascript and Document Object Model》 《Professional Javascript for Web Developers》 hmm..三本极度经典的JS名著

Ruby FastCGI lighttpd mysql

#cd /usr/src #export PATH=”/usr/local/bin:/usr/local/sbin:$PATH” // 安装 readline #wget http://download.huihoo.com/ruby/readline-5.1.tar.gz #tar xzvf readline-5.1.tar.gz #cd readline-5.1 #./configure –prefix=/usr/local #make #sudo make install #cd .. // 安装 ruby #wget http://download.huihoo.com/ruby/ruby-1.8.4.tar.gz #tar xzvf ruby-1.8.4.tar.gz #cd ruby-1.8.4 #./configure –prefix=/usr/local –enable-pthread –with-readline-dir=/usr/local #make #sudo make install #cd .. |————————–| | RubyGems depends on zlib | |apt-get install zlib1g-dev|我使用yum install zlib1g-dev |————————–| [...]

Ruby读取天气预报

读取tq1**里深圳的天气预报,输出html 突然想玩玩erb模板就用多了几行代码。。 结果就不贴图了,就那么几个字,找到好看的天气图片再弄上去 #———————————————— #— You should install rubyful_soup gem first —- #———————————@ceilwoo——- require 'open-uri' weather=open('http://weather.tq121.com.cn/mapanel/index1_new.php?city=%C9%EE%DB%DA') require 'rubyful_soup' soup = BeautifulSoup.new(weather.read,:parse_only_these=>'td') today = “#{Time.now.day}日-#{Time.now.day.next}日” wt = soup.find(nil,:attrs=>{'class'=>'weather'}).string temperature = soup.find(nil,:attrs=>{'class'=>'weatheren'}).string require 'erb' html= ERB.new %q{ 深圳: } a=today b=wt c=temperature open('weather.html','w'){|File|File.puts(html.result(binding))}