摘要: 两种情况:用户模式和内核模式 一 用户模式 相当于运行自己写的程序,在里面设置线程同步 有volatile和interlocked两者方式 1 volatile static bool _stop; public static void Run() {//主线程 Task.Run(() => {// 阅读全文
posted @ 2020-04-28 15:51 冲天小肥牛 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 解决方案: (1) select2 加入 dropdownParent 属性,设置父元素modal (2) css设置 让select2的选择弹出层位于最上层,否则将被modal遮挡住 转自:https://www.cnblogs.com/waw/p/8400527.html 阅读全文
posted @ 2019-11-05 16:34 冲天小肥牛 阅读(1923) 评论(0) 推荐(0) 编辑
摘要: def hello(name): return 'hello, '+name print(hello('jack')) def fibs(num): '计算斐波那契数'#文档字符串 a=[0,1] for i in range(int(num)-2): a.append(a[-1]+a[-2]) return a print(fibs(5... 阅读全文
posted @ 2019-07-05 00:44 冲天小肥牛 阅读(161) 评论(0) 推荐(0) 编辑
摘要: >>> print('name')#只有一个参数 name >>> print('name','age')#空格拼接 name age >>> print('hi'+',','tom')#想某个值没有空格相隔 hi, tom >>> print('name','age','home',sep='_')#指定分隔符 name_age_home >>> 阅读全文
posted @ 2019-07-04 00:29 冲天小肥牛 阅读(218) 评论(0) 推荐(0) 编辑
摘要: >>> f="hi,%a is a %a" #%后面只能跟同一个值 >>> v=('mac','dog') >>> f % v #最原始 "hi,'mac' is a 'dog'" >>> from string import Template >>> tmp=Template('hi, $who is a $what')#引用模块 >>> tmp.substitute 阅读全文
posted @ 2019-07-03 00:32 冲天小肥牛 阅读(278) 评论(0) 推荐(0) 编辑
摘要: python 1 字符串: 1.1 三个单引号:'''一串长的字符串(可直接换行)''' 1.2 反斜杠 \:可换行。 如: 字符串1\ 字符串2 表示:字符串1字符串2 数和表达式 求结果: 1 / 2=0.5 求整数部分:1 // 2 = 0 5.0 // 2.4 =2.0 求余数:... 阅读全文
posted @ 2019-07-01 23:34 冲天小肥牛 阅读(189) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2019-06-14 10:37 冲天小肥牛 阅读(966) 评论(0) 推荐(0) 编辑
摘要: 效果: 点击后不得到焦点且不影响当前焦点所在位置,类似系统计算器中按钮的效果。 可以实现无焦点的按钮、复选框、单选框等控件。 阅读全文
posted @ 2019-03-06 10:01 冲天小肥牛 阅读(1437) 评论(1) 推荐(1) 编辑
摘要: using System; using System.Collections.Generic; using System.Runtime.InteropServices; namespace Print { class PrintStatus { public static int oldPrintId = 0; [StructLayout(L... 阅读全文
posted @ 2019-03-06 09:46 冲天小肥牛 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 1 class People 2 { 3 public string A { get; set; } 4 public string B { get; set; } 5 public string C { get; set; } 6 7 8 public override bool Equals(o 阅读全文
posted @ 2018-11-26 11:51 冲天小肥牛 阅读(531) 评论(0) 推荐(0) 编辑