怪奇物语

怪奇物语

首页 新随笔 联系 管理
上一页 1 2 3 4 5 6 7 ··· 23 下一页

2025年1月12日 #

摘要: golang中 &和*的区别 & 用于获取地址 * 用于声明时,就是声明指针类型, 用于解引用时,就是解引用指针。 & 是取地址操作符,用于获取变量的内存地址。例如: package main import "fmt" func main() { var num int = 10 // 获取 num 阅读全文
posted @ 2025-01-12 08:00 超级无敌美少男战士 阅读(246) 评论(0) 推荐(0)

2025年1月11日 #

摘要: golang 函数和方法的区别 一句话总结就是,func直接函数名就是函数,否则就是方法. 至于是谁的的方法,看函数前面有没有*号的指向. golang中函数第一等公民,所以以函数优先. demo\main.go package main import "fmt" // 定义一个结构体 type S 阅读全文
posted @ 2025-01-11 22:48 超级无敌美少男战士 阅读(10) 评论(0) 推荐(0)

摘要: golang 单元测试 命令行 日志打印 测试结果打印控制台 test.bat @REM go test -timeout 30s -run ^TestMultiPong$ github.com/jergoo/go-grpc-tutorial/ping @REM go test -timeout 3 阅读全文
posted @ 2025-01-11 22:11 超级无敌美少男战士 阅读(161) 评论(0) 推荐(0)

2025年1月10日 #

摘要: prism中依赖注入的使用 BlankApp\BlankApp\App.xaml.cs using System.Windows; using BlankApp.Views; using Prism.Ioc; namespace BlankApp { /// <summary> /// Intera 阅读全文
posted @ 2025-01-10 08:00 超级无敌美少男战士 阅读(58) 评论(0) 推荐(0)

2025年1月9日 #

摘要: 如何执行lua脚本 :lua vim.print(package.loaded) 如何映射jk键 vim.keymap.set('i', 'jk', '<Esc>') vim.keymap.set('t', 'jk', [[<C-\><C-n>]]) 上面中的参数t是什么意思,在什么场景中的使用 在 阅读全文
posted @ 2025-01-09 08:00 超级无敌美少男战士 阅读(356) 评论(0) 推荐(0)

2025年1月1日 #

摘要: DataTable 的线程安全问题 背景 虽然说一般只读不太会涉及到线程安全问题, 但是实际在编写代码的过程中发现data table即使是读取也是线程不安全的. 我的当时的代码是想要在多线中基于此data table创建一个data row,一开始以为是闭包的问题, 后来解决闭包问题之后,发现还有 阅读全文
posted @ 2025-01-01 08:00 超级无敌美少男战士 阅读(58) 评论(0) 推荐(0)

2024年12月26日 #

摘要: AutoMapper中映射对象属性不同的处理 Creating Rules for Mapping Properties With Different Names But what if we have different property names in our source and desti 阅读全文
posted @ 2024-12-26 08:00 超级无敌美少男战士 阅读(47) 评论(0) 推荐(0)

摘要: AutoMapper的使用 根据上传的文件内容,可以看到AutoMapper被用来映射不同对象之间的属性。具体来说,它用于将一个类的实例转换为另一个类的实例,而这两个类拥有相似的结构或部分相似的属性。以下是基于提供的代码对AutoMapper用法的总结: 安装和引用: 在TodoList.Api.c 阅读全文
posted @ 2024-12-26 08:00 超级无敌美少男战士 阅读(91) 评论(0) 推荐(0)

摘要: AutoMapper的默认映射规则 convertions map complex object to flat/simple ones Default conventions AutoMapper uses the following conventions: It will automatica 阅读全文
posted @ 2024-12-26 08:00 超级无敌美少男战士 阅读(36) 评论(0) 推荐(0)

2024年12月21日 #

摘要: dotnet ef migrations Infrastructure\DependencyInjection\InfrastructureDependencyInjection.cs services.AddDbContext<MySqlDatabase>(options => { options 阅读全文
posted @ 2024-12-21 08:00 超级无敌美少男战士 阅读(23) 评论(0) 推荐(0)

2024年12月4日 #

摘要: SQLSugar中查询DataTable public class BaseRespository : IBaseRespository { private readonly ISqlSugarClient _dbOracleSAPSR3; private readonly ILogger<Base 阅读全文
posted @ 2024-12-04 08:00 超级无敌美少男战士 阅读(171) 评论(0) 推荐(0)

2024年11月30日 #

摘要: 手动批量注入service 自动依赖注入 C# asp.net dontet 依赖注入 public static class ServiceCollectionExtensions { // 批量注入所有的继承IBaseService的Service public static void AddP 阅读全文
posted @ 2024-11-30 08:00 超级无敌美少男战士 阅读(28) 评论(0) 推荐(0)

2024年11月27日 #

摘要: SeedData 怎么写 数据库上下文 怎么拿到 依赖注入 builder.Services.AddDbContext<BlazorMovieContext>(options => options.UseSqlServer( builder.Configuration.GetConnectionSt 阅读全文
posted @ 2024-11-27 08:00 超级无敌美少男战士 阅读(21) 评论(0) 推荐(0)

摘要: blazor 折叠按钮 功能 <div class="top-row ps-3 navbar navbar-dark"> <div class="container-fluid"> <!-- 👇👇👇 --> <button title="Navigation menu" class="navb 阅读全文
posted @ 2024-11-27 08:00 超级无敌美少男战士 阅读(33) 评论(0) 推荐(0)

摘要: 实体状态 分离状态 未更改状态 已添加状态 已删除状态 已修改状态 Entity Framework Detached、Unchanged、Added、Deleted、Modified efcore 五种状态 Detached(分离状态): 当实体对象被创建但尚未与任何Entity Framewor 阅读全文
posted @ 2024-11-27 08:00 超级无敌美少男战士 阅读(106) 评论(0) 推荐(0)

摘要: QuickGrid 使用 Blazor 依赖注入 builder.Services.AddQuickGridEntityFrameworkAdapter(); 绑定使用 QuickGrid的使用如下: 在BlazorMovie-main\BlazorMovie\Pages\Movies\Index. 阅读全文
posted @ 2024-11-27 08:00 超级无敌美少男战士 阅读(168) 评论(0) 推荐(0)

摘要: Blazor razor 注释参数 SupplyParameterFromQuery SupplyParameterFromForm OnInitializedAsync 参数属性: [SupplyParameterFromQuery] public int Id { get; set; } [Su 阅读全文
posted @ 2024-11-27 08:00 超级无敌美少男战士 阅读(71) 评论(0) 推荐(0)

2024年11月20日 #

摘要: vimiun chrome msedge 配置 { "name": "Vimium C", "@time": "2024/11/20 19:54:58", "time": 1732103698988, "environment": { "extension": "1.99.994", "platfo 阅读全文
posted @ 2024-11-20 20:24 超级无敌美少男战士 阅读(42) 评论(0) 推荐(0)

摘要: vscode 配置markdown的代码片及其不生效问题解决 markdown.json 的配置文件 // Place your snippets for markdown here. Each snippet is defined under a snippet name and has a pr 阅读全文
posted @ 2024-11-20 20:20 超级无敌美少男战士 阅读(151) 评论(0) 推荐(0)

2024年11月15日 #

摘要: 为什么说說深呼吸實際上也無法讓人放鬆? 從呼吸肌肉的觀點來看當你遇到周遭親朋好友緊張、焦慮、情緒激動的時候,你會給他們什麼建議呢? 相信大家都會不加思索地說:趕快做深呼吸。 的確,大家從小就被灌輸一個觀念,深呼吸是一個讓人很放鬆的呼吸方式。 我一直也是這麼認為,直到我在加拿大學習放鬆減量呼吸訓練,聽 阅读全文
posted @ 2024-11-15 18:48 超级无敌美少男战士 阅读(21) 评论(0) 推荐(0)

2024年11月8日 #

摘要: dotnet cli 发布脚本 publish_remote.bat 该脚本实现一键主要发布到远程的共享文件夹中 @echo off :: 定义变量 SHARE_PATH:共享文件夹, SOURCE_DIR:代码发布的文件夹, TARGET_DIR:目标文件夹(共享文件夹的映射) set PRO_P 阅读全文
posted @ 2024-11-08 08:00 超级无敌美少男战士 阅读(52) 评论(0) 推荐(0)

2024年11月3日 #

摘要: asp.net dotnet razor page mvc 过滤器 数据验证过滤器 数据库事务过滤器 Program.cs注册过滤器 services.AddRazorPages(opt => { opt.Conventions.ConfigureFilter(new DbContextTransa 阅读全文
posted @ 2024-11-03 16:46 超级无敌美少男战士 阅读(51) 评论(0) 推荐(0)

摘要: webapi dotnet Program.cs 的封装 精简代码 拆分成两个部分RegisterServices(builder);和ConfigureApplication(app); 或者使用代码块,大括号来进行拆分. using HtmlTags; using MediatR; using 阅读全文
posted @ 2024-11-03 16:46 超级无敌美少男战士 阅读(16) 评论(0) 推荐(0)

摘要: asp.net MiniProfiler 性能分析工具 1. 依赖包 这里使用了MiniProfiler.AspNetCore.Mvc和MiniProfiler.EntityFrameworkCore两个依赖包。从ContosoUniversity.csproj文件中可以看到相关的引用: <Pack 阅读全文
posted @ 2024-11-03 16:45 超级无敌美少男战士 阅读(100) 评论(0) 推荐(0)

2024年10月31日 #

摘要: # wpf 数据绑定 DataContext App\App\MainWindow.xaml <Window x:Class="Application.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentati 阅读全文
posted @ 2024-10-31 19:49 超级无敌美少男战士 阅读(43) 评论(0) 推荐(0)

摘要: # wpf UI 界面 数据绑定 四种类型 ComplicatedButton\ComplicatedButton\MainWindow.xaml <Window x:Class="WpfApp.MainWindow" xmlns="http://schemas.microsoft.com/winf 阅读全文
posted @ 2024-10-31 19:01 超级无敌美少男战士 阅读(22) 评论(0) 推荐(0)

摘要: button 按钮 content属性 阅读全文
posted @ 2024-10-31 08:00 超级无敌美少男战士 阅读(32) 评论(0) 推荐(0)

摘要: 列宽,行宽,倍数关系 跨行,跨列 阅读全文
posted @ 2024-10-31 08:00 超级无敌美少男战士 阅读(10) 评论(0) 推荐(0)

摘要: 描述性注释 MS_Description 查看特别表,所有字段 描述性注释 SELECT obj.name AS ObjectName, col.name AS ColumnName, ep.value AS Description FROM sys.extended_properties ep I 阅读全文
posted @ 2024-10-31 08:00 超级无敌美少男战士 阅读(11) 评论(0) 推荐(0)

2024年10月29日 #

摘要: wpf 触发器 多条件触发器 <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microso 阅读全文
posted @ 2024-10-29 19:00 超级无敌美少男战士 阅读(20) 评论(0) 推荐(0)

摘要: wpf 数据绑定 viewmodel 阅读全文
posted @ 2024-10-29 19:00 超级无敌美少男战士 阅读(11) 评论(0) 推荐(0)

摘要: wpf 数据绑定 GridDemo\GridDemo\MainWindow.xaml.cs using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; usin 阅读全文
posted @ 2024-10-29 19:00 超级无敌美少男战士 阅读(13) 评论(0) 推荐(0)

摘要: wpf 样式 触发器 <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c 阅读全文
posted @ 2024-10-29 19:00 超级无敌美少男战士 阅读(11) 评论(0) 推荐(0)

摘要: wpf 触发器 多条件触发器 数据绑定触发器 <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas 阅读全文
posted @ 2024-10-29 19:00 超级无敌美少男战士 阅读(41) 评论(0) 推荐(0)

摘要: sqlcmd 设置登录或者查询的超时时间 背景 sqlcmd在执行某些比较慢的查询,会很容易报出time expired的问题,而在ssms就没有该问题。所以需要查询设置查询或登录的超时时间,这样才能查询到完整的数据 命令 sqlcmd -S <dbserveripaddress> -U <dbus 阅读全文
posted @ 2024-10-29 08:00 超级无敌美少男战士 阅读(105) 评论(0) 推荐(0)

2024年10月27日 #

摘要: wpf的样式 作用所有按钮 <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microso 阅读全文
posted @ 2024-10-27 19:00 超级无敌美少男战士 阅读(21) 评论(0) 推荐(0)

摘要: # wpf 数据绑定 列表 ObservableCollection PrismDryIocDemo\PrismDryIocDemo\App.xaml <Application x:Class="PrismDryIocDemo.App" xmlns="http://schemas.microsoft 阅读全文
posted @ 2024-10-27 15:51 超级无敌美少男战士 阅读(34) 评论(0) 推荐(0)

2024年10月26日 #

摘要: StackPanel wpf 布局 GridDemo\GridDemo\MainWindow.xaml <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presenta 阅读全文
posted @ 2024-10-26 21:43 超级无敌美少男战士 阅读(11) 评论(0) 推荐(0)

摘要: wpf Grid布局 效果 GridDemo\GridDemo\MainWindow.xaml <Window x:Class="GridDemo.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentatio 阅读全文
posted @ 2024-10-26 21:37 超级无敌美少男战士 阅读(15) 评论(0) 推荐(0)

摘要: bmal文件读取 运行效果 Demo01\Demo01\MainWindow.xaml.cs using System.Collections; using System.Globalization; using System.IO; using System.Resources; using S 阅读全文
posted @ 2024-10-26 21:06 超级无敌美少男战士 阅读(76) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 7 ··· 23 下一页