在使用Laravel Eloquent模型时,我们可能要判断取出的结果集是否为空,但我们发现直接使用is_null或empty是无法判段它结果集是否为空的。 var_dump之后我们很容易发现,即使取到的空结果集, Eloquent仍然会返回Illuminate\Database\Eloquent\ ...
分类:
其他好文 时间:
2017-07-10 10:19:29
阅读次数:
191
#include<stdio.h> int numberOf1_solution1(int n)/*将一个正数以此向右移一位,与1做与运算。直到这个数为零*/ { int count = 0; while (n) { if (n&1) count++; n=n >> 1; } return coun ...
分类:
其他好文 时间:
2017-07-10 10:17:23
阅读次数:
137
eclipse使用快捷键: 1. 查找声明 : F3 ( 或者 Ctrl 加鼠标左键点击 ) 2. 头文件和源文件切换 . Ctrl +Tab 3. 查看类继承关系图 Ctrl +T 4. 查找源文件 Ctrl +Shift+R 5. 查找字段 Ctrl +H 6. 查找文件的函数或者全局变量 Ct... ...
分类:
其他好文 时间:
2017-07-10 10:17:12
阅读次数:
173
Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each process only has one parent process, but may have ...
分类:
系统相关 时间:
2017-07-10 10:14:01
阅读次数:
220
1 Endv.DataHelper myHelper = new Endv.DataHelper(); 2 DataSet ds = myHelper.GetDataSet("select * from Right"); 3 4 DataTable dt = ds.Tables[0]; 5 6 ..... ...
分类:
其他好文 时间:
2017-07-10 01:16:28
阅读次数:
240
今天项目中发现的一个问题: 在vue项目中输出一个数组,明明有俩个值:0,6,但是length为1 正常的是这样的 结果研究发现,是vue源码的问题,具体内容如下: 转载自:http://www.cnblogs.com/Darlietoothpaste/p/6682407.html Vue的数组操作 ...
分类:
编程语言 时间:
2017-07-10 01:13:06
阅读次数:
292
MyISAM存储引擎mysql系统表很多都用myisam引擎 生产场景: 引擎调优精要: query_cache_size=256Mquery_cache_limit=1Mquery_cache_min_res_unit=2K Innodb引擎: 生产场景: innodb_additional_me ...
分类:
数据库 时间:
2017-07-10 00:36:27
阅读次数:
303
//冒泡排序 function bubble_sort($arr){ $count = count($arr); for($i=0;$i$i;$j--){ if($arr[$j]"; $t3 = microtime(true); $a2 = quick_sort($a); $t4 = microti... ...
分类:
编程语言 时间:
2017-07-10 00:35:08
阅读次数:
241
react 组件方面: 总结 React 组件的三种写法 及最佳实践 [涨经验] React组件编写思路(一) 使用react-router实现单页面应用时设置页面间过渡的两种方式 【翻译】基于 Create React App路由4.0的异步组件加载(Code Splitting) React进阶 ...
分类:
其他好文 时间:
2017-07-09 23:58:40
阅读次数:
380
#ifndef __GPU_TIMER_H__ #define __GPU_TIMER_H__ struct GpuTimer { cudaEvent_t start; cudaEvent_t stop; GpuTimer() { cudaEventCreate(&start); cudaEvent ...
分类:
其他好文 时间:
2017-07-09 23:57:56
阅读次数:
754