介绍一种使用Groovy的方法:编译成java字节码并且作为正常java应用程序运行在java虚拟机上,即预编译模式。
1、安装Groovy
下载Groovy binary:
http://groovy.codehaus.org/Download
将其解压。然后设置环境变量GROOVY_HOME为解压后文件的目录。
然后在path环境变量中添加:%GROOVY_HOME%/bi...
分类:
编程语言 时间:
2014-05-25 21:59:10
阅读次数:
472
题目如下:
Tree Summing
Background
LISP was one of the earliest high-level programming languages and, withFORTRAN, is one of the oldest languages currently being used. Lists,wh...
分类:
其他好文 时间:
2014-05-25 21:39:51
阅读次数:
276
View的getLeft, getRight, getTop,
getBottom方法得到的分别是相对于其父组件不同方向的距离网上找了张图说明:其中right和left的计算方法如下: right = left +
width; bottom = top + height;
分类:
其他好文 时间:
2014-05-25 18:51:01
阅读次数:
244
【题目】
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
【题意】
给定一个链表L,和非负数K,要求把链表的后k个节点移到链表前
【思路】
先将指针指向指向倒数第K个节点,然后...
分类:
其他好文 时间:
2014-05-25 18:20:06
阅读次数:
252
红黑树
红黑树是一种二进制查找树,但在每个节点上增加一个存储位表示节点的颜色,可以是red或black。通过对任何一条从根到叶子的路径上各个节点着色方式的限制,红黑树确保没有一条路径会比其他路径长出两倍,因而是接近平衡的。
树中灭个节点包含五个域,color,key,left,right 和p。如果某及诶但没有一个子节点或父节点,则该节点响应的指针域包含值NIL.我们将把这些NIL指向二叉查找...
分类:
其他好文 时间:
2014-05-25 10:27:17
阅读次数:
290
昨天同事在做主从时,从库报如下错误:Got fatal error 1236 from master when reading data from binary log: 'Misconfigured master - server id was not set'粗粗看好像是master的server-id没有设置,但同事做如下查询:备库采集:
root@localhost Fri May 23 ...
分类:
数据库 时间:
2014-05-25 09:57:24
阅读次数:
330
进入iTunes ConnectManage Your Apps->New
Version->View DetailsLinks->Binary Details->Reject This
Binary->Reject Binary->DoneReady to Upload Binary->No No...
分类:
移动开发 时间:
2014-05-25 07:42:14
阅读次数:
267
寻找图中最小连通的路径,图如下:
算法步骤:
1. Sort all the edges in non-decreasing order of their weight.
2. Pick the smallest edge. Check if it forms a cycle with the spanning tree
formed so far. If cycle is n...
分类:
其他好文 时间:
2014-05-25 07:35:59
阅读次数:
301
近段时间,有很多朋友向新辰抱怨说出大问题了,为神马site不到首页了,而且收录变成了0?唉,新辰不得不很同情的告诉你:你的首页真的被K了!好了,作为一个职业SEOer,面对被K犹如已经看破红尘般没了脾气,所以,废话少说,身为SEOer的你赶紧补救吧!希望新辰的这些方法能够帮助你早日逃离拔毛的痛苦哦:
所谓治病先察言观色,后开方救人,新辰说的就是先找准病因,才能给出解决的办法。面对突然si...
分类:
其他好文 时间:
2014-05-25 07:21:40
阅读次数:
247