IDEA User input data Convert to index Using index number fund element vaule Output element vaule Screenshot Code using System; namespace array2d { public class array2d { public static void Main(string[] args) { //initilizing arrays string[,] platenumber = new string[5,3] { {"ZJI163","USA1008","PHA101"}, {"PJ130108", "USA1006","JAP118" }, {"MAX168", "USA1002" ,"TWD120"}, { "AZZ9756", "USA1005","KOR119" }, {"NAS1223","USA109","DDT886"} }; //wait for user input,convert to int Console.WriteLine("Welcome use DK parking system!\n Solt: 0-4 \n floor: 0-2"); Console.WriteLine("Plz type slot: "); int solt = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("Plz type floor: "); int floor = Convert.ToInt32(Console.ReadLine()); // decision the length of the element if (solt < 5 && floor < 3) { string car = platenumber[solt, floor]; Console.WriteLine("Found platenumber is :" + car); } else { Console.WriteLine("\nThe value you entered does not exist"); } Console.WriteLine("Thank you !"); Console.ReadLine(); } } }

October 16, 2022 0comments 35hotness 0likes Read all

C# Multidimensional Arrays As discussed in the previous chapter, Arrays in C# will support multi-dimensional arrays. In c#, a multidimensional array is an array that contains more than one dimension to represent the elements in a tabular format like rows and columns.In c#, multidimensional arrays can support either two or three-dimensional series. To create multi-dimensional arrays, we need to use a comma (,) separator inside the square brackets. C# Multi-Dimensional Array Declaration In c#, Multidimensional Arrays can be declared by specifying the data type of elements followed by the square brackets [] with comma (,) separator. The following are examples of creating two or three-dimensional arrays in the c# programming language. Question: Create a complete C# program that will compute the average of all elements in array x int [,] x = new int[4, 5] { { 4, 5, 6, 2, 12 }, { 10, 25, 33, 22, 11 },{ 211, 32, 43, 54, 65 }, { 3, 2, 1, 5, 6 } }; Average Solution Use for loop get array x elements values Add values Divide results by no. of values Code using System; namespace Module7 { public class Module7 { public static void Main(string[] args) { //initilizing array int[,] x = new int[4, 5] { { 4, 5, 6, 2, 12 }, { 10, 25, 33, 22, 11 }, { 211, 32, 43, 54, 65 }, { 3, 2, 1, 5, 6 } }; Console.WriteLine("---Two dimensional array elements---"); // use for loop get array x elements for(int y=0; y<4; y++) { int sum = 0; double avg =…

October 4, 2022 0comments 36hotness 0likes Read all

Question: Create a complete C# program that will simulate a log-in process. If the username and password are both correct the program will display “Log-in Successful”, otherwise it will display “Invalid Log-in details” FlowChart: C# Logical Operators: Code Answer: using System; namespace Module6 { class module6 { static void Main(string[] args) { string emailid, password; //use readline get user input Console.WriteLine("Plz enter u Emaill address :"); emailid = Console.ReadLine(); Console.WriteLine("Plz enter u Password"); password = Console.ReadLine(); //use if else to decision input data contains value if (emailid.Contains("[email protected]") && (password.Contains("d123456"))) { Console.WriteLine("Your Log-in Was Successful!"); } else { Console.WriteLine("Invalid Log-in details"); } Console.ReadLine(); } } } Reference C# Logical Operators with Exampleshttps://www.tutlane.com/tutorial/csharp/csharp-logical-operators-with-examples C# String Contains()https://www.javatpoint.com/csharp-string-contains

October 3, 2022 0comments 44hotness 0likes Read all

此博文记录了如何在网页中简单提取视频源地址的方法,起因是STS 课程中有一个Assessment是要观看影片去回答问题。Youtube没有资源,网页操作不方便,我想把他放到VLC中播放。 软件环境 Chrome浏览器 VLC打开网络链接(视频源地址 M3U8) Windows 10 操作步骤 使用Chrome浏览器在视频播放页面按F12进入开发模式(如上图所示)。 在控制台找到Network 在搜索框输入M3U8 复制Request URL中的值在VLC中打开即可 Reference: How do we download a blob url video [closed] https://stackoverflow.com/questions/42901942/how-do-we-download-a-blob-url-video 如何下载 blob 地址的视频资源 https://www.cnblogs.com/mq0036/p/14953209.html

September 30, 2022 1comments 47hotness 0likes Read all

Create an new windwos forms project. Design Size. Add panel. design panel color,size,style. Add button. calculartor button and oper button. Coding button function. Declaring variables double fstNum,secNum; string oper; Identify button function btnCE private void btnCE_Click(object sender, EventArgs e) { textDisplay.Text = "0"; string f, s; f = Convert.ToString(fstNum); s = Convert.ToString(secNum); f = ""; s = ""; } backspace private void backspace_Click(object sender, EventArgs e) { if (textDisplay.Text.Length > 0) { textDisplay.Text = textDisplay.Text.Remove(textDisplay.Text.Length - 1, 1); } if (textDisplay.Text == "") { textDisplay.Text = "0"; } } btn9 private void btn9_Click(object sender, EventArgs e) { if (textDisplay.Text == "0") { textDisplay.Text = "9"; } else { textDisplay.Text = textDisplay.Text + "9"; } } btnAdd private void btnAdd_Click(object sender, EventArgs e) { fstNum = double.Parse(textDisplay.Text); oper = "+"; textDisplay.Text = ""; } btnPM private void btnPM_Click(object sender, EventArgs e) { double q = Convert.ToDouble(textDisplay.Text); textDisplay.Text = Convert.ToString(-1 * q); } btnC private void btnC_Click(object sender, EventArgs e) { textDisplay.Text = "0"; } benDec private void benDec_Click(object sender, EventArgs e) { if (benDec.Text == ".") { if (!textDisplay.Text.Contains(".")) { textDisplay.Text = textDisplay.Text + benDec.Text; } } } use switch statement out put equal private void btnEuq_Click(object sender, EventArgs e) { secNum = double.Parse(textDisplay.Text); switch (oper) { case "+": textDisplay.Text = (fstNum + secNum).ToString(); break; case "-": textDisplay.Text = (fstNum - secNum).ToString(); break; case "*": textDisplay.Text = (fstNum * secNum).ToString(); break; case "/": textDisplay.Text = (fstNum / secNum).ToString(); break; default: break; } } Code download:caluclator.zip Reference:

September 25, 2022 0comments 36hotness 0likes Read all

Example explainedLine 1: using System means that we can use classes from the System namespace. Line 2: A blank line. C# ignores white space. However, multiple lines makes the code more readable. Line 3: namespace is used to organize your code, and it is a container for classes and other namespaces. Line 4: The curly braces {} marks the beginning and the end of a block of code. Line 5: class is a container for data and methods, which brings functionality to your program. Every line of code that runs in C# must be inside a class. In our example, we named the class Program. Don't worry if you don't understand how using System, namespace and class works. Just think of it as something that (almost) always appears in your program, and that you will learn more about them in a later chapter. Line 7: Another thing that always appear in a C# program, is the Main method. Any code inside its curly brackets {} will be executed. You don't have to understand the keywords before and after Main. You will get to know them bit by bit while reading this tutorial. Line 9: Console is a class of the System namespace, which has a WriteLine() method that is used to output/print text. In our example it will output "Hello World!". If you omit the using System line, you would have to write System.Console.WriteLine() to print/output text. Note: Every C# statement ends with a semicolon ;. Note: C# is case-sensitive: "MyClass" and "myclass" has different meaning. Note: Unlike Java, the…

September 24, 2022 0comments 35hotness 0likes Read all

云服务器配置 CPU 2核 - 内存 4GB - 系统盘 60GB Centos7.6 安装docker #/bin/bash sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum-config-manager --enable docker-ce-nightly sudo yum install docker-ce docker-ce-cli containerd.io systemctl start docker #启动容器 systemctl enable docker #开机自启 sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose docker --version docker-compose --version 安装Jumpserver curl -sSL https://github.com/jumpserver/jumpserver/releases/download/v2.21.2/quick_start.sh | bash 等待安装完成之后即可访问HOST的地址进行登录管理配置资产

June 27, 2022 0comments 35hotness 0likes Read all

Intel UHD 630 Driver for Windows 7 CPU: Intel® Core™ i7-8700Video: Intel UHD 630OS: Windows 7 64-bit Driver Downloadhttps://www.biostar.com.tw/app/en/event/H310_windowstool/win7_8th_i3_i5_Driver_2.0.rar Thanks https://www.sevenforums.com/drivers/424720-intel-uhd-630-driver-windows-7-a.html https://www.intel.com/content/www/us/en/download/18799/28436/intel-graphics-driver-for-windows-15-45.html

June 18, 2022 0comments 38hotness 0likes Read all

【Steam不再提供中国内地的CM服务器】CM(Connection Manager)服务器,用于 Steam 帐户登录认证、好友在线状态、聊天和游戏邀请等等方面。目前 Steam 获取的服务器列表已不存在中国内地服务器。 由于steam不再提供中国内地的CM服务器,导致每周末晚高峰的时期,steam登录及其困难。写这篇文章是为了记录处理这个问题的过程和解决办法,希望能帮到大家; 解决方案如下 方法一 指定客户端连接协议启动客户端 直接给steam.exe的快捷方式加参数-tcp或-websocket来指定连接协议启动客户端 -tcp模式 -websocket模式 为改善使用体验,我添加了一个启动目录,使得在启动时候可以选择启动模式如果此方法无法连接登录,请选择方法二 方法二 添加hosts,在默认情况下指定CM服务器 / 强制指定使用WS连接启动客户端 使用Dogfight360的工具添加host 指定MC服务器 ,然后通过WS连接模式启动客户端即可 点击检测延迟选择延迟较低的服务(晚高峰建议避开新加坡,日本,香港 我这里选择卢森堡,具体根据您的互联网运营商选择) 选择指定的MC服务器 点击应用选中 通过-websocket连接模式启动即可 此文章并不能保证百分之百可以解决。通过希望通过此文章能够让您尝试多一个方法去解决此问题。 参考阅读:Dogfight 360的博客 https://www.dogfight360.com/blog/knowledge-base/fix_steamlogin/ Steam status https://steamstat.us/ 其乐 https://keylol.com/

May 21, 2022 0comments 27hotness 0likes Read all

为什么要创建符号链接 部分游戏无法识别中文路径需要从第三方游戏库加载到官方游戏库节省时间提高效率 使用Linkexe链接 配置文件说明 [Count] ;文件个数 FileCount=1 [PathInfo] ;SourceFile源文件相对于本exe所在目录 DriveLetter映射目标路径 SourceFile0=Battle.net DriveLetter0=C:\ProgramData\ ;注意序号默认从0开始,如果设置非0会报错无法正常运行 注: 该程序非公开,此配置文件只做记录 使用Powershell脚本创建符号链接 待更新完善 New-Item -ItemType SymbolicLink -Path "Symbolic\Link\Path" -Target "New\Target\For\Link" -Force 相关阅读 How to change the drive in a symbolic link? https://superuser.com/questions/1362951/how-to-change-the-drive-in-a-symbolic-link# 微软知识中心 https://docs.microsoft.com/zh-cn/windows-server/administration/windows-commands/mklink Powershell https://docs.microsoft.com/zh-cn/powershell/module/microsoft.powershell.management/new-item?view=powershell-7.2&viewFallbackFrom=powershell-6 应用实例 https://www.itiohub.com/log/steamgame.html

March 9, 2022 0comments 38hotness 0likes Read all
13456713