C# Find the value of an element using the index

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(); } } }

C# Multidimensional Arrays

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. ...

C# String Contains Assessment

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("ydsgsdg@dsadas.edu.ph") && (password.Contains("d123456"))) { Console.WriteLine("Your Log-in Was Successful!"); } else { Console.WriteLine("Invalid Log-in details"); } Console.ReadLine(); } } } Reference C# Logical Operators with Examples https://www.tutlane.com/tutorial/csharp/csharp-logical-operators-with-examples ...

blob视频资源的简单提取

此博文记录了如何在网页中简单提取视频源地址的方法,起因是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

Make a calculartor in c sharp

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 ...

JumpServer 开源堡垒机安装记录

云服务器配置 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的地址进行登录管理配置资产

Intel UHD 630 Driver for Windows 7

Intel UHD 630 Driver for Windows 7 CPU: Intel® Core™ i7-8700 Video: Intel UHD 630 OS: Windows 7 64-bit Driver Download https://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

Steam客户端无法登录解决办法

【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/

Google Chrome 參數大全

前言 在开发Web项目当中,浏览器必不可少,而浏览器的启动参数可以帮我们实现很多功能。 常用参数 常用参数请参考下表。 序号 参数 说明 1 –allow-outdated-plugins 不停用过期的插件。 2 –allow-running-insecure-content 默认情况下,https 页面不允许从 http 链接引用 javascript/css/plug-ins。添加这一参数会放行这些内容。 3 –allow-scripting-gallery 允许拓展脚本在官方应用中心生效。默认情况下,出于安全因素考虑这些脚本都会被阻止。 4 –disable-desktop-notifications 禁用桌面通知,在 Windows 中桌面通知默认是启用的。 5 –disable-file-system 停用 FileSystem API。 6 –disable-preconnect 停用 TCP/IP 预连接。 7 –disable-remote-fonts 关闭远程字体支持。SVG 中字体不受此参数影响。 8 –disable-web-security 不遵守同源策略。 9 –disk-cache-dir 将缓存设置在给定的路径。 10 –disk-cache-size 设置缓存大小上限,以字节为单位。 11 –dns-prefetch-disable 停用DNS预读。 12 –enable-print-preview 启用打印预览。 13 –extensions-update-frequency 设定拓展自动更新频率,以秒为单位。 14 –incognito 让浏览器直接以隐身模式启动。 15 –keep-alive-for-test 最后一个标签关闭后仍保持浏览器进程。(某种意义上可以提高热启动速度,不过你最好得有充足的内存) 16 –kiosk 启用kiosk模式。(一种类似于全屏的浏览模式) 17 –lang 使用指定的语言。 18 –no-displaying-insecure-content 默认情况下,https 页面允许从 http 链接引用图片/字体/框架。添加这一参数会阻止这些内容。 19 –no-referrers 不发送 Http-Referer 头。 20 –no-startup-window 启动时不建立窗口。 21 –proxy-server 使用给定的代理服务器,这个参数只对 http 和 https 有效。 22 –start-maximized 启动时最大化。 23 –single-process 以单进程模式运行 Chromium。(启动时浏览器会给出不安全警告)。 24 –user-agent 使用给定的 User-Agent 字符串。 25 –process-per-tab 每个分页使用单独进程。 26 –process-per-site 每个站点使用单独进程。 27 –in-process-plugins 插件不启用单独进程。 28 –disable-popup-blocking 禁用弹出拦截。 29 –disable-javascript 禁用JavaScript。 30 –disable-java 禁用Java。 31 –disable-plugins 禁用插件。 32 –disable-images 禁用图像。 更多参数 由于水平有限,下表为网络翻译,了解跟多可根基参数,查找相关资料。 ...

Windows10 创建符号链接相关笔记

为什么要创建符号链接 部分游戏无法识别中文路径 需要从第三方游戏库加载到官方游戏库 节省时间提高效率 使用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

云服务器安装ikuai路由

服务器配置 镜像: Ubuntu 18.04 64位 CPU: 1核 内存: 2G 带宽:2mbps 系统盘总容量: 20GB 数据盘总容量: 0GB 安装步骤 查看云服务器网络配置 cat /etc/network/interfaces 或者 netstat -rn 下载ISO安装包 x32位 wge thttps://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x32_3.5.11_Build202112031159.iso -O ikuai8.iso x64位 wget https://www.ikuai8.com/download.php?n=/3.x/iso/iKuai8_x64_3.5.11_Build202112031159.iso -O ikuai8.iso 挂载ISO镜像 sudo mount ikuai8.iso /mnt 复制ISO镜像启动文件 sudo cp -rpf /mnt/boot / 重启服务器 sudo reboot 通过VNC控制进入服务器面板 正常ISO安装爱快系统 解除LAN口绑定,将网卡绑定到WAN口 设置WAN口的IP地址为云服务器的内网IP地址 在安装好的路由控制台开启外网访问WEB 进入控制台\“开启外网访问WEB\” o、其他选项 –> 2、开启外网访问web 安装完成之后使用云服务器的外网IP地址即可访问你的ikuai路由

无法加载应用程序或操作系统,原因是所需文件丢失或包含错误 解决笔记

故障现象 故障发生前操作 使用Symantec ghost磁盘对拷之后新磁盘上的系统无法 进入系统出现以上错误 设备情况 联想ThinkPad E580 源磁盘和新的目标磁盘都是MBR模式 2TB磁盘有9个分区,每一个分区一个操作系统 解决步骤 使用PE系统里面的引导修复修复其中一个分区 使用磁盘管理工具重建引导(注意备份分区表) 重启电脑进入BIOS关闭快速启动,选择传统模式启动即可(如果需要UEFI启动请根据实际情况设置) 在当前进入的操作系统中使用EasyBCD 添加和编辑引导即可 将引导添加到相对应的分区即可 参考阅读 EsayBCD https://neosmart.net/EasyBCD/ 磁碟分割MBR、GPT是什麼? https://www.linwei.com.tw/forum-detail/76/ 声明 此文章作为本人日常笔记,不对读者负责; 数据无价,谨慎操作

使用脚本从APNIC获取中国IP地址列表

說明 該shell 腳本能從apnic獲取ip地址導出到txt文檔中 #!/bin/bash wget -c http://ftp.apnic.net/stats/apnic/delegated-apnic-latest cat delegated-apnic-latest | awk -F '|' '/CN/&&/ipv4/ {print $4 "/" 32-log($5)/log(2)}' | cat > ipv4.txt cat delegated-apnic-latest | awk -F '|' '/CN/&&/ipv6/ {print $4 "/" 32-log($5)/log(2)}' | cat > ipv6.txt cat delegated-apnic-latest | awk -F '|' '/HK/&&/ipv4/ {print $4 "/" 32-log($5)/log(2)}' | cat > ipv4-hk.txt cat delegated-apnic-latest | awk -F '|' '/HK/&&/ipv6/ {print $4 "/" 32-log($5)/log(2)}' | cat > ipv6-hk.txt

将盖伦游戏平台下的STEAM游戏联接到你的STEAM游戏库

将盖伦游戏平台下的STEAM游戏连接到你的STEAM游戏库 复制"acf"文件 将盖伦更新好的STEAM游戏目录下的acf 文件拷贝到 STEAM库SteamLibrary\steamapps\目录下 使用批处理命令将acf文件拷贝到SteamLibrary\steamapps\目录下 copy "Z:\我的游戏\单机游戏\NARAKA BLADEPOINT\appmanifest_1203220.acf" "Z:\SteamLibrary\steamapps"(实际路径请根据自身磁盘路径填写) 创建软连接,将游戏目录连接到STEAM库 将盖伦更新好的STEAM游戏目录下的游戏本体目录通过mklink命令联接到STEAM库SteamLibrary\steamapps\common\目录 使用mklink命令创建软链接将盖伦的STEAM游戏本体文件联接到STEAM库目录 mklink /J "Z:\SteamLibrary\steamapps\common\NARAKA BLADEPOINT" "Z:\我的游戏\单机游戏\NARAKA BLADEPOINT\NARAKA BLADEPOINT\"(实际路径请根据自身磁盘路径填写) 只需要以上两条命令即可将盖伦平台的STEAM游戏联接到自己的STEAM库里 常见问题 命令不生效 请检查批处理语法或者文件目录是否正确 请检查文件编码,如果有中文目录请保存为ANSI编码格式

海康威视NVR解绑萤石解决办法

海康威视NVR解绑萤石解决办法 经常遇到店家转让门店, NVR 绑定原先业主的手机号等等,导致现有业主无法添加设备,于是就需要解绑设备; 思路 已经带解绑程序的设备可直接在设备的**“网络配置-云平台”中进行解绑(需要设备管理员密码) 未带解绑程序需要去官网下载带解绑程序的固件包(4.0版本以上默认支持解绑) 下载于设备匹配的固件 使用U盘插入设备进行设备升级 使用Web管理端进行设备升级 升级完成之后设备自动重启 进入“网络配置-云平台”**中进行解绑即可 升级包下载地址 中文 https://www.hikvision.com/cn/support/Downloads/Device-upgrade-package/

Google个人API 申请笔记 -Google Personal API Keys Apply

因测试Kodi中Youtube插件的功能需要用到GoogleAPI, 故记录一下Google个人API的申请笔记 此笔记编辑日期2021/09/02 若Google有更新,请以Google为准 具体步骤 凭证基本信息填写 登录https://console.cloud.google.com/ 创建一个项目 启用API和服务 选择YouTube Data API v3 服务并启用 在YouTube Data API v3 服务中选择左边栏的凭据 配置OAuth同意屏幕 User Type 我选的外部 (因为不是GoogleWorkSpace用户) 填写应用信息(带红色星号选项必填) 添加范围(根据需求自己选择即可) 添加测试用户(我加的我自己) 保存之后即可 API密匙和OAuth客户端ID创建 在凭据中直接创建API密匙和OAuth客户端ID(客户端根据自身需求选择)即可 根据Google API 给的密匙依次填入Kodi中的Youtube应用中即可使用 在Kodi中使用Youtube的体验 优点 无广告 搜索结果精准 操作简便 缺点 加载速度极慢(非大陆网路环境) 参考阅读 https://www.yinxiang.com/everhub/note/53490d9c-fb0a-4652-a109-7cc119ad9593 https://github.com/anxdpanic/plugin.video.youtube/wiki/Personal-API-Keys

搜尋文章

輸入標題、分類或文章內容

開始輸入以搜尋文章