作为一个前沿的 Web 开发者,对于HTML5 和 CSS3 技术或多或少都有掌握。前几年这些新技术刚萌芽的时候,开发者们已经使用它们来小试牛刀了,如今这些先进技术已经遍地开发,特别是在移动端大显身手。1.HTML5 模拟现实物理效果Ball Pool 是一个基于HTML5 技术的实验,模拟现实物理...
分类:
Web程序 时间:
2015-06-09 09:46:59
阅读次数:
224
Server:ip=`ifconfigeth0|grep"inetaddr"|awk-F":"‘{print$2}‘|awk‘{print$1}‘`hostname=`hostname`echo"$ip$hostname">>/etc/hostsyum-yinstallgccrubyntp/etc/init.d/ntpdstopntpdatecn.pool.ntp.org;hwclock-wrpm-ivhhttps://yum.puppetlabs.com/el/6.5/products/x86_..
分类:
其他好文 时间:
2015-06-08 19:55:18
阅读次数:
122
Sort a linked list in O(n log n)
time using constant space complexity.
算法一 自顶向下折半归并,递归
使用递归。进行折半。
先使用快慢指针,找到中间结点。将链表一分为二。
对此两链表进行递归排序后,进行归并。
在leetcode上实际执行时间为62ms。
/**
* Definition for...
分类:
其他好文 时间:
2015-06-08 09:57:20
阅读次数:
118
Sort a linked list inO(nlogn) time using constant space complexity.链表排序,要求时间复杂度O(nlgn),我写的归并排序。/** * Definition for singly-linked list. * public class...
分类:
其他好文 时间:
2015-06-07 17:18:21
阅读次数:
131
warning:deprecated conversion from string constant to ‘char *’ 解决方案#include
using namespace std;int fuc(char *a)
{
cout << a << endl;
}
int main()
{
fuc("hello");
}Linux 环境下当GCC版本比较高...
分类:
其他好文 时间:
2015-06-07 01:05:11
阅读次数:
138
onStartCommand()是由Android系统调用的,本质上也是调用了onStart()方法。
onStartCommand()返回值有几种:
1)START_STICKY
英文解释:
Constant to return from onStartCommand: if this service's process is killed while it is started...
分类:
移动开发 时间:
2015-06-06 15:01:40
阅读次数:
156
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- Remov...
分类:
编程语言 时间:
2015-06-05 19:37:00
阅读次数:
147
CREATE OR REPLACE PROCEDURE ModifyColumnTypeIS sqlRenameColumn CONSTANT VARCHAR2(100) := 'alter table [tablename] rename column [targetcolumn] to [tar...
分类:
其他好文 时间:
2015-06-05 15:29:58
阅读次数:
97
PL/SQL结构分为三块:declare、begin、exception。其中begin必不可少。块一:declare的作用是申明变量,包括变量的名称及其相关属性和是否定义初始值。其相关属性包括数据类型,长度。 其初始值定义时可以用:=也可以用default,当用constant对数据类型进行修饰之...
分类:
数据库 时间:
2015-06-05 12:15:16
阅读次数:
178
模式动机(Flyweight Pattern):顾名思义,享元模式就是运用共享技术解决大量细粒度对象的复用问题。在享元模式中,由工厂负责维护一个享元池(Flyweight Pool),用于存储具有相同内部状态的一些对象。所谓内部状态,是指一个对象的特征,我们把大多数该类对象的不变特征确定为共享特征,...
分类:
其他好文 时间:
2015-06-05 12:06:59
阅读次数:
133