原创 C++數據域封裝

Data Field Encapsulation (數據域封裝) class Circle { //數據域採用public的形式有兩個問題 public: //First,

原创 1001. 害死人不償命的(3n+1)猜想 (15)(Python)

卡拉茲(Callatz)猜想: 對任何一個自然數n,如果它是偶數,那麼把它砍掉一半;如果它是奇數,那麼把(3n+1)砍掉一半。這樣一直反覆砍下去,最後一定在某一步得到n=1。卡拉茲在1950年的世界數學家大會上公佈了這個猜想,傳說

原创 【轉載】開源的存儲解決方案

你的企業離不開存儲數據。但是,當你去尋找一款可以涵蓋所有存儲需求的解決方案時,可能性卻似乎是無窮無盡的,其中一些可能會花費你大量的IT預算。所以,當你正在選購數據存儲工具的時候,你不應該忽視開源。 一旦你深入探尋開源世界,你會發現

原创 創建函數並訪問

class Circle{ public: double radius; Circle() { //Constructors: radius

原创 C++ 入門

1.A variable pointer to a constant value 變量指針指向一個常量數據 Shortly:Pointer to Constant(常量指針/常指針) 特徵:指針指向的內容不可

原创 變量作用域與this指針

對於this的看法(引自wrean):this 本身在英語中不就是簡化語言的作用麼。比如如果樓上問我 “這門課是老崔老師教的嗎?” 我可以有兩種回答方式:“是老崔老師(radius_)”或者“就是這個老師(*this)” 【對

原创 C++字符串類

Constructing a String (創建string對象) Create an empty string using string’s no-arg constructor (用無參構造函數創建一個空字串) strin

原创 1031. 查驗身份證(15)

一個合法的身份證號碼由17位地區、日期編號和順序編號加1位校驗碼組成。校驗碼的計算規則如下: 首先對前17位數字加權求和,權重分配爲:{7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2};然後將計算的和對11

原创 1106. Lowest Price in Supply Chain (25)

【程序來自tiny656】 A supply chain is a network of retailers(零售商), distributors(經銷商), and suppliers(供應商)– everyone involved

原创 筆記本電腦突然無法連網

筆記本電腦突然無法聯網,無線網也不能連接,系統檢測顯示是windows無法自動將IP協議堆棧綁定到網絡適配器。 解決方法:將無線網的屬性打開,把連接項目裏面的除了兩個microsoft、tpv4、tpv6、兩個鏈路層拓撲發現的其他東西都勾

原创 Essential C++(3)泛型編程

STL: 容器:vector , list , set, map…… 算法:find , sort , replace , merge…… 假設給定一個存儲整數的vector,以及一個整數值,如果此值存

原创 1005. Spell It Right (20)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the s

原创 歸還文物(有時間就翻譯。。)

Well-travelled artefacts Where it is safe to do so, cultural artefacts should be repatriated

原创 Politics this week

Politics this week (Feb 20th 2016 | From the print edition) Tributes were paid to Antonin Scalia, one of the justices

原创 Essential C++ 之 編程基礎

(1) 常識:page 1 - 25 布爾值: 字符: 整數: 浮點數:算數運算符: 關聯運算符: 邏輯運算符: 等號運算符: 小於等於符: 賦值運算符: 累加運算符: 條件運算符: 複合運算符: 條件分支: 循環控制: 抽象化程序庫