会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
低调码农哥
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
22
23
24
25
26
27
28
29
30
···
32
下一页
2019年12月17日
C#字符串与时间格式化
摘要: 需要将其它类型的变量,转换为字符串类型的一些常见方法与属性。 字符型转换为字符串 // C 货币 2.5.ToString("C"); // ¥2.50 // D 10进制数 25.ToString("D5"); // 25000 // E 科学型 25000.ToString("E"); // 2
阅读全文
posted @ 2019-12-17 11:19 低调码农哥!
阅读(5630)
评论(0)
推荐(0)
2019年12月12日
C# HttpClient以multipart/form-data形式 提交文件和其它参数
摘要: 调用文件接口,需要一个上传文件和一个Region参数,参考调用实例 public async Task<WebApiResult> UploadFile(UploadFileModel info, IList<IFormFile> files) { try { var postContent = n
阅读全文
posted @ 2019-12-12 18:45 低调码农哥!
阅读(13447)
评论(4)
推荐(0)
2019年12月11日
git 本地代码 切换远程分支
摘要: 公司之前代码使用的是gitlab,后来换成腾讯的工峰,所以需要切换远程不支,所以在原代码上切换即可。 在原项目打开git bash命令,打开后会显示本地的原始分支 打开后 添加新的远程分支,红色字体为新的远程地址 $ git remote add origin https://git.code.te
阅读全文
posted @ 2019-12-11 11:36 低调码农哥!
阅读(3803)
评论(0)
推荐(0)
C# List集合 GroupBy分组
摘要: var grpBalance = listBalance.GroupBy(m => new { m.MerChantId, m.Name}).Distinct().Select(t => new balInfo { MerChantId = t.Key.MerChantId, Name = t.Ke
阅读全文
posted @ 2019-12-11 09:49 低调码农哥!
阅读(17467)
评论(0)
推荐(0)
2019年11月22日
Mysql 5.7.28离线包下载与配置
摘要: 下载链接:https://pan.baidu.com/s/1uPbBknyIebQRDt4k_RA58Q 提取码:14zi 将下载文件进行解压,我解压位置为:D:\Program Files\mysql-5.7.28-winx64 在D:\Program Files\mysql-5.7.28-win
阅读全文
posted @ 2019-11-22 14:57 低调码农哥!
阅读(9419)
评论(0)
推荐(0)
2019年11月5日
c# 邮件发送
摘要: /// <summary> /// 邮件发送 /// </summary> /// <param name="subject">邮件标题</param> /// <param name="body">邮件内容,html格式</param> /// <param name="toMailList">收
阅读全文
posted @ 2019-11-05 10:23 低调码农哥!
阅读(1488)
评论(0)
推荐(1)
2019年10月28日
System.InvalidOperationException: The binary operator NotEqual is not defined for the types 'Microsoft.EntityFrameworkCore.Storage.ValueBuffer' and 'Microsoft.EntityFrameworkCore.Storage.ValueBuffer'.
摘要: .netcore 2.1使用左表连接时报错,原因是对数据库中实体 DateTimeOffset date做查询判断时,将数据库中date转为string进行了判断,这样判断是错误的,并且效率低,应该是不改变数据库中字段类型,将查询条件字段更改为数据库字段类型 错误的写法: 正确的写法:
阅读全文
posted @ 2019-10-28 16:51 低调码农哥!
阅读(1517)
评论(0)
推荐(0)
上传图片报错-Failed to load resource:the server responded with a status of 413(Request Entity Too Large)
摘要: 使用.netcore2.1 做文件上传时,要求是小于20M,上传3至5M都没问题,大于10M,提示错误【如标题】,原来是nginx配置的原因 解决方法: 打开nginx反向代理服务器nginx.conf配置文件,修改client_max_body_size值,client_max_body_size
阅读全文
posted @ 2019-10-28 10:59 低调码农哥!
阅读(1960)
评论(0)
推荐(0)
2019年10月24日
C# ling to sql 左表连接
摘要: var begin_daily = from a in _postgreDbContext.tab1 join b in _postgreDbContext.tab2 on a.id equals b.merchant_id into a_left from left_a in a_left.Def
阅读全文
posted @ 2019-10-24 15:15 低调码农哥!
阅读(565)
评论(0)
推荐(0)
2019年10月23日
【转载】C#中decimal保留2位有效小数
摘要: 在C#的数字运算过程中,有时候针对十进制decimal类型的计算需要保留2位有效小数,针对decimal变量保留2位有效小数有多种方法,可以使用Math.Round方法以及ToString先转换为字符串等操作来实现。 (1)方法一:使用C#中的数字计算类Math类中的方法Math.Round方法。
阅读全文
posted @ 2019-10-23 11:10 低调码农哥!
阅读(11431)
评论(0)
推荐(0)
上一页
1
···
22
23
24
25
26
27
28
29
30
···
32
下一页
公告