06 2024 档案

摘要:Services.AddControllers().AddJsonOptions 是一个常用于ASP.NET Core应用程序中配置MVC控制器如何处理JSON的方法。 它允许你添加自定义JSON序列化设置,例如更改日期格式、更改默认的序列化行为等。 以下是如何使用 AddJsonOptions 的 阅读全文
posted @ 2024-06-28 14:05 yinghualeihenmei 阅读(19) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/ZkbFighting/p/12922029.html AddTransient(shuan sen te) 瞬间生命周期 : 每次需要创建一个全新的 AddSigleton(Single ten) 单例进程唯一实例 :每一次请求都是同一个( 阅读全文
posted @ 2024-06-28 11:56 yinghualeihenmei 阅读(19) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/1285026182YUAN/p/17686654.html 以前记录的是在.net framwork中的,是放在global文件中的。现在记录的是在.netcore里的应用,netcore框架里已经没有global文件了。 源码:https 阅读全文
posted @ 2024-06-28 10:50 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/qq_18932003/article/details/119975014 匹配单个路由匹配固定的单个路径 endpoints.MapControllerRoute( name: "AA", pattern: "About", defaults: 阅读全文
posted @ 2024-06-28 10:04 yinghualeihenmei 阅读(7) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/shanghaibao123/article/details/124116749 下载NuGet包依赖 Microsoft.Extensions.Http 在启动类中配置启用https builder.Services.AddHttpClient 阅读全文
posted @ 2024-06-27 16:35 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/yzj_xiaoyue/article/details/79367901 在 .Net Core Web的视图获取从后台传来的数据的时候,默认使用的是 UnicodeRanges.BasicLatin进行的编码,所以在前台显示中文,而在查看源码的 阅读全文
posted @ 2024-06-27 15:43 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.jb51.net/article/251755.htm https://blog.csdn.net/hiose89/article/details/125012881 这篇文章介绍了.Net Core日志记录之第三方框架Serilog 一、前言对内置日志系统的整体实 阅读全文
posted @ 2024-06-27 15:18 yinghualeihenmei 阅读(11) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_45303938/article/details/108007791 签章后修改文档 如果把一个有签过名的PDF文档进行修改,再验证时可能会有以上的提示:“由本签名控制的文档修订版次尚未被更改,但在其后,文档已被更改”。出现这种情况 阅读全文
posted @ 2024-06-26 17:57 yinghualeihenmei 阅读(14) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/yelin042/article/details/80785984 DataRow[] rowArr= dt.Select("age >25", " age desc");select 也可以排序,但是返回的是datarow protected 阅读全文
posted @ 2024-06-26 14:46 yinghualeihenmei 阅读(16) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/zzh1236/archive/2013/04/08/3008293.html https://tech.powereasy.net/cpzsk/dynetbbcjwt/content_20555 时时间已到。超时时间已到,但是尚未从池中获取 阅读全文
posted @ 2024-06-26 11:10 yinghualeihenmei 阅读(13) 评论(0) 推荐(0) 编辑
摘要:答案来源于AI: 要在 jQuery EasyUI 的,可以通过修改 window 的 options 来实现。具体做法是设置 closable 属性为 false。 以下是实现这一功能的代码示例: // 初始化窗口时设置 closable 为 false $('#win1').window({ c 阅读全文
posted @ 2024-06-24 12:05 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:这个问题感觉很奇怪,属于页面上面新打开的页面。 页面在浏览器打开也很正常。 最后是将新打开的页面宽度调大,将整个页面都显示出来,看起来只会偏一点点,影响不大。 阅读全文
posted @ 2024-06-24 11:58 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:点了下加速球就好了,将不用的程序,自启动的程序都关掉。 阅读全文
posted @ 2024-06-24 10:41 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/sD7O95O/article/details/107587430 现在部署Asp.Net Core应用已经不再限制于Windows的IIS上,更多的是Docker容器、各种反向代理来部署。也有少部分用IIS部署的,IIS部署确实是又快又简单,图 阅读全文
posted @ 2024-06-21 16:50 yinghualeihenmei 阅读(8) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.yisu.com/ask/29579392.html 在C#中,Path.Combine()方法用于将两个或多个字符串路径组合成一个有效的路径。它接受多个字符串参数作为路径的组成部分,并返回一个字符串,表示有效的路径。 语法如下: public static str 阅读全文
posted @ 2024-06-21 15:46 yinghualeihenmei 阅读(7) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/hefeng_aspnet/article/details/135859719 在ASP.NET Core中,可以通过以下三种方式获取应用程序所在目录: 1、使用`AppContext.BaseDirectory`属性: string appDi 阅读全文
posted @ 2024-06-21 15:37 yinghualeihenmei 阅读(120) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_33795833/article/details/90324791 ASP.NET Core应用中使用得最多的还是具体的物理文件,比如配置文件、View文件以及网页上的静态文件,物理文件系统的抽象通过PhysicalFileProv 阅读全文
posted @ 2024-06-21 15:29 yinghualeihenmei 阅读(12) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/cuit/article/details/132504757 WebApplication 类ASP.NET Core 有3个 Host 类,是ASP.NET Core中用于初始化,生命周期管理,启动Web 服务的最重要的类。所以详细重点分析一下 阅读全文
posted @ 2024-06-21 15:09 yinghualeihenmei 阅读(12) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/hkzw/p/12001420.html 一、新建一个Web 的 应用程序 二、选择项目的基本信息(.net coer 2.2 和带有试图控制器的程序) 在这里创建的是MVC模式,也可以用其他的,比如空的、web应用程序。跟平常开的的那种表面 阅读全文
posted @ 2024-06-21 14:36 yinghualeihenmei 阅读(7) 评论(0) 推荐(0) 编辑
摘要:在红框里重新安装一下就好了,可能之前没装好.netcore吧 阅读全文
posted @ 2024-06-21 14:19 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:catch{} return""; 因为catch{} 后面还有个return,所以还是会运行到return,会返回ref的值,我这边遇到的是因为catch了,没有给 ref赋值出现的问题,在catch里面再赋一下值就好了 阅读全文
posted @ 2024-06-21 11:53 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/lcxBlog/p/4903070.html https://blog.csdn.net/weixin_43831728/article/details/105916518 区别:1.类型不同 结构是一种值类型,而类是引用类型。值类型用于存储 阅读全文
posted @ 2024-06-21 11:37 yinghualeihenmei 阅读(19) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://baijiahao.baidu.com/s?id=1776341114812323315&wfr=spider&for=pc excel表格换行方法1:使用快捷键进行换行很多人疑问,excel表格怎么换行?其实很简单,我们可以直接使用excel表格自带的换行快捷键进行换行, 阅读全文
posted @ 2024-06-20 17:18 yinghualeihenmei 阅读(31) 评论(0) 推荐(0) 编辑
摘要:添加项目一直提示错误,应该是因为我这边将冲突点了合并。 从文件夹中点击.csproj,右击用vs打开,然后终于好了。。。 阅读全文
posted @ 2024-06-19 18:23 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_44179269/article/details/113420767 1, setTimeout()基础setTimeout函数用来指定某个函数或某段代码,在多少毫秒之后执行。它返回一个整数,表示定时器的编号,以后可以用来取消这个定 阅读全文
posted @ 2024-06-18 16:32 yinghualeihenmei 阅读(31) 评论(0) 推荐(0) 编辑
摘要:将对方的winrar卸载重装了我们平时用的就好了。 没想到不同的winrar解压还有这种情况。 查了下别人也遇到过兼容的问题,原文链接:https://zhidao.baidu.com/question/2272593102165721188.html 我之前看到说winrar5.5开始分界,5.5 阅读全文
posted @ 2024-06-18 13:55 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:jQuery EasyUI中文文档 - EasyUI在线开发文档-EasyUI中文站 (jeasyui.cn) https://www.jeasyui.cn/document/index/index.html Jquery UI 官方文档 https://www.w3cschool.cn/doc_j 阅读全文
posted @ 2024-06-17 12:01 yinghualeihenmei 阅读(8) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/HiLiu_/article/details/134539854 第一部分:onclick、onserverclick HTML控件,如input还有a标签,只有onclick ( 客户端)和onserverclick(服务端)事件,而没有onc 阅读全文
posted @ 2024-06-17 11:45 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/harbour_bin/article/details/10963555 问题:在局部刷新的部分不能实现response.write的功能? 解决方法: 如果页面中不用Ajax,cs中运行某段js代码方式可以是:Page.ClientScript 阅读全文
posted @ 2024-06-17 11:27 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:这边的虚拟路径查出来配置错了。 显示的是新建的时候的别名。修改目前我这边是删除重新加一个。 阅读全文
posted @ 2024-06-13 19:38 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/lwf3115841/article/details/130459042 https://blog.csdn.net/Pei_hua100/article/details/108072643 ist是C#常用的数组,它较之前的ArryList更加 阅读全文
posted @ 2024-06-13 17:03 yinghualeihenmei 阅读(170) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/longshen/archive/2010/02/10/1667074.html // 2009-9-5 20:12:12 //获取日期DateTime.Now.ToLongDateString().ToString(); // 2009年9 阅读全文
posted @ 2024-06-11 18:50 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:http://www.imangodoc.com/9fFUQ6eR.html 在C#中,DateTime类是表示日期和时间的类型。DateTime.AddMilliseconds()是DateTime类的一个方法,可以用于在日期和时间中添加指定的毫秒数。本文将详细介绍DateTime.Ad 阅读全文
posted @ 2024-06-11 18:48 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.jb51.net/article/122143.htm 输出如下图所示: 猜测这里是由于js初始化时间的时候往往是向 1970/01/01 添加毫秒数,JavaScriptSerializer进行序列化的时候也会格式化为距离1970/01/01 到当该时间点GMT+ 阅读全文
posted @ 2024-06-11 18:23 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/m0_67683346/article/details/127591079 6.2、console.log在控制台打印一个日志(一般是给程序员看的): console.log("hello JavaScript");需要在开发者工具中的控制台查看 阅读全文
posted @ 2024-06-11 13:22 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/shadow_zed/article/details/106419848 1. jquery.extend(), 为jQuery类添加类方法例子1 例子2 调用直接用$.类名 2. jquery.extend(), 将两个或更多对象的内容合并到第 阅读全文
posted @ 2024-06-11 13:12 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://learn.microsoft.com/zh-cn/dotnet/api/system.web.script.serialization.javascriptserializer?view=netframework-4.8.1&redirectedfrom=MSDN 命名空 阅读全文
posted @ 2024-06-11 13:07 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/wangqilong/p/12540397.html https://www.cnblogs.com/firstyi/archive/2007/11/20/965957.html ViewState的使用比较简单,一两句话就可以了。赋值: V 阅读全文
posted @ 2024-06-07 17:38 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/qq_27033067/article/details/102950735 写SQL语句我们会遇到需要判断字段值中是否包含某个字符串,虽然SQL SERVER中并没有像C#提供了Contains函数,但SQL SERVER中提供了CHAEINDX 阅读全文
posted @ 2024-06-07 16:58 yinghualeihenmei 阅读(15) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_44917045/article/details/103236167 https://blog.csdn.net/bazinga_y/article/details/134416680 在写分页的时候,返回Json数据给前台的时候, 阅读全文
posted @ 2024-06-06 17:53 yinghualeihenmei 阅读(24) 评论(0) 推荐(0) 编辑
摘要:第一次遇到,智能搜索中的答案: public class MyClass { public int Id { get; set; } public string Name { get; set; } } using System; using System.Collections.Generic; 阅读全文
posted @ 2024-06-06 01:16 yinghualeihenmei 阅读(9) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/bincoding/p/8065437.html https://www.cnblogs.com/bruce1992/p/14022655.html 今天看代码遇到了很多await,梳理一下await的用法。 await只针对awaitabl 阅读全文
posted @ 2024-06-06 00:56 yinghualeihenmei 阅读(8) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.php.cn/faq/603903.html IWebHostEnvironment 提供有关 Web 托管环境和 应用程序正在运行。 属于命名空间 Microsoft.AspNetCore.Hosting IWebHostEnvironment 接口需要作为依赖项 阅读全文
posted @ 2024-06-06 00:23 yinghualeihenmei 阅读(40) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/micenote/articles/9692207.html 什么是依赖注入软件设计原则中有一个依赖倒置原则(DIP),为了更好的解耦,讲究要依赖于抽象,不要依赖于具体。而控制反转(Ioc)就是这样的原则的其中一个实现思路, 这个思路的其中一 阅读全文
posted @ 2024-06-06 00:21 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/weixin_45203607/article/details/124227504 什么是匿名函数1、匿名函数,即没有名称的函数2、如果单独只写一个匿名函数,此时是不符合语法要求的 会报错。需要给 匿名函数包裹一个括号,使之成为表达式。3、被小括 阅读全文
posted @ 2024-06-05 16:56 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/Jeely/p/10715089.html js 中 (function($){...})(jQuery) 含义js中定义函数常用写法是 function name(arg){ //arg则是匿名函数的参数。 //... } 调用函数时的写法 阅读全文
posted @ 2024-06-05 16:45 yinghualeihenmei 阅读(2) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/liujie2272/p/6279925.html @RenderBody@RenderBody是布局页(_Layout.cshtml)通过占位符@RenderBody占用独立部分,当创建基于此布局页的试图时,视图的内容会和布局页合并,而新创 阅读全文
posted @ 2024-06-05 13:40 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/maoyazhi/p/5946455.html layout方式布局就是相当于一个模板一样的,相当于定义好了框架,作为一个母版页的,使用布局或母版页的好处是,我们不需要在每个视图中都设置一份相同的内容,在它下面的页面需要修改不同代码的地方使用 阅读全文
posted @ 2024-06-05 13:02 yinghualeihenmei 阅读(7) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://baijiahao.baidu.com/s?id=1658981115582831300&wfr=spider&for=pc 在ASP.NET MVC中,有一个特殊的ViewBag对象,ViewBag是一个dynamic动态类型,定义在ControllerBase类中,可以 阅读全文
posted @ 2024-06-04 16:09 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/qqvvn/p/9932812.html 一、动态类型其实是动态编译的一种形式。在.net4.0上添加新的动态类型dynamic,对于动态类型,就是在运行时才会确定的类型。 1.dynamic关键字的使用 1)使用var可以定义本地变量,该变 阅读全文
posted @ 2024-06-04 15:58 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/yaxiya/article/details/113613472 https://baijiahao.baidu.com/s?id=1777519235111640038&wfr=spider&for=pc 步骤一、Windows查看所有的端口 阅读全文
posted @ 2024-06-04 14:33 yinghualeihenmei 阅读(4) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/2301_80068547/article/details/134619359 一、Bootstrap 简介Bootstrap 来自 Twitter (推特),是目前最受欢迎的前端框架。Bootstrap 是基于 HTML、CSS和 JavaSc 阅读全文
posted @ 2024-06-04 11:15 yinghualeihenmei 阅读(1) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.51cto.com/u_16213388/7243295 .NET MVC cshtml 如何调试 在使用 .NET MVC 开发网页应用程序时,cshtml 文件是视图文件,用于定义页面的外观和布局。调试 cshtml 文件是非常重要的,因为它可以帮助我们定位和 阅读全文
posted @ 2024-06-04 10:24 yinghualeihenmei 阅读(20) 评论(0) 推荐(0) 编辑
摘要:public bool CanJump(int[] nums) { int rightMost=0; int n=nums.Length; for(int i=0;i<n;i++) { if(i<=rightMost) { rightMost = Math.Max(rightMost,i+nums[ 阅读全文
posted @ 2024-06-04 01:37 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://learn.microsoft.com/zh-cn/aspnet/core/mvc/views/razor?view=aspnetcore-8.0 Razor 是一种标记语法,用于将基于 .NET 的代码嵌入网页中。 Razor 语法由 Razor 标记、C# 和 HTML 阅读全文
posted @ 2024-06-03 18:33 yinghualeihenmei 阅读(53) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://m.imooc.com/wenda/detail/550239 cshtml 是 MVC3 之后新增的视图文件,跟原先的 aspx 很相似。区别主要在于二者的解释引擎不同。aspx 采用的是 WebForm Engine,而 cshtml 则是 Razor Renderin 阅读全文
posted @ 2024-06-03 18:10 yinghualeihenmei 阅读(24) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://www.cnblogs.com/DHclly/p/5285748.html https://blog.csdn.net/qq_42988836/article/details/123230630 编译器失败,错误代码为xxx问题:出现编译器失败,等一会儿出现csc.exe无 阅读全文
posted @ 2024-06-03 17:23 yinghualeihenmei 阅读(3) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://upimg.baike.so.com/doc/6061191-6274247.html https://blog.csdn.net/u013733643/article/details/123473628 DOTNET就是.NET, 严格说是:.NET Framework框 阅读全文
posted @ 2024-06-03 15:12 yinghualeihenmei 阅读(6) 评论(0) 推荐(0) 编辑
摘要:原文链接:https://blog.csdn.net/m0_56366948/article/details/137480405 当你尝试直接启动一个类库(Class Library)项目时,你会遇到这样的错误消息,因为类库项目本身不生成可执行文件(如 .exe 文件),它们只是包含可以被其他程序或 阅读全文
posted @ 2024-06-03 13:24 yinghualeihenmei 阅读(107) 评论(0) 推荐(0) 编辑
摘要:public static int MaxProfit(int[] prices) { int priceSize = prices.Length; int [,] dp=new int[priceSize,2];//同一天有两种状态, [i,0]为第i天没有股票的利润,[i,1]为i天持有股票的利 阅读全文
posted @ 2024-06-02 22:49 yinghualeihenmei 阅读(5) 评论(0) 推荐(0) 编辑
摘要:设置-实验室-勾选掉 开启360壁纸功能。 阅读全文
posted @ 2024-06-02 22:24 yinghualeihenmei 阅读(11) 评论(0) 推荐(0) 编辑