- 博客(41)
- 问答 (1)
- 收藏
- 关注
原创 Oracle Update Select
Oracle 更新多行BEGIN FOR cr IN (SELECT Zlwl_Zc_AccountId, AmountOfproduction FROM Zlwl_Zc_ScrapApply a WHERE Zlwl_Zc_ScrapApplyId = '251dacca-756c-49f8-98e6-14cb8f49e985') loop --循环 UPDATE Zlwl_Zc_Acc
2022-05-11 10:48:24 624
原创 Oracle 把字符串拆分成多行
SELECT REGEXP_SUBSTR ('1,2,3', '[^,]+', 1,rownum)from dual connect by rownum<=LENGTH ('1,2,3') - LENGTH (regexp_replace('1,2,3', ',', ''))+1;
2022-04-07 16:03:27 2433
原创 C# 后台生成二维码图片
using System;using System.Drawing;using System.Drawing.Printing;using System.Text;using ThoughtWorks.QRCode.Codec; /// <summary> /// 生成二维码图片 /// </summary> /// <param name="codeNumber">要生成二维码的数据</param>
2022-03-27 00:11:15 307
原创 JavaScripts生成二维码方法
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <meta charset="utf-8" /></head><body> <div id="qrcode"></di
2022-03-23 16:41:08 352
原创 读取Excel内容到DataTable
读取Excel文件到DataSet中using NPOI.SS.UserModel; /// <summary> /// 读取Excel文件到DataSet中 /// </summary> /// <param name="filePath">文件路径</param> /// <returns></returns> private DataTable ExcelToDataTable(s
2022-03-16 15:49:46 474
原创 javascript限制输入框只允许输入数字
## 按下键盘按键触发方法function GridKeyPress(){ if(event.keyCode<48||event.keyCode>57) event.returnValue= false; }
2021-12-09 11:53:37 793
原创 js 上传文件
前端代码<%@ Page Language="C#" AutoEventWireup="true" CodeFile="RecUpload.aspx.cs" Inherits="ActivityFile_RecUpload" %><!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><html xmlns="http://www.w3.org/1999/
2021-07-29 14:32:15 148
原创 DataTable转换Json
public string DataTableToJson(DataTable dt) { string Json = "["; int ColumnCount = dt.Columns.Count; foreach (DataRow dr in dt.Rows) { Json += "{"; for (int i = 0; i < ColumnCount; i++) .
2021-06-24 12:36:42 354
原创 js 根据字符串类型的数字排序
var arr = [ {AddRess: "广州南站", lng: 113.275824, lat: 22.994826, Mileage: "558"}, {AddRess: "长沙南站", lng: 113.071579, lat: 28.15323, Mileage: "883"}, {AddRess: "上海虹桥站", lng: 121.327012, lat: 31.200458, Mileage: "1892"}, {AddRess: "兰州西高铁站", lng: 103.758769
2021-06-20 01:25:09 1210
原创 js 延时执行
for(var i = 0; i < 3; i++) { (function(i) { setTimeout(function() { console.log(i); }, (i + 1) * 1000); })(i)}
2021-06-19 00:24:46 806
原创 js 根据经纬度获取百度地图两个点间距离
var map = new BMap.Map("allmap"); var a = new BMap.Point(Longitude1, Latitude1); var b = new BMap.Point(Longitude2, Latitude2); map.getDistance(a, b);
2021-06-16 16:22:22 509
原创 Task.Factory.StartNew
Task.Factory.StartNew(() => SendOrder_Location(tranNo, stationId, isChangeTranMode)); Task.Factory.StartNew(() => { });
2021-05-31 23:37:20 666
原创 JT808平台通用应答详细解析
平台接收鉴权包后,需回复平台通用应答平台通用应答:7E 80 01 00 05 04 01 92 69 90 66 F4 E7 F4 E7 01 02 00 8F 7E7E-----标头《Begin》8001-----消息id(string)《MsgId》00-----结果《JT808PlatformResult》05-----?感觉跟鉴权码长度有关040192699066-----设备号 (string)《TerminalPhoneNo》F4E7-----标头流水号《ManualMsgNum
2021-05-22 21:12:56 1249
原创 JT808终端注册应答详细解析
终端注册应答:7E 81 00 00 0C 04 04 57 10 31 66 00 30 00 30 00 73 68 75 61 6E 67 77 65 69 E0 7E7E-----标头《Begin》81 00-----消息id(string)《MsgId》00-----结果《JT808TerminalRegisterResult》0C-----? 跟鉴权码长度有关,鉴权码长度+304 04 57 10 31 66----- 设备号 (string)《TerminalPhoneNo》00
2021-05-22 21:07:41 2506
原创 十六进制字符转换成字节数组
public static byte[] hexStringToByte(String hex) { int len = (hex.Length / 2); byte[] result = new byte[len]; char[] achar = hex.ToCharArray(); for (int i = 0; i < len; i++) { .
2021-05-19 22:56:12 125
原创 JT808详细解释
7E0200005B014141138693224E00000100000000000157E6DE06CBEC600000000000001703090019200104000026F5EB3700060089FFFFFFFD000700B400FFFFFFFF002400A901CC000627BD0FABCC27910000B727911287BF27BD1159C327BD0000BB27910ED1B5C97E————————————————详细解释7E -
2021-05-08 17:43:51 2988 2
原创 RabbitMQ 403异常:AMQP close-reason, initiated by Peer, code=403
RabbitMQ 403异常:AMQP close-reason, initiated by Peer, code=403这是因为没有权限问题登录web端,点击Set permission按钮授权即可
2021-04-23 10:06:56 1095
原创 在HTML里遍历视图
@Model TestNetCore.Areas.Models@{ ViewData["Title"] = "Home Page";}<div class="text-center"> <h1 class="display-4">@Model.FullName</h1> @foreach (var m in @Model.list) { <h5>@m.FullName</h5> }&
2020-11-27 15:48:40 285
原创 Asp.NetCore 利用SqlSugar连接数据库
1、安装SqlSugarCore包2、配置appsettings.json连接字符串(.NetCore没有Web.config了)"ConnectionStrings": { "BaseDb": "Server=127.0.0.1;Initial Catalog=Test;User ID=sa;Password=sa;MultipleActiveResultSets=true" }3、新建类,读取Json配置文件public class SqlsugarBase {
2020-11-17 11:23:55 4705 1
原创 qlSugar常用方法
查询所有var result = DB.Queryable().ToList();相当于 :select * from Student;跟据主键查询:id为方法参数var result = DB.Queryable().InSingle(id);相当于 :select * from Student where Id = id;根据给定的字段查询:name为方法参数var result = DB.Queryable().Where(s => s.Name == name).
2020-11-12 17:30:52 298
原创 Asp.Net Core项目部署到Windows
1、安装托管模块AspNetCoreModule安装成功后IIS模块里会有一个AspNetCoreModuleV2模块托管模块下载2、项目发布3、IIS添加网站
2020-11-11 17:37:28 375
原创 .Net 使用SqlSugar连接Oracle数据库
1、添加SqlSugar引用添加Oracle.ManagedDataAccess引用3、在Web.config配置数据库连接 <connectionStrings> <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\aspnet-test-20190316013328.mdf;Initial
2020-10-26 10:36:23 7953
原创 图片查看插件-magnify
1、需要引用的文件<link href="~/Content/magnify/jquery.magnify.css" rel="stylesheet" /><script src="~/Content/magnify/jquery.magnify.js"></script><script src="~/Scripts/jquery.js"></script>2、在 HTML 中添加 data-magnify 属性,插件会自动初始化默认结
2020-10-23 16:49:59 1143
原创 C#使用Redis存储数据
安装Redis插件Redis三个插件版本须一致,4.0以上为收费版本连接Redis服务器public static RedisClient Redis = new RedisClient("地址", "端口", "密码",0);bool a=Redis.Ping();//判断Redis是否连接成功Redis.Set("key", "value");//写入Redisvar value = Redis.Get<Models>("key");//根据key值读取Redis...
2020-10-22 10:52:48 1478
原创 C# 导出Excel方法
获取数据源public Response<string> ExportExcel(ExportExcelDetailRequest request) { using (var db = new NDatabase()) { DataTable data = db.Fetch(sql);//数据查询 string date = DateTime.Now.ToString("yyyyMMdd"); st
2020-09-30 10:54:21 338
原创 XmlDocument读取xml
XmlDocument doc = new XmlDocument(); doc.LoadXml(xml);//读取xml字符串 doc.Load("C:\\Users\\Our sky\\Desktop\\YLGL_20200916160715240.xml");//读取本地xml文件 string dataMark = doc.SelectSingleNode("DATASET/HEAD/DATA_MARK"...
2020-09-30 10:19:58 895
原创 HttpWebRequest 提示 “基础连接已关闭:发送时发生意外错误” 的解决方法
HttpWebRequest 多次请求不同网站时,由于安全协议问题。提示错误 “The underlying connection was closed: An unexpected error occurred on a send.”(基础连接已关闭:发送时发生意外错误)记录解决方法//.net 4.0 设置: ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;//.net 4.5 设置: ServicePointMa
2020-09-27 17:02:18 3741
原创 C# 利用QQ邮箱发送邮件
public Response SendEmail() { using (MailMessage mailMessage = new MailMessage()) using (SmtpClient smtpClient = new SmtpClient("smtp.qq.com", 587)) { mailMessage.To.Add("接收人邮箱地址"); .
2020-09-24 16:41:30 442
原创 根据gps坐标设置车辆行驶途经点
根据gps坐标设置车辆行驶途经点<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="viewport" content="initial-scale=1.0, user-scalable=no" /><style type="text/css">body, html,#allmap {width: 100
2020-08-03 19:21:06 683
空空如也
怎么获取百度地图驾车路线api检索后的原始坐标
2022-09-01
部标808协议报警标识怎么解析?
2021-06-12
TA创建的收藏夹 TA关注的收藏夹
TA关注的人