Could not find gem 'sqlite3 (>= 0) x64-mingw32' in any of the gem sources listed in your Gemfile or available on this machine. Run `bundle install` to install missing gems. 在 windows下搭建Ruby Rails Web...
分类:
数据库 时间:
2015-12-12 15:36:02
阅读次数:
482
1.ThinkPHP中实例化对象M()和D()的区别在实例化的过程中,经常使用D方法和M方法,这两个方法的区别在于M方法实例化模型无需用户为每个数据表定义模型类,如果D方法没有找到定义的模型类,则会自动调用M方法。通俗一点说:M实例化参数是数据库的表名。D实例化的是你自己在Model文件夹下面建立的...
分类:
Web程序 时间:
2015-12-12 09:41:35
阅读次数:
143
题目:Given an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Ass...
分类:
其他好文 时间:
2015-12-12 06:59:34
阅读次数:
210
(SELECT p.*,(SELECT CONCAT(m.name,m.id) FROM service_fastfix_category m WHERE m.id=SUBSTR(p.id,1,4)) AS parentcode,(SELECT GROUP_CONCAT(ee.name)FROM e...
分类:
其他好文 时间:
2015-12-11 22:18:19
阅读次数:
304
Linux中find常见用法示例·find path -option [ -print ] [ -exec -ok command ] {} \;find命令的参数;pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。-p...
分类:
其他好文 时间:
2015-12-11 20:47:08
阅读次数:
217
清理单个文件,可以这样:echo > myLog.log但是,如果我要清理一堆文件,比如在/logs目录下面的所有以.log结尾的文件的内容,而不删除文件,该如何操作呢?我一开始的语句是这样的:find /logs -name "*.log" -exec echo > {} \;但是,运行的结果是新...
分类:
系统相关 时间:
2015-12-11 18:43:13
阅读次数:
123
Given a 2D board and a word, find if the word exists in the grid.The word can be constructed from letters of sequentially adjacent cell, where "adjace...
分类:
其他好文 时间:
2015-12-11 12:59:39
阅读次数:
249
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.
According to the definition of LCA on Wikipedia: “The lowest common ancestor is defined
betw...
分类:
其他好文 时间:
2015-12-11 10:08:34
阅读次数:
137
获取当前select的选中值可以这样做:var osName = $("#selOsName").find("option:selected").val();或者直接var osName = $("#selOsName").val();实际测试好用建议第一个比较好。设置select选中某一值可以这样...
分类:
其他好文 时间:
2015-12-11 10:06:54
阅读次数:
143
4SumGiven an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target?Find all unique quadruplets in the array w...
分类:
其他好文 时间:
2015-12-11 06:51:55
阅读次数:
164