- All *53
- = [
- Technology *33 ,
- Misc *9 ,
- Physics *11
- ]
Category:
-
Algorithm -- strstr 的 Rabin Karp 解法
More...
C’s strStr() or Java’s indexOf() 是两个常用函数,也是一道经典的算法问题。
比如LeetCode第28题,几乎所有旁友都做过这题。
Input: haystack = "aaaaaaaaaaaaaaaaaabaaaaaa", needle = "aab" Output: 16
-
Algorithm -- Permutation Combination Subset
Technology algorithm 11 , java 5 , Permutation 1 , Combination 1 , Subset 1 , DFS 1 , Binary Operation 1More...
Given a collection of numbers, return all possible
Permutations
,K-Combinations
, or allSubsets
are the most fundamental questions in algorithm.They can be impelmented by simple
recursion
,iteration
,bit-operation
, and some other approaches. I mostly use Java to code in this post. -
Shor's Algorithm crackes RSA
More...
利用量子计算机和Shor算法可以攻克RSA加密。
-
iOS Delegate -- Respond UI Event by Delegate
More...
In the last post I talked about how to Customsize an UI Widget. There is a use case of the Widget: respond some UI event of the Widget in another View Controller.
-
iOS UI -- Custom UI with Embeded Table View Cell
More...
In an .xid file, you can not define a custom Table View Cell in the Table View. (Although you can do it in storyboard).
If you want to do so, you have to create the Table View Cell by codes.
-
我的VIM笔记
More...
记录下我的VIM笔记,按自己的记录时间顺序,并未严肃分类。
我不太使用插件,喜欢先熟悉原生的功能。目前使用的插件也只有 NERDTree 和 fcitx 输入法插件了。
-
公钥加密算法(四) RSA及相关笔记 (草稿)
More...
主线为Matrix67的一篇post跨越千年的RSA算法。
-
Doubly Linked Hashmap
More...
My implementation of Doubly Linked Hashmap in Java.
LinkedHashmap is used specially for LRU Cache (least recently used cache).
It maintains the insertion order of entries of hashmap.
-
Algorithm -- Maximum Single-Sell Profit
More...
This is a classic interview question.
You can cracking it by brute force, divide-and-conquer, and expectly, dynamic programming.
The famous post talking about it on StackOverflow.
You can verify your answers via the LeetCode problem
-
Algorithm -- Binary Tree to Linked List (In-place)
More...
Flatten a Binary Tree to Linked List, with preorder, inorder, or postorder. Implement the algorithm in place.
I’ll use 3 different methods to implement each order. They are
[recursion with TreeNode, void recursion, iteration]
. -
LeetCode Question -- Word Ladder II
More...
题目来源: LeetCode OJ, Word Ladder II
思路简介: 先用BFS找出最短路径,在Word Ladder I的基础上修改,使BFS遍历到的word按遍历先后层级排列;然后用DFS找出所有可能的最短路径。
-
磨刀不误砍柴工 系列之 三 : Dynamic Programming
More...
Dynamic Programming (DP) is a general algorithm design paradigm. Its inventor is Richard Bellman. DP is originated from his mathemetical research.
-
Remote SSH to VMware GuestOS
More...
在NAT网络配置下,很多人都可以很轻松地从Host OS上ssh到VMware的Guest OS,只需要把Host OS和Guest OS当作是在由VMware所管理的同一个子网下的两台机器就可以了。
那么如果我有另一台笔记本或者手机,想要SSH到我台式机中VMware下的一台虚拟机该如何操作呢?
-
Object Oriented Design -- Chess Game
More...
Object Oriented Design for Chess Game.
This is a simple version by myself, as I have not found a simple one on the Internet.
-
公钥加密算法(三) Rabin
More...
The Rabin Cryptosystem is based on the idea that computing square roots modulo a composite N is simple when the factorization is known, but the very complex when it is unknown.
Rabin加密系统是基于在已知合数N的因式分解的情况下,可以计算出二次剩余的平方根;但是在因式分解N未知的情况下很难求解的原理。
-
公钥加密算法(二) RSA
More...
我对RSA甚至加密以及计算机科学产生兴趣不得不说有很大一部分影响自阮一封的文章。
这要从当年一款神级产品Google Reader说起,相信这款产品在很多人(尤其是IT人员吧)心中都是无可替代的经典。我也忘了当时为什么订阅了阮一封的RSS,可能是随手订阅,可能是一看到就被他的文风和排版所吸引。在Google Reader上面读文章是一种享受,在Google Reader上面读阮一封的文章更是。
-
公钥加密算法(一) ElGamal
More...
公钥加密算法的作用大家都很熟悉了,比如大名鼎鼎的RSA,被誉为计算机领域最重要的算法之一。
学了Foundation of Cryptography之后,我了解了常用的公钥算法除了RSA之外还有好几种,甚至RSA被认为是不能严格证明的,不知道这个不能严格证明的问题和Snowden爆出来的RSA Backdoor有没有关系。
-
Spam Filter (4) -- Self-Learning & Augment
More...
Till then, I have achieved Average AUC of 0.921837 with Naive Bayes, and 0.909551 with Logistic Regression. This kind of result would rank at 3rd position in Discovery Challenge 2006.
-
Spam Filter (3) -- Logistic Regression & TF-IDF
Technology ML 4 , spam 4 , LR 1 , TF-IDF 1More...
I studied this method from one of papersposted on Third Conference on Email and Anti-Spam (CEAS 2006). [2] I implemented the basic Logistic Regression (LR) method followed by the conduct of it and it worked as good as the basic implementation of Graham’s Method.
-
An Android SQLite Example
More...
I don’t like database. Although sqlite is light-weighted and relatively easy to use, I don’t like using sqlite.
A most important reason is that DBs are not easy to set-up.
-
Android Parcelable Inside Another Parcelable
More...
It is too consuming to pass data using Java serializablein Android. Whereas, Android offers an other powerful tool: Parcelable.
-
Spam Filter (2) -- Bayes Theorem & Graham's Method
Technology ML 4 , spam 4 , Bayes 1More...
The basic algorithm of my Bayesian Filter is studied from Paul Graham’s post A PLAN FOR SPAM. I was firstly attracted on this topic by a Chinese version of it: 贝叶斯推断及其互联网应用: 定理简介 和 过滤垃圾邮件 (2011) Ruan Yi-feng (Bayesian Inference and Web Application: Introduction to the Theory & Spam Filtering)
-
Spam Filter (1) -- Data Resource & ROC Curve
More...
This is my project of CS559 Machine Learning @Stevens 2013 Fall.
This project will design a Spam Filter based on the date set from Discovery Challenge workshop at ECML/PKDD 2006 in Berlin.
-
HTML SlideShow
More...
这两天看了下如何制作网页版的幻灯片,基本原理就是HTML+CSS+Javascript,通过维护一个文件来定义多张页面,用Javascript来实现动态切换效果。
-
磨刀不误砍柴工 系列之 五 : Strings and Pattern Matching
More... -
磨刀不误砍柴工 系列之 四 : Graph
More... -
LaTeX Notes & MathJax in Jekyll
More...
I take
Math of Cryptography
andMachine Learning
this semester. So I guess it is important for me to be able to input mathematics formular in blog posts when I want to write somthing about math. -
Frequent Problems Raised in Android Programming
More...
This post lists some problems appears frequently during Android developing.
-
Android UI – Staggered Grid View
More...
There is an open source library of Staggered Grid View
It works fine but… There are some flaws:
-
Some Useful Android Programming Snips
More...
Digest: all activity in app, detect string & uni-code char, intent, dp/sp/px, screen size, available memory
-
磨刀不误砍柴工 系列之 二 : Bounded-Depth Search Trees
More...
Bounded-Depth Search Trees includes: (2,4) Tree, Red-Black Tree
To under Red-Black tree more easily, we could learn (2,4) Tree at first. These two trees can be converted to each other.
-
磨刀不误砍柴工 系列之 一 : Heap BST AVL
More...
学习算法是磨刀不误砍柴工的一件事情。
(磨刀不误砍柴工) 系列是我学习算法的笔记,总结自己学习中的理解,并希望能分享交流。
-
使用Github Pages建独立博客 [转]
More...
Github本身就是不错的代码社区,他也提供了一些其他的服务,比如Github Pages,使用它可以很方便的建立自己的独立博客,并且免费。