码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
封装一个函数来选择类名为某一个的节点
这个代码中学到了如果要返回一个数组,可以调用数组的push方法往里面添加。这次写的过程中注意到了哪些该打引号哪些不打。函数return的东西要用一个变量来保存,并不能直接用里面的那个aResult,里面那是一个局部变量。在用TagName选择子元素的时候,因为不知道子元素是什么,所以用了一个通配符来...
分类:其他好文   时间:2015-08-07 00:18:45    阅读次数:129
【LeetCode】168 - Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 ->...
分类:其他好文   时间:2015-08-07 00:15:02    阅读次数:121
php模式设计
1,策略模式2,个体模式3,工厂模式4,观察者模式 1 observers[] = $obj;17 }18 public function getExchangeRate()19 {20 return $this->exchange_rate;21 }...
分类:Web程序   时间:2015-08-07 00:13:23    阅读次数:170
[leedcode 217] Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the arr...
分类:其他好文   时间:2015-08-07 00:09:44    阅读次数:174
dedecms 调用所属栏目的二级栏目列表
include\taglib\channel.lib.php在 else if($type=='self') { if($reid==0) return ''; $sql = "SELECT id,typename,typedir,isdefault,ispa...
分类:其他好文   时间:2015-08-07 00:09:23    阅读次数:138
【LeetCode】171 - Excel Sheet Column Number
Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ...
分类:其他好文   时间:2015-08-07 00:08:19    阅读次数:142
hdu 1558:Segment set
简单的并查集的题目 最好自己写 看题解没意思 #include #include #include #include #define maxn 1111 using namespace std; float line[maxn][5]; int l; int fa[maxn]; int big[maxn]; int seek(int x) { return fa[...
分类:其他好文   时间:2015-08-06 22:36:11    阅读次数:133
[leetcode 241]Different Ways to Add Parentheses
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. The valid operators are+, - and *. Example 1 I...
分类:其他好文   时间:2015-08-06 22:34:50    阅读次数:377
leetcode_Sqrt(x)
描述: Implement int sqrt(int x). Compute and return the square root of x. 思路: 按题意来说是实现一个api方法,对整数开根号 1.用二分的方法来对一个整数开根号,每次循环求start和end之间的值mid来计算,若mid*mid>x,则end变为mid,若mid*mid 2.对于1中的思路有两个不足的地方,假如...
分类:其他好文   时间:2015-08-06 22:31:07    阅读次数:159
First Missing Positive
Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your algorithm should run in O(n) time and uses constant...
分类:其他好文   时间:2015-08-06 22:29:49    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!