自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(124)
  • 收藏
  • 关注

原创 10 python tips and tricks for writing better code

10 python tips and tricks for writing better code1. conditioneg-1condition = Trueif condition: x = 1else: x = 0print (x)a better code for eg-1:condition = Truex = 1 if condition else 0print (x)2. numberseg-2.1num1 = 100000000000

2020-06-20 12:20:14 300

原创 what is http and how web works

the HTTP protocol & how the web works​The HTTP protocolHTTP = __H__yper__t__ext __T__ransfer __P__rotocolthe HTTP is an application layer protocol that allows web-based applications to communicate and exchage datathe HTTP is the messager of the we

2020-06-20 12:06:56 293

原创 usage of softlinks

usage of symbolic linkssymbolic links also called soft links,soft links is means shortcut as windows,it has different inode as original file.hard link like copy of a file,it has the same inode as original file.ln -s targetffile/targetdir linknamehow to

2020-06-13 14:10:36 286

原创 usage of leiningen and clojure

usage of leiningen and clojureleiningenhow to installinstall javasudo apt-get updatesudo apt-get install openjdk-8-jdkgo to leingen to download scriptdownload the script ,save it as name “lein”,do “chmod a+x lein” ,and move it to “/usr/local/

2020-06-03 22:35:29 226

原创 the difference between nvidia-docker,docker,nvidia-docker runtime

nvidia-dockeris old and deprecated, it installnvidia-container-runtime. nvidia-container-runtimeis old and deprecated, but still needed in the Kubernetes context. It installsnvidia-container-tool...

2020-05-05 21:19:56 386

原创 base command of linux

imveryhappyandhonortotellyousthaboutlinuxshell,linuxshelliseasytolearn,asabeginner,youjustneedtoknowthesecommandsasbelow:lsls-lls-acdmyd...

2020-05-04 16:16:14 193

原创 遇到E: Unable to correct problems, you have held broken package的解决办法

参考https://blog.csdn.net/baidu_19473529/article/details/78013695中的第二种方法。即:执行两步操作:sudo apt-get install aptitude sudo aptitude install xxxx

2020-02-06 11:40:03 716

原创 Ubuntu安装tmux步骤

本文概述:首先,我们去github的tmux页面,也就是这个网址https://github.com/tmux/tmux,上面说到,要先安装libevent和cuners的依赖,于是我们先要安装这些依赖。然后再安装tmux一、安装依赖1、安装一些东西在tmux的github网页https://github.com/tmux/tmux上提到,会用到autoconf,au...

2019-11-30 14:38:06 1220

原创 Ubuntu安装openssl

安装tmux时候需要安装libevent,但安装libevent时说找不到openss,如下:CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find OpenSSL, try to set the path to Open...

2019-11-30 12:51:29 977

原创 如何查看gitlab版本号, 如何查看gitlab runner版本号

一、在你的项目的页面右上角,点击问号按钮,点击"help",弹出的页面中会包含gitlab版本信息。二、在终端输入gitlab-runner --version可以查看runner的版本信息...

2019-11-15 13:58:43 7405

原创 Docker初识及简单使用

资料来源:b站https://www.bilibili.com/video/av58402749?from=search&seid=8338831688956664857一、先注册docker idhttps://blog.csdn.net/debugbugbg/article/details/81865553二、以docker id登陆docker playground...

2019-11-10 13:12:21 505

原创 ubuntu18安装nvidia驱动

这里提供一种方法:执行,ubuntu-drivers devices看到recommend那一行,是默认推荐的驱动。执行sudo ubuntu-drivers autoinstall

2019-11-06 14:56:36 274

原创 linux下读写文件

// constructing threads#include <iostream> // std::cout#include<sys/time.h>#include<queue>#include <string.h>#include <fstream>using namespace std;int m...

2019-11-01 16:30:03 274

原创 linux计算程序运行时间

可参考:https://www.linuxidc.com/Linux/2012-06/61903p2.htm在计算多线程程序运行时间的时候,用可能会出问题,但是用以下方法会好一些:#include <iostream> #include<sys/time.h>using namespace std;int delay(int time){ ...

2019-10-31 13:23:35 479

原创 Git的使用(LINUX/Ubuntu下)

可参考视频资料:b站搜索"git使用",up主"不咲貓"(音:xiao mao)0.建立git目录(仓库/代码库) git init (在本机电脑上新建的某个文件夹下执行此句,表示那个文件夹可以被git管理) 执行此句之后可以用ls -la看到多出了一个.git文件1.创建版本 git add . (git add <filename>)...

2019-10-28 00:45:59 208

原创 如何表示ASCII码的特殊字符的STX

char te = '\u0002';//STXif(strTest.contains(te)){}

2019-10-24 19:44:30 6037

原创 正则表达式 C# 匹配字符串中间是任意字符的

string s = "XN/IN/TSAEI/HSLLKH INF(JAN12)/P1   +";string pattern = "XN/IN(.*)INF\\((.*)\\)/P";MatchCollection mc = System.Text.RegularExpressions.Regex.Matches(s, pattern, RegexOptions.IgnoreCase);...

2019-10-17 16:28:23 1388

原创 c# 将List<byte>转为string类型

string test = System.Text.Encoding.Default.GetString(buffer.ToArray())

2019-10-15 22:26:52 5354 1

原创 解决Linux下PermissionDenied问题(给文件授权)

有时候用U盘拷贝文件到linux,发现拷贝过去的东西无法使用,提示Permission Denied ,如何解决呢?假设有目录MyDir,你想要更改MyDir下的文件myData的读写权限,那么:在终端上进入MyDir目录,在终端输入: chmod -R 777 myData 回车即可...

2019-09-28 12:50:56 1623

原创 mysql5.7.26安装步骤

1.下载安装包,解压,将解压后的安装包放在D盘下的MySql文件夹下,并新建my.ini文件。(注意解压后的包中应该没有Data文件夹和my.ini文件,如果有,删掉。) 2.为my.ini添加内容如下:[client]port=3306default-character-set=utf8[mysqld]# 设置为自己MYSQL的安装目录basedir=D:...

2019-09-24 11:53:02 1966 1

原创 winform为了美化界面IrisSkin4.dll后,界面显示很混乱,难看,界面上有错乱的线条,卡顿的解决办法

将引用目录中的PresentationCore和PresentationFramework移除,就好了。可能是这两个dll和IrisSkin4.dll有某些不合的原因导致的界面混乱。建议移除这两个dll后,测试一下程序所有的功能是否正确;如果你的项目中找不到这两个dll,那么建议先考虑是不是其他的dll与IrisSkin4.dll冲突导致的,一个一个删掉dll去试。...

2019-09-20 17:59:39 1826

原创 安装mysql需要避开的坑

1.不要手动创建Data文件夹,如果已经创建了,就删掉,重新执行mysqld --initialize-insecure2.如果输入mysqld --initialize-insecure,发现报错:mysqld无法将mysqld识别为cmdlet,函数,脚本文件...,那么在mysql前面加上".\"...

2019-09-04 11:45:08 239

原创 windows如何查看已经打开的端口号,如何查看进程信息,如何查看占用端口的程序,如何关闭占用端口的程序

windows+ r键调出命令行,输入cmd,调出命令行工具一、查看端口号在命令行工具里输入: netstat -ano 会列出所有的端口号,如果想查看一个单独的端口的信息(比如想查看某个端口正在被哪个线程占用),那么就在命令行输入:netstat -ano|findstr "3002"表示查看6000端口的信息(注意findstr后有空格),包含了这个端口的占用线程等信息,如下图...

2019-08-30 15:16:56 611 1

原创 C#winform打开文件夹选择器

一、打开文件夹选择器 System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog(); dialog.Description = "请选择文件夹"; if (dialog.ShowDialog() == System.Windows.Forms.Dialog...

2019-08-21 18:46:52 5986

原创 用纯C++批量给文件改名(文件可以嵌套在多个文件夹中)

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <windows.h>#include <stdlib.h>using namespace std;bool AlterFileName(string strDir, string strSrc, string strDes);st...

2019-08-21 16:11:13 638

转载 没有安装sql数据库如何用vs打开mdf数据库文件

VS 2013菜单栏,工具-->连接到数据库;“更改”数据源为:MicrosoftSQL Server数据库文件;“浏览”并选择数据库文件;“使用Windows身份验证”;“测试连接”。若连接成功,确定后在左侧“服务器资源管理器”的“数据连接”中便会看到你想看的。注意:确保你的addressDB.mdf文件和日志文件addressDB_l...

2019-08-20 15:38:20 2742

原创 C++ 11vector erase使用之如何循环遍历删除Vector中的各个元素

无语,有时候遇到删除Vector中的元素时会奔溃的问题,就这样解决:#include<iostream>#include <vector>using namespace std;int main(){ vector<int> vecInt; vecInt.push_back(7); vecInt.push_back(4); vecIn...

2019-08-19 20:32:47 4519

原创 C# checklistbox用户点击列表框上的一个项目,将选中的项的值显示到界面上,取消勾选时,同步在界面上取消

简易场景:用户点击列表框上的一个项目,将选中的项的值显示到界面上,取消勾选时,同步在界面上取消。注意,要在ItemCheck事件里面写(如果在mouseClick事件里写,会有很多坑爹的问题),该事件有参数为e,调用e.currentValue和newValue就是目前的值和将要变化的值 private void chkListBox1_ItemCheck(object sen...

2019-08-18 17:30:52 1787

原创 C#委托跨线程安全调用控件

来源:https://www.cnblogs.com/PatrickLiu/p/7094616.html//申明一个委托对象     public delegate void Action2<in T>(T t); private void button1_Click(object sender, EventArgs e) { ...

2019-08-10 14:21:54 407

原创 C# List<string> 将各个元素组合成一个新的字符串

来源:https://zhidao.baidu.com/question/1926774620317851987.htmlList<string> MyString= new List<string>();string nStr =string.Join(string.Empty,MyString.ToArray());

2019-08-08 19:21:22 3751 1

原创 C#选项卡tabcontrol的背景色如何改变

转载来源:https://zhidao.baidu.com/question/75299631.html把TabControl的DrawMode设为OwnerDrawFixed然后在它的DrawItem事件里添加代码:private void tabControl1_DrawItem(object sender, DrawItemEventArgs e){ ...

2019-08-08 15:22:30 4057

原创 c#如何找到一个windows窗体并关闭(winform关闭windows特定窗体)

/* 关闭一个消息窗体 ,title是窗体的名称*/ public static void KillMessageBox(string title) { //按照MessageBox的标题,找到MessageBox的窗口 IntPtr ptr = FindWindow(null, title); ...

2019-08-08 11:33:34 1136

原创 winform窗体centerscreen居中屏幕显示无效的解决办法

来源:http://www.cftea.com/c/2013/11/6137.asp private void frmTest_Load(object sender, EventArgs e) { /* 居中显示 */ Size size = Screen.PrimaryScreen.WorkingArea.Size; ...

2019-08-08 10:40:57 3081 2

原创 vs当前不会命中断点还未为文档加载任何符号的一种解决方法

除了网上那些很多方法之外,如果还没有解决,那么可以检查一下.sln文件的路径是不是太长了,如果路径太长,也会导致无法调试的问题,坑!举例: 将C:\Users\Mrzl\Desktop\Barn\我的测试我的测试我的测试ver0.20190726 - 副本-0730号完成了文件完成了文件完成稿了文件夹键字\我的测试我的测试我的测试我的测试我的测试我的测试ver0.20190716\...

2019-08-07 15:26:16 1538 1

原创 C#listview控件修改每个单元格的颜色修改一行中不同列的颜色

来源:https://www.cnblogs.com/mingjiatang/p/3808765.htmlListViewItem item;item = new ListViewItem(new string[] { "NAME","" });item.UseItemStyleForSubItems = false; 只需要将ListView的每一项的UseItemStyl...

2019-08-06 15:26:44 1368 2

原创 C#如何找到一个listview的某一项的值如何更改listview某一个项的值

来源:https://www.cnblogs.com/summary/p/4526671.html用linq:ListViewItem li = ListViewUser.Items.Cast<ListViewItem>().First(x => x.Text == "1005" && x.SubItems["city"].Text == "北京...

2019-08-05 20:24:52 3153

转载 网友自己实现一个C#的INI文件读写类,非常好用

来源于网络,具体地址不详 /* ini文件操作类 */ public class INIOperationClass { #region INI文件操作 /* * 针对INI文件的API操作方法,其中的节点(Section)、键(KEY)都不区分大小写 * 如果指定的INI文件不存在,会自动...

2019-08-05 17:04:30 829

原创 C# Directory插入数据时,解决已添加了具有相同键的项的问题,如何插入唯一键值,判断是否已经加入过某键值

来源:https://bbs.csdn.net/topics/392251962?page=1if (!myDictionary.ContainsKey(System.IO.Path.GetFileName(pa_th[i]))) { myDictionary.Add(System.IO.Path.GetFileName(pa_th[i]), pa_th[i]); }...

2019-08-04 23:02:33 2073

转载 C#关闭一个特定的窗体(关闭特定的消息框或者普通窗体)

/* 关闭一个消息窗体 ,title是窗体的名称*/ public static void KillMessageBox(string title) { //按照MessageBox的标题,找到MessageBox的窗口 IntPtr ptr = FindWindow(null, title); ...

2019-08-04 21:57:56 1514

转载 C#事件订阅(计时器的EventHandler自己写)如何给计时器Timer的Tick事件传递参数

来源于:https://blog.csdn.net/wem520/article/details/79992845https://blog.csdn.net/wem520/article/details/79992845Timer secAlarmTimer = new Timer(); secAlarmTimer.Enabled = true; ...

2019-08-04 18:42:46 1108

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除