Algorithm 4th Edition

These are 2 links for Algorithm 4th Edition, the English version, and the Chinese version. EN -> https://www.tabtu.top/doc/Algorithms_4th_Edition_en.pdf CH -> https://www.tabtu.top/doc/Algorithms_4th_Edition_ch.pdf JAR package -> https://www.tabtu.top/doc/algs4.jar Code -> https://algs4.cs.princeton.edu/code/ Data -> https://introcs.cs.princeton.edu/java/data/ Index: Fundamentals Basic Programming Model Data Abstraction Bags, Queues, and Stacks Analysis of Algorithms Case Study: Union-Find Sorting Elementary Sorts Mergesort Quicksort Priority Queues …

Load sysobjects from SQLServer

Load all User Table list: Load all User View list: Load User Function list: Load stored procedures list: Load stored procedure modify context: Load view context:

Working on R&D (2020-2021)

Redmine R&D project with Ezi-Technologies. http://xametw57y2.1ju.ca/redmine on tabtu Map Report: (2020.11 – 2021-03) Drawing by map and generate report by current. E-Chart show result by searching cities and communities. Line or Bar grown chart by timing, 2017-01 to current. Calculator on serverless platform. .Net5, C# Source Distribution System: (2021.04 – 2021.10) continue Call CodeDom on …

How to use Worker Service in Windows

When we try to create a Worker Service project in Windows, do not forget to change depandency to Microsoft.Extensions.Hosting.WindowsServices This platform is setting to package IHosting by default. We need to change the refering package to WindowsServices, then add an new implement in Programs.cs DO NOT FORGET ADD UseWindowsService() to support framework in windows system.

SC command for Windows Services

一、直接使用cmd来进行服务的一些操作 1、安装服务 其中:test3为创建的服务名,binPath后面是运行exe文件的所在路径 2、配置服务 有以下集中方式: sc config 服务名 start= AUTO    (自动) sc config 服务名 start= DEMAND  (手动) sc config 服务名 start= DISABLED(禁用) 例如下面的命令,在WINDOWS系统中开机便会自动启动: 3、开启服务 4、关闭服务 5、删除服务 二、为方便使用,可编辑为bat批处理文件 (新建一个txt文件,自己命名,把后缀改为.bat文件) 1、创建、配置、开启服务 2、关闭服务 3、删除服务

C#获取当前路径的7种方法

C#获取当前路径的方法如下: 1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName -获取模块的完整路径。 2. System.Environment.CurrentDirectory -获取和设置当前目录(该进程从中启动的目录)的完全限定目录。 3. System.IO.Directory.GetCurrentDirectory() -获取应用程序的当前工作目录。这个不一定是程序从中启动的目录啊,有可能程序放在C:\www里,这个函数有可能返回C:\Documents and Settings\ZYB\,或者C:\ProgramFiles\Adobe\,有时不一定返回什么东东,我也搞不懂了。 4. System.AppDomain.CurrentDomain.BaseDirectory -获取程序的基目录。 5. System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase -获取和设置包括该应用程序的目录的名称。 6. System.Windows.Forms.Application.StartupPath -获取启动了应用程序的可执行文件的路径。效果和2、5一样。只是5返回的字符串后面多了一个”\”而已 7. System.Windows.Forms.Application.ExecutablePath -获取启动了应用程序的可执行文件的路径及文件名,效果和1一样。 对于Windows程序和Web 应用程序来说,他们运行的路径是不一样的,所以关键是判断当前运行的程序是哪种程序.于是我们可以使用如下的代码 string path = “”;   if(System.Environment.CurrentDirectory ==AppDomain.CurrentDomain.BaseDirectory) //Windows应用程序则相等   … {   path =AppDomain.CurrentDomain.BaseDirectory;   }   else  … {   path =AppDomain.CurrentDomain.BaseDirectory + “Bin\”;   } 这样如果我们写了一个类库,类库中用到了Assembly.LoadFrom,由于是通用类库,所以可能用到Windows程序中也可能用到Web中,那么用上面的代码就很方便了. 1、Server.MapPath 2、System.Windows.Forms.StartupPath 3、Type.Assembly.Location C#获取当前路径方法2可以应用于控制台应用程序,WinForm应用程序,Windows服务,方法1可以应用于Web应用程序,方法3都可以应用。但方法3是加载应用程序的路径。如果是Web应用程序,取得的路径是:C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NETFiles目录。所以Web项目还是使用Server.MapPath吧。否则建议使用方法2。如果自己新建类库。可以加入对System.Windows.Forms.StartupPath的引用后使用。

xsd.exe tool in Vistual Studio which can generate .xsd files from XML, and can transfer to code instance

Script Style: Read a XML format file into xsd tool. It may generate multiple files to discribe the object. Load XSD files to generate a code instance. Must list out all XML files when creating. ‘/c’ stand for ‘/classes’; We can use XSD tool to generate .xsd files from .dll library or .exe PS: Some …