码迷,mamicode.com
首页 >  
搜索关键字:return array    ( 86705个结果
pl/sql 函数及与存储过程的区别
函数用于返回特定的数据,当建立函数时,在函数头部必须包含return子句。而在函数体内必须包含return语句返回的数据。我们可以使用create function来建立函数。1)、接下来通过一个案例来模拟函数的用法--输入雇员的姓名,返回该雇员的年薪CREATE FUNCTION annual_i...
分类:数据库   时间:2014-05-10 00:53:59    阅读次数:331
排序算法学习之归并排序
1. 归并排序原理:有长度为n的子序列a[n],可以将其看做n个长度为1的子序列,将相邻子序列两两归并后子序列数量减少一半,再对子序列进行两两归并,数量又减少一般,重复直到得到一个长度为n的子序列2. 实现归并操作的代码如下:/*array[s…m]和array[m+1…t]均已各自有序,合并使得a...
分类:其他好文   时间:2014-05-10 00:28:40    阅读次数:382
【LeetCode】Best Time to Buy and Sell Stock II
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a...
分类:其他好文   时间:2014-05-10 00:24:49    阅读次数:255
return 与 yield return 的区别
昨晚虽睡得不怎么样,今天居然有点儿“顿悟”的感觉。yield似乎在枚举器里看过,但没什么印象了,各种搜索一通,很多是转的,还长篇大论的很多文字,不知怎么有不想看下去的感觉,喝了杯咖啡,抬头看着屏幕,突然觉得我也顿悟了:不同点总结如下: 1) 返回值类型不同: a) return 返回其后...
分类:其他好文   时间:2014-05-10 00:15:44    阅读次数:243
google 搜索不跳中间页
Array.prototype.slice.call(document.links,0).forEach(function(link){link.onmousedown = null})插件总失效 用这个对付下
分类:其他好文   时间:2014-05-10 00:15:19    阅读次数:250
boost::function实践——来自《Beyond the C++ Standard Library ( An Introduction to Boost )》
代码段1: 1 #include 2 #include 3 4 5 float mul_ints(int x, int y) { return ((float)x) * y; } 6 struct int_div { 7 float operator()(int x, int y)...
分类:编程语言   时间:2014-05-09 23:38:56    阅读次数:487
webdriver 窗口切换
1.通过浏览器的句柄来操纵窗口,得到句柄的方法 public String getWindowHandle(){ String currentWindow = driver.getWindowHandle(); return currentWindow; } 2.切换到最新的窗口 pub...
分类:Web程序   时间:2014-05-09 23:27:19    阅读次数:406
Leetcode | N-Queens I & II
N-Queens IThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return a...
分类:其他好文   时间:2014-05-09 20:34:01    阅读次数:335
jquery自己手写表单验证
/*验证邮箱格式*/ function checkEmail(strEmail){ if(!/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/ .test(strEmail)){ return false; } else ...
分类:Web程序   时间:2014-05-09 20:02:19    阅读次数:482
排序算法学习之简单排序(冒泡排序,简单选择排序,直接插入排序)
一、冒泡排序冒泡排序算是最基础的一种算法了,复杂度为O(N^2),其基本思想是:从最低端数据开始,两两相邻比较,如果反序则交换。代码如下:/*最基本的冒泡排序*/void BubbleSort1 (int n, int *array) /*little > big*/{ int i, j...
分类:其他好文   时间:2014-05-09 13:02:57    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!