Category Archives: Technologies

上一篇/下一篇

文章页面 article.php?id=5 1234567891011121314151617<?php $id = $_GET[’id’]; // 查询文章内容 $article_sql = "SELECT * FROM `article` WHERE `id` = {$id}"; // 略 // 查询上一篇文章的ID $prev_id_sql = "SELECT `id` FROM `article` WHERE `id` < {$id} limit 1"; // 略 echo "<a href=\"article.php?id={$prev_id}\">上一篇</a>"; // … Continue reading

Posted in Technologies | Tagged | 3 Comments

Ubuntu 下 Objective-C 开发环境

装一堆东西先 1sudo apt-get install build-essential gnustep gobjc gnustep-make libgnustep-base-dev gnustep-devel 编辑 .bashrc 加入 1234#set GNUstep GNUSTEP_ROOT=/usr/share/GNUstep export GNUSTEP_ROOT source /usr/share/GNUstep/Makefiles/GNUstep.sh 写段小程序测试下: 建个目录 test 1mkdir test 创建文件hello.m,内容如下 12345678910111213141516171819202122232425262728293031323334#include <stdio.h> /* * The next #include line is generally present in all Objective-C … Continue reading

Posted in Technologies | Tagged , | Leave a comment

ubuntu上自动安装windows TTF字体

有时候你错失了网页上好看的字体,有时候你想作点设计,或者你想把什么东西弄的漂漂点。可是,大多数字体都是truetype格式的,这种格式在ubuntu上使用起来有点小问题。 当然了,在ubuntu上安装TTF字体也不是很复杂,但在你要安装字体的时候总是重复的做这些工作是很无聊的。这也是我为什么要用C写这个小应用程序的原因,它把这一切操作全包了。 首先从 这里 下载。然后解压,打开终端,用cd命令进入解压出来的目录。 在这个目录里执行 1sudo cp ttfinstall /bin/ 现在 ttfinstall 在你的系统里了,现在你安装字体就要方便的多了,我们来试试看:

Posted in Technologies | Tagged , , | 4 Comments

QeePHP 针对复杂的表单手写 Form view

如果在项目里能统一表单的样式布局肯定是最好的了,可能你只需要定义一两个general_form_element.php放在_element 里,view里调用< ?php $this->_element(‘general_form’, array(‘form’ => $form)); ?>就可以了 但很多时候表单复杂了,布局改变了你就得去改general_form_element.php,而改了这个文件又会影响其他表单,当你不想为这个特殊的表单创建一个_element,那就手写吧 说明:这不符合 qeephp 的思想,不推荐

Posted in Technologies | Tagged , , | 2 Comments

The repository for Debian-based LAMP servers

Ubuntu 源里的 php 版本版本过低?更新太慢?懒得自己编译? 没关系,dotdeb 就是干这事的。 About Dotdeb is a repository containing many packages for the Debian stable (aka ”Etch”) distribution : PHP versions 4 & 5 and many of their PECL extensions, MySQL versions 5.0 and 5.1, Qmail, Vpopmail… … Continue reading

Posted in Technologies | Tagged , , | Leave a comment