ITeye博客

把动态语言进行到底

xanderzhang · 共 22 篇文章

推荐一个rails做的英语学习网站

推荐一个rails实现的英语学习网站: - www.master.fm 后台使用rails2和rails3。 rails3 比之前的版本都强很多.

2011-06-30 14:03 · Ruby/rails · 评论(0)

Ruby on rails 实现的站点

网址 http://www.master.fm 欢迎大家多提意见 . .

2011-06-16 21:25 · Ruby/rails · 评论(0)

Tor on Ubuntu Lucid Lynx

Since Lucid Lynx is still in beta, tor isn’t packaged up at torproject.org yet but there is a PPA! https://launchpad.net/~sevenmachines/+archive/tor $ sudo add-apt-repository ppa:sevenmachines/tor $ sudo apt-get update $ sudo apt-get install tor vidalia privoxy firefox-torbutton To start it up with…

2010-08-04 14:17 · 网络-Programme · 评论(0)

redis 键值存取效率测试i

require "rubygems" require "redis" require "json" redis = Redis.new(:host => "localhost", :port => 6379) module AutoJ def auto_j h = {} instance_variables.each do |e| o = instance_variable_get e.to_sym h] = (o.respond_to? :auto_j) ? o.auto_j : o; end h end def to_json *a auto_j.to_json *a end end c…

2010-07-16 14:26 · Ruby/rails · 评论(0)

解决了一个wsgi非常棘手的问题

Hi, It is needed by the COM infrastructure. When you don't use threads this function call is needed too, but it is done by Python automatically. In a new thread before any COM call you have to call CoIniztialize. If I am right multiply CoInitialize call in the same thread doesn't cause any harm. So…

2009-09-11 01:45 · Python · 评论(0)

python 编码转换

http://www.pythonclub.org/python-basic/codec

2009-09-10 13:22 · Python · 评论(0)

Python字符串的encode与decode

首先要搞清楚,字符串在Python内部的表示是unicode编码. 因此,在做编码转换时,通常需要以unicode作为中间编码,即先将其他编码的字符串解码(decode)成unicode,再从unicode编码(encode)成另一种编码。 decode的作用是将其他编码的字符串转换成unicode编码, 如str1.decode('gb2312'),表示将gb2312编码的字符串转换成unicode编码。 encode的作用是将unicode编码转换成其他编码的字符串, 如str2.encode('gb2312'),表示将unicode编码的字符串转换成gb2312编码。 在某些IDE中,…

2009-09-10 10:09 · Python · 评论(0)

django + MySQL + flup + Nginx 的一些相关配置文件的备份

备份是一种安全策略 很大的一个问题是编码问题,全部utf-8 1.首先是/etc/mysql/my.cnf: The MySQL database server configuration file. You can copy this to one of: - "/etc/mysql/my.cnf" to set global options, - "~/.my.cnf" to set user-specific options. One can use all long options that the program supports. Run program with --help …

2009-09-09 15:22 · Python · 评论(0)

VNC 许可密匙

5D7L8-ZQXSA-2L5D4-4UFB4-PWDLA

2009-09-09 09:56 · 收藏 · 评论(0)

linux下面的时间设置

以前一直用date设置,这次参考网上资料,终于整了个全的。 Linux时钟分为系统时钟(System Clock)和硬件(Real Time Clock,简称RTC)时钟。系统时钟是指当前Linux Kernel中的时钟,而硬件时钟则是主板上由电池供电的时钟,这个硬件时钟可以在BIOS中进行设置。当Linux启动时,硬件时钟会去读取系统时钟的设置,然后系统时钟就会独立于硬件运作。 Linux中的所有命令(包括函数)都是采用的系统时钟设置。在Linux中,用于时钟查看和设置的命令主要有date、hwclock和clock。其中,clock和hwclock用法相近,只用一个就行,只不过clock…

2009-09-09 09:01 · 操作系统 · 评论(0)

http://wwwsearch.sourceforge.net/ClientCookie/

http://wwwsearch.sourceforge.net/ClientCookie/

2009-09-06 21:23 · Python · 评论(0)

一句话建立SMTP测试服务器

python -m smtpd -n -c DebuggingServer 0.0.0.0:25 from:http://initiative.yo2.cn/archives/636736

2009-09-06 17:33 · Python · 评论(0)

MyDownloadProgressBar.as

http://www.pixelbox.net/demos/downloadProgressBar/MyDownloadProgressBar.as package com.example.preloaders { import flash.display.Loader; import flash.display.Sprite; import flash.events.Event; import flash.events.ProgressEvent; import flash.events.TimerEvent; import flash.geom.Rectangle; import fla…

2009-08-27 23:04 · Flex · 评论(0)

Flex 中 如何使 progressbar 垂直

flex 中的一些细节真是很难 全部掌握 。 记下来 可能以后用的到 。 设置 routation 属性 为 90 即可 。

2009-08-12 14:05 · Flex · 评论(0)

restful_authentication 中 单元测试问题

The tests installed by restful_authentication encounter undefined-method errors, starting with "undefined method fixtures'" for the unit tests. The problem seems to be that the tests derive only from Test::Unit::TestCase, whereas the relevant methods are defined in ActiveRecord::TestCase and Action…

2009-07-16 10:11 · Ruby/rails · 评论(0)