上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页

2022年10月27日

asp.net 判断集成和经典模式

摘要: protected void Application_Start(object sender, EventArgs e) { log4net.Config.XmlConfigurator.Configure(); try { var path = HttpContext.Current.Reques 阅读全文

posted @ 2022-10-27 20:54 空明流光 阅读(31) 评论(0) 推荐(0) 编辑

vue 获取所有路由 及通过 名称 获取指定路由

摘要: 获取路由表: var routes = this.router.options.routes;this.router.resolve({ name: item.name }).route.meta.permissionId 阅读全文

posted @ 2022-10-27 15:22 空明流光 阅读(3746) 评论(0) 推荐(0) 编辑

iis 配置所有文件类型 mime

摘要: .* application/octet-stream 阅读全文

posted @ 2022-10-27 13:48 空明流光 阅读(180) 评论(0) 推荐(0) 编辑

2022年10月26日

vue 根据name获取指定路由对象

摘要: var href = this.$router.resolve({name: "login"}).href; 阅读全文

posted @ 2022-10-26 16:49 空明流光 阅读(313) 评论(0) 推荐(0) 编辑

java mybatis 利用 map 实现执行sql动态输入和动态返回

摘要: mapper.xml <select id="getDemoData" parameterType="hashMap" resultType="java.util.Map"> SELECT #{id} as id </select> mapper List<Map<String, Object>> 阅读全文

posted @ 2022-10-26 14:33 空明流光 阅读(623) 评论(0) 推荐(0) 编辑

2022年10月17日

python 序列化到字符串以及反序列化

摘要: import pickle s1 = pickle.dumps("I am data") str_version = s1.decode('unicode_escape') decoded = pickle.loads(str_version.encode('utf-8', 'unicode_esc 阅读全文

posted @ 2022-10-17 15:49 空明流光 阅读(111) 评论(0) 推荐(0) 编辑

2022年9月29日

htm 使用 head meta refresh url 实现自动跳转 备忘

摘要: 将以下代码存为 .html 或 .jsp 替换首页即可: <html> <head> <meta http-equiv="Refresh" content="1;url=/stgl/#/login" /> </head> <body> </body> </html> 阅读全文

posted @ 2022-09-29 16:11 空明流光 阅读(47) 评论(0) 推荐(0) 编辑

2022年9月25日

centos 任务管理器 htop

摘要: 一、以yum方式安装 1、yum -y install epel-release.noarch 2、yum -y install htop 二、源码方式安装 1、安装gcc、内核库依赖库 yum install -y gcc ncurses-deve 2、下载源码 wget http://sourc 阅读全文

posted @ 2022-09-25 18:50 空明流光 阅读(332) 评论(0) 推荐(0) 编辑

2022年9月16日

postgresql 备忘

摘要: 查看postgresql版本:select version() 1. postgresql 查询多行合并成一行 SELECT string_agg (DISTINCT relname, ',' order by relname ASC) FROM pg_stat_user_tables WHERE 阅读全文

posted @ 2022-09-16 15:33 空明流光 阅读(134) 评论(0) 推荐(0) 编辑

2022年9月13日

c# 获取当前时区时间

摘要: 获取当前时区时间 time (东八区默认会减去8小时): var time = new Date(new Date().getTime() + (new Date().getTimezoneOffset() / 60) * 24 * 60 * 1000); 获取当前时区当前时间 time 字符串: 阅读全文

posted @ 2022-09-13 16:06 空明流光 阅读(1608) 评论(0) 推荐(0) 编辑

2022年9月11日

fiddler 使用备忘

摘要: fiddler2 只适用于 xp 及以下系统,以后续系统有很多限制,高版本使用fiddler4 1. fiddler 就是一个代理服务器,默认本机8888端口,可以在 Tool\Options\Connections 中更改 2.fiddler 对 https 默认不开启捕获,需要在 Tools \ 阅读全文

posted @ 2022-09-11 08:10 空明流光 阅读(28) 评论(0) 推荐(0) 编辑

2022年9月9日

centos 查看磁盘占用情况命令

摘要: 最易理解的结果,命令:df -h 阅读全文

posted @ 2022-09-09 17:23 空明流光 阅读(90) 评论(0) 推荐(0) 编辑

2022年9月8日

javascript 动态添加 get set 方法

摘要: var temp = window; Object.defineProperty(temp, "myprop", { get: function () { return null; }, set: function (val) { window.alert("myprop:" +val); } }) 阅读全文

posted @ 2022-09-08 15:45 空明流光 阅读(240) 评论(0) 推荐(0) 编辑

2022年8月29日

java stream 模拟实现 linq selectmany 功能

摘要: Map<String, List<Tag>> map = new HashMap<>(); Stream<Tag> stream = map.values().stream().flatMap(List::stream); 如果本身不是一个map,可能想办法转成map,再进行转换 var class 阅读全文

posted @ 2022-08-29 20:42 空明流光 阅读(243) 评论(0) 推荐(0) 编辑

vue 获取汉字拼音

摘要: import { pinyin } from 'pinyin-pro'; // 获取带音调拼音 pinyin('汉语拼音'); // 'hàn yǔ pīn yīn' // 获取不带声调的拼音 pinyin('汉语拼音', { toneType: 'none' }); // 'han yu pin 阅读全文

posted @ 2022-08-29 16:06 空明流光 阅读(463) 评论(0) 推荐(0) 编辑

2022年8月23日

自动替换文件内容、文件名、文件夹名

摘要: void Main() { var root = @"c:\smartcampus-submodule\zhzp"; //var extensions = string.Join("," ,getFileExtensions(root)); //extensions.Dump(); replaceF 阅读全文

posted @ 2022-08-23 18:16 空明流光 阅读(127) 评论(0) 推荐(0) 编辑

2022年8月22日

psql 定义变量

摘要: DO $$ DECLARE myvar integer; BEGIN SELECT 5 INTO myvar; DROP TABLE IF EXISTS tmp_table; CREATE TABLE tmp_table AS SELECT * FROM yourtable WHERE id = m 阅读全文

posted @ 2022-08-22 15:38 空明流光 阅读(66) 评论(0) 推荐(0) 编辑

2022年8月18日

java stopwatch 使用

摘要: public class Program { public static void main(String[] args) throws InterruptedException { var sw = new StopWatch("模板测试"); sw.start("任务1"); Thread.sl 阅读全文

posted @ 2022-08-18 14:36 空明流光 阅读(1109) 评论(1) 推荐(0) 编辑

2022年8月15日

idea java maven 依赖项冲突问题排查方法

摘要: 在maven中右键单击需要排查的项目,按下图方法,打开依赖项可视化界面 在弹出界面中按Ctrl+F,搜索你要查看的依赖项,一般都会标注版本,有多个依赖项的自己判断吧 阅读全文

posted @ 2022-08-15 16:07 空明流光 阅读(647) 评论(0) 推荐(0) 编辑

2022年8月10日

c# .net core entity framework postgresql 使用

摘要: 环境:vs2022 .net6 工具:EFCore Power Tools v2.5.1074.vsix 右键单击项目,上下文件菜单选择 “EFCore工具” -> "反向工程",然后按照提示连接数据库,生成时 “实体路径” 填写成相对项目的根目录的相对路径,勾选 “在生成的代码中包含连接字符串” 阅读全文

posted @ 2022-08-10 10:36 空明流光 阅读(434) 评论(0) 推荐(0) 编辑

2022年8月8日

java mybatis LambdaQueryWrapper 与 QueryWrapper 混合使用

摘要: 虽然我很讨厌低效的mybatis,没办法,搞java只能用它,虽然不能跨表、不能跨库,查询都这么费劲,谁让它生态好呢 var query = new QueryWrapper<SocietyMember>() .select("*") .lambda(); query = query.in(Soci 阅读全文

posted @ 2022-08-08 11:23 空明流光 阅读(972) 评论(0) 推荐(0) 编辑

2022年8月5日

java 访问 postgresql

摘要: var driver = new org.postgresql.Driver(); var databaseProperties = new Properties(); databaseProperties.setProperty("user", databaseUsername); databas 阅读全文

posted @ 2022-08-05 14:31 空明流光 阅读(747) 评论(0) 推荐(0) 编辑

2022年8月2日

java springboot 方法返回 header, javascript 可访问

摘要: var servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); var response = servletRequestAttributes.getResp 阅读全文

posted @ 2022-08-02 10:40 空明流光 阅读(737) 评论(0) 推荐(0) 编辑

2022年7月29日

vue 实现自定义下拉多选框控件 Checkbox Select

摘要: 网上看了别人写的控件,bug太多,于是仿着自己写了一个 控件:checkableSelect.vue <template> <el-select v-bind="$attrs" v-model="selectedValue" multiple @change="changeSelect"> <el- 阅读全文

posted @ 2022-07-29 13:51 空明流光 阅读(4147) 评论(0) 推荐(0) 编辑

2022年7月20日

java stream group by 对结果 value 进行二次 map 示例

摘要: var result = societyMemberService.list(new LambdaQueryWrapper<SocietyMember>() .eq(SocietyMember::getSocietyId, societies.stream().map(x -> x.getId()) 阅读全文

posted @ 2022-07-20 11:41 空明流光 阅读(1674) 评论(0) 推荐(0) 编辑

2022年7月14日

java stream 多字段排序

摘要: 我觉得最实用的当属这种原形: var comparator= Comparator.comparing((SocietyMember x)->x.getSocietyId()) .thenComparing(x-> studentMap.get(x.getStudentUuid()).getMatc 阅读全文

posted @ 2022-07-14 18:08 空明流光 阅读(411) 评论(0) 推荐(0) 编辑

java mybatis 分页查询

摘要: Page<SignLog> page = new Page<SignLog>(pageIndex + 1, pageSize); Page<SignLog> pagedData = signLogService.page(page,new LambdaQueryWrapper<SignLog>() 阅读全文

posted @ 2022-07-14 14:33 空明流光 阅读(62) 评论(0) 推荐(0) 编辑

2022年7月13日

c# 计算文件的 md5 编码

摘要: using (FileStream fs = File.OpenRead(path)) { using (var crypto = MD5.Create()) { var md5Hash = crypto.ComputeHash(fs); return md5Hash; } } 阅读全文

posted @ 2022-07-13 17:41 空明流光 阅读(263) 评论(0) 推荐(0) 编辑

2022年7月11日

c# 以共享只读方式打开被其它应用占用的文件

摘要: IWorkbook workbook = null; using (var fs = new FileStream(filepath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { workbook = new HSSFWorkboo 阅读全文

posted @ 2022-07-11 17:04 空明流光 阅读(622) 评论(0) 推荐(0) 编辑

2022年7月5日

java spring 事务流程控制包装 transactionscope

摘要: java spring 中 @transactional 导致整个方法都是事务,无法提前 commit,为了缓存同步,需要在 commit 后清空缓存,就办不到了。 因 c# transactionscope 很方便,于是封装了一个线程安全的 java 版的 transactionscope imp 阅读全文

posted @ 2022-07-05 18:16 空明流光 阅读(163) 评论(0) 推荐(0) 编辑

2022年6月30日

asp.net webform 动态调试技巧

摘要: <script runat="server"> protected void TextBox1_TextChanged(object sender, EventArgs e) { Trace.Warn("TextBox1_TextChanged"); } </script> <script runa 阅读全文

posted @ 2022-06-30 10:19 空明流光 阅读(129) 评论(0) 推荐(0) 编辑

2022年6月28日

wpf 播放视频以及循环播放

摘要: url: <MediaElement Source="{Binding url}" /> public Uri url { get { return new Uri("http://vjs.zencdn.net/v/oceans.mp4", UriKind.Absolute) ; } } 文件路径: 阅读全文

posted @ 2022-06-28 16:34 空明流光 阅读(653) 评论(0) 推荐(0) 编辑

wpf 中的 repeater ------- ItemsControl

摘要: <ItemsControl ItemsSource="{Binding Path=imageNames}" Padding="10"> <ItemsControl.ItemTemplate> <DataTemplate> <TextBlock Text="{Binding}" /> </DataTe 阅读全文

posted @ 2022-06-28 15:22 空明流光 阅读(405) 评论(0) 推荐(0) 编辑

2022年6月22日

wpf 布局要点备忘

摘要: 通用: VerticalContentAlignment="Stretch" :内部子控件会垂直100%高度 HorizontalContentAlignment="Stretch" :内部子控件会水平100%宽度 HorizontalAlignment="Left" :设置之后会左对齐,水平方向不 阅读全文

posted @ 2022-06-22 13:53 空明流光 阅读(141) 评论(0) 推荐(0) 编辑

wpf xaml 中的计算绑定不用convert

摘要: Key features and restrictions: One or many source properties in Path with many available operators: description <Label Content="{c:Binding A*0.5+(B.Ne 阅读全文

posted @ 2022-06-22 11:14 空明流光 阅读(453) 评论(0) 推荐(0) 编辑

2022年6月21日

wpf listbox 无选中背景,及纵向横向排列完整实例

摘要: 建议使用ItemsControl替代,ListBox限制太多<TabItem Header="我的Tab页" Name="tabItem1"> <TabItem.Resources> <SolidColorBrush x:Key="Item.MouseOver.Background" Color=" 阅读全文

posted @ 2022-06-21 19:01 空明流光 阅读(423) 评论(0) 推荐(0) 编辑

WPF ListBox横向排列自动换行显示表单

摘要: 建议使用ItemsControl替代,ListBox限制太多 如果只是单纯的让ListBox可以横向配列,这样很简单,只需要更改ListBox的ItemsPanel模板就可以,例如: <ListBox><ListBox.ItemsPanel><ItemsPanelTemplate><WrapPane 阅读全文

posted @ 2022-06-21 17:15 空明流光 阅读(1570) 评论(0) 推荐(0) 编辑

2022年5月28日

table 固定表头备忘

摘要: 方案1:使用一个table实现 优点:列可以自适应,无论如何也不会出现对不齐的风险 缺点:滚动条出现在了header区域,美中不足 使用了vue语法,但很容易看懂,自己改成纯HTML也可以 <table class="table-fixedHeader" cellpadding="0" cellsp 阅读全文

posted @ 2022-05-28 10:00 空明流光 阅读(459) 评论(0) 推荐(0) 编辑

2022年5月24日

c++ 数字类型转string

摘要: #include <string> using namespace std; std::to_string(x) 几乎所有的数字类型都可以转 阅读全文

posted @ 2022-05-24 20:34 空明流光 阅读(405) 评论(0) 推荐(0) 编辑

2022年5月20日

java: You aren’t using a compiler supported by lombok, so lombok will not work and has been disabled

摘要: idea 报错:java: You aren’t using a compiler supported by lombok, so lombok will not work and has been disabled.Your processor is: com.sun.proxy.$Proxy27 阅读全文

posted @ 2022-05-20 16:03 空明流光 阅读(4029) 评论(1) 推荐(1) 编辑

上一页 1 2 3 4 5 6 7 8 9 ··· 18 下一页

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示