博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年11月16日

摘要: 前言:多对多关系至少需要3个表,我们把一个表叫做主表,一个叫做关系表,另外一个叫做字典表或者副表(字典表是纪录比较少,而且基本稳定的,例如:版块名称;副表是内容比较多,内容变化的,例如)。 阅读全文

posted @ 2012-11-16 15:56 |orz 阅读(295) 评论(0) 推荐(0) 编辑

2012年11月13日

摘要: MySQL執行順序如下 1.FROM 2.ON 3.JOIN 4.WHERE 5.GROUP BY 6.WITH CUBEor WITH ROLLUP 7.HAVING 8.SELECT 9.DISTINCT 10.ORDER BY 11.TOP / LIMIT 阅读全文

posted @ 2012-11-13 16:44 |orz 阅读(302) 评论(0) 推荐(0) 编辑

2012年3月12日

摘要: 1.git处于master这个branch下时,默认的remote就是origin; 2.当在master这个brach下使用指定remote和merge的git pull时,使用默认的remote和merge。 但是对于自己建的项目,并用push到远程服务器上,并没有这块内容,需要自己配置。 阅读全文

posted @ 2012-03-12 11:28 |orz 阅读(382) 评论(0) 推荐(0) 编辑

2012年1月6日

摘要: 几年以前,Charles Simonyi(他后来成为微软的著名程序员)设计了一种以前缀为基础的命名方法,这种方法后来称为"匈牙利表示法"以记念他.他的思想是根据每个标识符所代表的含义给它一个前缀.微软后来采用了这个思想,给每个标识符一个前缀以说明它的数据类型.因此,整型变量的前缀是n,长整型变量是nl,字符型数组变量是ca,以及字符串(以空类型结尾的字符数组)以sz为前缀.这些名字可能会非常古怪.比如说:lpszFoo表示"Foo"是一个指向以空字符为结尾的字符串的长整型指针. 阅读全文

posted @ 2012-01-06 21:07 |orz 阅读(624) 评论(0) 推荐(0) 编辑

2011年11月5日

摘要: Qt namespace Ui 阅读全文

posted @ 2011-11-05 19:24 |orz 阅读(2184) 评论(0) 推荐(1) 编辑

摘要: 城门失火殃及池鱼   pImpl惯用手法的运用方式大家都很清楚,其主要作用是解开类的使用接口和实现的耦合。   如果不使用pImpl惯用手法,代码会像这样: 阅读全文

posted @ 2011-11-05 19:03 |orz 阅读(473) 评论(0) 推荐(1) 编辑

2011年9月20日

摘要: //: concurrency/CriticalSection.java // Synchronizing blocks instead of entire methods. Also // demonstrates protection of a non-thread-safe class // with a thread-safe one. //package concurrency; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.*; 阅读全文

posted @ 2011-09-20 16:27 |orz 阅读(767) 评论(1) 推荐(0) 编辑

2011年4月2日

摘要: Author:peterurl:http://www.mysqlperformanceblog.com/2006/07/12/insert-into-select-performance-with-innodb-tables/Everyone using Innodb tables probably got use to the fact Innodb tables perform non locking reads, meaning unless you use some modifiers such as LOCK IN SHARE MODE or FOR UPDATE, SELECT s 阅读全文

posted @ 2011-04-02 15:57 |orz 阅读(548) 评论(0) 推荐(0) 编辑

2011年3月22日

摘要: How to kill ruby on rails WEBrick server daemonI have been running a rails app on a machine, which I can’t restart (no root access) or physically pull the plug on, just using the prepackaged rails server, WEBrick. But I quickly found out that it was not that easy tokillmy app. I’d run something like 阅读全文

posted @ 2011-03-22 17:48 |orz 阅读(333) 评论(0) 推荐(0) 编辑

摘要: 1 # Hash#deep_merge 2 # From: http://pastie.textmate.org/pastes/30372, Elliott Hird 3 # Source: http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html 4 # This file contains extensions to Ruby and other useful snippits of code. 5 # Time to extend Hash with some recursive merging magic. 6 7 8 class . 阅读全文

posted @ 2011-03-22 09:52 |orz 阅读(301) 评论(0) 推荐(0) 编辑