- 博客(67)
- 资源 (4)
- 收藏
- 关注

原创 ajax contentType
//写在前面的话 //contentType 和data是一对,data是什么类型是由contentType指定的,而dataType只是后台返回值的类型 $("#postjson").click(function () { var json = JSON.stringify({ userid: "admin", password: ...
2018-11-28 14:45:32
1362

原创 数据库访问类
/* * Author: Ming * 日期: 2012.04.06 * 功能: 数据库通用访问类 */using System.Data;using System.Data.Common;namespace Ming.DbHelper{ public static class DbHelper { static DbProviderFac
2012-05-05 19:05:24
633
原创 下载vs样式文件
public void DownloadStyles(int count) { for (int i = 1; i <= count; i++) { string url = string.Format("https://studiostyl.es/settings/downloadScheme/{0}?version=14.1", i); string fullName..
2022-03-16 14:06:08
316
原创 studiostyl.es vs样式
// HttpHelper.GetHttpRequestFile 也在本博客中 for (int i = 1; i <= 1000; i++) { string url = string.Format("https://studiostyl.es/settings/downloadScheme/{0}?version=14.1", i); string fullName = string.Format(@".
2021-08-19 17:57:43
268
原创 移除请求头中的语言标志
1: 移除X-AspNet-Version很简单,只需要在Web.config中增加这个配置节:<system.web> <httpRuntime enableVersionHeader="false" /> //方法2经测试发现可以通过方法3删掉 和 HttpContext.Current.Response.Headers.Remove("X-AspNet-Version"); </system.web> 2:移除X-AspNetMvc-Version.
2021-07-05 14:44:27
476
原创 动态生成表达式树对集合过滤
/// <summary> /// 动态生成排序表达式 /// </summary> /// <typeparam name="T">实体类型</typeparam> /// <param name="t">实体值</param> /// <param name="linq">实体集合</param> /// <.
2021-06-17 16:53:23
162
原创 加快ef的加载速度去掉.net的请求头标志
public void CreateViews() { using (DataAccessDbContext dbcontext = new DataAccessDbContext()) { var objectContext = ((IObjectContextAdapter)dbcontext).ObjectContext; var mappingColle...
2021-04-30 00:37:49
109
原创 重绘comboBox的items
首先设置this.comboBox1.DrawMode = DrawMode.OwnerDrawVariable; private void comboBox1_MeasureItem(object sender, MeasureItemEventArgs e) { int fontSize = 8; if (e.Index % 2 == 0) fontSize = 8; else.
2021-02-05 14:06:31
300
原创 oracle 操作
oracle脚本重定向到文件spool d:\user.txtselect b.owner,b.object_name,a.session_id,a.locked_mode from v$locked_object a,dba_objects b where b.object_id = a.object_id;spool off;查找Oracle数据库全部表结构SELECT t.table_name, t.colUMN_NAME, t.DATA_TYPE || '(.
2020-08-10 20:28:19
180
原创 加密字符串
#include <stdio.h>/// <summary>/// 两次异或法加密字符串,缺陷是ch变量的字符不能出现在key中,不然计算成0,无法还原/// </summary>/// <param name="ch"></param>/// <param name="key"></param>void EncryptAndDecode(char ch[], char key[]){ for (int.
2020-07-15 21:03:51
516
原创 winform实现自适应
private void ScaleWindow() { float w = 1920;//你当前的分辨率宽 float h = 1080;//你当前的分辨率高 Rectangle rect = Screen.PrimaryScreen.Bounds; float ww = rect.Width / w; float wh = rect.Height / h; ...
2020-06-15 17:32:46
804
原创 oracle表结构重定向到文件
oracle脚本重定向到文件spool d:\test.txtselect * from AA;spool off;查找Oracle数据库全部表结构SELECT t.table_name, t.colUMN_NAME, t.DATA_TYPE || '(' || t.DATA_LENGTH || ')', t1.COMMENTS FROM User_Tab_Cols t, User_Col_Comments t1WHERE t.table_name...
2020-05-28 17:34:27
291
原创 mssql 执行脚本
sqlcmd -S .\sqlexpress -U sa -P 1 -d aaa -i G:\Projects\PartTime\server\docs\db.sql将数据库之后用微软自带的sqlcmd工具,可以导入执行。第一步:Win+R 键入:cmd 命令,开启命令行工具;第二步:键入:sqlcmd -S . -U sa -P 123 -d test -i data.sql参数说明:-S 服务器地址 -U 用户名 -P 密码 -d 数据库名称(提前存在才行,不然报错) -i 脚本.
2020-05-10 13:17:07
648
原创 重绘标题栏
[DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); [DllImport("User32.dll")] private static extern IntPtr...
2019-11-08 10:50:08
437
原创 Excel导入导出类
/********************************************************************-----------------------------------------------------------------** Copyright (c) 2014** Name: ** Version: 1.0** Author: mi...
2019-11-07 17:04:48
344
原创 遍历目录删除文件
/// <summary> /// 遍历目录删除文件 /// </summary> /// <param name="dir">目录</param> /// <param name="isSubDir">是否包括子目录</param> priva...
2019-11-01 17:29:58
308
原创 .net core mvc axios 文件上传
@{ Layout = "~/Views/Shared/_CRM.cshtml";}<style> #fileType { display: none; } div.file-listing { height: 30px; line-height: 30px; margin: 5px...
2019-10-18 11:08:59
562
2
原创 卸载win10内置windows app的方法
1.以管理员身份运行WindowsPowerShell2:DISM.exe /Online /Cleanup-image /Restorehealth 卸载全部的app3:Remove-AppxPackage "music" 可以用通配符(你懂得) 卸载指定的一个或者多个4:get-appxpackage *Microsoft.WindowsAlarms* 查找指定的...
2019-10-18 09:09:10
913
原创 删除appstore
服务是接下来执行命令的关键这两个服务要设置他的启动类型为自启动,然后重启,才会运行,有点特殊,切记切记启动两个服务1: ClipSVC(client license service)2:AppXSvc(Appx Deployment Service)接下来管理员身份打开 power shell,一定要管理员然后执行remove-appxpackage -AllUs...
2019-09-25 11:25:27
1528
原创 .net core webapi 端口
public class Program { /* * 1:项目中添加文件host.json 内容如下 * { "urls": "http://localhost:6004;https://localhost:6005" } 2:修...
2019-06-27 17:37:30
1493
原创 .net core webapi 跨域
using Microsoft.AspNetCore.Builder;using Microsoft.AspNetCore.Hosting;using Microsoft.AspNetCore.Mvc;using Microsoft.Extensions.Configuration;using Microsoft.Extensions.DependencyInjection;name...
2019-05-14 14:53:26
1183
原创 身份证读取api
public class IDCardAPI { private const string ApiPath = "widapi.dll"; //private const string ApiPath = "widapi_x64.dll"; // 初始化端口,port:USB: 1001~1006, 串口:1~16 返回1成功,&l...
2019-05-06 15:02:35
2831
1
原创 mysql .net core
https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db//1:install-package Microsoft.EntityFrameworkCore//2:install-package MySql.Data.EntityFrameworkCore//3:install-packa...
2019-05-01 17:20:13
269
原创 c# winform cpuhelper
public static class HardwareHelper { const int interval = 400; /// <summary> /// 磁盘使用情况 /// </summary> /// <returns></returns> public static string GetDiskUsage() { StringBuilder sb =
2019-04-23 20:12:47
220
转载 c# winform 打印机控制帮助类
//https://www.cnblogs.com/gordensong/p/3825462.html public class Printer { /// <summary> /// 获取打印机状态,是否离线。 /// </summary> /// <param name="print...
2019-04-23 19:20:21
1433
原创 c# winform 全局异常处理
//切记debug时无效,必须要单独运行exe才有效,坑爸爸的微软Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.ThreadException += new ThreadExceptionEventHandler(ThreadExcep...
2019-04-13 17:58:36
892
转载 c#/C++打开触摸键盘
#include <initguid.h>#include <Objbase.h>#pragma hdrstop// 4ce576fa-83dc-4F88-951c-9d0782b4e376DEFINE_GUID(CLSID_UIHostNoLaunch, 0x4CE576FA, 0x83DC, 0x4f88, 0x95, 0x1C, 0x9D, 0x0...
2019-03-16 17:19:47
1641
转载 JavaScript 日期格式化大全
//如果侵权请联系本主删除,尊重知识和版权////原文地址https://www.cnblogs.com/fengwenzhee/p/8733760.htmlfunction today(){ var today=new Date(); var h=today.getFullYear(); var m=today.getMonth()+1; var d=to...
2018-11-30 10:57:44
636
1
原创 LogHelper 日志帮助类
public class LogHelper { public static readonly ILog loginfo = LogManager.GetLogger("loginfo"); public static readonly ILog errorinfo = LogManager.GetLogger("errorinfo"); ...
2018-05-31 14:16:31
4507
原创 HttpHelper上传下载请求,表单的提交
public sealed class HttpHelper { /// <summary> /// 最原始的请求,包括常用的参数 字符串参数 /// </summary> /// <param name="url"></param> /// <par...
2018-05-31 14:15:27
1331
原创 jpg文件转换PDF文件
public class PdfHelper { int qrWitdh = 110;//二维码宽 int qrHeight = 110;//二维码高 int margin = 15;//上边距,右边距 public PdfHelper() { } /// <summary> ...
2018-05-31 14:14:21
742
原创 取得管理员权限,删除系统文件夹
Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\*\shell\runas]@="管理员取得所有权""NoWorkingDirectory"=""[HKEY_CLASSES_ROOT\*\shell\runas\command]@="cmd.exe /c takeown /f \"%1\" && icacls
2017-11-29 10:21:43
2055
原创 vue 分页
@{ Layout = null;}<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css"><script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js...
2017-10-22 22:39:55
668
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人