渴死的火烈鸟
standalone · 共 356 篇文章
Proof of Storage
因为公司有一个合作项目牵涉到,这几天抽空看了一下proof of storage的paper,复习了一下本科学的密码学的内容,觉得还是一个很有意思的topic。其中一个reference挺难找的,记在这里吧。下面讨论的原理还是基于大整数的分解问题。 http://diswww.mit.edu/bloom-picayune/crypto/13190 Adi Shamir once proposed the following hash function: Let n = p*q be the product of two large primes, such that factoring n …
2011-08-25 22:04 · cryptography · 评论(0)
sql where on
http://blog.csdn.net/qiqi860819/article/details/4586067
2011-07-29 09:17 · database · 评论(0)
how to explain free buffers and cached memory usage
free -m total used free shared buffers cached Mem: 48269 2424 45845 0 139 1120 -/+ buffers/cache: 1164 47105 Swap: 8197 0 8197 total used free shared buffers cached Mem: A B C D E F -/+ buffers/cache: G H Swap: I J K Note: A=B+C A=G+H G=B-E-F H=C+E+F The display columns mean: total: Your total (phy…
2011-07-18 11:57 · linux · 评论(0)
Pro Git Tips
1. git init Create a new repo with exsiting project. 2. git diff This command compares what's in your working directory with what's in your staging area. The result tells what changes have not been staged. 3. git diff --cached Shows what you've stage that will go into your next commit. In Git v1.6 …
2011-07-14 17:53 · linux · 评论(2)
Great HTML5 Example
This author shows how to draw interactive pie chart with html5. http://www.elated.com/articles/snazzy-animated-pie-chart-html5-jquery/
2011-07-07 18:05 · javascript · 评论(0)
Last Survival
There are 100 people forming a circle and they are numbered from 1 to 100. They decide to kill each other using a sword, in following manner. At any point, person numbered n having a sword kills person numbered n+1 and passes the sword to n+2. This process doesnt stop untill at the end only 1 perso…
2011-06-30 16:02 · algorithm · 评论(0)
Check if the two rectangles intersect
Given the bottom left and top right coordinates of the two rectangles, check whether the two rectangles intersect or not.
2011-06-29 14:58 · algorithm · 评论(0)
sort n integers of range 0~n^2-1 in O(n) time
This is one problem introduced in "Introduction to Algorithm". We can use radix-sort to solve it. package alg; import java.util.ArrayList; import java.util.Iterator; /* * This example shows how to use radix sort algorithm to sort N integers in the range of 0 ~ N^2-1. */ public class RadixSortExampl…
2011-06-24 17:22 · algorithm · 评论(0)
Calculating Permutations and Job Interview Questions
http://www.bearcave.com/random_hacks/permute.html Calculating Permutations and Job Interview Questions
2011-06-18 17:44 · c++ · 评论(0)
How to generate permutations recursively
I have posted code to calcuate permutations in order, this is another more short recursive one of generating non-order permutations. package alg_test; public class Permutation2 { void swap(int a[], int i, int j) { int temp = a[i]; a[i]=a[j]; a[j]= temp; } void printArray(int a[]){ for(int i=0;i<a.l…
2011-06-18 17:02 · java · 评论(0)
一个HDFS Error
ERROR: hdfs.DFSClient: Exception in createBlockOutputStream java.io.IOException: Bad connect ack with firstBadLink While running a job once I got the following exception 10/12/10 21:09:05 INFO hdfs.DFSClient: Exception in createBlockOutputStream java.io.IOException: Bad connect ack with firstBadLin…
2011-06-11 21:53 · hadoop · 评论(0)
hadoop cluster at ebay
Friday, December 17, 2010Hadoop cluster at Ebay I am always curious to know how other companies are installing Hadoop clusters. How are they using its ecosystem. Since Hadoop is still relatively new, there are no best practices. Every company is implementing what they think is the best infrastructu…
2011-06-11 21:39 · hadoop · 评论(0)
[转]hadoop at ebay
http://www.ebaytechblog.com/2010/10/29/hadoop-the-power-of-the-elephant/ Hadoop – The Power of the Elephant by Anil Madan on 10/29/2010 in Machine Learning In a previous post, Junling discussed data mining and our need to process petabytes of data to gain insights from information. We use several t…
2011-06-11 21:09 · hadoop · 评论(0)
Extjs 4 : Customize Legend of Pie Chart
Unlike extjs 3, pie chart of Extjs 4 can be customized according to your requirment. For example, in my application, I need to customize pie chart's legend to show a combination of both category and its count.(Default it will show only category.) So I hacked extjs library, create my own Legend, I'm…
2011-06-09 18:43 · javascript · 评论(0)
别人总结的perl技巧
1. 用eval获得程序的执行错误 $a = 10; $b = 0; $c = $a/$b; 会发生什么? 程序会crash,因为有浮点数异常。用eval就可以做到两全,既执行语言,又能在出现异常的时候不crash $a = 10; $b = 0; eval {$c = $a/$b}; eval { ... }可以捕获执行的多条语句的错误结果。 然后用$@可以得到错误原因。 #!/usr/bin/perl $a = 10; $b = 0; eval {$c = $a/$b}; if ($@) { print "There was a error ($@)\n"; }else { print …
2011-05-21 15:08 · perl · 评论(0)