Help to record my journey.
摘要:1 DateTime startDate = DateTime.Parse("2014-11-1");2 DateTime endDate = DateTime.Parse("2015-9-1");3 int totalMont...
阅读全文
摘要:1、在需要用到加密的地方可以使用.net中的md5相关的类生成md5给文件加密。2、基本思路:将文件也好,字符串也好,转成字节数组,再利用.net的md5相关类生成md5相关字符串,再将字符串转成16进制。3、具体的例子: 1 using System; 2 using System.Collect...
阅读全文
摘要:1、场景:发到客户那的程序中使用的一个C++的库需要被替换,而该库在使用了前使用了md5进行检验防止其它伪装的库将其替换,因而替换时要算目标库的md5,并把使用该库的另一个库也换掉。2、涉及技术:做一个离线补丁包去升级程序,并将库文件集成到其中,程序运行时再将其释放出来。3、解决方法:将目标库当成资...
阅读全文
摘要:1、情境:做项目的时候要打开串口然后进行一些库函数的调用来操作目标板。串口使用的是usb转串口,板子插进拔出的,每次都使用不一样的usb口,debug的时候懒得每次改com口,又不想在UI上加上一个选择com口的combox,于是就使用了下面这个方法。2、环境:win7 64、vs20103、目标:...
阅读全文
摘要:Notice:Iam learning C++ and I write down this artical just want to prevent me form forgetting.Reproduced,please indicate the source!With the exception of static const int data members , aclass’s data members cannot be initialized where they’re declared in the class body.Objects contain only data, so
阅读全文
摘要:1-What to do when I don't know the usage of a linux command1、type command2、help command if the command is built-inor apropos command or whatis commandthenman n command3、which commandAlso,you canget to know the installation directory of that command.2-get file from the ftp server using ftpget com
阅读全文
摘要:Make1):The Makefile is often used not only to control the compilation of source code, but also to prepare manual pages and to install the application into a target directory.2):The makefile is read by the make command, which determines the target file or files that are to be made and then compares t
阅读全文
摘要:1: install vsftpd.apt-get install vsftpd2:configure /etc/vsftpd.confvi /etc/vsftpd.confuncomment below statement#local_enable=YES#write_enable=YES3:after configuration in step 2,directory /srv/ftp and a usergroup named ftp was added automatically by the system cat /etc/shadow|grep ftp4:useradd&p
阅读全文
摘要:Notice:This is a guest post from https://help.ubuntu.com/10.04/serverguide/samba-fileprint-security.htmlOne of the most common ways to network Ubuntu and Windows computers is to configure Samba as a File Server. This section covers setting up a Samba server to share files with Windows clients.The se
阅读全文