码迷,mamicode.com
首页 >  
搜索关键字:array    ( 29504个结果
531. Lonely Pixel I
Given a picture consisting of black and white pixels, find the number of black lonely pixels. The picture is represented by a 2D char array consisting ...
分类:其他好文   时间:2017-03-07 09:00:25    阅读次数:160
4-7 PHP-务必使用带引号字符串做键值==php把没有引号的建当作常量产生常量开销
"hello world", "imooc"=>"http://baidu.com" ); echo $array[key]; //如果不用引号 输出的是http://baidu.com echo $array["key"]; //输出的是"hello world", ...
分类:Web程序   时间:2017-03-07 08:58:31    阅读次数:248
487. Max Consecutive Ones II
Given a binary array, find the maximum number of consecutive 1s in this array if you can flip at most one 0. Example 1: Note: The input array will onl ...
分类:其他好文   时间:2017-03-07 08:46:32    阅读次数:260
3-7 PHP内置函数之间的性能测试 microtime()测试isset()和array_key_exists执行时间
<?php header('Content-Type:text/html;charset=utf8'); $_start=current_time(); $array1=range(1000,2000); $i=0; while ($i<200000){ ++$i; // isset($array1 ...
分类:Web程序   时间:2017-03-07 08:44:45    阅读次数:206
3-5 PHP自身能力性能测试之代码测==== ab比内置函数和自定义函数性能
<?php $array1=array(); $array2=array(); for ($i=0;$i<rand(1000,2000);$i++){ $array1[]=rand(); } for ($y=0;$y<rand(1000,2000);$y++){ $array2[]=rand(); ...
分类:Web程序   时间:2017-03-07 08:27:30    阅读次数:160
使用五种以上方式获取一个文件的扩展名
要求:dir/upload.image.jpg,找出 .jpg 或者 jpg ,必须使用PHP自带的处理函数进行处理,方法不能明显重复,可以封装成函数,比如 get_ext1($file_name), get_ext2($file_name) 第一种: 第二种: 第三种: 第四种: 第五种: 第六种 ...
分类:其他好文   时间:2017-03-07 00:14:28    阅读次数:455
js-ES6学习笔记-Generator函数
1、Generator 函数是 ES6 提供的一种异步编程解决方案。形式上,Generator 函数是一个普通函数,但是有两个特征。一是,function关键字与函数名之间有一个星号;二是,函数体内部使用yield语句,定义不同的内部状态。 2、Generator函数的调用方法与普通函数一样,也是在 ...
分类:Web程序   时间:2017-03-06 22:07:40    阅读次数:191
分享js中的 sort 另一种用法
// 看上去正常的结果: ['Google', 'Apple', 'Microsoft'].sort(); // ['Apple', 'Google', 'Microsoft']; // apple排在了最后: ['Google', 'apple', 'Microsoft'].sort(); // ... ...
分类:Web程序   时间:2017-03-06 22:06:54    阅读次数:169
2017-3-6 leetcode 118 169 189
今天什么都没发生 leetcode118 https://leetcode.com/problems/pascals-triangle/?tab=Description leetcode169 https://leetcode.com/problems/majority-element/?tab=D ...
分类:其他好文   时间:2017-03-06 21:18:46    阅读次数:251
软件工程实验一
删除排序数组的重复数字 public class Solution { /** * @param A: a array of integers * @return : return an integer */ public int removeDuplicates(int[] nums) { // ...
分类:其他好文   时间:2017-03-06 20:44:49    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!