CoomonJS modules provide a clean syntax for importing dependencies. This lesson will take a look at the basics of using CommonJS modules.app.jsvar dep...
分类:
Web程序 时间:
2014-12-09 07:05:40
阅读次数:
230
使用MongoDB需要对文档结构进行合理的设计,以满足某些特定需求。比如随机选取文档,使用skip跳过随机个文档就没有在文档中加个随机键,
然后使用某个随机数对文档进行查询高效,随机键还能添加索引,效率更高。合理选择,合理设计。import java.net.UnknownHostException;
import java.util.Date;
import java.util.List;
...
分类:
数据库 时间:
2014-12-08 12:25:58
阅读次数:
269
阻塞队列提供了可阻塞的 put 和 take 方法,以及支持定时的 offer 和 poll 方法。如果队列已经满了,那么put方法将阻塞直到有空间可以用;如果队列为空,那么take方法将一直阻塞直到有元素可用。队列可以使有界的,也可以是无界的,无界队列永远都不会充满,因此无界队列上的put方法永远不会阻塞。一种常见的阻塞生产者-消费者模式就是线程池与工作队列的组合,在 Executor 任务执行框架中就体现了这种模式。
意义:该模式能简化开发过程,因为他消除了生产者和消费者类之间的代码依赖性,此外,该模式...
分类:
编程语言 时间:
2014-12-06 21:37:31
阅读次数:
341
1.Partitioning 分区Take例1:取前3个数 1 static void Linq1() 2 { 3 int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; 4 var first3Numbers = numbers.Take...
分类:
其他好文 时间:
2014-12-05 00:43:42
阅读次数:
287
拼着一切代价,奔你的前程。——巴尔扎克
本讲内容:3DSmax简介
一、3DSmax视图控制
菜单栏、工具栏、视图区、动画区、视图控制区、命令面板
本讲就到这里,Take your time and enjoy it...
分类:
其他好文 时间:
2014-12-04 19:57:14
阅读次数:
165
One sample is used to replace double quote from words which encapsulated by csvwriter ,you know csv writer will take care of the double quote and com....
分类:
Web程序 时间:
2014-12-04 19:46:05
阅读次数:
269
1.关闭正在运行的MySQL
2.启动MySQL的安全模式,命令如下:
mysqld --skip-grant-tables
or
mysqld-nd --skip-grant-tables
3.使用root用户[免密码]登陆MySQL
mysql -u root -p
输入密码时,直接回车
4.选择MySQL系统库
use mysql
5.查看当前系统用户...
分类:
数据库 时间:
2014-12-04 18:06:35
阅读次数:
176
I was too optimistic.It is take several days working on the demo.. The intresting thing is when I finished the demo, I understand how people make a ro...
分类:
编程语言 时间:
2014-12-04 00:41:10
阅读次数:
219
在Mac OS X10.10下sudo gem install curses 返回如下错误:
apple@kissAir: ruby_src$sudo gem install curses
Password:
Fetching: curses-1.0.1.gem (100%)
Building native extensions. This could take a...
分类:
系统相关 时间:
2014-12-03 12:33:28
阅读次数:
394
Given integers N and M, output in how many ways you can take N distinct positive integers such that sum of those integers is M. Since result can be huge, output it modulo 1000000007
(10^9 + 7)
N ...
分类:
其他好文 时间:
2014-12-03 00:24:54
阅读次数:
230