原创 [Linux] Crond 定時任務

  task.null.crontab是一個沒有內容的空文件 開啓定時任務  crontab/weblogic/tools/task.crontab 停止定時任務 crontab/weblogic/tools/task.null.cron

原创 [leetcode] Maximum Subarray

//統計nums[i]之前的sum值,如果這個值大於0,則拼接之前的序列,否則新的序列從i開始 //保留一個全局最大值,每次得到的candidate都和它比較 class Solution { public: int maxSu

原创 [leetcode][SQL]181. Employees Earning More Than Their Managers

<pre name="code" class="sql">select a.Name as Employee from Employee a Join Employee b on a.ManagerId=b.Id where a.s

原创 [leetcode][SQL]182. Duplicate Emails

轉自:http://blog.csdn.net/yangquanhui1991/article/details/51526443 Write a SQL query to find all duplicate emails in a

原创 [機器學習]PCA 和協方差矩陣

<p><strong>1.</strong></p><p><strong>PCA 和協方差矩陣</strong></p><p><strong> </strong></p><p><strong>已知一組數據的協方差矩陣P,下面關於主分量說法

原创 [leetcode]31. Next Permutation -Find next greater number with same set of digits

Find next greater number with same set of digits Given a number n, find the smallest number that has same set of

原创 [leetcode]18. 4Sum

//用夾逼定理 class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<v

原创 [leetcode]48. Rotate Image

//首先按對角線置換,然後按照豎中分線置換,這樣就達到了90度旋轉的要求class Solution { public: void rotate(vector<vector<int>>& matrix) {

原创 [leetcode]55. Jump Game 貪心

解法一,遞歸,超時 class Solution { public: bool canJump(vector<int>& nums) { if(nums.size()>1&&nums[0]==0)ret

原创 [雜記]各種編程語言的註釋

Language In-line comment Block comment C (C99), C++, Go, and JavaScript // InlineComment /* BlockComment */

原创 [leetcode]268. Missing Number

解法一:置換 class Solution { public: int missingNumber(vector<int>& nums) { //每次交換,位置 i 和 位置nums[i]的值,直到i的值

原创 [leetcode]35. Search Insert Position

class Solution { public: int searchInsert(vector<int>& nums, int target) { int len=nums.size();

原创 解決移動端點擊事件延遲300ms

轉自:http://blog.csdn.net/xdongll/article/details/51908994 說明:移動設備上的web網頁是有300ms延遲的,玩玩會造成按鈕點擊延遲甚至是點擊失效。  以下是歷史原因,來源一個公司內

原创 [leetcode]34. Search for a Range

class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { int l=0; int

原创 [leetcode]62. Unique Paths

class Solution { public: int uniquePaths(int m, int n) { if(m==1||n==1)return 1; vector<vector<int>