顯示具有 IT 標籤的文章。 顯示所有文章
顯示具有 IT 標籤的文章。 顯示所有文章

2017年1月15日 星期日

Commonly used regular expression symbols

Reference from Web Scraping with Python , Ryan Mitchell
SymbolsMeaningExampleExample Match
*Matches the preceding character, subexpression, or bracketed character, 0 or more timesa*b*aaaaaaaa,aaabbbbb, bbbbbb
+Matches the preceding character, subexpression, or bracketed character,1 or more timesa+b+aaaaaaaab, aaabbbbb, abbbbbb
[]Matches any character within the brackets (i.e., “Pick any one of these things”)[A-Z]*APPLE,
CAPITALS,
QWERTY
()A grouped subexpression (these are evaluated fi rst, in the “order of operations” of regular expressions)(a*b)*aaabaab, abaaab, ababaaaaab
{m, n}Matches the preceding character, subexpression, or bracketed character between m and n times (inclusive)a{2,3}b{2,3}aabbb, aaabbb,aabb
[^]Matches any single character that is not in the brackets[^A-Z]*apple,lowercase,qwerty
|Matches any character, string of characters, or subexpression, separated by the “I” (note that this is a vertical bar, or “pipe,” not a capital “i”)b(a|i|e)dbad, bid, bed
.Matches any single character (including symbols, numbers, a space, etc.)b.dbad, bzd, b$d, b d
^Indicates that a character or subexpression occurs at the beginning of a string^aapple, asdf, a
\An escape character (this allows you to use “special” characters as their literal meaning)\. \| \\. | \
$Often used at the end of a regular expression, it means “match this up to the end of the string.” Without it, every regular expression has a defacto “.*” at the end of it, accepting strings where only the fi rst part of the string matches. This can be thougt of as analogous to the ^ symbol.[A-Z]*[a-z]*$ABCabc, zzzyx, Bob
?!“Does not contain.” This odd pairing of symbols, immediately preceding a character (or regular expression), indicates that that character should not be found in that specific place in the larger string. This can be tricky to use; after all, the character might be found in a diff erent part of the string. If trying to eliminate a character entirely, use in conjunction with a ^ and $ at either end.^((?![A-Z]).)*$no-caps-here, $ymb0ls a4e f!ne

2017年1月14日 星期六

old computer-science joke

As the old computer-science joke goes: “Let’s say you have a problem, and you decide
to solve it with regular expressions. Well, now you have two problems.”

2016年10月17日 星期一

Chrome Disable TLS1.0

在Chrome icon 按右鍵-> 內容,在目標欄位最後加上  -ssl-version-min=tls1.1

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ssl-version-min=tls1.1



2016年10月16日 星期日

hidden windows secret command line tricks

Reference from:
https://codingsec.net/2016/06/best-hidden-windows-secret-command-line-tricks/


#2 Copy the output of a command to clipboard

<command> | clip

#6 View a navigable list of all the commands recently used by you

pressing the F7 keyq

#7 Run cmd as admin without using the mouse

a) Type cmd in the Start Menu’s search box and press Ctrl + Shift + Enter


#9 Drag & Drop a file/folder inside Command Prompt

You can just drag a file/folder into the Command Prompt window in order to paste its location in the command prompt window.


#10 Get detailed help for commands whose syntax you don’t know

help <command>.

2016年6月5日 星期日

Total Cost of Ownership (TCO)

Gartner defines total cost of ownership (TCO) a comprehensive assessment of information technology (IT) or other costs across enterprise boundaries over time. For IT, TCO includes hardware and software acquisition, management and support, communications, end-user expenses and the opportunity cost of downtime, training and other productivity losses.

Reference from http://www.gartner.com/it-glossary/total-cost-of-ownership-tco/

2016年5月28日 星期六

快速鍵 - Hot Key

Shortcut KeysDescription
Alt + FFile menu options in current program.
Alt + EEdit options in current program
Alt + TabSwitch between open programs
F1Universal Help in almost every Windows program.
F2Rename a selected file
F5Refresh the current program window
Ctrl + NCreate a new, blank document in some software programs
Ctrl + OOpen a file in current software program
Ctrl + ASelect all text.
Ctrl + BChange selected text to be Bold
Ctrl + IChange selected text to be in Italics
Ctrl + UChange selected text to be Underlined
Ctrl + FOpen find window for current document or window./ Search.
Ctrl + SSave current document file.
Ctrl + XCut selected item.
Shift + DelCut selected item.
Ctrl + CCopy selected item.
Ctrl + InsCopy selected item
Ctrl + VPaste
Shift + InsPaste
Ctrl + KInsert hyperlink for selected text
Ctrl + PPrint the current page or document.
HomeGoes to beginning of current line.
Ctrl + HomeGoes to beginning of document.
EndGoes to end of current line.
Ctrl + EndGoes to end of document.
Shift + HomeHighlights from current position to beginning of line.
Shift + EndHighlights from current position to end of line.
Ctrl + Left arrowMoves one word to the left at a time.
Ctrl + Right arrowMoves one word to the right at a time.
Ctrl + EscOpens the START menu
Ctrl + Shift + EscOpens Windows Task Manager
Alt + F4Close the currently active program
Alt + EnterOpen the Properties for the selected item (file, folder, shortcut, etc.)

2015年8月8日 星期六

你去過現場了嗎? 豐田三現主義

在豐田有所謂的「現場、現物、現實」三現主義,亦即實際到工作現場走一趟,運用現場實務思考,進而掌握真實的狀況。因此,每當豐田主管遇到下屬反映問題時,劈頭就會問對方:「你去過現場了嗎?」

應用在IT issue handling:
現場: AP log
現物: Source code
現實: Issue reproduce

2015年7月26日 星期日

高效能網站開發指南

1. 影響網路通訊效能的兩個關鍵元素: 延遲(Latency). 頻寬(Bandwidth)。延遲(而非頻寬)通常是大多數網站的效能瓶頸。
2. 根據研究結果,一旦系統出現100~200ms的延遲,絕大數人都會確實感到所謂的「延誤」 (lag)。一旦延遲時間超過300ms,在互動上通常就會被當作是「遲鈍」 (sluggish),而在碰到1000ms以上的阻塞情況下,很多使用者都會在等候回應的時候,開始轉到另一個更迫切的事務上。








3. TCP的最佳化重點是在資料傳遞的準確性,而非即時性。這樣的特性,相對地位瀏覽器網頁效能的最佳化工作帶來挑戰。
4. 「壅塞崩潰」(congestion collapse): 假如任何主機的往返時間超過重新傳送的最大間隔的話,這主機就會一再地把相同資料包的副本發送到網路上。如此一來,整個網路就會出現很大的麻煩問題。
5. Head-of-Line Blocking: 每個TCP封包被放置在網路上的時候,夾帶著一個獨一無二的序號,而該項資料一定會被依序第傳到接收端。假如其中有個封包在送往接收端的路上發生遺失狀況的話,所有後續封包就必須先被保留在接收端的TCP緩衝區,直到遺失的封包被重新傳送,並且到達接收端為止。
6. UDP不提供的服務
   6.1 不保證訊息傳遞情況 => 沒有ACK訊號,不做重新傳送,沒有逾時機制。
   6.2 不保證傳輸次序 => 無封包序號,不做重新排序處理
   6.3 無連線狀態追蹤 => 沒有連線建立或拆卸機制
   6.4 無擁塞控制機制 => 無內建客戶端或網路回饋機制
7. Browser Prosessing Pipeline
 










8. Cookies 是許多應用程式的常見效能瓶頸,許多開發者都會忘記,他們會因此而把明顯的傳輸負擔加諸到每一個請求上。
9. 考慮對低於1~2KB以下的資源進行內聯處理(resource inlining),因為在這個門檻以下的資源,往往都會產生比該項資源本身還高的HTTP成本。

  • 假如檔案都是小的,而且被限定在幾個特定頁面裡的話,考慮內聯處理。
  • 假如小的檔案常常會被多個頁面重複使用到的話,就考慮套件打包方式。
  • 假如小的檔案擁有較高的更新頻率的話,則將他們個別保存。
10. 長期有效的效能最佳慣例
  • 減少DNS查詢
  • 重複使用TCP連線
  • 將HTTP重導數量降到最低
  • 使用內容傳輸網路(CDN)
  • 刪除不必要資源

2015年6月7日 星期日

Archiving 注意事項

1. Location
   - How fast will we need to be able to retrieve from archives when needed?
2. Duration
   - How much space do we nned in the archival system?
   - How long will we need to store the archives for?
3. Format
   - In what format will the data or information be stored? Clear text or cipher text?
   - How will these archives themselves be protected

2015年4月26日 星期日

14 Differences between QA and QC in Software Testing

Reference: 
http://testingbasicinterviewquestions.blogspot.tw/2015/03/top-14-differences-between-qa-and-qc-in.html

      Quality Assurance
         Quality Control
1. Quality Assurance helps us to build processes.
1. Quality Control helps us to implements the build processes.
2. It is the Duty of the complete team.
2. It is only the Duty of the Testing team.
3. QA comes under the category of Verification.
3. QC comes under the category of Validation.
4. Quality Assurance is considered as the process oriented exercise.
4. Quality Control is considered as the product oriented exercise.
5. It prevents the occurrence of issues, bugs or defects in the application.
5. It always detects, corrects and reports the bugs or defects in the application.
6. It does not involve executing the program or code.
6. It always involves executing the program or code.
7. It is done before Quality Control.

7. It is done only after Quality Assurance activity is completed.

8. It can catch an error and mistakes that Quality Control cannot catch, that is why considered as Low Level Activity.
8. It can catch an error that Quality Assurance cannot catch, that is why considered as High Level Activity.

9. It is human based checking of documents or files.
9. It is computer based execution of program or code.
10. Quality Assurance means Planning done for doing a process.
10. Quality Control Means Action has taken on the process by execute them.
11. Its main focuses on preventing Defects or Bugs in the system.
11. Its main focuses on identifying Defects or Bugs in the system.
12. It is not considered as a time consuming activity.
12. It is always considered as a time consuming activity.
13. Quality Assurance makes sure that you are doing the right things in the right way that is the reason it is always comes under the category of verification activity.
13. Quality Control makes sure that whatever we have done is as per the requirement means it is as per what we have expected, that is the reason it is comes under the category of validation activity.
14. QA is Pro-active means it identifies weaknesses in the processes.
14. QC is Reactive means it identifies the defects and also corrects the defects or bugs also.