原创 [LeetCode] Ugly Number II

Ugly Number II Write a program to find the n-th ugly number. Ugly numbers are positive numbers whose prime factors

原创 [LeetCode] Insert Interval

Insert Interval Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessa

原创 [LeetCode] Clone Graph

Clone Graph Clone an undirected graph. Each node in the graph contains a label and a list of its neighbors. OJ's un

原创 漢字轉拼音c/c++源碼,支持gb2312和utf8

最近在寫一個拼音轉換程序,將漢字轉化成拼音。網上很多轉化程序只支持gb2312編碼,卻不支持utf8.於是根據網上的源碼整合成了一個既支持gb2312編碼、又支持utf8編碼的拼音轉換程序。他們都支持簡拼和全拼,且utf-8支持多音字。在

原创 判斷點是否在多邊形區域裏面

英語原文:https://www.ecse.rpi.edu/~wrf/Research/Short_Notes/pnpoly.html 基本思想是,以該點向任意方向(這裏是x軸正向)作射線,若與多邊形的交點個數爲偶數,則在多邊形之

原创 c#運行JS代碼

Jint,  Gitbub網址:https://github.com/sebastienros/jint 編譯好的dll文件:https://pan.baidu.com/s/1qYhSM64 使用方法示例: class Pr

原创 Comparing Hadoop, Spark, and Storm

Hadoop, Spark, and Storm have become quite popular in recent times as open-source to work with large sets of data. We

原创 Azure Service、Azure Web、Azure Storm日誌機制

    兵馬未動,糧草先行。程序未果,日誌先成。     在學習Azure平臺,並用之進行項目託管的過程中,深深感嘆程序日誌記錄的重要性。通過日誌,可以知道程序運行情況,發現隱含bug;通過日誌,可以挖掘產品的訪問情況,進一步提升產品

原创 tfs中獲得的Azure storm代碼不能提交

在一臺機器上提交的代碼,另外一臺機器下載後,會發現很多問題。 例如,Azure Storm便不能提交了,產生一下錯誤: Faild to generate spec file... storm The system cannot

原创 vs2013無法創建html,不能發佈:The web publishing extension is not installed which is required to publish

環境:vs2013,同時在電腦上安裝有vs2012、vs2015 動作:可能是重新安裝了Azure SKD之後,導致vs2013出錯 現象:無法添加、打開html文件。無法右鍵-》publish到azure平臺網站,彈窗提示:The

原创 判斷二維平面上兩線段是否相交

題目:如題,包含線段端點。重合也算相交。 解題思路: 假設兩線段分別爲AB、CD。則AB直線的方程爲Fab(x,y) = (y-ya)(xa-xb) - (x-xa)(ya-yb)=0。我們注意到,若線段AB與線段CD相交,則必有

原创 [LeetCode] Edit Distance

Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2.

原创 在國外,聽網易音樂

X牆就是一道圍城,國內的人希望翻出去(瀏覽谷歌、臉書等),國外的人想翻回來(聽國內音樂、看國內視頻)。 雖然我沒有肉身番羽土嗇,但是公司默認就是外網,無法聽國內的音樂。 於是着手弄了一個國內VPN,通過它,能夠聆聽網易雲音樂了。

原创 Azure Table深入理解

> 1、同一個Table中的相同Partition Key是否存在同一個文件中? Azure Table爲如下所示的三層結構。Stream層是最終數據存放的位置,Partition層對Stream層的數據進行分區(Partition)

原创 Azure Storm入門(二)—— 事務處理

這是Azure Storm系列文章。此前的文章包括: Azure Storm入門(一)——從一個例子開始 此前我們通過一個例子瞭解了Storm的基本執行流程。這裏我們再通過一個例子來探討一下Storm的事務處理部分。 1、