自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (6)
  • 收藏
  • 关注

原创 bootstrap popup window

ref:http://www.w3cschool.cc/bootstrap/bootstrap-v2-modal-plugin.htmlhttp://getbootstrap.com/javascript/example code: Date time picker Large modal

2015-03-30 17:58:51 2142

原创 datepicker datetimepicker

http://www.eyecon.ro/bootstrap-datepicker/example: Date time picker $(document).ready(function() { $('#example1').datepicker({ format: "mm-dd-yyyy" }); }

2015-03-30 17:04:08 363

原创 leetcode 日经贴,python code -Remove Element

Remove Elementclass Solution: # @param A a list of integers # @param elem an integer, value need to be removed # @return an integer def removeElement(self, A, elem):

2015-03-23 20:43:38 324

原创 leetcode 日经贴,python code -Decode Ways

Decode Waysclass Solution: # @param s, a string # @return an integer def numDecodings(self, s): n = len(s) if n == 0: return 0 if n == 1: if '1' <=

2015-03-23 20:37:53 321

原创 POJ 1470 Closest Common Ancestors - Tarjan

POJ 1470 Closest Common AncestorsWiki 上的 Tarjan 算法, Tarjan is an offline algorithmhttp://en.wikipedia.org/wiki/Tarjan's_off-line_lowest_common_ancestors_algorithmfunction TarjanOLCA(u) Ma

2015-03-20 11:37:43 437

转载 3-ways-to-define-a-javascript-class/

http://www.phpied.com/3-ways-to-define-a-javascript-class/

2015-03-19 19:50:15 392

原创 leetcode 日经贴,Cpp code -Merge k Sorted Lists

Merge k Sorted Lists/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */struct node {

2015-03-19 10:15:13 293

原创 leetcode 日经贴,Cpp code -Valid Parentheses

Valid Parenthesesclass Solution {public: bool leftBrace(char ch) { return ch == '(' || ch == '{' || ch == '['; } bool isMatch(char lc, char rc) { return lc == '(' && r

2015-03-19 10:00:41 320

原创 leetcode 日经贴,Cpp code -Maximum Subarray

Maximum Subarrayclass Solution {public: int maxSubArray(int A[], int n) { int ans = 0, cs = 0; if (n == 0) return 0; ans = cs = A[0]; for (int i = 1; i < n; ++

2015-03-19 09:54:23 313

原创 leetcode 日经贴,Cpp code -Interleaving String

Interleaving Stringclass Solution {public: bool isInterleave(string s1, string s2, string s3) { int n = s1.length(), m = s2.length(), l3 = s3.length(); if (n + m != l3)

2015-03-19 09:49:57 304

原创 base64 encode with javascript

/** * Base64 encode algorithm * @param {byte array} the binary data of image * @return {datauri} */var Base64 = { // private property _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrst

2015-03-17 18:03:14 448

原创 python webapp2 redirect

source codehttp://webapp-improved.appspot.com/_modules/webapp2.html#redirectwebapp2.redirect(uri, abort=True)

2015-03-17 16:10:15 614

原创 python decorators, classmethod and staticmethod

http://www.pythoncentral.io/python-decorators-overview/http://www.pythoncentral.io/difference-between-staticmethod-and-classmethod-in-python/

2015-03-17 12:23:19 519

原创 leetcode 日经贴,Cpp code -Scramble String

Scramble Stringclass Solution {public: bool isScramble2(string s1, string s2) { int n = s1.length(); if (n <= 3) return true; //from left int match = 0;

2015-03-17 10:57:29 488

原创 leetcode 日经贴,Cpp code -Path Sum II

Path Sum II/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * };

2015-03-16 22:55:15 302

原创 leetcode 日经贴,Cpp code -Binary Tree Postorder Traversal

Binary Tree Postorder Traversal/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), ri

2015-03-16 14:28:26 302

原创 leetcode 日经贴,Cpp code -Median of Two Sorted Arrays

Median of Two Sorted Arraysclass Solution {public: int findkth(int* A, int m, int* B, int n, int k) { if (m + n < k) { return -1; //out of range } if (m ==

2015-03-16 14:24:02 302

原创 leetcode 日经贴,Cpp code -Sort Colors

Sort Colorsclass Solution {public: void swap(int &a, int &b) { int c = a; a = b; b = c; } void sortColors(int A[], int n) { const int red = 0, white =

2015-03-16 10:19:32 312

原创 leetcode 日经贴,Cpp code -Palindrome Partitioning II

Palindrome Partitioning IIclass Solution {public: int minCut(string s) { int n = s.length(); if (n <= 1) return 0; vector > dp; dp.resize(n); for (int

2015-03-16 10:10:09 288

原创 decompress in memory data

Decompress in memory data with gzip and StringIO.StringIOimport gzipimport StringIOdata = open('f.zip').read()fobj = StringIO.StringIO(data)fi = gzip.GzipFile(fileobj=fobj)fw = open('decompres

2015-03-12 20:47:45 342

pattern recognition and machine learning

bishop 的经典之作,学机器学习的首先,贝叶斯观点来解读模型

2011-10-08

带权区间图的最短路算法

提出一个带权区间图的最短路问题的O(n*a(n))的时间的新算法,其中n是带树区间图的个数

2009-09-05

简单的表达式求值 支持括号

简易计算器,能够实现对整数表达式进行以下运算, +、-、*、/、%、^并支持‘(’、‘)’。例如:((12-2)*6)/5

2009-09-04

dancing links

中文版的 dancing links,若想快点看懂就下吧,若想看原版就去找 knuth 的原版吧

2009-08-12

组合数学 组合数 整数划分 递推 方程 多项式定理

讲解组合数学的知识,大连理工应用数学系讲义 对学习组数学的朋友有很大的帮助 第二章 多项式定理及其应用

2009-08-03

RealPlayer11GOLD.deb

RealPlayer11GOLD.deb

2008-12-10

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除