Author: admin

Easy easy to extend c# class

Love this book, a very easy way call “extension methods” can let you easily inject new method to existing classes (even you don’t have its source code). I tested it in windows with .net framework and mac .net core, both work correctly. read count : 27

2018/12/16 0

Bismarck sunk 4 ships

read count : 12

2018/12/11 0

Proved can call class in GAC

Nothing special, it works. SharePoint Master page doesn’t have a code behind, we can use this skill to add it in GAC. read count : 24

2018/12/02 0


SharePoint 2016爆到連啲default column type都死埋,SharePoint真係少啲經驗都必炒無疑 read count : 21

2018/12/01 0

Godaddy cheap VPS之經驗

係Godaddy起左隻最Cheap VPS, $160蚊個月, 得一粒vcore同1GB Ram, 行ubuntu + mysql + apache + wordpress. 正常黎講要兩三個星期restart一次mysql因為out of memory. 行wordpres兩年之後response time趑黎越慢, 有成十秒先load到個page. 裝左W3 Total Cache之後快左好多, 一兩秒就load到, 建議大家一定要裝. read count : 42

2018/11/28 0

Russian ship destoryed level 9 destroyer by torpedo

Russian ship destoryed level 9 destroyer by torpedo is miracle, uaually you are unable to get so close to send out the torpedo, level 9 destroyer has just too many canons. read count : 14

2018/11/25 0

[Real] Typescript has no type

If i pass an integer to the function’s parameter “from”, it will become integer and say it doesn’t has “includes” function, since it is belong to class string. This code is tested in SharePoint online with reactjs and typescript.   Below is my tsconfig.json   read count : 42

2018/11/23 0

Office 365 outlook有webhook

Office 365 outlook有webhook,以後要sync email去SharePoint又唔想用Microsoft Flow嘅話可以唔洗寫Polling了 read count : 25

2018/11/15 0

Microsoft嘅SharePoint Online係會disable上左production嘅feature

Microsoft嘅SharePoint Online原來個feature就算上左production都會因為有問題而中途被disable返 read count : 19

2018/11/10 0

Unexplainable : Typescript compiler has bug

Unexplainable : Typescript compiler has bug, if i add anything above {this.toDoList}, a html tag or just a string, the variable become nothing, nothing is shown on the screen. I am not sure it is reactjs bug or typescript bug, or may be chrome bug. I am using latest spfx 1.7.0 with SharePoint Online for…
Read more

2018/11/09 0

Solved : central admin new web application button is disabled

When you login to central admin and found out your “new web application” button is disabled. Just run SharePoint configuration Wizard, logout and login admin your windows. Everything will be fine. !!! If still failed, try to login to windows via non-administrator account. Then start central admin by “run as administrator” read count : 10

2018/11/01 0

Simplest c# sample to call azure storage api

Finally called the azure storage api, stucked for one hour in library. There is a / in + “/{0}/\ncomp:list”, Account); Remember two things:1. If you are calling to azure management api, you need a cert. Read and If you are calling azure storage api, you just need a key, no cert if needed.…
Read more

2018/10/27 1

Excel Addins行得比Outlook前

Excel Addins行得比Outlook前, 雖然而家大家都係NodeJS+React, 但係Outlook到而家連Attach debugger都, 要告靠print段估 read count : 28

2018/10/23 0

JDK 11 problem

JDK11網上好多人都有我呢個問題,就係11 refactor左好多class,如果用嘅library係jdk8到compiler就會有呢個問題。Netbeans進度太慢,最新嘅netbeans 9.0只支持jdk10仲要好多plugin都用唔到,原因係netbeans.org呢個domain仲未貢獻俾apache基金會。所以原先netbeans plugin啲lib用緊package org.netbeans仲未可以移到俾apache,呢單野唔知搞幾耐。 read count : 21

2018/09/30 0

dotnet core will produce two exe

dotnet core will produce two exe if you make it self contained. One in win-x64\ and one in win-x64\publish\ . The different between it is referencing two different coreclr.dll. See the arrow in the below image. read count : 23

2018/09/22 0

Command to tail SharePoint Log

If in SharePoint 2013, change your path to C:\Program files\Common Files\Microsoft Shared\Web Server Extensions\13\logs\ read count : 31

2018/09/20 0


咪記唔將成套.net搞到portable其中一個原因可能係CLR係用com server寫,com一引用DLL根本係好難移值 read count : 24

2018/09/19 0

Useful AD command about AD user

get user properties get-aduser -filter {name -eq ‘administrator’} -property * get-aduser -filter {name -eq ‘administrator’} -property *|select mobile,city read count : 14

2018/09/15 0

主題分享 – 走進 .NET Core 的世界

dotnet core pptx [slideshare id=114651142&doc=dotnetcore-180915070504&w=650&h=500] read count : 38

2018/09/15 0

Cityu AppsLab – Assembly programming course lesson 2

Powerpoint : Lesson 1 : assembly-programming Lesson 2 : assembly-programming Lesson 2 [slideshare id=112511457&doc=assembly-programminglesson2-180901042113&w=650&h=500 ] read count : 22

2018/09/01 0

Azure Recovery Services vaults根本就backup唔到

Azure Recovery Services vaults根本就backup唔到仲要無得delete個backup job,而家除左等唔知可以點!? read count : 25

2018/08/26 0

Free Assembly programming training in Cityu AppsLab

Thanks for Professor Ray from AppsLab holding this meaningful training for public about assembly language programming training, bringing system level programming experience to all joiners. Register links are and If you are interest to build a toolchain from the ground up, join us at or contact me at [slideshare id=110442329&doc=assembly-programming-i-180818154333&w=650&h=500] Course Materials: asm_example nasm…
Read more

2018/08/18 0

Hyper-V是Type 1的Hypervisor

Hyper-V是Type 1的Hypervisor, 當你安裝完它的時侯, 它會比所在的windows更加底層, Bootloader是會首先加載它然後由它去啓動完先的那一個windows, 所以之後的vm也和那個windows同級, 所以就算那個windows死機了, 其實Hyper-V是沒有死的, 在它上面運行的vm更加不會死. read count : 54

2018/08/14 0

.net core CLR ELF analyst in Ubuntu 16.04

Analyst the ELF files build from .net core CLR in Ubuntu 16.04 by read count : 11

2018/08/12 0

Manually create sharepoint configuration database

1. you have to run sharepoint shell using administrator 2. when credential dialog popup, you have to input the user name as machine_name\administrator 3. when hitting error, you must close the shell and restart it, otherwise whatever you do, last error message still happen Tips: 1. if you hit “Requested registry access is not allowed”,…
Read more

2018/08/03 0

Powershell學習之旅 – Object Type

Powershell是一種typed的語言,和其它同種的語言比,它有一個我認為比較特別的地方,就是它支援不同的Object typ。Windows世界裏幾個大的Object家族它都支持: Common Object Model (COM) .Net Windows Management Instrumentation (WMI), 它是Management Object Format格式 ActiveX Data Objects Active Directory Services Interface (ADSI) XML Powershell是用adaptor的方式去和不同格式的object聯絡,此Topic沒有太多人有興趣所以書中並沒有提及。   read count : 35

2018/08/01 0

Misleading information from Microsoft Docs

I just deployed my outlook addin to office 365 admin center, information from the below page is misleading.   read count : 19

2018/07/06 0

[solved] WordPress excerpt function can’t break chinese text vi ./wp-content/themes/one-page-express/functions.php read count : 18

2018/07/04 0


「打水程式」的電腦簽賭程式,利用兩個網站間對同一場比賽的不同賠率,自動找出同時押注兩隊均可獲利的比賽,從中賺取差價,獲利率幾乎百分之百。利用不同簽賭網站對同一場比賽訂定的賠率不同,從中賺取差價,早在國外及大陸地區風行多年,並有簽賭集團專門藉此牟利。早期均是靠人力坐在電腦前分析各個簽賭網站的賠率,稱之為「打水」,負責分析者稱為「打水員」,後來則演進為以電腦程式自動在簽賭網站之間找出可獲利的比賽,稱為「打水程式」。 舉例來說,一場A隊對上B隊的比賽,甲站對A隊開出賠率1:1,對B隊開出賠率1:0.9;乙站對A隊開出賠率1:0.8,對B隊賠率1:1.1。如同時下注甲站A隊10000元,乙站B隊9500元,比賽結束後,如A隊獲勝,甲站可贏10000元,乙站輸9500元,可獲利500元;若B隊獲勝,則甲站輸10000元,乙站可贏10450元,仍獲利450元。 弱盤打水:高勝率、高風險、高報酬 打弱盤才是近年打水的主流,目前台灣的球公司普遍都是這種打法,一般沒接觸打水的玩家很難將打弱盤和打水畫上等號,其實許多人在說的「假球理論」、「十賭九輸理論」、「明燈理論」,都是指向「弱盤理論」。打弱盤並不是打雙邊,而是只打單邊,就是永遠站在人少的那一邊;就單一場比賽來看打弱盤是打單邊,然而將整個投注模式放大後,打弱盤即是囊括了所有不公平盤底下得利的那一邊,「假球理論」指的是熱門投注球隊故意放水坑殺散戶,「十賭九輸理論」指的是注碼多的一方會輸球,「明燈理論」指的是賭桌上投注最多的那個賭客通常是其他賭客的明燈,跟他反向投注就會贏錢。 用比較科學點的角度來看,A隊在初始的平衡盤口讓B隊1分,但因為A隊是投注熱門,經過大量投注後變成讓B隊1.5分,此時買B隊等於比平衡盤多了0.5分的受讓,那勝率自然會拉高,所以打弱盤在理論基礎上並沒有什麼太大的缺陷,若能做到場場投注弱盤,也就是永遠站在55%以上勝率的那一方,那將時間軸拉長後確實是穩賺不賠的生意。 當然就短時間內來看,打弱盤的風險一定是所有水單中最大的,單邊投注就會佔到輸贏,而不是真的只賺水錢或分洞,但時間拉長後和別的水單並無二致,只是打弱盤會有更高的勝率,和折損更少的賠率損失,只要資金夠充裕可以承受一時的勝負擺盪,打弱盤無疑是報酬最好的打水方式。 什麼是足球打水?對於初次接觸的朋友可能會感到很陌生,足球打水本質上是利用了平台與平台之間的對賭,自己從中賺取利潤。比如意甲比賽我們在A平台上下注AC米蘭獲勝,在B平台上下注尤文圖斯獲勝,這樣不管最終是尤文圖斯贏,還是AC米蘭贏,我都能買中。因為賠率的關係,除去下注的金額,我們還能有盈利,這個過程我們就稱為足球打水。足球打水為什麼能夠獲利呢?這裡面有一個很關鍵的因素——賠率,上一段中也有提到。賠率是菠菜平台經過嚴密計算綜合得出的,這就跟保險公司確定保險範圍和收費一個道理。一般情況下,一場比賽,根據兩隊交戰歷史紀錄,兩隊最近狀態,主客場勝率等,會確立3個賠率。我們先來簡單了解下賠率,後面我們在說打水套利的公式是怎樣的。 賠率計算公式:a÷b=c cc×10%=d 這裡面d就是最終計算出來的賠率 a是基數,值為100 b是莊家分析師分析出來的百分比概率 c是a / b的結果 舉個例子: 世界杯中巴西與阿根廷的比賽,莊家通過分析得出巴西勝出的概率為40%左右。那麼就用這個公式來計算如下: 第一步100÷40=2.5 第二步2.5-2.5×10%=2.25 那麼,莊家開出巴西的賠率會在2.25左右。 如莊家通過分析得出打平的概率為31%左右,那麼就用這個公式來計算如下: 第一步100÷31=3.22 第二步3.22-3.22×10%=3 那麼,莊家就會開出平局的賠率會在2.89左右。阿根廷獲勝的賠率也可以按照相同的方法計算出。 上面就是賠率的簡單計算過程中,不過賠率並不是固定不變的,Bet公司會根據球隊的狀態已經下注的情況,動態調整比賽賠率,因為賠率有了動態的變動,我們才有足球打水的機會。那麼足球打水套路公式是怎樣的呢? 計算方法:上盤,假設回水1%,下注2000,水位1.00,輸贏都是2000。下盤,假設回水1%,下注2020,水位0.98,如果下盤贏就賺2020*0.98,2020*0.98 + (2000+2020)*1% – 2000=19.8,賺19.8塊;如果下盤輸,2000+ (2000+2010)*1% -2020=19.8,一樣賺19.8塊。 足球打水之所以能夠盈利,就是因為不同Bet平台有賠率變動的時間差,抓住這些時間差,我們足球打水就能夠獲利。 read count : 254

2018/06/18 0


發現左一個可以玩殘你嘅咪記大bug,如果你寫sharepoint兼用typescript但係又想用jquery, 你好可能會用: import * as $ from ‘jquery’; 如果嗰畫面得一個webpart,甘你會無事,如果有多個webpart(見下圖),你reload幾次就會撞到有一次某幾個webpart無哂野,因為jquery撞左,網上有啲友話係config.json個externals加返jquery呢一招我試過唔得。但我撞到有一招係work嘅: read count : 25

2018/06/18 0


佛教根本無一本書講明做好人一定有好報,無一位過去嘅論師可以或嘗試過論證呢一點,龍樹無,無著無,世親無,十大弟子都無。佛教的根本立命之題就係世界是無常,呢種無常係終極嘅無常,甘仲點可能做好人一定好有報呢。如果宇宙真係做好人一定會有好報,甘呢個宇宙就應該被一個更大嘅機器所包住,再由呢個機器去維護呢個宇宙做好人一定有好報呢條一定會發生嘅定律。宇宙根本唔係為人類而設甘點可能有一條定律為人類而設計呢?人嘅行為會帶來後果,好壞嘅後果全部都係自己懲罰自己,呢點係唯一公平嘅地方。因為呢個宇宙唔會為左你而設立機制去懲罰,你自己就係懲罰你自己嘅唯一機制。 read count : 22

2018/06/17 0


Autoconf不能跑得很快的原因是因為它會為每一個feature去compile一個很小的測試程式去測試那個feature能不能被正確編譯出來,在底層系統的世界,因為歷史原故,我們不能好簡單的判斷在你的dev machine裏有libXXX.1.2.3.so就認為你的代碼能正確地編譯出來,因為好多時library的作者更改了代碼但沒有升級版本號。如果要令你的c/c++程式能誇平台編譯,版本號也是沒有絕對意義,因為同一個版本的library在linux和在unix上有着實質的不同。最誇張的例子就是有些庫在linux上是存在,但在unix上是不存在,所以autoconf要為每一次編譯去逐個測試,所以實在快不來,這一點和java/nodejs世界的build system有非常大的不同。 read count : 16

2018/06/17 0

Simplest websocket with nodejs example

1. express –view=ejs myspp 2. var server = http.createServer(app); 3. Source : myapp read count : 18

2018/06/14 0


插一百萬行record, Redis比H2慢太多,H2只需要七秒,redis用了40秒,為什麼用c++寫出來的redis會比用java寫出來的h2慢這麼多的? NoSQL不是比傳統database爽快的嗎? read count : 34

2018/06/12 0

Solved: vscode [tslint] ‘ should be ” (quotemark)

To solve “[tslint] ‘ should be ” (quotemark)” when developing spfx webpart using visual studio code, do these: open config/tslint.json add {     “$schema”: “”,     // Display errors as warnings     “displayAsWarning”: false,     // The TSLint task may have been configured with several custom lint rules     // before this config file is read (for example lint rules…
Read more

2018/06/10 0