FastMember 可以在 Nuget 里找到 配合 Dapper 很好用。 用 Dapper 的时候,要定义实体,像这样调用conn.Query<OrderModel>(sql).ToList(), 不然 FastMember 转成的 DataTable 是空的 private void ...
编程
VC获取进程加载的DLL模块
VC++获取进程加载的DLL模块: #include <windows.h> #include <tchar.h> #include <stdio.h> #include <psapi.h> // To ensure correct resolution of symbols, add Psapi.lib to T...
使用命令行查看进程加载的DLL
windows中,可以使用命令行查看进程加载的DLL。 查看所有进程的加载的DLL: tasklist /m 查看指定进程加载的DLL (例如查看notepad++.exe) tasklist /m /fi "imagename eq notepad++.exe"
mysql的bit字段取值只能为0和1,相当于bool类型
mysql的bit字段取值只能为0和1,相当于bool类型,如果取了别的值,mysql也不报错,但是数据无变化,更新不了。 这是mysql坑的一个地方 例如 update queue set is_called=2 where id=5 is_called是bi...
VC++窗口置顶
VC++窗口置顶,可以使用win32函数SetWindowPos来实现: SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
VC++开机启动
VC++写的程序,想要开机启动,可以使用注册表来实现,代码如下: inline void SetAutoRun() { TCHAR szFilePath[MAX_PATH]; memset(szFilePath, 0, MAX_PATH); if (GetModuleFileNa...
vmware进入BIOS的方法
vmware进入BIOS的方法:先关闭虚拟机,然后编辑虚拟机vmx文件,在最后添加 bios.forceSetupOnce = "TRUE" 再开机就自动进入BIOS
windows批处理执行Mysql脚本
windows批处理执行Mysql脚本,批处理脚本代码如下: @echo off %cd%\mysql\bin\mysql.exe -u root -h 127.0.0.1 -p123456 -e"use cqms;select 1;select 2;" echo 数据库升级完成 pause 通过文件执行 ...
解决 ubuntu 使用root登录 ssh 报错: password authentication failed
解决 ubuntu 使用root登录 ssh 报错: password authentication failed... sudo vi /etc/ssh/sshd_config 找到PermitRootLogin without-password,改为PermitRootLogin yes。 最后重启SSH服务 sudo ...
mysql去重并统计数量
mysql去重并统计数量: select count(distinct queue_number) as total from queue
