diff --git a/Build Tool/Windows installer/Advanced Installer/Advanced Installer.md b/Build Tool/Windows installer/Advanced Installer/Advanced Installer.md new file mode 100644 index 0000000..59c94d1 --- /dev/null +++ b/Build Tool/Windows installer/Advanced Installer/Advanced Installer.md @@ -0,0 +1,4 @@ +# Advanced Installer + +- [Free Windows Installer - MSI Installer Tool](https://www.advancedinstaller.com/) +- [安装包制作工具 Advanced Installer v16.1 + v16.0 付费汉化版!心海首发!-心海e站](https://hrtsea.com/27808.html) diff --git a/Cloud/google/GoogleTranslateFreeApi/GoogleTranslateFreeApi.md b/Cloud/google/GoogleTranslateFreeApi/GoogleTranslateFreeApi.md new file mode 100644 index 0000000..80acc13 --- /dev/null +++ b/Cloud/google/GoogleTranslateFreeApi/GoogleTranslateFreeApi.md @@ -0,0 +1,5 @@ +# GoogleTranslateFreeApi + +## Github + +- [Grizley56/GoogleTranslateFreeApi](https://github.com/Grizley56/GoogleTranslateFreeApi) diff --git a/Cloud/google/Gpay/Gpay.md b/Cloud/google/Gpay/Gpay.md new file mode 100644 index 0000000..e69de29 diff --git a/Cloud/google/Translate/Translate.md b/Cloud/google/Translate/Translate.md new file mode 100644 index 0000000..16f0c65 --- /dev/null +++ b/Cloud/google/Translate/Translate.md @@ -0,0 +1,7 @@ +# Translate + +- [使用 google 语言 api 来实现整个网站的翻译 - 曾经沧海 云淡风轻 - 博客园](https://www.cnblogs.com/yifenghong/p/4522949.html) +- [谷歌大神 Jeff Dean:谷歌翻译 API 付费服务已获利 - 人工智能 - 电子发烧友网](http://www.elecfans.com/rengongzhineng/636406.html) +- [这是真的,Google 翻译的 API 真的关闭了-腾讯云资讯](https://cloud.tencent.com/info/aa73e69f1b1f8f14ccdd15f0e8666ef2.html) +- [快速入门:使用客户端库](https://cloud.google.com/translate/docs/quickstart-client-libraries) +- [GoogleCloudPlatform/dotnet-docs-samples](https://github.com/GoogleCloudPlatform/dotnet-docs-samples/blob/2ec373efac86f3e589ff98ac8abf5d28b29b1578/translate/api/QuickStart/Program.cs) diff --git a/Cloud/google/apis.md b/Cloud/google/apis.md new file mode 100644 index 0000000..e99aab9 --- /dev/null +++ b/Cloud/google/apis.md @@ -0,0 +1,35 @@ +# console.developers.google.com/apis + +- [Getting Title at 53:25](https://console.developers.google.com/apis/dashboard?project=fluid-mote-240115&pli=1) + +## GCP [Google Cloud Platform] + +- [Google Cloud Platform Documentation Google Cloud](https://cloud.google.com/docs/) +- [Google Cloud Platform Billing Support - Google Cloud Platform Console Help](https://support.google.com/cloud/contact/cloud_platform_billing) + +## Cloud Translation API + +- [Google 中国开发者  |  Google Developers](https://developers.google.cn/china/) +- [技术资源汇总](https://chinagdg.org/resource-list/) + +### Google.Cloud.Translation.V2 + +- [Cloud Translation API](https://console.developers.google.com/apis/library/translate.googleapis.com?filter=category:machine-learning&project=fluid-mote-240115&folder&organizationId) +- [Google.Cloud.Translation.V2 | Google.Cloud.Translation.V2](https://googleapis.github.io/google-cloud-dotnet/docs/Google.Cloud.Translation.V2/) +- [Google Cloud Client Libraries for .NET | Google Cloud APIs](https://googleapis.github.io/google-cloud-dotnet/docs/index.html) + +## APIS + +### Google APIs Explorer + +- [Google APIs Explorer](https://developers.google.com/apis-explorer/#p/) +- [API Library](https://console.developers.google.com/apis/library?project=fluid-mote-240115&folder&organizationId) +- [Machine learning](https://console.developers.google.com/apis/library?filter=category:machine-learning&project=fluid-mote-240115&folder&organizationId) + +### Pricing + +- [Pricing Google Cloud](https://cloud.google.com/translate/pricing) + +### Google Cloud Platform + +- [GCP Support Services Support Google Cloud](https://cloud.google.com/support/) diff --git a/Cloud/google/developers/developers.md b/Cloud/google/developers/developers.md new file mode 100644 index 0000000..bf4250d --- /dev/null +++ b/Cloud/google/developers/developers.md @@ -0,0 +1,5 @@ +# developers + +- [Google Developers](https://developers.google.com/) +- [GCP(Google Cloud Platform)入门 - 六合小杆子 - 博客园](https://www.cnblogs.com/shengwang/p/10567446.html) +- [Gpay](https://pay.google.com/payments/home) diff --git a/Cloud/google/google-translate-api/google-translate-api.md b/Cloud/google/google-translate-api/google-translate-api.md new file mode 100644 index 0000000..91df152 --- /dev/null +++ b/Cloud/google/google-translate-api/google-translate-api.md @@ -0,0 +1,5 @@ +# google-translate-api + +## GitHub + +- [matheuss/google-translate-api](https://github.com/matheuss/google-translate-api) diff --git a/C-currentDirectory.Bat b/Cmd-CurrentDirectory.Bat similarity index 100% rename from C-currentDirectory.Bat rename to Cmd-CurrentDirectory.Bat diff --git a/C-mddir.Bat b/Cmd-mddir.Bat similarity index 100% rename from C-mddir.Bat rename to Cmd-mddir.Bat diff --git a/DB/Microsoft SQL Server 2012 Express/Microsoft SQL Server 2012 Express.md b/DB/Microsoft SQL Server 2012 Express/Microsoft SQL Server 2012 Express.md new file mode 100644 index 0000000..da982c6 --- /dev/null +++ b/DB/Microsoft SQL Server 2012 Express/Microsoft SQL Server 2012 Express.md @@ -0,0 +1,3 @@ +# Microsoft SQL Server 2012 Express + +- [Download Microsoft® SQL Server® 2012 Express from Official Microsoft Download Center](https://www.microsoft.com/en-us/download/details.aspx?id=29062) diff --git a/DB/PostgreSQL/PostgreSQL.md b/DB/PostgreSQL/PostgreSQL.md new file mode 100644 index 0000000..c126775 --- /dev/null +++ b/DB/PostgreSQL/PostgreSQL.md @@ -0,0 +1,3 @@ +# PostgreSQL + +- [问题来了,PostgreSQL 的好处都有啥?](https://www.sohu.com/a/237111633_671058) diff --git a/DB/SQLite/Insert.md b/DB/SQLite/Insert.md new file mode 100644 index 0000000..bd67a17 --- /dev/null +++ b/DB/SQLite/Insert.md @@ -0,0 +1,13 @@ +# 写入 + +- [使用事务操作 SQLite 数据批量插入,提高数据批量写入速度,源码讲解 - 伍华聪 - 博客园](https://www.cnblogs.com/wuhuacong/p/3310008.html) +- [提升 SQLite 数据插入效率低、速度慢的方法 - fugaoting 的博客 - CSDN 博客](https://blog.csdn.net/fugaoting/article/details/88732027) +- [提升 SQLite 数据插入效率低、速度慢的方法 - majiakun1 的专栏 - CSDN 博客](https://blog.csdn.net/majiakun1/article/details/46607163) +- [c# 对sqlite基本操作,带批量插入(百万级秒插)-CSDN下载](https://download.csdn.net/download/mic_gary/10154869) + +## 常遇到问题 + +### string or blob too big + +- System.Data.SQLite.SQLiteException:“string or blob too big +- statement too long” diff --git a/DB/SQLite/Repair.md b/DB/SQLite/Repair.md new file mode 100644 index 0000000..39398f7 --- /dev/null +++ b/DB/SQLite/Repair.md @@ -0,0 +1,25 @@ +# Repair + +- SQLite 有一个很严重的缺点就是不提供 Repair 命令. +- 导致死亡提示 database disk image is malformed 它的产生有很多种可能, +- 比如,磁盘空间不足,还有就是写入数据过程中突然掉电等.官 + +- [SQLite 数据库错误:The database disk image is malformed 解决(修复)方法 - 林鹤霄 - ITeye 博客](https://linhexiao.iteye.com/blog/2342808) +- [使用 SQLite 的感想 - 猴健居士 - 博客园](https://www.cnblogs.com/HopeGi/archive/2013/05/28/3102922.html) +- [sqlite 错误 database disk image is malformed 可解决 - wolfking0608 的博客 - CSDN 博客](https://blog.csdn.net/wolfking0608/article/details/71076588) +- [讨论 SQLite 数据库损坏与修复 - 飞龙在天 - CSDN 博客](https://blog.csdn.net/dragonpeng2008/article/details/52094269) + +## 大型文件修复 + +```txt +最后这个问题还是解决了,我的解决方法是: +下载SQLite Expert Professional,一定要Professional版(收费)的,Personal版(免费)的没有修复功能。 +``` + +### sqlite3 下载 + +```txt +sqlite-tools-win32-x86-3280000.zip +(1.70 MiB) A bundle of command-line tools for managing SQLite database files, including the command-line shell program, the sqldiff.exe program, and the sqlite3_analyzer.exe program. +(sha1: 4063fe326243ab775a86c104fa77ac178f03976b) +``` diff --git a/DB/SQLite/SQL.md b/DB/SQLite/SQL.md new file mode 100644 index 0000000..75efe98 --- /dev/null +++ b/DB/SQLite/SQL.md @@ -0,0 +1,9 @@ +# SQL + +## SQL 语句 + +### 清理空闲页 + +```C# +VACUUM +``` diff --git a/DB/SQLite/SQLite.md b/DB/SQLite/SQLite.md index e139967..6c03cb4 100644 --- a/DB/SQLite/SQLite.md +++ b/DB/SQLite/SQLite.md @@ -2,6 +2,25 @@ - 本教程帮助您了解什么是 SQLite,它与 SQL 之间的不同,为什么需要它,以及它的应用程序数据库处理方式。 - SQLite 是一个软件库,实现了自给自足的、无服务器的、零配置的、事务性的 SQL 数据库引擎。SQLite 是一个增长最快的数据库引擎,这是在普及方面的增长,与它的尺寸大小无关。SQLite 源代码不受版权限制。 +- [SQLite 的并发处理 - Ming Tong - CSDN 博客](https://blog.csdn.net/cuit/article/details/21975807) + +```txt +总结 +最后我们来总结一下 + + +1.当有写操作时,其他读操作会被驳回 +2.当有写操作时,其他写操作会被驳回 +3.当开启事务时,在提交事务之前,其他写操作会被驳回 +4.当开启事务时,在提交事务之前,其他事务请求会被驳回 +5.当有读操作时,其他写操作会被驳回 +6.读操作之间能够并发执行 +``` + +```txt +使用SQLite经常会遇到并发处理,要处理好多线程或多进程之间的并发,就得搞清楚SQLite的机制,尤其是Sqlite的锁机制。 +因为SQLite是文件数据库,所以它的锁也基本是和文件一致,也即:写独占,读共享。这意味是在读取数据库的时候,是可以多个线程共享的,而如果有增删改的操作,则会独占此文件,其他线程会进程都会被阻塞。 +``` ## Official @@ -12,6 +31,22 @@ - [SQLite 简介 | 菜鸟教程](http://www.runoob.com/sqlite/sqlite-intro.html) - [SQLite 性能 - 它不是内存数据库,不要对 IN-MEMORY 望文生意。 - bbqz007 - 博客园](https://www.cnblogs.com/bbqzsl/p/6066851.html) - [C#操作 SQLite 数据库 - 阿凡卢 - 博客园](https://www.cnblogs.com/luxiaoxun/p/3784729.html) +- [[sqlite] db-journal 文件产生原因及说明 - Boffi - CSDN 博客](https://blog.csdn.net/mozart_cai/article/details/26815339) +- [SQLite 库级锁简介和“database is locked”异常的解决方法 - time 式的博客 - CSDN 博客](https://blog.csdn.net/WZh0316/article/details/81188451) + +### 性能 + +- [sqlite3 数据库最大可以是多大?可以存放多少数据?读写性能怎么样? - DerekHan - 博客园](https://www.cnblogs.com/derekhan/p/10897421.html) + +### 读写/锁 + +```text +SQLite 是一个软件库,实现了自给自足的、无服务器的、零配置的、事务性的 SQL 数据库引擎。SQLite允许多个进程/线程同时进行读操作,但在同一时刻只允许一个线程进行写操作。SQLite在进行写操作时,数据库文件会被锁定,此时任何其他的读/写操作都会被阻塞,如果阻塞超过5秒钟(默认是5秒,可通过重新编译SQLite进行修改),就会抛出描述为“database is locked”的异常。 + +出现上述现象的原因是SQLite只支持库级锁,不支持并发执行写操作,即使是不同的表,同一时刻也只能进行一个写操作。例如,事务T1在表A新插入一条数据,事务T2在表B中更新一条已存在的数据,这两个操作是不能同时进行的,只能顺序进行。 + +SQLite尽量延迟了申请X锁,直到数据块真正写盘时才申请X锁,再加上被阻塞的操作有等待时间,所以当SQLite作为客户端嵌入数据库被使用时时,一般情况下不会抛出“database is locked”的异常。但是,在高并发的环境下,还是很有可能抛出异常的。避免这种异常的最简单有效的方法,就是在进行写操作时实现互斥锁,并保证写操作按顺序执行。 +``` ## SQLite 与 SQLite 区别 diff --git a/DB/SQLite/Thread.md b/DB/SQLite/Thread.md new file mode 100644 index 0000000..9269517 --- /dev/null +++ b/DB/SQLite/Thread.md @@ -0,0 +1,181 @@ +# 线程读写 + +- [Sqlite3 多线程读写解决方案 - tajon1226 的专栏 - CSDN 博客](https://blog.csdn.net/tajon1226/article/details/54864322) +- [sqlite3 多线程和锁 ,优化插入速度及性能优化 - 熠熠闪光 - 博客园](https://www.cnblogs.com/huozhong/p/5973938.html) + +## Sqlite3 多线程读写解决方案 + +```text +重要的事情说三遍!!! + +如果你想在多线程环境下使用数据库, +那么你得确保所有的线程使用的都是同一个数据库连接。 + +如果你想在多线程环境下使用数据库, +那么你得确保所有的线程使用的都是同一个数据库连接。 + +如果你想在多线程环境下使用数据库, +那么你得确保所有的线程使用的都是同一个数据库连接。 + +``` + +## 多线程读写操作 + +```c# + //多线程写 一定要加锁 + Thread Th3 = new Thread(delegate () + { + Parallel.For(0, 1, new ParallelOptions() { MaxDegreeOfParallelism = 300 }, (i, loopState) => + { + try + { + lock (lockObj) + { + using (var db = Aleseocore.Module.Aleseo.Database.Main.Base.GetInstance_demo_guid()) + { + var demo_guiditem = new Aleseo.Database.Main.Entity.Models.demo_guiditem(); + demo_guiditem.guid = i.ToString(); + demo_guiditem.body = System.Guid.NewGuid().ToString("N"); + var t2 = db.Insertable(demo_guiditem).ExecuteCommand(); + } + } + } + catch (Exception) + { + Console.WriteLine("写入异常"); + } + + }); + + }); + Th3.IsBackground = true; + Th3.Start(); + + //多线程读 无须加锁 + Thread Th4 = new Thread(delegate () + { + Parallel.For(0, 999999999, new ParallelOptions() { MaxDegreeOfParallelism = 300 }, (i, loopState) => + { + try + { + using (var db = Aleseocore.Module.Aleseo.Database.Main.Base.GetInstance_demo_guid()) + { + var urlitems = db.Queryable().OrderBy(it => SqlSugar.SqlFunc.GetRandom()).Take(50).ToList(); + } + } + catch (Exception) + { + Console.WriteLine("读取异常"); + } + lock (lockObj) + { + } + }); + + }); + Th4.IsBackground = true; + Th4.Start(); + +``` + +## 批量写测试 + +```c# + + //多线程写 一定要加锁 + Thread Th3 = new Thread(delegate () + { + //批量写入测试 + List demo_Guiditems = new List(); + + + + Parallel.For(0, 0, new ParallelOptions() { MaxDegreeOfParallelism = 5000 }, (i, loopState) => + { + try + { + lock (lockObj) + { + demo_Guiditems.Add(new Aleseo.Database.Main.Entity.Models.demo_guiditem() { guid = i.ToString(), body = File.ReadAllText(@"D:\wwwrootRes\AleseoTemp\Articles\c4150a1b8b8005af3ad0127adb125fae.txt", Encoding.UTF8) }); + } + + } + catch (Exception ex) + { + Console.WriteLine("写入异常," + ex.Message); + } + + }); + + if (demo_Guiditems.Count==0) + { + return; + } + + System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); + stopwatch.Reset(); + stopwatch.Start(); + + using (var db = Aleseocore.Module.Aleseo.Database.Main.Base.GetInstance_demo_guid()) + { + + var t2 = db.Insertable(demo_Guiditems).ExecuteCommand(); + } + + stopwatch.Stop(); + Console.WriteLine("成功导入{0}条数据 ,用时{1}秒。", demo_Guiditems.Count, stopwatch.Elapsed.TotalSeconds); + + Console.WriteLine("执行完毕"); + + + + }); + Th3.IsBackground = true; + Th3.Start(); +``` + +## 事务多线程下错误示例 + +```c# + // 事务插入数据 + if (demo_Guiditems.Count == 0) { return; } + + System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); + stopwatch.Reset(); + stopwatch.Start(); + + Thread Th_insert_1 = new Thread(delegate () + { + using (var db = Aleseocore.Module.Aleseo.Database.Main.Base.GetInstance_demo_guid()) + { + for (int i = 0; i < 2500; i++) + { + var item = demo_Guiditems[i]; + db.Insertable(item).AddQueue(); + } + var more = db.SaveQueuesAsync(); + } + + }); + Th_insert_1.IsBackground = true; + Th_insert_1.Start(); + + Thread Th_insert_2 = new Thread(delegate () + { + + using (var db = Aleseocore.Module.Aleseo.Database.Main.Base.GetInstance_demo_guid()) + { + for (int i = 2500 - 1; i < 5000; i++) + { + var item = demo_Guiditems[i]; + db.Insertable(item).AddQueue(); + } + var more = db.SaveQueuesAsync(); + } + + }); + Th_insert_2.IsBackground = true; + Th_insert_2.Start(); + + +``` diff --git a/DB/Sql Server LocalDB/Sql Server LocalDB.md b/DB/Sql Server LocalDB/Sql Server LocalDB.md new file mode 100644 index 0000000..2058f1a --- /dev/null +++ b/DB/Sql Server LocalDB/Sql Server LocalDB.md @@ -0,0 +1,10 @@ +# Sql Server LocalDB + +## Wiki + +- [VS2015 自带的 LocalDB 数据库的用法 - Traveller_Lee - 博客园](https://www.cnblogs.com/Traveller-Lee/archive/2016/08/16/5776312.html) +- [如何安装 SQL LocalDB 数据库安装图文教程](https://baijiahao.baidu.com/s?id=1590447297764877317&wfr=spider&for=pc) +- [开发机用 LocalDB 代替 SQL Server-使用与连接字符串](http://www.cftea.com/m/c.asp?docID=7913) +- [SqlLocalDB 实用工具](https://docs.microsoft.com/zh-cn/previous-versions/sql/sql-server-2012/hh212961%28v%3Dsql.110%29) +- [使用 SqlLocalDB 命令行管理 LocalDB - 账号难注册 - 博客园](https://www.cnblogs.com/wallis0922/p/3702424.html) +- [SQL Server LocalDB本地文件数据库操作实践 - 纸上得来终觉浅,绝知此事要躬行 - CSDN博客](https://blog.csdn.net/boonya/article/details/80743084) diff --git a/DB/Sql Server LocalDB/SqlLocalDB.md b/DB/Sql Server LocalDB/SqlLocalDB.md new file mode 100644 index 0000000..42095c0 --- /dev/null +++ b/DB/Sql Server LocalDB/SqlLocalDB.md @@ -0,0 +1,19 @@ +# SqlLocalDB + +## 操作命令 + +```C# +// 启动、停止LocalDB实例 +SqlLocalDB start "MyLocalDB" +SqlLocalDB stop "MyLocalDB" +``` + +### 路径 + +- SqlLocalDB.exe +- %ProgramFiles%\Microsoft SQL Server\110\Tools\Binn + +### CMD 命令行中运行 SqlLocalDB.exe + +- Cd %ProgramFiles%\Microsoft SQL Server\110\Tools\Binn +- SqlLocalDB.exe /? diff --git a/DB/SqlBulkCopy/SqlBulkCopy.md b/DB/SqlBulkCopy/SqlBulkCopy.md new file mode 100644 index 0000000..0c3eb90 --- /dev/null +++ b/DB/SqlBulkCopy/SqlBulkCopy.md @@ -0,0 +1,4 @@ +# SqlBulkCopy + +- [SqlBulkCopy 类](https://msdn.microsoft.com/zh-cn/library/ms294344) +- [SqlBulkCopy 批量写入 25 万条数据只需 3s - 汉城节度使 - 博客园](https://www.cnblogs.com/tuqun/p/3637691.html) diff --git a/Doc/Online/kancloud/kancloud.md b/Doc/Online/kancloud/kancloud.md new file mode 100644 index 0000000..5c2887a --- /dev/null +++ b/Doc/Online/kancloud/kancloud.md @@ -0,0 +1,3 @@ +# 看云 kancloud + +- [看云 | 专注文档在线创作、阅读、分享和托管](https://www.kancloud.cn/) diff --git a/Framework/.NET/Html Agility Pack/style.md b/Framework/.NET/Html Agility Pack/style.md new file mode 100644 index 0000000..014d701 --- /dev/null +++ b/Framework/.NET/Html Agility Pack/style.md @@ -0,0 +1,3 @@ +# style + +- [Better way to add a style attribute to Html using HtmlAgilityPack](https://html-agility-pack.net/knowledge-base/12062495/better-way-to-add-a-style-attribute-to-html-using-htmlagilitypack) diff --git a/Framework/.NET/PhantomJS/PhantomJS.md b/Framework/.NET/PhantomJS/PhantomJS.md new file mode 100644 index 0000000..7217824 --- /dev/null +++ b/Framework/.NET/PhantomJS/PhantomJS.md @@ -0,0 +1,3 @@ +# PhantomJS + +- [PhantomJS基础及示例 - 腾讯Web前端 IMWeb 团队社区 | blog | 团队博客](https://imweb.io/topic/560b402ac2317a8c3e08621c) diff --git a/Framework/.NET/ScrapySharp/ScrapingBrowser.md b/Framework/.NET/ScrapySharp/ScrapingBrowser.md new file mode 100644 index 0000000..e173e19 --- /dev/null +++ b/Framework/.NET/ScrapySharp/ScrapingBrowser.md @@ -0,0 +1,31 @@ +# ScrapingBrowser + +- [ScrapingBrowser.NavigateToPage C# (CSharp) Code Examples - HotExamples](https://csharp.hotexamples.com/examples/-/ScrapingBrowser/NavigateToPage/php-scrapingbrowser-navigatetopage-method-examples.html) +- [Scraping data dynamically generated by JavaScript in html document using C#](https://stackoverflow.com/questions/24130650/scraping-data-dynamically-generated-by-javascript-in-html-document-using-c-sharp) + +## Demo + +### By JavaScript in html document + +```c# +- [WebBrowser Control (Internet Explorer)](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa752040(v=vs.85)) + +Uri uri = new Uri("http://www.somewebsite.com/somepage.htm"); + +webBrowserControl.AllowNavigation = true; +// optional but I use this because it stops javascript errors breaking your scraper +webBrowserControl.ScriptErrorsSuppressed = true; +// you want to start scraping after the document is finished loading so do it in the function you pass to this handler +webBrowserControl.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(webBrowserControl_DocumentCompleted); +webBrowserControl.Navigate(uri); + +private void webBrowserControl_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) +{ + HtmlElementCollection divs = webBrowserControl.Document.GetElementsByTagName("div"); + + foreach (HtmlElement div in divs) + { + //do something + } +} +``` diff --git a/Framework/.NET/ScrapySharp/img.md b/Framework/.NET/ScrapySharp/img.md index beaab09..11de487 100644 --- a/Framework/.NET/ScrapySharp/img.md +++ b/Framework/.NET/ScrapySharp/img.md @@ -30,5 +30,9 @@ if (imgs.Count() > 0) { } + + var tagitems = ale[0].ParentNode.Descendants(tage).ToList(); +var tagitemsa = ale[0].ParentNode.ChildNodes.Where(e => e.Name == tage); +var tagitems = ale[0].ParentNode.ChildNodes.Where(e => e.Name == tage).ToList(); //end ``` diff --git a/Framework/.NET/ScrapySharp/javascript.md b/Framework/.NET/ScrapySharp/javascript.md new file mode 100644 index 0000000..3bb33d8 --- /dev/null +++ b/Framework/.NET/ScrapySharp/javascript.md @@ -0,0 +1,4 @@ +# javascript + +- [How do i Screen scrap html page generated by javascript](https://html-agility-pack.net/knowledge-base/23033578/how-do-i-screen-scrap-html-page-generated-by-javascript) +- [Scraping websites in C# using HtmlAgilityPack | colm ahern](http://colmahern.com/scraping-websites-in-csharp-using-htmlagilitypack) diff --git a/Framework/.NET/ScrapySharp/using.md b/Framework/.NET/ScrapySharp/using.md new file mode 100644 index 0000000..af2683a --- /dev/null +++ b/Framework/.NET/ScrapySharp/using.md @@ -0,0 +1,12 @@ +# using + +## 代码 + +### 代码示例一 + +```c# +var browser = new ScrapySharp.Network.ScrapingBrowser(); +var homePage = browser.NavigateToPage(new Uri("http://www.bing.com/")); + +var homePage = browser.NavigateToPage(new Uri(url), ScrapySharp.Network.HttpVerb.Get, "", null); +``` diff --git a/Framework/.NET/SqlSugar/Insert.md b/Framework/.NET/SqlSugar/Insert.md new file mode 100644 index 0000000..5dbc8eb --- /dev/null +++ b/Framework/.NET/SqlSugar/Insert.md @@ -0,0 +1,29 @@ +# Insert + +- [插入-SqlSugar4-文档园](http://www.codeisbug.com/Doc/8/1130) + +## 代码插入 + +### demo 一 + +```c# +var t2 = db.Insertable(insertObj).ExecuteCommand(); + +db.Insertable(item).AddQueue(); + +db.Insertable(demo_Guiditems); + + +db.Insertable(item).AddQueue(); + +``` + +### demo 二 + +```c# +db.Utilities.PageEach(demo_Guiditems, 500, list => +{ + var t2 = db.Insertable(list).ExecuteCommand(); +}); + +``` diff --git a/Framework/.NET/SqlSugar/Select.md b/Framework/.NET/SqlSugar/Select.md index 92a0f2d..87a3f57 100644 --- a/Framework/.NET/SqlSugar/Select.md +++ b/Framework/.NET/SqlSugar/Select.md @@ -3,6 +3,7 @@ ## 返回指定列匿名类集合 - [.Select 用法-SqlSugar4-文档园](http://www.codeisbug.com/Doc/8/1159) +- [SqlSugar 常用查询实例-拉姆达表达式 - 天马 3798 - 博客园](https://www.cnblogs.com/tianma3798/p/6093088.html) ```C# var data = db.Queryable() @@ -105,8 +106,263 @@ SELECT `ID`,`Name` FROM `Student` WHERE (( `ID` = @ID0 ) OR ( `Name` = @Name1 ) */ ``` +### 统计 + +```c# +root.allcount = db.Queryable().Count(); +``` + +### 判断是否存根据主键查询 + +```c# + +``` + +### 判断记录是否存 + +```c# +bool exists1 = db.Queryable().Any(it => it.guid == aitem.hrefmd5); +return db.Queryable().Any(it => it.guid == aitem.hrefmd5); +``` + ### 随机查询出 10 条数据 ```c# var urlitems = db.Queryable().Where(it => it.linktype == Aleseocore.Module.siteitem.Main.Const.urlitemtype.article).OrderBy(it => SqlFunc.GetRandom()).Take(50).ToList(); ``` + +### 特殊符号查询 + +```c# +SELECT +T_urls.url +FROM +T_urls +WHERE +T_urls.url LIKE '%/NH79X/%' + +``` + +### SqlSugar 常用查询实例-拉姆达表达式 + +#### 查询列表 + +```c# +//查询列表 + SqlSugarClient db = SugarContext.GetInstance(); + List tList = db.Queryable().ToList(); + Console.WriteLine(tList.Count); + + var studentDynamic = db.Queryable().ToDynamic(); + Console.WriteLine(studentDynamic); + + string teaJson = db.Queryable().ToJson(); + Console.WriteLine(teaJson); + + //Json序列化的DateTime处理 + db.SerializerDateFormat = "yyyy年MM月dd日"; + string teacher1 = db.Queryable().OrderBy("tbirthday desc").Take(2).ToJson(); + string teacher2 = db.Sqlable().From("t").SelectToJson(" top 1 *"); + string teacher3 = db.SqlQueryJson("select top 1 * from teacher;"); + Console.WriteLine(teacher1); + Console.WriteLine(teacher2); + Console.WriteLine(teacher3); + Console.WriteLine(tList.First().tbirthday.Value.ToString("yyyy-MM-dd")); +``` + +#### 常用查询 + +```c# +//查询单条 +SqlSugarClient db = SugarContext.GetInstance(); +teacher tea1 = db.Queryable().Single(t => t.tno == "804");//如果查询数据库没有数据,抛出异常 +Console.WriteLine(tea1.tname); +//根据主键查询单条 +teacher tea2 = db.Queryable().InSingle("814");//如果查询数据为空,返回null +Console.WriteLine(tea2.ToJsonString());// 输出:null +/***考虑查询为空的情况***/ +teacher tea3 = db.Queryable().SingleOrDefault(t => t.tno == "814"); +Console.WriteLine(tea3.ToJsonString());// 输出:null +teacher tea4 = db.Queryable() + .Where(q => q.tno == "814") + .FirstOrDefault(); //此处扩展方法仿EF First()/FirstOrDefault() +Console.WriteLine(tea4.ToJsonString()); // 输出:null + + +/*****常用查询******/ +//1.判断是否存在 +bool exists1 = db.Queryable().Any(q => q.tno == "814"); +Console.WriteLine(exists1); +//2.模糊查询,含有 +List contains1 = db.Queryable() + .Where(q => q.tname.Contains("李")) + .ToList(); +Console.WriteLine(contains1.ToJsonString()); +//以xxx结尾 +List end1 = db.Queryable() + .Where(q => q.tname.EndsWith("成")) + .ToList(); +Console.WriteLine(end1.ToJsonString()); +//3. in关键词查询 +string[] idList = new string[] { "804", "825" }; +List in1 = db.Queryable() + .In(q => q.tno, idList) //如果不支持拉姆达表达式,默认为主键 + .ToList(); +Console.WriteLine(in1.ToJsonString()); +List in2 = db.Queryable() + .Where(q => idList.Contains(q.tno)) + .ToList(); +Console.WriteLine(in2.ToJsonString()); + + +/*********汇总查询等***********/ +//1.获取总数 +int count = db.Queryable() + .Where(q => q.tsex == "男") + .Count(); +Console.WriteLine("count=" + count); +//2.获取最大值 +decimal maxDegree = db.Queryable() + .Where(q => q.cno == "3-105") + .Max(q => q.degree) //此处Max返回的结果为Object需要拆箱 + .ObjToDecimal(); +Console.WriteLine("maxDegree:" + maxDegree); +//3.获取最小值 +decimal minDegree = db.Queryable() + .Where(q => q.cno == "3-105") + .Min(q => q.degree) + .ObjToDecimal(); +Console.WriteLine("minDegree:" + minDegree); +//4.平均值 +//SqlSugar 不支持 平均值的扩展方法 + +/***复杂的查询可以使用Sql字符串实现***/ +//var list = db.Queryable().Where("id=@id and name=@name", new { id = 1, name = xxx }).ToList(); +``` + +#### 分页查询 + +```c# +//分页查询处理 +SqlSugarClient db = SugarContext.GetInstance(); +//分页方式1 +Queryable query = db.Queryable(); +query = query.Where(q => q.tno.StartsWith("8")); +//排序 +//query = query.OrderBy("tbirthday desc"); //排序说明,如果是倒叙,需要传入排序的sql片段 +query = query.OrderBy(q => q.tbirthday); //如果是正序,可以指定拉姆达表达式 +int allCount = query.Count(); +//分页 +//List list1 = query.Skip(1).Take(2).ToList(); +//或者 +List list1 = query.ToPageList(1, 2); +Console.WriteLine("list1-count:" + allCount); +Console.WriteLine("list1:" + list1.ToJsonString()); + + +//分页方式2+符合查询 多where是and拼接 +Queryable query2 = db.Queryable(); +query2 = query2.Where(q => q.ssex == "男"); +query2 = query2.Where(q => q.sname.EndsWith("军")); +//排序 +query2 = query2.OrderBy(q => q.sbirthday); +int allCount2 = 0; +//分页 +List list2 = query2.ToPageList(1, 2, ref allCount2); +Console.WriteLine("list2-count:" + allCount2); +Console.WriteLine("list2:" + list2.ToJsonString()); +``` + +#### 汇总查询 2 + +```c# +//分组,查询汇总 +SqlSugarClient db = SugarContext.GetInstance(); +dynamic result1 = db.Queryable() + .GroupBy(q => q.ssex) + .Select("ssex,count(*) Count") + .ToDynamic(); +foreach (var item in result1) +{ + Console.WriteLine(item.ssex + "----" + item.Count); +} + +string result2 = db.Queryable() + .GroupBy(q => q.sno) + .Select("sno,isnull(sum(degree),0)") + .ToJson(); +Console.WriteLine(result2); +``` + +#### 关联表查询 + +```c# +static void QueryFive() +{ + //关联表查询,筛选等 + SqlSugarClient db = SugarContext.GetInstance(); + //将结果转换成其他对象 + var result = db.Queryable() + .JoinTable((s1, s2) => s1.sno == s2.sno) + .OrderBy(s1 => s1.degree) + .Take(1) + .Select((s1, s2) => new Score_Student + { + sno = s1.sno, + sname = s2.sname, + cno = s1.cno, + degree = s1.degree + }).ToList(); + Console.WriteLine(result.ToJsonString()); + //输出结果 + //[{"sno":"101","sname":"李军","degree":64.0,"cno":"3-105"}] + + //关联查询 + //特别说明:如果指定了关联表代表参数s1,s2,那么在后边的筛选等操作中需要使用表字段的地方,必须使用s1或s2 + var result2 = db.Queryable() + .JoinTable((s1, s2) => s1.sno == s2.sno) + .Where(s1 => s1.degree > 64) + .Where(s1 => s1.degree < 70) + .ToJson(); + Console.WriteLine(result2); + //输出结果: + //[{"sno":"109","cno":"3-245","degree":68.0, + //"sno1":"109","sname":"王芳","ssex":"女","sbirthday":"\/Date(161193600000)\/","class":"95031"}] + + + //获取单个表的投影 + //特别说明,如果想获取单个表的投影,需要先将查询结果.ToList(),然后在创建匿名对象 + //或者 Select()中使用sql指定列名 + var result3 = db.Queryable() + .OrderBy(q => q.sbirthday) + .Take(1) + .ToList() + .Select(q => new + { + sno = q.sno, + sname = q.sname + }); + Console.WriteLine(result3.ToJsonString()); + //输出结果: + //[{"sno":"103","sname":"陆军"}] + + + //获取多个表,投影 + var result4 = db.Queryable() + .JoinTable((s1, s2) => s1.sno == s2.sno) + .OrderBy(s1 => s1.degree) + .Take(1) + .Select("s1.*,s2.sname as sname") + .ToJson(); + Console.WriteLine(result4); + //输出结果: + //[{"sno":"101","cno":"3-105","degree":64.0,"sname":"李军","row_index":1}] +} +public class Score_Student +{ + public string sno { get; set; } + public string sname { get; set; } + public decimal degree { get; set; } + public string cno { get; set; } +} +``` diff --git a/Framework/.NET/SqlSugar/Update.md b/Framework/.NET/SqlSugar/Update.md index 308d306..eaaee78 100644 --- a/Framework/.NET/SqlSugar/Update.md +++ b/Framework/.NET/SqlSugar/Update.md @@ -11,3 +11,12 @@ ```c# var t3 = db.Updateable(updateObj).UpdateColumns(it => new { it.Name }).ExecuteCommand(); ``` + +### 更新代码 1 + +```c# +db.Utilities.PageEach(urlsguiditems_PageEach, 200, list => +{ + var t2 = db.Updateable(list).UpdateColumns(it => new { it.status }).ExecuteCommand(); +}); +``` diff --git a/Framework/WEB/Mip/MIP.md b/Framework/WEB/Mip/MIP.md index 8a0cbdd..572e505 100644 --- a/Framework/WEB/Mip/MIP.md +++ b/Framework/WEB/Mip/MIP.md @@ -10,3 +10,5 @@ - [全新织梦通用手机 MIP 模板 全独立功能 不影响原站*织梦模板下载*小菜说](http://www.xiaocaishuo.com/archives/1624.html) - [百度 mip 模板免费下载\_mip 演示【php 中文网源码】](http://www.php.cn/xiazai/code/mip) +- [MIP 模板网-MIP 建站系统官方旗下平台](http://www.mipmb.com/) +- [MIP 建站系统-基于百度 MIP 开发的建站系统](http://001.demo.mipmb.com/) diff --git a/JavaStrcipt/Unfiled/js-class.md b/JavaStrcipt/Unfiled/js-class.md new file mode 100644 index 0000000..89a9bba --- /dev/null +++ b/JavaStrcipt/Unfiled/js-class.md @@ -0,0 +1,4 @@ +# class + +- [类](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Classes) +- [js Class与普通构造函数有何区别](https://www.jianshu.com/p/2aaaacd8bad3) diff --git a/JavaStrcipt/Unfiled/replace.md b/JavaStrcipt/Unfiled/replace.md index e80f4ad..4a8039c 100644 --- a/JavaStrcipt/Unfiled/replace.md +++ b/JavaStrcipt/Unfiled/replace.md @@ -83,3 +83,34 @@ string.replace(new RegExp(key, "g"), "b"); ```js tmpvalues.json_sconf_Seritexts.replace(new RegExp("\\+", "g"), "%2B"); ``` + +### js 实体转化 + +- [js 实体转化 - Soler_lia 的博客 - CSDN 博客](https://blog.csdn.net/soler_lia/article/details/80323501) + +```js +function convert(str) { + return str + .replace(/&/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'"); +} +``` + +```js +function convert(str) { + var entitys = { + "&": "&", + "<": "<", + ">": ">", + '"': """, + "'": "'" + }; + var regexp = new RegExp("[" + Object.keys(entitys).join("") + "]", "g"); + return str.replace(regexp, function(matched) { + return entitys[matched]; + }); +} +``` diff --git a/JavaStrcipt/jQuery/laycode/parent.md b/JavaStrcipt/jQuery/laycode/parent.md new file mode 100644 index 0000000..37f07aa --- /dev/null +++ b/JavaStrcipt/jQuery/laycode/parent.md @@ -0,0 +1,5 @@ +# parent + +```c# +$('.left_zw').parent().html() +``` diff --git a/Markdown/Template/issue.md b/Markdown/Template/issue.md new file mode 100644 index 0000000..99db0cc --- /dev/null +++ b/Markdown/Template/issue.md @@ -0,0 +1,9 @@ +# issue + +## 常用发表问题描述模板 + +### 模板 1 + +```text + +``` diff --git a/Markdown/Template/issue.txt b/Markdown/Template/issue.txt new file mode 100644 index 0000000..b952d29 --- /dev/null +++ b/Markdown/Template/issue.txt @@ -0,0 +1,47 @@ +### Description +Loads the HTML document from the specified string. + then after document.DocumentNode.InnerHtml; +The source code has changed +In the title tag section + +### before +- LoadHtml(string html); +- here is html +```html + + + +<google> + + + + +``` + +### after +- document.DocumentNode.OuterHtml; +- here is html +```html + + + +<google></google> + + + + +``` + + +### Was changed +- Title content has been changed +```html +<google></google> +``` + + +### pls help me + +```html +tks very much +``` diff --git a/Markdown/Template/issue1.txt b/Markdown/Template/issue1.txt new file mode 100644 index 0000000..485ce3e --- /dev/null +++ b/Markdown/Template/issue1.txt @@ -0,0 +1,30 @@ +### Description +Loads .... + +### before +- LoadHtml(string html); +- here is html +```html + +``` + +### after +- document.DocumentNode.OuterHtml; +- here is html +```html + +``` + + +### Was changed +- Title content has been changed +```html + +``` + + +### pls help me + +```html +tks very much +``` diff --git a/Microsoft .NET/Cefsharp/CefC++.md b/Microsoft .NET/Cefsharp/CefC++.md index 0455ddc..a10107d 100644 --- a/Microsoft .NET/Cefsharp/CefC++.md +++ b/Microsoft .NET/Cefsharp/CefC++.md @@ -3,7 +3,7 @@ - [CEF](https://github.com/chromiumembedded/cef) - [CEF 收集](https://www.cnblogs.com/bycnboy/category/1216694.html) - [Browser](https://github.com/sanwer/Browser) -- [CEF3:用CEF3实现最简单的浏览器](https://blog.csdn.net/u011304970/article/details/77601198) +- [CEF3:用 CEF3 实现最简单的浏览器](https://blog.csdn.net/u011304970/article/details/77601198) ## CEF 代码 @@ -15,4 +15,4 @@ ```c++ -``` \ No newline at end of file +``` diff --git a/Microsoft .NET/Csharp/laycode/CsharpLazycode/CsharpLazycode.md b/Microsoft .NET/Csharp/laycode/CsharpLazycode/CsharpLazycode.md new file mode 100644 index 0000000..b71e14d --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/CsharpLazycode/CsharpLazycode.md @@ -0,0 +1,18 @@ +# 常用自己的语法 + +## 辅助类代码 + +### 等待延时 + +```c# +CsharpLazycode.Module.Laycode.sys.WaitDelay(CsharpLazycode.Module.Laycode.random.NextIncludeMax(3, 5) * 1000, true); + +var ridv = CsharpLazycode.Module.Laycode.random.NextIncludeMax(20, 100); + +newname = CsharpLazycode.Module.Laycode.random.GetRandomString(8, 20, true, true, true, false, ""); + +CsharpLazycode.Module.Laycode.random.GetRandomString(5, 20, true, true, true, false, "____") + + +var configurationNobase64 = CsharpLazycode.Module.base64.Util.afterDecodeRspace(configuration); +``` diff --git a/Microsoft .NET/Csharp/laycode/File/file.md b/Microsoft .NET/Csharp/laycode/File/file.md index a6fb633..ee07c2c 100644 --- a/Microsoft .NET/Csharp/laycode/File/file.md +++ b/Microsoft .NET/Csharp/laycode/File/file.md @@ -32,15 +32,15 @@ MessageBox.Show("保存成功"); ```C# OpenFileDialog ofd = new OpenFileDialog(); - ofd.Filter = "Excel文件(*.xls;*.xlsx)|*.xls;*.xlsx|所有文件|*.*"; - ofd.ValidateNames = true; - ofd.CheckPathExists = true; - ofd.CheckFileExists = true; - if (ofd.ShowDialog() == DialogResult.OK) - { - string strFileName = ofd.FileName; - //其他代码 - } +ofd.Filter = "Excel文件(*.xls;*.xlsx)|*.xls;*.xlsx|所有文件|*.*"; +ofd.ValidateNames = true; +ofd.CheckPathExists = true; +ofd.CheckFileExists = true; +if (ofd.ShowDialog() == DialogResult.OK) +{ + string strFileName = ofd.FileName; + //其他代码 +} using (FileStream fsRead = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Read)) @@ -77,12 +77,13 @@ while ((line = sr.ReadLine()) != null) { Console.WriteLine(line.ToString()); } +sr.Close(); ``` -## C#文件的写入 +## 文件的写入字节集 ```c# - FileStream fs = new FileStream("E:\\ak.txt", FileMode.Create); +FileStream fs = new FileStream("E:\\ak.txt", FileMode.Create); //获得字节数组 byte[] data = System.Text.Encoding.Default.GetBytes("Hello World!"); //开始写入 @@ -99,6 +100,16 @@ File.ReadAllText(ofd.FileName); File.ReadAllText(ofd.FileName,Encoding.UTF8); ``` +### C# 使用 List 泛型读取和保存文本文件 + +- [C# 使用 List 泛型读取和保存文本文件 - 曾祥展 - 博客园](https://www.cnblogs.com/zengxiangzhan/archive/2010/01/30/1659674.html) + +```c# +List list = mgr.ReadTextFileToList(@"C:\test.txt");//记取字符串 +foreach (string s in list) Console.WriteLine(s); //显示出来′ +Console.ReadKey(); //按′任一键关闭Console +``` + ## C#文本写入 ```c# @@ -106,17 +117,12 @@ System.IO.File.WriteAllText("e:\\asp_1.txt", "I LOVE YOU!"); System.IO.File.WriteAllText("d:/Work/Doc/tmp/2.txt", "I LOVE YOU!"); System.IO.File.WriteAllText("d:/Work/Doc/tmp/2.txt", "I LOVE YOU!", Encoding.UTF8); - - - //Link try { System.IO.File.WriteAllText(root.urllinkspath, "", Encoding.UTF8); } catch (Exception) { } try { System.IO.File.WriteAllText(root.fileslinkspath, "", Encoding.UTF8); } catch (Exception) { } using (var aleDB = new Aleseocore.Module.Aledb.Class.aleDB(root.urllinkspath)) { aleDB.firstTimeinit(); } using (var aleDB = new Aleseocore.Module.Aledb.Class.aleDB(root.fileslinkspath)) { aleDB.firstTimeinit(); } - - ``` ## 文本按行写入 @@ -182,3 +188,8 @@ Task.Static.WebRes.Add("/static/clipboard/clipboard.js", Resread("aa.Resources.s Task.Static.WebRes.Add("/static/layui/layui.all.js", Resread("aa.Resources.static.layui.layui.all.js")); ``` + +## C#多线程读写同一文件处理 + +- [C#多线程读写同一文件处理 - 天马 3798 - 博客园](https://www.cnblogs.com/tianma3798/p/8252553.html) +- [6 秒完成 50 万条多线程并发日志文件写入](http://www.ibcibc.com/thread-8060-1-1.html) diff --git a/Microsoft .NET/Csharp/laycode/File/filelimit.md b/Microsoft .NET/Csharp/laycode/File/filelimit.md new file mode 100644 index 0000000..ed06ff8 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/File/filelimit.md @@ -0,0 +1,7 @@ +# 数据量存储常见问题 + +- [txt 文件最多可以存放多少行数据](https://zhidao.baidu.com/question/182665563.html) + +```txt +文件行数没有限制,但是操作系统会限制文件大小。比如unix下单个文件不能超过2G,windows下FAT32分区也不能超过2G。 +``` diff --git a/Microsoft .NET/Csharp/laycode/Firewall/Firewall.md b/Microsoft .NET/Csharp/laycode/Firewall/Firewall.md new file mode 100644 index 0000000..a41ecf3 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/Firewall/Firewall.md @@ -0,0 +1,6 @@ +# Firewall + +- [Reference Source](https://referencesource.microsoft.com/#WsatConfig/Configuration/NetFwTypeLib.cs) +- [An Easy Firewall Application](https://www.codeproject.com/Articles/5144/An-Easy-Firewall-Application) +- [C# 添加修改防火墙端口及程序 - Pete-Jones - 博客园](https://www.cnblogs.com/yunfeng83/p/7240093.html?utm_source=itdadao&utm_medium=referral) +- [C#添加删除防火墙例外(程序、端口) - Fiyo - ITeye 博客](https://sdfiyon.iteye.com/blog/1197511) diff --git a/Microsoft .NET/Csharp/laycode/GC/GC.md b/Microsoft .NET/Csharp/laycode/GC/GC.md new file mode 100644 index 0000000..f1437a6 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/GC/GC.md @@ -0,0 +1,35 @@ +# GC + +- [C#怎么使用 GC 强制回收资源 -CSDN 问答](https://ask.csdn.net/questions/333291?locationNum=2) + +## 常用代码 + +### 强制回收 + +```c# +// 强行回收, 必须是, +GC.Collect(); +// 但是也不是滥用的, 你最好贴出核心部分代码看看、 +``` + +### while 会增加内存 + +```c# +while (true) +{ + + +} + +``` + +### while 正确用法 + +```C# +var gc_count_urls = 0; +while (true) +{ + CsharpLazycode.Module.Laycode.sys.WaitDelay(2 * 1000, true); + gc_count_urls++; if (gc_count_urls > 5) { gc_count_urls = 0; GC.Collect(); } +} +``` diff --git a/Microsoft .NET/Csharp/laycode/Hashtable/Hashtable.md b/Microsoft .NET/Csharp/laycode/Hashtable/Hashtable.md new file mode 100644 index 0000000..c8d2d0f --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/Hashtable/Hashtable.md @@ -0,0 +1,48 @@ +# Hashtable + +- 线程安全推荐使用 + +## DEMO + +### 多线程操作错误示例 + +```c# +//任务队列DEMO + + Hashtable ht = new Hashtable(); + + Thread Th1 = new Thread(delegate () + { + + Parallel.For(0, 999999999, + new ParallelOptions() { MaxDegreeOfParallelism = 100 }, + (i, loopState) => + { + ht.Add(System.Guid.NewGuid().ToString("N"), CsharpLazycode.Module.Laycode.words.Util.GenerateSurname()); + + }); + + + + }); + Th1.IsBackground = true; + Th1.Start(); + + + Thread Th2 = new Thread(delegate () + { + while (true) + { + foreach (var item in ht) + { + ht.Remove(item); + } + + + } + + + }); + Th2.IsBackground = true; + Th2.Start(); +``` diff --git a/Microsoft .NET/Csharp/laycode/List/List.md b/Microsoft .NET/Csharp/laycode/List/List.md index 68d680d..e157688 100644 --- a/Microsoft .NET/Csharp/laycode/List/List.md +++ b/Microsoft .NET/Csharp/laycode/List/List.md @@ -1,8 +1,12 @@ # List +- List 的实例可不是线程安全的,这个 MSDN 写的清清楚楚明明白白。自己处理同步去。 + ## wiki - [C# List 集合 where 的用法 - Fly_bokeyuan - 博客园](https://www.cnblogs.com/-Fly/p/7765517.html) +- [将 list 集合,元素随机打乱 - \_小豪豪 - 博客园](https://www.cnblogs.com/remember-forget/p/9815527.html) +- [C# list 多线程访问,有写入,读取,加锁后,返回的list 后,不也是非线程安全的 ](https://zhidao.baidu.com/question/1926201084657737907.html) ## 用法 @@ -26,3 +30,63 @@ List list = new List(); list = list.Where(a => a.testNumber.Contains(Number_Name) && a.testName.Contains(Number_Name)).ToList(); ``` + +### 集合已修改;可能无法执行枚举操作 + +- [[C#]集合已修改;可能无法执行枚举操作 - wolfy - 博客园](https://www.cnblogs.com/wolf-sun/p/5721457.html) + +### 多线程之 List 的线程安全问题 + +- [C# 多线程之 List 的线程安全问题 - 郑小超 - 博客园](https://www.cnblogs.com/GreenLeaves/p/10092128.html) + +```c# + static object lockObj = new object(); + + lock (lockObj) + { + list.Add(i); + } +``` + +### 加锁线程安全 + +```c# + //任务队列DEMO + object lockObj = new object(); + List lst = new List(); + Thread Th1 = new Thread(delegate () + { + Parallel.For(0, 10,new ParallelOptions() { MaxDegreeOfParallelism = 100 }, + (i, loopState) => + { + lock (lockObj) { + lst.Add(System.Guid.NewGuid().ToString("N")); + Console.WriteLine(string.Format("添加后总数:{0}", lst.Count)); + } + }); + + + + }); + Th1.IsBackground = true; + Th1.Start(); + + + Thread Th2 = new Thread(delegate () + { + while (true) + { + lock (lockObj) + { + if (lst.Count > 0) + { + lst.Remove(lst[lst.Count - 1]); + Console.WriteLine(string.Format("读取删除后总数:{0}", lst.Count)); + } + } + } + }); + Th2.IsBackground = true; + Th2.Start(); + +``` diff --git a/Microsoft .NET/Csharp/laycode/Queue/Queue.md b/Microsoft .NET/Csharp/laycode/Queue/Queue.md new file mode 100644 index 0000000..1922691 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/Queue/Queue.md @@ -0,0 +1,86 @@ +# Queue + +## Wiki + +- [C# 队列(Queue) | 菜鸟教程](https://www.runoob.com/csharp/csharp-queue.html) + +## Demo + +### 基本使用 + +```c# +Queue q = new Queue(); + +q.Enqueue('A'); +q.Enqueue('M'); +q.Enqueue('G'); +q.Enqueue('W'); + +Console.WriteLine("Current queue: "); +foreach (char c in q) +Console.Write(c + " "); +Console.WriteLine(); +q.Enqueue('V'); +q.Enqueue('H'); +Console.WriteLine("Current queue: "); +foreach (char c in q) +Console.Write(c + " "); +Console.WriteLine(); +Console.WriteLine("Removing some values "); +char ch = (char)q.Dequeue(); +Console.WriteLine("The removed value: {0}", ch); +ch = (char)q.Dequeue(); +Console.WriteLine("The removed value: {0}", ch); +Console.ReadKey(); + +...........rst +Current queue: +A M G W +Current queue: +A M G W V H +Removing values +The removed value: A +The removed value: M +``` + +### 错误方法线程中示例 + +```c# + +//任务队列DEMO + +Queue q = new Queue(); + +Thread Th1 = new Thread(delegate () +{ + + Parallel.For(0, 5, + new ParallelOptions() { MaxDegreeOfParallelism = 100 }, + (i, loopState) => + { + q.Enqueue(CsharpLazycode.Module.Laycode.words.Util.GenerateSurname()); + + }); + + + +}); +Th1.IsBackground = true; +Th1.Start(); + + +Thread Th2 = new Thread(delegate () +{ + while (true) + { + foreach (var c in q) + { + string ch = (string)q.Dequeue(); + } + } + + +}); +Th2.IsBackground = true; +Th2.Start(); +``` diff --git a/Microsoft .NET/Csharp/laycode/Stopwatch/Stopwatch.md b/Microsoft .NET/Csharp/laycode/Stopwatch/Stopwatch.md new file mode 100644 index 0000000..717cd59 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/Stopwatch/Stopwatch.md @@ -0,0 +1,34 @@ +# Stopwatch + +- [【C#】记录程序耗时方法 - 青春本就不靠谱 - 博客园](https://www.cnblogs.com/on-fire/p/9522878.html) + +## 耗时 + +### demo + +```c# +System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); +stopwatch.Reset(); +stopwatch.Start(); +// Here: 需要计算耗时的过程/方法 +stopwatch.Stop(); +stopwatch.Elapsed.TotalSeconds //这里是输出的总运行秒数,精确到毫秒的 + +//当然也可以输出分钟,小时等等。。。。。。 + +stopwatch.Elapsed.TotalHours;//以小时为单位 +stopwatch.Elapsed.TotalMilliseconds;//以毫秒为单位 +stopwatch.Elapsed.TotalMinutes;//以分钟为单位 +stopwatch.Elapsed.TotalDays;//以天为单位 + +``` + +### demo1 + +```c# +System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); +stopwatch.Reset(); +stopwatch.Start(); +stopwatch.Stop(); +Console.WriteLine("成功导入{0}条数据 ,用时{1}秒。", demo_Guiditems.Count, stopwatch.Elapsed.TotalSeconds); +``` diff --git a/Microsoft .NET/Csharp/laycode/Thread/Parallel.md b/Microsoft .NET/Csharp/laycode/Thread/Parallel.md index 0fa9d14..ed0238e 100644 --- a/Microsoft .NET/Csharp/laycode/Thread/Parallel.md +++ b/Microsoft .NET/Csharp/laycode/Thread/Parallel.md @@ -1,6 +1,6 @@ # C# Parallel -- [C#中的多线程 - 并行编程](https://www.cnblogs.com/zeroone/p/4789531.html) +- [C#中的多线程 - 并行编程](https://www.cnblogs.com/zeroone/p/4789531.html) -[c# parallel.for 怎么控制并发数量,控制多 5 个并发量 - zhangzhiping35 - 博客园](https://www.cnblogs.com/zhangzhiping35/p/11058684.html) ## 相关代码 @@ -29,4 +29,18 @@ Parallel.ForEach ```c# -``` \ No newline at end of file +``` + +### 并发控制 + +```c# +Parallel.For(0,10, +new ParallelOptions(){MaxDegreeOfParallelism = 5}, +(i, loopState) => +{ + System.Diagnostics.Debug.WriteLine("Start Thread={0}, i={1}", Thread.CurrentThread.ManagedThreadId, i); + + Thread.Sleep(i*200); + Console.WriteLine("Finish Thread={0}, i={1}", Thread.CurrentThread.ManagedThreadId, i); +}); +``` diff --git a/Microsoft .NET/Csharp/laycode/Unfiled/using/get-set.md b/Microsoft .NET/Csharp/laycode/Unfiled/using/get-set.md index a4601ae..c55bbcc 100644 --- a/Microsoft .NET/Csharp/laycode/Unfiled/using/get-set.md +++ b/Microsoft .NET/Csharp/laycode/Unfiled/using/get-set.md @@ -1,6 +1,7 @@ # get set - [C#中 set 与 get 语句](https://zhidao.baidu.com/question/490736754188972092.html) +- [c# 造一个事件,监测一个 string 类的对象的值,当值发生改变时触发事件。](https://zhidao.baidu.com/question/1669968280264798347.html) ## 语句 @@ -41,3 +42,48 @@ public static string sitenamepath get { return Wordspath("网站名称"); } } ``` + +### c# 造一个事件,监测一个 string 类的对象的值,当值发生改变时触发事件 + +```c# +public class AClass +{ + protect string _a="旧值"; + public string A{ + get{ + return _a; + } + set{ + _a=value; + OnStringChange(); + } + } + public event Eventhandle OnStringChangeEvent; + public void OnStringChange() + { + if(OnStringChangeEvent!=null) + { + OnStringChangeEvent(this,null); + } + } +} + +//比如在main函数中 如果这样用就会引发一个事件 +static void main() +{ + var aa=new AClass(); + + aa.OnStringChangeEvent+=(oo,ee)=>{ + Console.WriteLine("值变了,新值是:"+(oo as AClass).A); + }; + + aa.A="新值"; +} +``` + +### set + +```c# +[Language("am")] +public static Language Amharic { get; internal set; } +``` diff --git a/Microsoft .NET/Csharp/laycode/lock/lock.md b/Microsoft .NET/Csharp/laycode/lock/lock.md new file mode 100644 index 0000000..04b5802 --- /dev/null +++ b/Microsoft .NET/Csharp/laycode/lock/lock.md @@ -0,0 +1,42 @@ +# lock + +- [Getting Title at 22:41](https://www.cnblogs.com/liuqiyun/p/9118382.html) + +## 锁测试代码 + +```c# +//锁 多线程测试 +object lockObj_lock = new object(); + +Thread Th_lock_1 = new Thread(delegate () +{ + Parallel.For(0, 6, new ParallelOptions() { MaxDegreeOfParallelism = 1000 }, (i, loopState) => + { + lock (lockObj_lock) + { + while (true) + { + CsharpLazycode.Module.Laycode.sys.WaitDelay(CsharpLazycode.Module.Laycode.random.NextIncludeMax(3, 5) * 1000, true); + Console.WriteLine(string.Format("我在并发{0}线程里,占用锁", i + 1)); + break; + } + } + }); +}); +Th_lock_1.IsBackground = true; +Th_lock_1.Start(); + +Thread Th_lock_2 = new Thread(delegate () +{ + Parallel.For(0, 8, new ParallelOptions() { MaxDegreeOfParallelism = 1000 }, (i, loopState) => + { + lock (lockObj_lock) + { + Console.WriteLine(string.Format("我在并发{0}线程里,饥饿锁", i + 1)); + } + }); +}); +Th_lock_2.IsBackground = true; +Th_lock_2.Start(); + +``` diff --git a/Microsoft Visual C++/McRip VC Redist Installer.md b/Microsoft Visual C++/McRip VC Redist Installer.md new file mode 100644 index 0000000..a597312 --- /dev/null +++ b/Microsoft Visual C++/McRip VC Redist Installer.md @@ -0,0 +1,4 @@ +# McRip VC Redist Installer + +- [McRip VC Redist Installer Download Free for Windows 10, 7, 8/8.1 (64 bit / 32 bit)](https://softfamous.com/mcrip-vc-redist-installer/) +- [Download McRip VC Redist Installer 1.6.0](https://www.softpedia.com/get/System/System-Miscellaneous/VC-Redist-Installer.shtml) diff --git a/Microsoft Visual C++/Microsoft Visual C++.md b/Microsoft Visual C++/Microsoft Visual C++.md new file mode 100644 index 0000000..1284f7c --- /dev/null +++ b/Microsoft Visual C++/Microsoft Visual C++.md @@ -0,0 +1,3 @@ +# Microsoft Visual C++ + +- [Microsoft Visual C++](https://baike.baidu.com/item/Microsoft%20Visual%20C%2B%2B/8646587?fromtitle=vc%2B%2B&fromid=2668342&fr=aladdin) diff --git a/Name/English.md b/Name/English.md index 16b35e3..497a3ed 100644 --- a/Name/English.md +++ b/Name/English.md @@ -128,6 +128,9 @@ StringExtensionMethods 扩展方法 Application Pool Identities 应用程序池标识 Pagination pagination 分页 Having 有 +constraint failed 约束失败 +WAIT until the dynamic text is set 等到动态文本设置完毕 +database disk image is malformed 数据库磁盘映像格式错误 ``` ## MVC @@ -150,3 +153,572 @@ Controller(控制器)是应用程序中处理用户交互的部分。 ``` ## Bash + +## 程序员必须掌握的 600 个英语单词 + +```text +application 应用程式 应用、应用程序 +application framework 应用程式框架、应用框架 应用程序框架 +architecture 架构、系统架构 体系结构 +argument 引数(传给函式的值)。叁见 parameter 叁数、实质叁数、实叁、自变量 +array 阵列 数组 +arrow operator arrow(箭头)运算子 箭头操作符 +assembly 装配件 +assembly language 组合语言 汇编语言 +assert(ion) 断言 +assign 指派、指定、设值、赋值 赋值 +assignment 指派、指定 赋值、分配 +assignment operator 指派(赋值)运算子 = 赋值操作符 +associated 相应的、相关的 相关的、关联、相应的 +associative container 关联式容器(对应 sequential container) 关联式容器 +atomic 不可分割的 原子的 +attribute 属性 属性、特性 +audio 音讯 音频 +A.I. 人工智慧 人工智能 +background 背景 背景(用於图形着色) 后台(用於行程) +backward compatible 回溯相容 向下兼容 +bandwidth 频宽 带宽 +base class 基础类别 基类 +base type 基础型别 (等同於 base class) +batch 批次(意思是整批作业) 批处理 +benefit 利益 收益 +best viable function 最佳可行函式 最佳可行函式 (从 viable functions 中挑出的最佳吻合者) +binary search 二分搜寻法 二分查找 +binary tree 二元树 二叉树 +binary function 二元函式 双叁函数 +binary operator 二元运算子 二元操作符 +binding 系结 绑定 +bit 位元 位 +bit field 位元栏 位域 +bitmap 位元图 位图 +bitwise 以 bit 为单元逐一┅ +bitwise copy 以 bit 为单元进行复制;位元逐一复制 位拷贝 +block 区块,区段 块、区块、语句块 +boolean 布林值(真假值,true 或 false) 布尔值 +border 边框、框线 边框 +brace(curly brace) 大括弧、大括号 花括弧、花括号 +bracket(square brakcet) 中括弧、中括号 方括弧、方括号 +breakpoint 中断点 断点 +build 建造、构筑、建置(MS 用语) +build-in 内建 内置 +bus 汇流排 总线 +business 商务,业务 业务 +buttons 按钮 按钮 +byte 位元组(由 8 bits 组成) 字节 +cache 快取 高速缓存 +call 呼叫、叫用 调用 +callback 回呼 回调 +call operator call(函式呼叫)运算子调用操作符 ###### (同 function call operator) +candidate function 候选函式 候选函数 ###### (在函式多载决议程序中出现的候选函式) +chain 串链(例 chain of function calls) 链 +character 字元 字符 +check box 核取方块 (i.e. check button) 复选框 +checked exception 可控式异常(Java) +check button 方钮 (i.e. check box) 复选按钮 +child class 子类别(或称为derived class, subtype) 子类 +class 类别 类 +class body 类别本体 类体 +class declaration 类别宣告、类别宣告式 类声明 +class definition 类别定义、类别定义式 类定义 +class derivation list 类别衍化列 类继承列表 +class head 类别表头 类头 +class hierarchy 类别继承体系, 类别阶层 类层次体系 +class library 类别程式库、类别库 类库 +class template 类别模板、类别范本 类模板 +class template partial specializations ###### 类别模板偏特化 类模板部分特化 +class template specializations ###### 类别模板特化 类模板特化 +cleanup 清理、善后 清理、清除 +client 客端、客户端、客户 客户 +client-server 主从架构 客户/服务器 +clipboard 剪贴簿 剪贴板 +clone 复制 克隆 +collection 群集 集合 +combo box 复合方块、复合框 组合框 +command line 命令列 命令行 (系统文字模式下的整行执行命令) +communication 通讯 通讯 +compatible 相容 兼容 +compile time 编译期 编译期、编译时 +compiler 编译器 编译器 +component 组件 组件 +composition 复合、合成、组合 组合 +computer 电脑、计算机 计算机、电脑 +concept 概念 概念 +concrete 具象的 实在的 +concurrent 并行 并发 +configuration 组态 配置 +connection 连接,连线(网络,资料库) 连接 +constraint 约束(条件) +construct 构件 构件 +container 容器 容器 ###### (存放资料的某种结构如 list, vector…) +containment 内含 包容 +context 背景关系、周遭环境、上下脉络 环境、上下文 +control 控制元件、控件 控件 +console 主控台 控制台 +const 常数(constant 的缩写,C++ 关键字) +constant 常数(相对於 variable) 常量 +constructor(ctor) 建构式 构造函数 ###### (与class 同名的一种 member functions) +copy (v) 复制、拷贝 拷贝 +copy (n) 复件, 副本 +cover 涵盖 覆盖 +create 创建、建立、产生、生成 创建 +creation 产生、生成 创建 +cursor 游标 光标 +custom 订制、自定 定制 +data 资料 数据 +database 资料库 数据库 +database schema 数据库结构纲目 +data member 资料成员、成员变数 数据成员、成员变量 +data structure 资料结构 数据结构 +datagram 资料元 数据报文 +dead lock 死结 死锁 +debug 除错 调试 +debugger 除错器 调试器 +declaration 宣告、宣告式 声明 +deduction 推导(例:template argument deduction) 推导、推断 +default 预设 缺省、默认 +defer 延缓 推迟 +define 定义 预定义 +definition 定义、定义区、定义式 定义 +delegate 委派、委托、委任 委托 +delegation (同上) +demarshal 反编列 散集 +dereference 提领(取出指标所指物体的内容) 解叁考 +dereference operator dereference(提领)运算子 * 解叁考操作符 +derived class 衍生类别 派生类 +design by contract 契约式设计 +design pattern 设计范式、设计样式 设计模式 ※ 最近我比较喜欢「设计范式」一词 +destroy 摧毁、销毁 +destructor 解构式 析构函数 +device 装置、设备 设备 +dialog 对话窗、对话盒 对话框 +directive 指令(例:using directive) (编译)指示符 +directory 目录 目录 +disk 碟 盘 +dispatch 分派 分派 +distributed computing 分布式计算 (分布式电算) 分布式计算 分散式计算 (分散式电算) +document 文件 文档 +dot operator dot(句点)运算子 . (圆)点操作符 +driver 驱动程式 驱动(程序) +dynamic binding 动态系结 动态绑定 +efficiency 效率 效率 +efficient 高效 高效 +end user 终端用户 +entity 物体 实体、物体 +encapsulation 封装 封装 +enclosing class 外围类别(与巢状类别 nested class 有关)外围类 +enum (enumeration) 列举(一种 C++ 资料型别) 枚举 +enumerators 列举元(enum 型别中的成员) 枚举成员、枚举器 +equal 相等 相等 +equality 相等性 相等性 +equality operator equality(等号)运算子 == 等号操作符 +equivalence 等价性、等同性、对等性 等价性 +equivalent 等价、等同、对等 等价 +escape code 转义码 转义码 +evaluate 评估、求值、核定 评估 +event 事件 事件 +event driven 事件驱动的 事件驱动的 +exception 异常情况 异常 +exception declaration 异常宣告(ref. C++ Primer 3/e, 11.3) 异常声明 +exception handling 异常处理、异常处理机制 异常处理、异常处理机制 +exception specification 异常规格(ref. C++ Primer 3/e, 11.4) 异常规范 +exit 退离(指离开函式时的那一个执行点) 退出 +explicit 明白的、明显的、显式 显式 +export 汇出 引出、导出 +expression 运算式、算式 表达式 +facility 设施、设备 设施、设备 +feature 特性 +field 栏位,资料栏(Java) 字段, 值域(Java) +file 档案 文件 +firmware 韧体 固件 +flag 旗标 标记 +flash memory 快闪记忆体 闪存 +flexibility 弹性 灵活性 +flush 清理、扫清 刷新 +font 字型 字体 +form 表单(programming 用语) 窗体 +formal parameter 形式叁数 形式叁数 +forward declaration 前置宣告 前置声明 +forwarding 转呼叫,转发 转发 +forwarding function 转呼叫函式,转发函式 转发函数 +fractal 碎形 分形 +framework 框架 框架 +full specialization 全特化(ref. partial specialization) +function 函式、函数 函数 +function call operator 同 call operator +function object 函式物件(ref. C++ Primer 3/e, 12.3) 函数对象 +function overloaded resolution 函式多载决议程序 函数重载解决(方案) +functionality 功能、机能 功能 +function template 函式模板、函式范本 函数模板 +functor 仿函式 仿函式、函子 +game 游戏 游戏 +generate 生成 +generic 泛型、一般化的 一般化的、通用的、泛化 +generic algorithm 泛型演算法 通用算法 +getter (相对於 setter) 取值函式 +global 全域的(对应於 local) 全局的 +global object 全域物件 全局对象 +global scope resolution operator 全域生存空间(范围决议)运算子 :: 全局范围解析操作符 +group 群组 +group box 群组方块 分组框 +guard clause 卫述句 (Refactoring, p250) 卫语句 +GUI 图形介面 图形界面 +hand shaking 握手协商 +handle 识别码、识别号、号码牌、权柄 句柄 +handler 处理常式 处理函数 +hard-coded 编死的 硬编码的 +hard-copy 硬拷图 屏幕截图 +hard disk 硬碟 硬盘 +hardware 硬体 硬件 +hash table 杂凑表 哈希表、散列表 +header file 表头档、标头档 头文件 +heap 堆积 堆 +hierarchy 阶层体系 层次结构(体系) +hook 挂钩 钩子 +hyperlink 超链结 超链接 +icon 图示、图标 图标 +IDE 整合开发环境 集成开发环境 +identifier 识别字、识别符号 标识符 +if and only if 若且唯若 当且仅当 +Illinois 伊利诺 伊利诺斯 +image 影像 图象 +immediate base 直接的(紧临的)上层 base class。 直接上层基类 +immediate derived 直接的(紧临的)下层 derived class。 直接下层派生类 +immutability 不变性 +immutable 不可变(的) +implement 实作、实现 实现 +implementation 实作品、实作体、实作码、实件 实现 +implicit 隐喻的、暗自的、隐式 隐式 +import 汇入 导入 +increment operator 累加运算子 ++ 增加操作符 +infinite loop 无穷回圈 无限循环 +infinite recursive 无穷递回 无限递归 +information 资讯 信息 +infrastructure 公共基础建设 +inheritance 继承、继承机制 继承、继承机制 +inline 行内 内联 +inline expansion 行内展开 内联展开 +initialization 初始化(动作) 初始化 +initialization list 初值列 初始值列表 +initialize 初始化 初始化 +inner class 内隐类别 内嵌类 +instance 实体 实例 ###### (根据某种表述而实际产生的「东西」) +instantiated 具现化、实体化(常应用於 template) 实例化 +instantiation 具现体、具现化实体(常应用於 template) 实例 +integer (integral) 整数(的) 整型(的) +integrate 整合 集成 +interacts 交谈、互动 交互 +interface 介面 接口 +for GUI 介面 界面 +interpreter 直译器 解释器 +invariants 恒常性,约束条件 约束条件 +invoke 唤起 调用 +iterate 迭代(回圈一个轮回一个轮回地进行) 迭代 +exception 异常情况 异常 +exception declaration 异常宣告(ref. C++ Primer 3/e, 11.3) 异常声明 +exception handling 异常处理、异常处理机制 异常处理、异常处理机制 +exception specification 异常规格(ref. C++ Primer 3/e, 11.4) 异常规范 +exit 退离(指离开函式时的那一个执行点) 退出 +explicit 明白的、明显的、显式 显式 +export 汇出 引出、导出 +expression 运算式、算式 表达式 +facility 设施、设备 设施、设备 +feature 特性 +field 栏位,资料栏(Java) 字段, 值域(Java) +file 档案 文件 +firmware 韧体 固件 +flag 旗标 标记 +flash memory 快闪记忆体 闪存 +flexibility 弹性 灵活性 +flush 清理、扫清 刷新 +font 字型 字体 +form 表单(programming 用语) 窗体 +formal parameter 形式叁数 形式叁数 +forward declaration 前置宣告 前置声明 +forwarding 转呼叫,转发 转发 +forwarding function 转呼叫函式,转发函式 转发函数 +fractal 碎形 分形 +framework 框架 框架 +full specialization 全特化(ref. partial specialization) +function 函式、函数 函数 +function call operator 同 call operator +function object 函式物件(ref. C++ Primer 3/e, 12.3) 函数对象 +function overloaded resolution 函式多载决议程序 函数重载解决(方案) +functionality 功能、机能 功能 +function template 函式模板、函式范本 函数模板 +functor 仿函式 仿函式、函子 +game 游戏 游戏 +generate 生成 +generic 泛型、一般化的 一般化的、通用的、泛化 +generic algorithm 泛型演算法 通用算法 +getter (相对於 setter) 取值函式 +global 全域的(对应於 local) 全局的 +global object 全域物件 全局对象 +global scope resolution operator 全域生存空间(范围决议)运算子 :: 全局范围解析操作符 +group 群组 +group box 群组方块 分组框 +guard clause 卫述句 (Refactoring, p250) 卫语句 +GUI 图形介面 图形界面 +hand shaking 握手协商 +handle 识别码、识别号、号码牌、权柄 句柄 +handler 处理常式 处理函数 +hard-coded 编死的 硬编码的 +hard-copy 硬拷图 屏幕截图 +hard disk 硬碟 硬盘 +hardware 硬体 硬件 +hash table 杂凑表 哈希表、散列表 +header file 表头档、标头档 头文件 +heap 堆积 堆 +hierarchy 阶层体系 层次结构(体系) +hook 挂钩 钩子 +hyperlink 超链结 超链接 +icon 图示、图标 图标 +IDE 整合开发环境 集成开发环境 +identifier 识别字、识别符号 标识符 +if and only if 若且唯若 当且仅当 +Illinois 伊利诺 伊利诺斯 +image 影像 图象 +immediate base 直接的(紧临的)上层 base class。 直接上层基类 +immediate derived 直接的(紧临的)下层 derived class。 直接下层派生类 +immutability 不变性 +immutable 不可变(的) +implement 实作、实现 实现 +implementation 实作品、实作体、实作码、实件 实现 +implicit 隐喻的、暗自的、隐式 隐式 +import 汇入 导入 +increment operator 累加运算子 ++ 增加操作符 +infinite loop 无穷回圈 无限循环 +infinite recursive 无穷递回 无限递归 +information 资讯 信息 +infrastructure 公共基础建设 +inheritance 继承、继承机制 继承、继承机制 +inline 行内 内联 +inline expansion 行内展开 内联展开 +initialization 初始化(动作) 初始化 +initialization list 初值列 初始值列表 +initialize 初始化 初始化 +inner class 内隐类别 内嵌类 +instance 实体 实例 ###### (根据某种表述而实际产生的「东西」) +instantiated 具现化、实体化(常应用於 template) 实例化 +instantiation 具现体、具现化实体(常应用於 template) 实例 +integer (integral) 整数(的) 整型(的) +integrate 整合 集成 +interacts 交谈、互动 交互 +interface 介面 接口 +for GUI 介面 界面 +interpreter 直译器 解释器 +invariants 恒常性,约束条件 约束条件 +invoke 唤起 调用 +iterate 迭代(回圈一个轮回一个轮回地进行) 迭代 +iterative 反覆的,迭代的 +iterator 迭代器(一种泛型指标) 迭代器 +iteration 迭代(回圈每次轮回称为一个 iteration) 迭代 +item 项目、条款 项、条款、项目 +laser 雷射 激光 +level 阶 层 (级) 例 high level 高阶 高层 +library 程式库、函式库 库、函数库 +lifetime 生命期、寿命 生命期、寿命 +link 联结、连结 连接,链接 +linker 联结器、连结器 连接器 +literal constant 字面常数(例 3.14 或 “hi” 这等常数值) 字面常数 +list 串列(linked-list) 列表、表、链表 +list box 列表方块、列表框 列表框 +load 载入 装载 +loader 载入器 装载器、载入器 +local 区域的(对应於 global) 局部的 +local object 区域物件 局部对象 +lock 机锁 +loop 回圈 循环 +lvalue 左值 左值 +macro 巨集 宏 +magic number 魔术数字 魔法数 +maintain 维护 维护 +manipulator 操纵器(iostream 预先定义的一种东西) 操纵器 +marshal 编列 列集 叁考 demarshal +mechanism 机制 机制 +member 成员 成员 +member access operator 成员取用运算子(有 dot 和 arrow 两种) 成员存取操作符 +member function 成员函式 成员函数 +member initialization list 成员初值列 成员初始值列表 +memberwise 以 member 为单元┅、members 逐一┅ 以成员为单位 +memberwise copy 以 members 为单元逐一复制 +memory 记忆体 内存 +menu 表单、选单 菜单 +message 讯息 消息 +message based 以讯息为基础的 基於消息的 +message loop 讯息回圈 消息环 +method (java) 方法、行为、函式 方法 +meta- 超- 元- 例 meta-programming 超编程 元编程 +micro 微 微 +middleware 中介层 中间件 +modeling 模塑 +modeling language 塑模语言,建模语言 +modem 数据机 调制解调器 +module 模组 模块 +modifier 饰词 修饰符 +most derived class 最末层衍生类别 最底层的派生类 +mouse 滑鼠 鼠标 +mutable 可变的 可变的 +multi-tasking 多工 多任务 +namespace 命名空间 名字空间、命名空间 +native 原生的 本地的、固有的 +nested class 巢状类别 嵌套类 +network 网路 网络 +network card 网路卡 网卡 +object 物件 对象 +object based 以物件为基础的 基於对象的 +object file 目的档 目标文件 +object model 物件模型 对象模型 +object oriented 物件导向的 面向对象的 +online 线上 在线 +opaque 不透明的 +operand 运算元 操作数 +operating system (OS) 作业系统 操作系统 +operation 操作、操作行为 操作 +operator 运算子 操作符、运算符 +option 选项,可选方案 选项 +ordinary 常规的 常规的 +overflow 上限溢位(相对於 underflow) 溢出(underflow:下溢) +overhead 额外负担、额外开销 额外开销 +overload 多载化、多载化、重载 重载 +overloaded function 多载化函式 重载的函数 +overloaded operator 多载化运算子 被重载的操作符 +overloaded set 多载集合 重载集合 +override 改写、覆写 重载、改写、重新定义 ###### (在 derived class 中重新定义虚拟函式 +package 套件 包 +pair 对组 +palette 调色盘、组件盘、工具箱 +pane 窗格 窗格 ###### (有时为嵌板之意,例 Java Content Pane) +parallel 平行 并行 +parameter 叁数(函式叁数列上的变数) 叁数、形式叁数、形叁 +parameter list 叁数列 叁数列表 +parent class 父类别(或称 base class) 父类 +parentheses 小括弧、小括号 圆括弧、圆括号 +parse 解析 解析 +part 零件 部件 +partial specialization 偏特化(ref. C++ Primer 3/e, 16.10) 局部特化 ###### (ref. full specialization) +pass by address 传址(函式引数的传递方式)(非正式用语)传地址 +pass by reference 传址(函式引数的一种传递方式) 传地址, 按引用传递 +pass by value 传值(函式引数的一种传递方式) 按值传递 +pattern 范式、样式 模式 +performance 效率、性能兼而有之 性能 +persistence 永续性 持久性 +pixel 图素、像素 像素 +placement delete ref. C++ Primer 3/e, 15.8.2 +placement new ref. C++ Primer 3/e, 15.8.2 +platform 平台 平台 +pointer 指标 指针 址位器(和址叁器 reference 形成对映,满好) +poll 轮询 轮询 +polymorphism 多型 多态 +pop up 冒起式、弹出式 弹出式 +port 埠 端口 +postfix 后置式、后序式 后置式 +precedence 优先序(通常用於运算子的优先执行次序) +prefix 前置式、前序式 前置式 +preprocessor 前处理器 预处理器 +prime 质数 素数 +primitive type 基本型别 (不同於 base class,基础类别) +print 列印 打印 +printer 印表机 打印机 +priority 优先权 (通常用於执行绪获得 CPU 时间的优先次序) +procedure 程序 过程 +procedural 程序性的、程序式的 过程式的、过程化的 +process 行程 进程 +profile 评测 评测 +profiler 效能(效率)评测器 效能(性能)评测器 +programmer 程式员 程序员 +programming 编程、程式设计、程式化 编程 +progress bar 进度指示器 进度指示器 +project 专案 项目、工程 +property 属性 +protocol 协定 协议 +pseudo code 假码、虚拟码、伪码 伪码 +qualified 经过资格修饰(例如加上 scope 运算子) 限定 +qualifier 资格修饰词、饰词 限定修饰词 +quality 品质 质量 +queue 伫列 队列 +radian 径度 弧度 +radio button 圆钮 单选按钮 +raise 引发(常用来表示发出一个 exception) 引起、引发 +random number 随机数、乱数 随机数 +range 范围、区间(用於 STL 时) 范围、区间 +rank 等级、分等(ref. C++Primer 3/e 9,15章) 等级 +raw 生鲜的、未经处理的 未经处理的 +record 记录 记录 +recordset 记录集 记录集 +recursive 递回 递归 +re-direction 重导向 重定向 +refactoring 重构、重整 重构 +refer 取用 叁考 +refer to 指向、指涉、指代 +reference (C++ 中类似指标的东西,相当於 “化身”) 引用、叁考 址叁器, see pointer +register 暂存器 寄存器 +reflection 反射 反射、映像 +relational database 关联式资料库 关系数据库 +represent 表述,表现 表述,表现 +resolve 决议(为算式中的符号名称寻找 解析 对应之宣告式的过程) +resolution 决议程序、决议过程 解析过程 +resolution 解析度 分辨率 +restriction 局限 +return 传回、回返 返回 +return type 回返型别 返回类型 +return value 回返值 返回值 +robust 强固、稳健 健壮 +robustness 强固性、稳健性 健壮性 +routine 常式 例程 +runtime 执行期 运行期、运行时 +common language runtime (CLR) 译为「通用语言执行层」 +rvalue 右值 右值 +save 储存 存储 +schedule 排程 调度 +scheduler 排程器 调度程序 +scheme 结构纲目、组织纲目 +scroll bar 卷轴 滚动条 +scope 生存空间、生存范围、范畴、作用域 生存空间 +scope operator 生存空间(范围决议)运算子 :: 生存空间操作符 +scope resolution operator 生存空间决议运算子 生存空间解析操作符 ###### (与scope operator同) +screen 萤幕 屏幕 +search 搜寻 查找 +semantics 语意 语义 +sequential container 序列式容器 顺序式容器 ###### (对应於 associative container) +server 伺服器、伺服端 服务器、服务端 +serial 串行 +serialization 次第读写,序列化 序列化 (serialize) +setter (相对於 getter) 设值函式 +signal 信号 +signature 标记式、签名式、署名式 签名 +slider 滚轴 滑块 +slot 条孔、槽 槽 +smart pointer 灵巧指标、精灵指标 智能指针 +snapshot 萤幕快照(图) 屏幕截图 +specialization 特殊化、特殊化定义、特殊化宣告 特化 +specification 规格 规格、规范 +splitter 分裂视窗 切分窗口 +software 软体 软件 +solution 解法,解决方案 方案 +source 原始码 源码、源代码 +stack 堆叠 栈 +stack unwinding 堆叠辗转开解(此词用於 exception 主题) 栈辗转开解 * +standard library 标准程式库 +standard template library 标准模板程式库 +statement 述句 语句、声明 +status bar 状态列、状态栏 状态条 +STL 见 standard template library +stream 资料流、串流 流 +string 字串 字符串 +subroutine +subscript operator 下标运算子 [ ] 下标操作符 +subtype 子型别 子类型 +support 支援 支持 +suspend 虚悬 挂起 +symbol 符号 记号 +syntax 语法 语法 +tag 标签 标记 索引标签,页签 +target 标的(例 target pointer:标的指标) 目标 +task switch 工作切换 任务切换 +template 模板、范本 模板 +template argument deduction 模板引数推导 模板叁数推导 +template explicit specialization 模板显式特化(版本) 模板显式特化 +template parameter 模板叁数 模板叁数 +temporary object 暂时物件 临时对象 +text 文字 文本 +``` diff --git a/Name/Namde.md b/Name/Namde.md index 692266d..d6ce5f7 100644 --- a/Name/Namde.md +++ b/Name/Namde.md @@ -1,3 +1,4 @@ # name - [几种常见的程序命名规则](https://blog.csdn.net/u014296677/article/details/51504321) +- [程序员必须掌握的 600 个英语单词 - sayxiaotie - 博客园](https://www.cnblogs.com/hdic/p/5996282.html) diff --git a/README.md b/README.md index 2e85f3d..b2df6db 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ ```shell |-- 知识目录树 - |-- C-currentDirectory.Bat |-- C-mddir.Bat + |-- Cmd-CurrentDirectory.Bat |-- README.md |-- _config.yml |-- Algorithms @@ -47,7 +47,10 @@ | |-- Gradle | | |-- Gradle.md | |-- Maven - | |-- Maven.md + | | |-- Maven.md + | |-- Windows installer + | |-- Advanced Installer + | |-- Advanced Installer.md |-- C++ | |-- C++.md |-- CDN @@ -70,7 +73,18 @@ | |-- Baidu | | |-- su.baidu.md | |-- google + | | |-- apis.md | | |-- google.md + | | |-- developers + | | | |-- developers.md + | | |-- google-translate-api + | | | |-- google-translate-api.md + | | |-- GoogleTranslateFreeApi + | | | |-- GoogleTranslateFreeApi.md + | | |-- Gpay + | | | |-- Gpay.md + | | |-- Translate + | | |-- Translate.md | |-- huaweicloud | | |-- huaweicloud.md | |-- TaobaoOpenPlatform @@ -95,6 +109,8 @@ | | |-- code0001-mssql-page.md | | |-- code0001-mssql.md | | |-- code0002-mssql-hanzi2pinyin.md + | |-- Microsoft SQL Server 2012 Express + | | |-- Microsoft SQL Server 2012 Express.md | |-- MongoDB | | |-- MongoDB.md | |-- MySQL @@ -106,6 +122,7 @@ | |-- Postgres | | |-- Npgsql.md | |-- PostgreSQL + | | |-- PostgreSQL.md | |-- Redis | | |-- Redis.md | | |-- class @@ -118,9 +135,18 @@ | | |-- RedisDesktopManager | | |-- RedisDesktopManager.md | |-- SQL Server Compact Edition + | |-- Sql Server LocalDB + | | |-- Sql Server LocalDB.md + | | |-- SqlLocalDB.md + | |-- SqlBulkCopy + | | |-- SqlBulkCopy.md | |-- SQLite + | | |-- Insert.md + | | |-- Repair.md + | | |-- SQL.md | | |-- SQLite-GUI tool.md | | |-- SQLite.md + | | |-- Thread.md | |-- SqlLocalDB |-- Doc | |-- Docsite @@ -128,7 +154,10 @@ | |-- MarkdownHttpHandler | | |-- MarkdownHttpHandler.md | |-- MkDocs - | |-- MkDocs.md + | | |-- MkDocs.md + | |-- Online + | |-- kancloud + | |-- kancloud.md |-- Docker | |-- Docker.md | |-- Boot2Docker @@ -155,12 +184,19 @@ | | |-- Html Agility Pack | | | |-- css.md | | | |-- Html Agility Pack.md + | | | |-- style.md + | | |-- PhantomJS + | | | |-- PhantomJS.md | | |-- ScrapySharp | | | |-- HtmlDocument.md | | | |-- img.md + | | | |-- javascript.md + | | | |-- ScrapingBrowser.md | | | |-- ScrapySharp.md | | | |-- tihuan.md + | | | |-- using.md | | |-- SqlSugar + | | |-- Insert.md | | |-- Select.md | | |-- SqlSugar.md | | |-- TruncateTable.md @@ -285,6 +321,7 @@ | | |-- children.md | | |-- jq-btn.md | | |-- jq-css.md + | | |-- parent.md | | |-- setInterval.md | |-- JSON | | |-- js-json.md @@ -299,6 +336,7 @@ | |-- html2canvas.html | |-- html2canvas.md | |-- jq-classfind.md + | |-- js-class.md | |-- js-findIndex.md | |-- js-Json2url.md | |-- js-QueryString.md @@ -327,6 +365,9 @@ | |-- readme | |-- Template | |-- install.md + | |-- issue.md + | |-- issue.txt + | |-- issue1.txt | |-- README.md | |-- table.md |-- Microsoft .NET @@ -409,6 +450,8 @@ | | |-- class | | | |-- class.md | | | |-- laycode.md + | | |-- CsharpLazycode + | | | |-- CsharpLazycode.md | | |-- DataGridView | | | |-- Code0016DataGridView.md | | |-- Delegate @@ -422,15 +465,22 @@ | | | |-- enum.md | | |-- File | | | |-- file.md + | | | |-- filelimit.md | | | |-- Path.md | | |-- FileProviders | | | |-- FileProviders.md + | | |-- Firewall + | | | |-- Firewall.md | | |-- Form | | | |-- Form.md | | | |-- SplitContainer | | | |-- SplitContainer.md | | |-- Format | | | |-- Format.md + | | |-- GC + | | | |-- GC.md + | | |-- Hashtable + | | | |-- Hashtable.md | | |-- HttpClient | | | |-- HTTP.md | | | |-- HttpClient-Get.md @@ -446,6 +496,8 @@ | | | |-- Linq.md | | |-- List | | | |-- List.md + | | |-- lock + | | | |-- lock.md | | |-- msgbox | | | |-- msgwinform.md | | |-- Newtonsoft @@ -455,6 +507,8 @@ | | | |-- path.md | | |-- PictureBox | | | |-- PictureBox.md + | | |-- Queue + | | | |-- Queue.md | | |-- random | | | |-- random-list.md | | | |-- random.md @@ -463,6 +517,8 @@ | | | |-- requireAdministrator.md | | |-- Split | | | |-- split.md + | | |-- Stopwatch + | | | |-- Stopwatch.md | | |-- StringBuilder | | | |-- StringBuilder.md | | |-- Thread @@ -550,6 +606,9 @@ | | |-- websocket-client.md | |-- websocket-sharp | |-- websocket-sharp.md + |-- Microsoft Visual C++ + | |-- McRip VC Redist Installer.md + | |-- Microsoft Visual C++.md |-- Name | |-- English.md | |-- Namde.md @@ -578,9 +637,12 @@ |-- SEO | |-- SEO.md | |-- Baidu + | | |-- baidu.md | |-- Google | |-- Knowledge | | |-- canonical.md + | | |-- Robots.md + | | |-- seoknowledge.md | |-- My engine system | | |-- My engine system.md | | |-- neiye @@ -590,7 +652,9 @@ | | |-- Resource | | |-- Resource.md | |-- Tool Box - | |-- weiyuanchuang.md + | | |-- weiyuanchuang.md + | |-- Wiki + | |-- sitemap.md |-- Server | |-- Apache | | |-- Apache.md @@ -610,6 +674,8 @@ | | | |-- caddy.service | | |-- PHP | | |-- PHP.md + | |-- FTP + | | |-- Microsoft FTP Service.md | |-- gossa | |-- IIS | | |-- DirectoryEntry @@ -767,6 +833,7 @@ | | |-- phpStudy.md | | |-- Rewrite.md | |-- Postman + | | |-- HEAD.md | | |-- Postman.md | |-- ProcessExplorer | | |-- ProcessExplorer.md @@ -1010,4 +1077,5 @@ |-- Windows PowerShell |-- YAML |-- YAML.md + ``` diff --git a/SEO/Baidu/baidu.md b/SEO/Baidu/baidu.md new file mode 100644 index 0000000..a942748 --- /dev/null +++ b/SEO/Baidu/baidu.md @@ -0,0 +1,12 @@ +# 百度算法 + +## 算法 + +### 闪电算法 + +- [关于百度上线 “闪电算法”的公告*搜索资讯*百度搜索资源平台](https://ziyuan.baidu.com/wiki/1590) +- [【官方说法】“闪电算法”解读*搜索学院*百度搜索资源平台](https://ziyuan.baidu.com/college/articleinfo?id=1591) + +### 飓风算法 2.0 + +- [【官方说法】飓风算法2.0解读_搜索学院_百度搜索资源平台](https://ziyuan.baidu.com/college/articleinfo?id=2685) diff --git a/SEO/Knowledge/Robots.md b/SEO/Knowledge/Robots.md new file mode 100644 index 0000000..13a4d6a --- /dev/null +++ b/SEO/Knowledge/Robots.md @@ -0,0 +1,102 @@ +# Robots + +- [Robots.txt 的妙用 - zhouchangshun_666 的博客 - CSDN 博客](https://blog.csdn.net/zhouchangshun_666/article/details/81564878) +- [网站 robots.txt 使用中常见的误区](http://www.chinaz.com/web/2012/0428/248613.shtml) +- [网站 robots.txt 如何设置?-MetInfo](https://www.metinfo.cn/faq/2363.html) + +## 工具 + +- [sitemap 网站地图 生成工具](https://help.bj.cn/) +- [robots 文件生成 - 站长工具](http://tool.chinaz.com/robots/) + +### 规范 + +```text +选项:编码格式:UTF-8;URL模式:notSelect;锚过滤:isSelect;内链/外链/全:allSelect;去掉标题为空:notSelect;自动补全URL:isSelect;死链判断:notSelect;次级链接页:notSelect。 +网站robots.txt如何设置? + +一、啥是robots.txt + +笔者引证baidu站长对象中后段话来阐发。查找引擎运用spider措施自动会见互联网上的页面并获取页面信息。spider在会见一个网站时,会起首会 查察该网站的根域下是不是有一个叫做 robots.txt的纯文本文件,这个文件用于指定spider在您网站上的抓取打算。您可以在您的网站中创建一个robots.txt,在文件中声明 该网站中不想被查找引擎录入的有些或者指定查找引擎只录入特定的有些。 + +二、robots.txt如何设置 + +1、robots.txt文件必须放置在网站根目录; + +2、robots.txt文件名必须小写。 + +根据上面两点提示我们查看到绝大部分网站的robots.txt文件,如果出现无法访问的现象,最大可能就是网站根目录中没有此文件。 +``` + +### 代码 + +```c# +遵循语法的Robots.txt才可能被机器人识别,至于语法,介绍起来很繁琐,现简单举例如下: + +1)禁止所有搜索引擎访问网站的任何部分(也就是网站彻底的拒绝所有搜索引擎收录) + +User-agent: * + +Disallow: / + +2)允许所有的robot访问(也就是网站允许所有搜索引擎收录) + +User-agent: * + +Disallow: + +3)禁止某个搜索引擎的访问(比如禁止百度收录,按如下的方式写) + +User-agent: baiduspider + +Disallow: / + +4)允许某个搜索引擎的访问(比如允许百度收录,按如下的方式写) + +User-agent: baiduspider + +Disallow: + +User-agent: * + +Disallow: / + +5)禁止搜索引擎访问某些目录 + +User-agent: * + +Disallow: /cgi-bin/ + +Disallow: /tmp/ + +Disallow: /images/ +``` + +### Robots.txt 示例 + +```txt +User-agent: * +Disallow: +Crawl-delay: 120 +Disallow: /cgi-bin/ +Sitemap: http://www.yoursite.com/sitemap.gz + +``` + +```txt +User-agent: * + +Disallow: /i*/ + +Disallow: /a*d/ + +Disallow: /*.php + +Disallow: /*/*.php + +Disallow: /*/list*.html + +Allow: /img/ + +Sitemap: https://域名/sitemap.xml +``` diff --git a/SEO/Knowledge/seoknowledge.md b/SEO/Knowledge/seoknowledge.md new file mode 100644 index 0000000..63f68a8 --- /dev/null +++ b/SEO/Knowledge/seoknowledge.md @@ -0,0 +1,3 @@ +# seoknowledge + +- [告诉你如何让网站网址实现百度秒收录](https://cloud.tencent.com/developer/article/1385395) diff --git a/SEO/Wiki/sitemap.md b/SEO/Wiki/sitemap.md new file mode 100644 index 0000000..798ea87 --- /dev/null +++ b/SEO/Wiki/sitemap.md @@ -0,0 +1,11 @@ +# sitemap + +- [如何建立 sitemap 网站地图(google)-百度经验](https://jingyan.baidu.com/article/cd4c2979df975b756e6e60ec.html) +- [Create your Google Sitemap Online - XML Sitemaps Generator](https://www.xml-sitemaps.com/) +- [C#生成 sitemap 站点地图](http://www.makaidong.com/%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%90%9C/48633.shtml) +- [百度 XML 地图规范的格式是怎样的 - 思享 SEO 博客](https://www.4xseo.com/basis/3290/) + +## 工具 + +- [sitemap 网站地图 生成工具](https://help.bj.cn/) +- [robots 文件生成 - 站长工具](http://tool.chinaz.com/robots/) diff --git a/Server/FTP/Microsoft FTP Service.md b/Server/FTP/Microsoft FTP Service.md new file mode 100644 index 0000000..3a400c4 --- /dev/null +++ b/Server/FTP/Microsoft FTP Service.md @@ -0,0 +1,46 @@ +# Microsoft FTP Service + +- [Windows 下搭建 FTP 服务器 - 子非魚! - 博客园](https://www.cnblogs.com/zhangfengfly/p/6879513.html) +- [Windows 下开启 FTP 服务并创建 FTP 用户 - Duke 的博客 - CSDN 博客](https://blog.csdn.net/pengpengpeng85/article/details/84977436) +- [IIS 7 中添加 FTP 站点并设置指定用户访问](https://www.jianshu.com/p/f705574d155a) +- [windows2008 新建站点及 ftp 账号 - 神经质少女爱代码 - 博客园](https://www.cnblogs.com/blog-zy/p/7940406.html) +- [用 IIS 配置 FTP 服务器,用户登陆不了](https://zhidao.baidu.com/question/479225943.html) +- [IIS 中 ftp 的部署+防火墙(一) - miner_k 的博客 - CSDN 博客](https://blog.csdn.net/miner_k/article/details/69427342) +- [Windows 2008 R2 IIS7.5 配置 FTP 图文教程](https://www.jb51.net/article/57219.htm) +- [Windows 2008 R2 FTP 防火墙配置问题 - lu lu - 博客园](https://www.cnblogs.com/dennlu/archive/2012/06/04/2534925.html) + +```c# +三步走: +1.在你的FTP服务器上关闭系统自带防火墙; +2.设置administrator用户名和密码,并启用,关闭guest登录,开放远程登录; +3.在“开始-控制面板-管理工具-本地安全策略-本地策略-安全选项”中找到“网络访问:本地账户的共享和安全模式”,后面要设置成“经典模式” +``` + +## 常见问题 + +- [windows 防火墙支持 FTP 服务的设置方法 - 37 度 2 - CSDN 博客](https://blog.csdn.net/china_skag/article/details/79429338) +- [WINDOWS2008 设置 FTP 防火墙规则 - sungcong - 博客园](https://www.cnblogs.com/sungcong/p/3907747.html) +- 连接不上 FTP 是因为防火墙没配置正确. +- net stop ftpsvc & net start ftpsvc(重启 ftp 服务)不然不生效 + +```c# +FTP Server (FTP Traffic-Out) +An outbound rule to allow FTP traffic for Internet Information Services (IIS) [TCP 20] + +WINDOWS2008 设置FTP防火墙规则 +在防火墙入站规划这里,加上21、20两个端口。 +然后重启ftp服务,cmd命令:net stop ftpsvc & net start ftpsvc(重启ftp服务) +一定要重启ftp服务,不然不生效 +``` + +### 加完防火墙规则后一定要重启 FTP + +```c# +cmd命令:net stop ftpsvc & net start ftpsvc(重启ftp服务) + +net stop ftpsvc +net start ftpsvc + +``` + +### 不知道为啥我用 ftp 建立的账户永远无法访问 温馨提示 建立用户时候不要以 ftp 为用户名 捣鼓了很多时间. diff --git a/Tool Box/Soft Ware/Google Chrome/Google Chrome.md b/Tool Box/Soft Ware/Google Chrome/Google Chrome.md index 82f7928..963641f 100644 --- a/Tool Box/Soft Ware/Google Chrome/Google Chrome.md +++ b/Tool Box/Soft Ware/Google Chrome/Google Chrome.md @@ -13,3 +13,9 @@ ```shell Charset 修改网站的默认编码 ``` + +### 下载安装 + +#### 语言版本选择 + +- [Google Chrome Web Browser](https://www.google.com/intl/en_uk/chrome/) diff --git a/Tool Box/Soft Ware/Postman/HEAD.md b/Tool Box/Soft Ware/Postman/HEAD.md new file mode 100644 index 0000000..1983184 --- /dev/null +++ b/Tool Box/Soft Ware/Postman/HEAD.md @@ -0,0 +1,3 @@ +# HEAD + +- [HTTP head请求 - longyongzhen - 博客园](https://www.cnblogs.com/longyongzhen/p/6647239.html) diff --git a/Tool Box/Soft Ware/ProcessExplorer/ProcessExplorer.md b/Tool Box/Soft Ware/ProcessExplorer/ProcessExplorer.md index 67b25c7..7023d6f 100644 --- a/Tool Box/Soft Ware/ProcessExplorer/ProcessExplorer.md +++ b/Tool Box/Soft Ware/ProcessExplorer/ProcessExplorer.md @@ -1,4 +1,4 @@ # ProcessExplorer - [Process Explorer - Windows Sysinternals](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer) -- [Getting Title at 37:38](http://bbs.anjian.com/showtopic-78576-1.aspx) +- [361度窗口插件(窗口插件增强版|WndEx)V7.71【2017-11-06】 _ 361度插件 - 按键精灵论坛](http://bbs.anjian.com/showtopic-78576-1.aspx) diff --git a/Tool Box/TOOL.md b/Tool Box/TOOL.md index 38f6a2c..47a9325 100644 --- a/Tool Box/TOOL.md +++ b/Tool Box/TOOL.md @@ -46,6 +46,11 @@ - [XML 编辑器 阅读器 - 在线工具](http://xmlgrid.net/cn/) - [XML 压缩、格式化-BeJSON.com](http://www.bejson.com/otherformat/xml/) +## JSON Editor Online + +- [JSON Editor Online - view, edit and format JSON online](https://jsoneditoronline.org/) +- [Json Parser Online](http://json.parser.online.fr/) + ## 在线工具 - [JSON 在线编辑器-JSON 中国](http://www.json.org.cn/tools/JSONEditorOnline/index.htm) @@ -120,3 +125,9 @@ ### 单位换算表 - [单位换算表](http://www.columbia.edu/~zz2111/unitexchange.htm) + +## 源码编程类 + +### CSharp + +- [C# (CSharp) Code Examples - HotExamples](https://csharp.hotexamples.com/) diff --git a/UI Framework/Css/laycode/style.md b/UI Framework/Css/laycode/style.md index 788dde1..6debe6d 100644 --- a/UI Framework/Css/laycode/style.md +++ b/UI Framework/Css/laycode/style.md @@ -2,6 +2,19 @@ ## 常用的 style 代码库 +```html + + +``` + ### 定义长度 ```html @@ -22,3 +35,9 @@ ```css style="display: none" ``` + +#### 图片自适应宽度 + +```css +

+``` diff --git a/UI Framework/layui/layer/loading.md b/UI Framework/layui/layer/loading.md index 01f86b6..91273c6 100644 --- a/UI Framework/layui/layer/loading.md +++ b/UI Framework/layui/layer/loading.md @@ -86,3 +86,15 @@ layer.msg("灵活运用offset", { //更多例子 layer.msg("Hi"); ``` + +## 信息常用 + +```js +layer.alert( + data.message, + { skin: "layui-layer-molv", closeBtn: 0 }, + function() { + layer.close(layer.index); + } +); +```