- 博客(123)
- 资源 (3)
- 收藏
- 关注
原创 c#深拷贝帮助类
using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Linq.Expressions;using System.Reflection;using System.Runtime.Serialization;using System.Runtime.Ser
2018-02-01 10:42:21 478
原创 c#SqlHelper
using System.Configuration;namespace DBUtility{ using Powertech.Model; using System; using System.Collections; using System.Collections.Generic; using System.Data; using Sys
2018-01-10 13:36:02 348
原创 grpc helper
using System;using System.IO;using System.Net;using System.Net.Sockets;using pb = global::Google.Protobuf;namespace Aquila.WarSimulator.Server.V1.Runtime.Utilities;public class NetworkHelper { public NetworkHelper () { // _dispatcher = D
2022-05-11 13:24:16 168
原创 python目的追踪
import pygame,sysfrom math import *pygame.init()font1=pygame.font.SysFont(‘microsoftyaheimicrosoftyaheiui’,23)textc=font1.render(’’,True,(250,0,0))screen=pygame.display.set_mode((800,700),0,32)missile=pygame.image.load(‘element/1.png’).convert_alpha(
2022-03-28 12:47:51 3896
原创 【无标题】
Ocelot配置{ "Logging": { "LogLevel": { "Default": "Information", "Microsoft.AspNetCore": "Warning" } }, "AllowedHosts": "*", "Routes": [ { //上游Api请求格式 "UpstreamPathTemplate": "/api/customer/{controller}/{action}",
2021-12-12 17:34:30 1367
原创 mql金叉死叉报警
#property indicator_chart_window#property indicator_buffers 4#property indicator_color1 Yellow#property indicator_color2 White#property indicator_color3 Yellow#property indicator_color4 White//---- input parametersextern int 均线周期1 = 8;extern i...
2021-08-06 10:22:34 784
原创 金叉死叉报警
//+------------------------------------------------------------------+//| MaCrossAA.mq4 |//| Copyright 2021, MetaQuotes Software Corp. |//| .
2021-05-16 19:25:34 1006
原创 abp vnext自定义claim
using Microsoft.AspNetCore.Http;using Microsoft.AspNetCore.Identity;using Microsoft.Extensions.Options;using System;using System.Linq;using System.Security.Claims;using System.Threading.Tasks;using Volo.Abp.DependencyInjection;using Volo.Abp.Ident.
2021-02-20 12:50:29 740
原创 asp.net 或mvc清除浏览器缓存
webform protected void Application_End(object sender, EventArgs e) { Response.Buffer = true; Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1); ...
2019-05-20 11:32:20 1635
原创 Lambda 帮助类
using System;using System.Collections.Generic;using System.Linq.Expressions;using System.Text;namespace Infrastructure{ /// <summary> /// Lambda extensions /// </summary&g...
2019-03-16 19:59:47 203
原创 js去除html标签
function GetClear(str) { if (str == null || str == undefined) { return ''; } else { var tem = str .replac...
2019-01-23 17:02:41 1696
原创 log4Net配置
<?xml version="1.0" encoding="utf-8"?><configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"
2019-01-15 11:03:27 148
原创 Python装饰器2
def func(functionName): print('---func---1---') def func_in(*argc,**kwargs): print('---func_in---1---') functionName(*argc,**kwargs) print('---func_in---2---') pri...
2019-01-06 11:55:24 183
原创 Python装饰器1
def func(functionName): print('----func----1----') def func_in(): print('------func_in---1--') functionName() print('------func_in---2---') print('----func---2----...
2019-01-06 11:33:48 141
原创 Python装饰器
def w1(func): print('----正在装饰1-------') def inner(): print('-----正在验证权限1-----') func() return innerdef w2(func): print('----正在装饰2----') def inner(): print...
2019-01-06 11:21:47 139
原创 汉诺塔
#include<iostream>#include<valarray>#include<iomanip>using namespace std;void move(unsigned n, unsigned& moveNumber, char source, char spare, char destination) { if (n == ...
2018-12-04 20:14:02 161
原创 NPOI导出Excel设置单元高度自适应
public class ExcelAHelper { /// <summary> /// List转Excel /// </summary> /// <typeparam name="T"></typeparam> /// <param name="l...
2018-12-04 17:51:17 4315 1
原创 栈
/*-- Stack.h --------------------------------------------------------------- This header file defines a Stack data type. Basic operations: constructor: Constructs an empty stack empty: ...
2018-11-28 20:49:10 121
原创 sql server查询数据库死锁
SELECT request_session_id spid,OBJECT_NAME(resource_associated_entity_id)tableNameFROM sys.dm_tran_locksWHERE resource_type='OBJECT '
2018-10-18 13:58:14 2563
原创 Log4Net配置
<log4net> <!--存提示消息--> <appender name="RollingFile" type="log4net.Appender.RollingFileAppender"> <file value="OpertionLog/Info/" /> <ap
2018-09-24 20:43:02 283
原创 通过随机数生成权重
import java.util.ArrayList; import java.util.List; import java.util.Random; public class WeightRandom { static List<WeightCategory> categorys = new ArrayList<WeightCategory&...
2018-09-03 20:08:02 388
原创 lambda 和表达式树对应的多条件关联查询
var a = from m in cx.Set<A>() join q in cx.Set<B>() on new { Id = m.Id, EId = m.Ext } equals new { Id = q.BId, EId = q.BExt } ...
2018-08-30 22:53:28 2850
原创 bug的避免之道
1: 详细的测试文档 测试一定要全面 不能漏掉任何数据 2:如果方法行数太多 , 就拆分开 3:验证数据的正确性4: 单元测试 一定要考虑多种情况 ...
2018-07-30 10:26:44 162
原创 EF_Expression
using System;using System.Collections.Generic;using System.Collections.ObjectModel;using System.Linq;using System.Linq.Expressions;using System.Reflection;using System.Text;namespace ECP.Util...
2018-07-17 22:55:51 703
原创 c#面试题
public abstract class A { public A() { Console.WriteLine("A"); } public virtual void Fun() { Console.WriteLine("A.Fun()"); } }...
2018-07-02 21:50:49 387
原创 空间类型和函数不可用于此提供程序,因为未能找到程序集“Microsoft.SqlServer.Types”版本 10 或更高版本。
ef迁移时报这个错 然后通过nuget安装Microsoft.SqlServer.Types还是报这个错 后来仔细看了一哈安装Microsoft.SqlServer.Types的说明于是把这段代码添加到Context的构造函数里 SqlServerTypes.Utilities.LoadNativeAssemblies(AppDomain.CurrentDomain.BaseDirect...
2018-03-25 09:51:00 1775 3
原创 webapi生成验证码
前台 $('#codeimage').attr("src", "@CommonAddress.SecurityCode?date=" + new Date().toISOString());后台: [System.Web.Http.HttpGet] public void SecurityCode([FromUri]DateTime date) ...
2018-03-16 12:13:22 4056
原创 mvc里的AutoMapper的帮助类
using System;using System.Collections;using System.Collections.Generic;using System.Data;using System.Linq;using System.Reflection;using System.Web;using System.Web.Mvc;using AutoMapper;usin...
2018-03-01 09:31:33 678
原创 c#模拟http请求类
public class HttpHelper { public static string Request(string url, Dictionary args, Encoding encoding, Dictionary headers = null, HttpMethod method = HttpMethod.POST, string co
2018-01-17 14:12:34 684
原创 vscode调试c++配置
{ "version": "0.1.0", "command": "g++", "args": ["-g","${file}","-o","${file}.exe"], // 编译命令参数 "problemMatcher": { "owner": "cpp", "fileLocation": ["relative", "${wo
2017-12-17 10:12:55 1660
原创 给你三个string str oldstr newstr 用newstr替换str里的oldstr
#include #include #include using namespace std;/*void func(string &s, string &oldVal,const string &newVal){ string::size_type size = oldVal.size(); for (string::size_type i = 0;i<s.lengt
2017-12-01 18:18:59 1190
原创 c语言的自增自减练习
#include#includeint main(void){ int i=3; printf("%d,%d,%d,%d,%d",i++,++i,++i,i++,--i); getchar(); system("pause"); return 0;}输出:5,6,6,2,6
2017-11-29 21:37:45 2165 7
原创 注册dll到系统
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 自动添加批处理文件管理员权限 :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2017-11-28 14:47:57 1427
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人