The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of gr...
                            
                            
                                分类:
其他好文   时间:
2014-05-07 06:10:17   
                                阅读次数:
370
                             
                         
                    
                        
                            
                            
                                题目
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
   1
         2
    /
   3
return [1,2,3].
Note: Recursiv...
                            
                            
                                分类:
其他好文   时间:
2014-05-07 03:30:19   
                                阅读次数:
254
                             
                         
                    
                        
                            
                            
                                这几天搞了一下Oracle数据库,可能用sql server习惯了,感觉好不方便。PL的界面友好度比sql server差远了 ,既然都收购了PL了
为什么不给它做好一点呢?各种不便。郁闷
向Oracle服务器插入一条数据
--不管什么格式通通用''引号引起来。不过INTEGER格式的还是别用引号
insert into T_SITE VALUES(
8, --注意主键别与表里的其他主键冲...
                            
                            
                                分类:
数据库   时间:
2014-05-07 03:24:59   
                                阅读次数:
319
                             
                         
                    
                        
                            
                            
                                SBJson包的下载地址在上一篇文章中。
可以使用NSDictionary中的键值对来拼接Json数据,非常方便,也可以进行嵌套,直接上代码:
    //开始拼接Json字符串
    NSDictionary *dataDictionary= [NSDictionary dictionaryWithObjectsAndKeys:@"mac",@"mac",
                ...
                            
                            
                                分类:
移动开发   时间:
2014-05-07 03:22:16   
                                阅读次数:
426
                             
                         
                    
                        
                            
                            
                                Maximum Weight Difference
Chef has gone shopping with his 5-year old son. They have bought N items so far. The items are numbered from 1 to N, and the item i weighs Wi grams.
Chef's son insist...
                            
                            
                                分类:
其他好文   时间:
2014-05-06 22:59:49   
                                阅读次数:
451
                             
                         
                    
                        
                            
                            
                                如果读到的是音频文件路径,需要先将音乐文件插入到多媒体库。如:path传入:/mnt/sdcard/mp3/a.mp3
//设置--铃声的具体方法      public void setMyRingtone(String path)      {         File sdfile = new File(path);        ContentValues values = new Co...
                            
                            
                                分类:
移动开发   时间:
2014-05-06 22:55:52   
                                阅读次数:
500
                             
                         
                    
                        
                            
                            
                                题目原文:
    Given n, how many structurally unique BST's (binary search trees) that store values 1...n?
For example,Given n = 3, there are a total of 5 unique BST's.
题目理解...
                            
                            
                                分类:
其他好文   时间:
2014-05-06 22:15:57   
                                阅读次数:
415
                             
                         
                    
                        
                            
                            
                                (1)、数据插入insert
语法:insertinto表名(字段名称1,字段名称2,n,)values(‘值1‘,‘值2‘,‘值3‘)
举例说明:
createtablegonda(
user_idint,
user_namevarchar(15),
oldint,
addressvarchar(50));
标准数据插入:
insertintogonda(user_id,user_name,old,address)
values(‘11..
                            
                            
                                分类:
数据库   时间:
2014-05-06 20:20:43   
                                阅读次数:
362
                             
                         
                    
                        
                            
                            
                                import java.awt.*; import javax.swing.*; class 
CalButtonPane extends JPanel { String[] keys = {"/","9","3","6","x","?","1", 
"7","2",",","!","5","...
                            
                            
                                分类:
其他好文   时间:
2014-05-06 18:10:07   
                                阅读次数:
258
                             
                         
                    
                        
                            
                            
                                MyEclipse设置自动提示一MyEclipse设置自动提示:1、快捷键提示代码window-->Preferences的General-->Keys下修改ContentAssist的快捷键为Alt+/,这样就可以通过快捷键得到提示代码.一般,快捷键默认就是Alt+/.2、自动提示window-->preferences的java->Editor->Co..
                            
                            
                                分类:
系统相关   时间:
2014-05-06 16:22:54   
                                阅读次数:
563