
Python/PHP/Perl
xin_wen
这个作者很懒,什么都没留下…
展开
-
使用这些Perl 函数控制数组和哈希
Perl 虽因其字符串处理能力而闻名,但是这并不意味着 Perl只能做字符串处理。这种语言还提供相当多的函数来处理和操纵其它的数据结构,其中包括很流行的数组和哈希。我们这篇文章展示了一些属于这一类的非常有用的函数,并简要解释了每个函数的工作方式以及使用它们的时机。函数解释示例scalar(@arr)这个函数将一个数组或哈希强迫解释成一个标量。当你原创 2005-10-06 13:01:00 · 3062 阅读 · 1 评论 -
Create thumbnail
//calculate thumb size $ow = imagesx($im); $oh = imagesy($im); $maxh = 100; $maxw = 150; $new_h = $oh; $new_w = $ow;原创 2006-03-24 17:30:00 · 1237 阅读 · 0 评论 -
Install PIL(Python Image Library) on Mac OSX 10.5
1. Install libjpeg curl http://www.ijg.org/files/jpegsrc.v6b.tar.gztar zxvf jpegsrc.v6b.tar.gzcd jpeg-6b/./configuremakesudo make install-libWhen you run make install-lib, probably youll get th原创 2009-04-03 15:05:00 · 1174 阅读 · 0 评论 -
使用Textmate编辑Mako模板
Textmate是Mac OS上,一个非常优秀的文本编辑器。目前的版本(1.5.7)默认并不支持mako,可以通过一下方法来添加对mako的支持。 cd ~/Library/Application Support/TextMate/Bundles, 如果TextMate目录下没有Bundles目录,则创建它。同理你可以 cd /Application/TextMate.app/Conten原创 2009-07-17 10:28:00 · 797 阅读 · 0 评论 -
Setting up Pinax development environment on Eclipse.
1. Install Pinax virtualenv is needed before install Pinax.download pinax, unpack it, install by:C:/> python scripts/pinax-boot.py /Users/pydev/pinaxpinax will be installed to C:/Users/pydev原创 2009-12-16 15:03:00 · 779 阅读 · 0 评论 -
Setup E-mail test environment for Pinax(django)
There’re 2 ways to do it, the first is sending the email out to an existing email address, the second is don’t actually send it, just print email out in your command line, which i原创 2010-03-02 10:46:00 · 1330 阅读 · 0 评论 -
Drupal theme pager not working
<br />Today i found one strange bug with drupal 6 pager_query implementation. When i write part of sql query in small letters like <br />$result = pager_query("SELECT * from {table1} where placementid = %d", 10, $pager_num, NULL, $vid);<br />and calling th原创 2010-08-21 00:13:00 · 859 阅读 · 0 评论