上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 259 下一页
摘要: @safe存在根本性设计缺陷,而DIP1000用来解决它.这不仅是为了新模型,而是要修复现有模型漏洞.如下在无DIP时编译,但DIP1000可检测到: @safe ref int oops1() { int[5] arr; int[] slice = arr[]; return slice[2]; 阅读全文
posted @ 2022-05-28 09:06 zjh6 阅读(16) 评论(0) 推荐(0)
摘要: 升级vim 每次升级,都是累,可不升级又不行.升级要用vim官网的稳定版,否则,是不行的.要出错. python要用py32里面的dll,要求名字叫python39.dll,然后放进E:\vim\vim82目录里面. _viminfo也给你覆盖了,我说怎么速度变快了.覆盖了都不讲一声. 什么插件都不 阅读全文
posted @ 2022-05-26 20:35 zjh6 阅读(23) 评论(0) 推荐(0)
摘要: #If WinActive("ahk_class CabinetWClass")&&(!A_CaretX) n::send {esc}^+{tab} m::send {esc}^{tab} h::send {left} j::send {down} k::send {up} l::send {rig 阅读全文
posted @ 2022-05-25 17:18 zjh6 阅读(156) 评论(0) 推荐(0)
摘要: ;要一个:,还要一个%a%. H(){ GetKeyState,state,LButton,P; return A_Cursor == IBeam && state == D } ;判断是否是输入状态. Loop{ m:=H() ToolTip,%m% %A_CaretX%+200 %A_Caret 阅读全文
posted @ 2022-05-25 16:04 zjh6 阅读(89) 评论(0) 推荐(0)
摘要: // module a: alias F = extern (C) void function(string param); F fun = someLibLoad!F("name"); assert(fun !is null); // 编译,且运行时工作. // module b: import 阅读全文
posted @ 2022-05-25 14:48 zjh6 阅读(16) 评论(0) 推荐(0)
摘要: import std.stdio; void main()@safe{ void delegate()@safe[] dgList; foreach(i; [1, 2, 3]) { immutable b = i; dgList ~= { writeln(b); };//应该不同. } foreac 阅读全文
posted @ 2022-05-25 09:11 zjh6 阅读(13) 评论(0) 推荐(0)
摘要: class C { void fun() { throw new Exception("oops"); } } class D : C { override void fun() nothrow { } } void main() { D d = new D; C c = new D; d.fun( 阅读全文
posted @ 2022-05-25 08:59 zjh6 阅读(13) 评论(0) 推荐(0)
摘要: extern(C++) class foo { void func() { } } extern(C++) final class bar : foo { override void func() const { } } class foo { public: virtual void func() 阅读全文
posted @ 2022-05-25 08:41 zjh6 阅读(14) 评论(0) 推荐(0)
摘要: import std.stdio: writeln; void foo(uint x) in (x >= 0) {//删除该前条件,因为x为`正`总是`>=0`. writeln(x); } void foo(ushort x) in (x >= 0) { writeln(x); } void ma 阅读全文
posted @ 2022-05-25 08:29 zjh6 阅读(19) 评论(0) 推荐(0)
摘要: struct S { string[] s; } auto foo(string[] s...) //不能用`中`标记`s` { return S(s); //改为 return S(s.dup); } void main() { import std.stdio: writeln; writeln 阅读全文
posted @ 2022-05-25 08:16 zjh6 阅读(18) 评论(0) 推荐(0)
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 259 下一页