码迷,mamicode.com
首页 >  
搜索关键字:count    ( 18169个结果
lua队列实现
Queue = {} function Queue.newquene() return {count = 0} end function Queue.push(queue, value) queue.count = queue.count+1 ...
分类:其他好文   时间:2015-08-26 23:56:13    阅读次数:121
php 冒泡排序
1234567891011121314151617181920/*** 冒泡排序*/$list = Array(6,8,7,2,3,4,1);echo "排序前";print_r($list);function mao($arr){for($i=1,$len=count($arr);$i$arr[$...
分类:编程语言   时间:2015-08-26 19:36:20    阅读次数:139
简单四则运算表达式的java实现
思路: 1 将表达式转换成后缀表达式 2 利用栈计算后缀表达式/** * 计算数值 * @param text * @return */ public static int count(String text) { ...
分类:编程语言   时间:2015-08-26 19:13:11    阅读次数:132
优先队列C++实现和应用
#include #include using namespace std; //优先级队列数组元素的个数 const int MaxPQSize = 50; template class PQueue{     private:         int count;         T pqlist[MaxPQSize];     public:         PQueu...
分类:编程语言   时间:2015-08-26 18:00:31    阅读次数:321
sqlserver带输入输出存储过程
-- 创建存储过程 ALTER PROCEDURE dbo.abcd @inp int, -- 输入参数 @oup int output -- 输出参数 AS BEGIN declare @num int -- 定义变量 declare @numer int -- 定义变量 SELECT @num = count...
分类:数据库   时间:2015-08-26 17:55:39    阅读次数:167
TextWatcher限制字数,避免栈溢出
TextWatcher介绍 TextWatcher有三个方法: public void beforeTextChanged(CharSequence s, int start, int count, int after)  start :代表当前光标在第几个位置(编程语言中通常第一个是0),或者要从第几个位置开始插入  after :代表本次要插入几个位置  count :不明确...
分类:其他好文   时间:2015-08-26 17:55:28    阅读次数:122
php二维数组添加元素
有两个二维数组,想把其中一个数组总的元素添加到另一个数组元素之中 for($i=0;?$i?<?count($playerrecharge_list);?++$i){ ????????????$playerrecharge_list[$i][‘nummoney‘]?=?$nummoney[$...
分类:编程语言   时间:2015-08-26 15:55:42    阅读次数:193
【剑指offer】七,二进制表示中1的个数
题目描述输入一个整数,输出该数二进制表示中1的个数。其中负数用补码表示。1 public class Solution {2 public int NumberOf1(int n) {3 int count = 0 ;4 while(n!=0){5 ...
分类:其他好文   时间:2015-08-26 13:45:05    阅读次数:138
LeetCode(38) Count and Say
题目The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, …1 is read off as “one 1” or 11. 11 is read off as “two 1s” or 21. 21 is read off as “one 2, t...
分类:其他好文   时间:2015-08-26 12:06:56    阅读次数:123
php中有关合并某一字段键值相同的数组合并
$v){ if($v[$key]==$start){ $new[$v[$newkey]][] = $v; unset($array[$k]); continue; } } sort($array); if(count($array)!==0){ ...
分类:编程语言   时间:2015-08-26 11:54:57    阅读次数:173
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!