Ranger's Way
  • Way => blog
  •  | 
  • Ranger => about me

    categoryCategory:

  • All *53
  • = [
  • Technology *33 ,
  • Misc *9 ,
  • Physics *11
  • ]
  • Algorithm -- strstr 的 Rabin Karp 解法 May 24, 2018
    categoryTechnology tags algorithm 11 , java 5 , strstr 1 , hash 1

    C’s strStr() or Java’s indexOf() 是两个常用函数,也是一道经典的算法问题。

    比如LeetCode第28题,几乎所有旁友都做过这题。

    Input: haystack = "aaaaaaaaaaaaaaaaaabaaaaaa", needle = "aab"
    Output: 16
    
    More...
  • Algorithm -- Permutation Combination Subset July 06, 2016
    categoryTechnology tags algorithm 11 , java 5 , Permutation 1 , Combination 1 , Subset 1 , DFS 1 , Binary Operation 1

    Given a collection of numbers, return all possible Permutations, K-Combinations, or all Subsets 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.

    Subsets draft

    More...
  • Shor's Algorithm crackes RSA August 27, 2015
    categoryTechnology tags RSA 3 , Shor 1 , algorithm 11 , quantum 2 , cryptography 5

    利用量子计算机和Shor算法可以攻克RSA加密。

    More...
  • iOS Delegate -- Respond UI Event by Delegate July 24, 2015
    categoryTechnology tags iOS 2

    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.

    More...
  • iOS UI -- Custom UI with Embeded Table View Cell July 19, 2015
    categoryTechnology tags iOS 2

    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.

    More...
  • 我的VIM笔记 February 23, 2015
    categoryTechnology tags VIM 1

    记录下我的VIM笔记,按自己的记录时间顺序,并未严肃分类。

    我不太使用插件,喜欢先熟悉原生的功能。目前使用的插件也只有 NERDTree 和 fcitx 输入法插件了。

    More...
  • 公钥加密算法(四) RSA及相关笔记 (草稿) January 29, 2015
    categoryTechnology tags cryptography 5 , asymmetric encryption 4 , RSA 3 , Maths 1

    主线为Matrix67的一篇post跨越千年的RSA算法。

    More...
  • Doubly Linked Hashmap December 28, 2014
    categoryTechnology tags DataStructure 1 , Java 1

    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.

    More...
  • Algorithm -- Maximum Single-Sell Profit November 09, 2014
    categoryTechnology tags algorithm 11

    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

    More...
  • Algorithm -- Binary Tree to Linked List (In-place) September 09, 2014
    categoryTechnology tags algorithm 11 , java 5 , BinaryTree 1 , LinkedList 1

    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].

    More...
  • LeetCode Question -- Word Ladder II August 25, 2014
    categoryTechnology tags algorithm 11 , java 5 , leetcode 1 , graph 1

    题目来源: LeetCode OJ, Word Ladder II

    思路简介: 先用BFS找出最短路径,在Word Ladder I的基础上修改,使BFS遍历到的word按遍历先后层级排列;然后用DFS找出所有可能的最短路径。

    More...
  • 磨刀不误砍柴工 系列之 三 : Dynamic Programming August 06, 2014
    categoryTechnology tags algorithm 11

    Dynamic Programming (DP) is a general algorithm design paradigm. Its inventor is Richard Bellman. DP is originated from his mathemetical research.

    More...
  • Remote SSH to VMware GuestOS July 03, 2014
    categoryTechnology tags VMware 1 , network 1 , SSH 1

    在NAT网络配置下,很多人都可以很轻松地从Host OS上ssh到VMware的Guest OS,只需要把Host OS和Guest OS当作是在由VMware所管理的同一个子网下的两台机器就可以了。

    那么如果我有另一台笔记本或者手机,想要SSH到我台式机中VMware下的一台虚拟机该如何操作呢?

    More...
  • Object Oriented Design -- Chess Game July 02, 2014
    categoryTechnology tags object-oriented 1 , java 5

    Object Oriented Design for Chess Game.

    This is a simple version by myself, as I have not found a simple one on the Internet.

    More...
  • 公钥加密算法(三) Rabin May 27, 2014
    categoryTechnology tags cryptography 5 , asymmetric encryption 4 , Rabin 1 , 中国剩余定理 2

    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未知的情况下很难求解的原理。

    More...
  • 公钥加密算法(二) RSA May 14, 2014
    categoryTechnology tags cryptography 5 , asymmetric encryption 4 , RSA 3 , 中国剩余定理 2

    我对RSA甚至加密以及计算机科学产生兴趣不得不说有很大一部分影响自阮一封的文章。

    这要从当年一款神级产品Google Reader说起,相信这款产品在很多人(尤其是IT人员吧)心中都是无可替代的经典。我也忘了当时为什么订阅了阮一封的RSS,可能是随手订阅,可能是一看到就被他的文风和排版所吸引。在Google Reader上面读文章是一种享受,在Google Reader上面读阮一封的文章更是。

    More...
  • 公钥加密算法(一) ElGamal May 07, 2014
    categoryTechnology tags cryptography 5 , asymmetric encryption 4 , ElGamal 1 , Hiffie-Hellman 1

    公钥加密算法的作用大家都很熟悉了,比如大名鼎鼎的RSA,被誉为计算机领域最重要的算法之一。

    学了Foundation of Cryptography之后,我了解了常用的公钥算法除了RSA之外还有好几种,甚至RSA被认为是不能严格证明的,不知道这个不能严格证明的问题和Snowden爆出来的RSA Backdoor有没有关系。

    More...
  • Spam Filter (4) -- Self-Learning & Augment April 14, 2014
    categoryTechnology tags ML 4 , spam 4 , Self-Learning 1

    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.

    More...
  • Spam Filter (3) -- Logistic Regression & TF-IDF March 03, 2014
    categoryTechnology tags ML 4 , spam 4 , LR 1 , TF-IDF 1

    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.

    More...
  • An Android SQLite Example February 09, 2014
    categoryTechnology tags Android 5 , sqlite 1 , db 1

    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.

    More...
  • Android Parcelable Inside Another Parcelable January 29, 2014
    categoryTechnology tags Android 5

    It is too consuming to pass data using Java serializablein Android. Whereas, Android offers an other powerful tool: Parcelable.

    More...
  • Spam Filter (2) -- Bayes Theorem & Graham's Method January 27, 2014
    categoryTechnology tags ML 4 , spam 4 , Bayes 1

    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)

    More...
  • Spam Filter (1) -- Data Resource & ROC Curve January 21, 2014
    categoryTechnology tags ML 4 , spam 4 , probability 1

    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.

    More...
  • HTML SlideShow January 06, 2014
    categoryTechnology tags slideshow 1 , jekyll 4

    这两天看了下如何制作网页版的幻灯片,基本原理就是HTML+CSS+Javascript,通过维护一个文件来定义多张页面,用Javascript来实现动态切换效果。

    More...
  • 磨刀不误砍柴工 系列之 五 : Strings and Pattern Matching November 13, 2013
    categoryTechnology tags algorithm 11
    More...
  • 磨刀不误砍柴工 系列之 四 : Graph October 19, 2013
    categoryTechnology tags algorithm 11
    More...
  • LaTeX Notes & MathJax in Jekyll October 05, 2013
    categoryTechnology tags TeX 1 , jekyll 4

    I take Math of Cryptography and Machine 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.

    More...
  • Frequent Problems Raised in Android Programming September 30, 2013
    categoryTechnology tags Android 5

    This post lists some problems appears frequently during Android developing.

    More...
  • Android UI – Staggered Grid View September 28, 2013
    categoryTechnology tags Android 5

    There is an open source library of Staggered Grid View

    It works fine but… There are some flaws:

    More...
  • Some Useful Android Programming Snips September 24, 2013
    categoryTechnology tags Android 5

    Digest: all activity in app, detect string & uni-code char, intent, dp/sp/px, screen size, available memory

    More...
  • 磨刀不误砍柴工 系列之 二 : Bounded-Depth Search Trees September 22, 2013
    categoryTechnology tags algorithm 11

    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.

    More...
  • 磨刀不误砍柴工 系列之 一 : Heap BST AVL September 22, 2013
    categoryTechnology tags algorithm 11

    学习算法是磨刀不误砍柴工的一件事情。

    (磨刀不误砍柴工) 系列是我学习算法的笔记,总结自己学习中的理解,并希望能分享交流。

    More...
  • 使用Github Pages建独立博客 [转] February 22, 2012
    categoryTechnology tags jekyll 4 , github 1

    Github本身就是不错的代码社区,他也提供了一些其他的服务,比如Github Pages,使用它可以很方便的建立自己的独立博客,并且免费。

    More...
三人同行七十希
五樹梅花廿一支
七子團圓正半月
除百零五使得知

About me

My name is Renjie Weng.
I like physics, programming, and cycling.
Programmer => [ Java, C++, python, Android, etc. ]
Interests => [ Distributed Systems , Cryptography ]

tagsTags

  • jekyll 4
  • algorithm 11
  • Android 5
  • ML 4
  • spam 4
  • trip 4
  • cryptography 5
  • asymmetric encryption 4
  • RSA 3
  • java 5
  • Motorcycle 4
  • Cycling 3
  • Bicycle 3
  • ...

Favorite Bloggers

  • 阮一峰 wise & humility
  • Steve Losh artist & programmer
  • 卢昌海 wise & scientist
  • Jordan Scales geek, SOSS organizor
  • basiccoder 机智幽默的青岛小青年
  • zerowidth high quality, clean design
  • BeiYuu 写东西很负责
  • Yi Zeng bright & versatile
  • 酷壳 intelligent & diligent
  • netmeister Prof. Hack. Jan Schauma
  • Dan Lew a mobile developer
  • Wolfram Rittmeyer another Android developer
  • Software Passion a mobile developer
  • 海豚微笑的背后 电子书发布者,数码控
  • Cecil Woebker A high-school genius.
  • Bruce Schneier Debian OpenSSL mantainer
  • Beyond the Void 天才,科普很多东西
  • Matrix67 算法高手
© 2024 Renjie Weng. All rights reserved.