上一页 1 ··· 107 108 109 110 111 112 113 114 115 ··· 259 下一页
摘要: 原文 问题是当前由胶合层检查-betterC,跳过(通常是根模块外声明,无-i的)未生成代码声明. @betterC不是语言/编译器功能,而是用户注解. //a0.d //用auto而不是int[]来在函数体中强制语义 auto foo(int i) { return [i]; } //动与整[]有 阅读全文
posted @ 2021-12-09 09:47 zjh6 阅读(15) 评论(0) 推荐(0)
摘要: import std.stdio : writeln; import std.algorithm : joiner; import std.array : split; bool isWhite(dchar c) @safe pure nothrow @nogc { return c == ' ' 阅读全文
posted @ 2021-12-09 09:10 zjh6 阅读(10) 评论(0) 推荐(0)
摘要: 有时,替换时,要区分/不区分,这时,就要加上标志了. i表示不区分,I表示区分大小写. 记着,免得搞忘了. 阅读全文
posted @ 2021-12-08 21:33 zjh6 阅读(93) 评论(0) 推荐(0)
摘要: //原文:http://purecpp.org/detail?id=2261, //线程池二 //抽取队列代码 #指示 一次 #包含<条件变量> #包含<互斥锁> #包含<队列> //其他线程池可复用它 元<型名 T>类 队列{//可压任意T类型 公: 空 压(常 T&项){ { 域锁 锁(互斥锁) 阅读全文
posted @ 2021-12-08 20:18 zjh6 阅读(17) 评论(0) 推荐(0)
摘要: 这里的chrome包含衍生品,如360极速等. 有时,感觉chrome,明明就打开几个书签,却感觉非常慢. 此时,很明显,人家做得很差的.这可能是在收集垃圾,或者什么的. 用久了浏览器,就感觉速度很慢,此时,我们就要重启.不折腾. 什么大厂出口,都是吹牛. 阅读全文
posted @ 2021-12-08 19:47 zjh6 阅读(16) 评论(0) 推荐(0)
摘要: //https://forum.dlang.org/post/sopoeb$1098$1@digitalmars.com import std.stdio, std.traits, core.lifetime; struct CtDelegate(R,T...){ void* ctx; R func 阅读全文
posted @ 2021-12-08 19:24 zjh6 阅读(15) 评论(0) 推荐(0)
摘要: struct FunctionObject { string s; this(string s) { this.s = s; } auto opCall() { import std.stdio : writeln; s.writeln; } } struct A { FunctionObject[ 阅读全文
posted @ 2021-12-08 11:10 zjh6 阅读(13) 评论(0) 推荐(0)
摘要: 原文 class S {} class A:S {} class Visitor { void visit(S s) {} void visit(A a) {} } class Derived : Visitor { } void main() { auto v = new Derived; v.v 阅读全文
posted @ 2021-12-08 09:48 zjh6 阅读(16) 评论(0) 推荐(0)
摘要: 使用sandwich删/**/内容 "$" { return 0; /* a b c */ } 把光标放在abc处,然后dif*,这里要点是先d确定大操作,再想i/a确定内/外,再用f+符来确定具体包围符. 阅读全文
posted @ 2021-12-07 17:12 zjh6 阅读(13) 评论(0) 推荐(0)
摘要: fun! Zjc(c,j='a') "置寄存器,默认为置a.还有很多寄存器 let ml='let @'.a:j.'=a:c' exe ml endf fun! Qhjt() "切换剪贴,切换至剪贴板,只能是用a寄存器. let @+=@a "如何想办法映射更多. endf 使用方法,先用上个函数设 阅读全文
posted @ 2021-12-07 15:03 zjh6 阅读(20) 评论(0) 推荐(0)
上一页 1 ··· 107 108 109 110 111 112 113 114 115 ··· 259 下一页