CodeSky 代码之空

随手记录自己的学习过程

归档时间:2017-02

MongoDB 初窥

2017-02-23 23:36分类: SQL评论: 3

这周开始由于项目的原因正式接触 MongoDB,之前稍微看过一点,但没怎么正式用过,一方面是设计思维牢固的钉死在了关系数据库的三大范式上(第四和 BC 有点过了……),另一方面是没有一个机会去做 PHP 以外的站(嗯,因为黄金搭档……)。

所以兜兜转转,稍微介绍一下 MongoDB 的一些事。

引言

MongoDB 是一个 NoSQL (Not Only SQL) 的数据库,提供面向文档的存储,操作简单,天生的分布式,带文件存储功能(GridFS)。

阅读更多 →

Xcode 编译 Weex Playground 到 iOS 设备

2017-02-07 10:26分类: Other评论: 6

作为不懂 iOS 开发的萌新,Weex Playground 的 App Store 版本现在还不能运行 Vue 版本,实在是苦大仇深,原生自然比模拟器爽一些,所以试了一下编译到自己的手机上,步骤如下:

首先,git clone [email protected]:alibaba/weex.git

然后如同文档介绍的:

1npm install
2./start
3
阅读更多 →

双端队列 Deque 与 随机化队列 RandomizedQueue 的实现

2017-02-03 17:00分类: Java评论: 1

双端队列,也就是栈和队列的结合,同时可以从头和尾进行进出栈 / 队列的功能,看一下他的数据结构就懂了:

1public class Deque<Item> implements Iterable<Item> {
2   public Deque()                           // construct an empty deque
3   public boolean isEmpty()                 // is the deque empty?
4   public int size()                        // return the number of items on the deque
5   public void addFirst(Item item)          // add the item to the front
6   public void addLast(Item item)           // add the item to the end
7   public Item removeFirst()                // remove and return the item from the front
8   public Item removeLast()                 // remove and return the item from the end
9   public Iterator<Item> iterator()         // return an iterator over items in order from front to end
10   public static void main(String[] args)   // unit testing (optional)
11}
12

双端队列的实现还是比较简单的(虽然实际上还会是踩了一些微小的坑)。

阅读更多 →
共 3 篇文章,1 页