1. synchronized
If two threads are using the same function( here we use output to print out string) of another instance, if we want to make sure that these two threads are not disturbing each other.
...
                            
                            
                                分类:
其他好文   时间:
2014-05-15 11:14:14   
                                阅读次数:
389
                             
                    
                        
                            
                            
                                /*
* hdu How many prime numbers
* date 2014/5/13
* state AC
*/
#include 
#include 
#include 
using namespace std;
bool isPrime(int x)
{
    int sqr=sqrt(x*1.0);
    for(int i=2;i<=sqr;i++)
    {...
                            
                            
                                分类:
其他好文   时间:
2014-05-15 05:07:18   
                                阅读次数:
261
                             
                    
                        
                            
                            
                                本文参考了以下地址的文章:
https://github.com/Centny/Centny/blob/master/Articles/How%20build%20github.com%3amattn%3ago-oci8.md?
一、安装oracle的OCI套件
1、OCI下载链接页面下载(instantclient-basic,instantclie...
                            
                            
                                分类:
数据库   时间:
2014-05-15 04:09:37   
                                阅读次数:
461
                             
                    
                        
                            
                            
                                Unique Binary Search Trees, Given n, how many structurally unique BST's (binary search trees) that store values 1...n?...
                            
                            
                                分类:
其他好文   时间:
2014-05-15 02:32:11   
                                阅读次数:
245
                             
                    
                        
                            
                            
                                戳我去解题You are climbing a stair case. It 
takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In 
how many distinct ways can you ...
                            
                            
                                分类:
其他好文   时间:
2014-05-15 01:55:06   
                                阅读次数:
251
                             
                    
                        
                            
                            
                                #1.清除规则iptables-F清除所有已订定的规则iptables-X杀掉所有使用者"自定义"的chain(应该说的是tables)iptables-Z将所有的chain的计数与流量统计都归零#2.设定政策iptables-PINPUTDROPiptables-POUTPUTACCEPTiptables-PFORWARDACCEPT#3~5.制订各项规则iptables-AINPUT-ilo-jA..
                            
                            
                                分类:
其他好文   时间:
2014-05-15 00:39:41   
                                阅读次数:
244
                             
                    
                        
                            
                            
                                HOWTO Use Python in the web — Python v3.0.1 
documentationmod_python?People coming from PHP often find it hard to grasp how 
to use Python in the web. T...
                            
                            
                                分类:
编程语言   时间:
2014-05-14 22:31:33   
                                阅读次数:
401
                             
                    
                        
                            
                            
                                http://blog.sina.com.cn/s/blog_69a4fbd70100rgkn.htmlhttp://developer.android.com/guide/topics/ui/how-android-draws.html
                            
                            
                                分类:
移动开发   时间:
2014-05-14 22:02:25   
                                阅读次数:
366
                             
                    
                        
                            
                            
                                ERROR1045(28000):Accessdeniedforuser‘root‘@‘localhost‘(usingpassword:YES)解决:1、先停止mysql服务,命令如下:#/etc/init.d/mysqlstop2、重新启动服务,命令如下:#/etc/init.d/mysqlstop#mysqld_safe--user=mysql--skip-grant-tables--skip-networking&3、登入mysql..
                            
                            
                                分类:
数据库   时间:
2014-05-14 16:36:13   
                                阅读次数:
368
                             
                    
                        
                            
                            
                                英文原文:How to Have a Meeting That Isn't a Complete Waste of Time
一场缺乏管理的会议可以浪费时间、体力与金钱,同时毫无生产力。 但这是可以避免的。 不管是您主持会议与否,您都可以照以下的建议这么作,同时建议您的团队,让团队合作更加顺利。
会前
每场会议都会有 3 W──When(何时)、who(对象)与 why(...
                            
                            
                                分类:
其他好文   时间:
2014-05-14 15:33:36   
                                阅读次数:
313