摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System 阅读全文
摘要:
查找button的子元素是个TextBlock,再设置它的TextWrappingProperty属性为 TextWrapping.Wrap。 Button btn2 = new Button() {Content="fdhfhfhfhfghfhfhfhfhhfh",Width=88}; btn2. 阅读全文
摘要:
包括画卡通画,找出2张图片的相似度,电脑做梦的图片生成,利用GTP-2的文本续写。 using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using 阅读全文
摘要:
https://docs.microsoft.com/zh-cn/dotnet/standard/collections/thread-safe/blockingcollection-overviewBlockingCollection 概述 BlockingCollection<T> 是一个线程安 阅读全文
摘要:
//随机多边形:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; usin 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Draw 阅读全文
摘要:
<InkCanvas Name="inkCanvas"></InkCanvas> <Button Name="btnRecognize" Content="RecognizeAsync" HorizontalAlignment="Left" Height="104" Margin="0,0,0,0" 阅读全文
摘要:
这个函数在处理循环时可以每生成一个数据就返回一个数据让主函数进行处理: static void Main(string[] args) { foreach (var item in GetNumbers()) Console.WriteLine("Main process. item = " + i 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Runtime.InteropServic 阅读全文
摘要:
模拟10个线程,每个线程模拟100次取钱: 其实就是相当于1000个人来同时取钱。当然实际情况是取钱的人分布在不同的地区的取款机取钱。同一个取款机只能一个人操作。 关键是要保证取钱的余额要准确,不能在多人同时操作的时候计算失误,于是要在计算余额的时候锁住。lock关键作用在于此。 static vo 阅读全文