原文:ThinkPhp学习07简单CRUD操作 1 public function show() { 2 $m=M('User'); 3 4 // $arr=$m->find(2); //查找id=2的数据,find只能返回一条数据 5 //2.SELECT * FROM `tp_user` WHE...
                            
                            
                                分类:
Web程序   时间:
2015-06-24 01:58:19   
                                阅读次数:
141
                             
                         
                    
                        
                            
                            
                                原文:ThinkPhp学习08一、普通查询方式 a、字符串 $arr=$m->where("sex=0 and username='gege'")->find(); b、数组 1 // 2.SELECT * FROM `tp_user` WHERE ( `sex` = 0 ) AND ( `user...
                            
                            
                                分类:
Web程序   时间:
2015-06-24 01:54:26   
                                阅读次数:
129
                             
                         
                    
                        
                            
                            
                                Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right which minimizes the sum of all numbers along its path.Note: You can only move either down or right at any...
                            
                            
                                分类:
其他好文   时间:
2015-06-24 00:52:10   
                                阅读次数:
107
                             
                         
                    
                        
                            
                            
                                There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
                            
                            
                                分类:
其他好文   时间:
2015-06-24 00:43:01   
                                阅读次数:
99
                             
                         
                    
                        
                            
                            
                                1. Question找字符串数组的最长公共前缀,是所有字符串的。Write a function to find the longest common prefix string amongst an array of strings.2. Solution(O(mn))以第一个字符串作为前缀初值...
                            
                            
                                分类:
其他好文   时间:
2015-06-24 00:35:28   
                                阅读次数:
125
                             
                         
                    
                        
                            
                            
                                Leetcode 03 Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For e...
                            
                            
                                分类:
其他好文   时间:
2015-06-23 23:07:53   
                                阅读次数:
115
                             
                         
                    
                        
                            
                            
                                Leetcode 01 Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return in...
                            
                            
                                分类:
其他好文   时间:
2015-06-23 23:04:42   
                                阅读次数:
126
                             
                         
                    
                        
                            
                            
                                题目三: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters.For example, ...
                            
                            
                                分类:
其他好文   时间:
2015-06-23 22:59:27   
                                阅读次数:
112
                             
                         
                    
                        
                            
                            
                                条件操作符用于比较两个表达式并从mongoDB集合中获取数据。
MongoDB中条件操作符有:
(>) 大于 - $gt((>=) 大于等于 - $gte(
> db.new.find({"age":{$gt:22}})#查找age大于22的文档
> db.new.find({"age":{$lt:22}})#查找age小于22的文档
> db.new.find({"age":{$g...
                            
                            
                                分类:
数据库   时间:
2015-06-23 21:44:47   
                                阅读次数:
166
                             
                         
                    
                        
                            
                            
                                一、字符串替换str_replace("iwind", "kiki", "i love iwind, iwind said");将输出 "i love kiki, kiki said"str_replace(find,replace,string,count)参数 描述find 必需。规定要查找的值...
                            
                            
                                分类:
编程语言   时间:
2015-06-23 21:30:12   
                                阅读次数:
147