原创 Python製作進度條

Python製作進度條 1號進度條 import datetime import time class Tiao(object): def __init__(self): self.obj1=dateti

原创 Python操作json

使用Json函數,需要導入json庫:import json 函數 描述 json.dumps 將python對象編碼成json字符串 json.loads 將已編碼的json字符串解析爲python對象 j

原创 C# How To系列

C# How To系列 文章目錄C# How To系列1.實例化一個類2.索引器3.通過Collection初始化器初始化字典4.Partial Class/Method5.方法傳類參數和結構體參數的區別6.運算符重載7.修改一個

原创 vim操作命令學習筆記

vim操作命令學習筆記 最近因爲買了一個阿里雲的服務器學linux系統,之前用vim寫代碼只會(:q!,:wq:i…)這幾個命令,然後在B站看到了大神TheCW用的Vim以後強烈懷疑自己用的是假Vim,然後下定決心去學習vim常用

原创 WPF的TextBlock控件

WPF的TextBlock控件 XMAL代碼如下: <Window x:Class="MyControl.MainWindow" xmlns="http://schemas.microsoft.com/winfx

原创 WPF用LiveChart來畫餅圖

WPF用LiveChart來畫餅圖 效果如下: xmal界面代碼: <Window x:Class="餅圖.MainWindow" xmlns="http://schemas.microsoft.com/winf

原创 C#幾何算法練習1

C#幾何算法練習1 下面的demo實現了 給定 n個線,找出其中兩兩相交的線 using System; using System.Collections.Generic; /// <summary> /// 給定 n個線,

原创 C#學習之Exception類

C#學習之Exception類 using System; //Represents error that occur during application execution //Inheritance: Object→Exc

原创 WPF使用鼠標滾輪和Ctrl實現縮放和放大功能

WPF使用鼠標滾輪和Ctrl實現縮放和放大功能 效果如下: WPF小項目合集 界面代碼如下: <Window x:Class="縮放.MainWindow" xmlns="http://schemas.mic

原创 # C#通過IEnumrator來遍歷

C#通過IEnumrator來遍歷 using System; using System.Collections; using System.Collections.Generic; namespace 練習基類 { cl

原创 C#實現IEnumerable接口

C#實現IEnumerable接口 public class Person { public Person(string f,string l) { this

原创 C#實現IDictionary接口

C#實現IDictionary接口 最近學習.Net開發,發現自己跟着實現一個微軟官方文檔的例子,對自己理解一些相關的數據結構和用法有相當好的幫助,所以這裏跟着文檔上的例子實現了IDictionary接口,實現了一個字典類型的基本

原创 C#中始終保持有序的泛型集合

C#中始終保持有序的泛型集合 在System.Collections.Generic命名空間下面的泛型集合SortedSet,對於經常需要排序的需求來說是很好用的了。集合中的數據始終處於一個有序狀態,同時還不會影響性能。 下面用一

原创 C#實現IComparable接口

C#實現IComparable接口 可以用這個接口對自定義的類進行排序,排序方式還可以設置按照多種標準排序。使用起來非常的靈活,本栗子實現了用一個自定義類Box的長,寬,高進行排序。即,先比較長,如果長相等,再比較寬,如果寬也相等

原创 C#特性例子說明

C#特性例子說明 using System; using System.Reflection; namespace 特性_Attribute { // An enumiration of animals publ