自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(0)
  • 资源 (12)
  • 收藏
  • 关注

空空如也

vscode快捷键速查表

vscode 快捷键windows版本 Ctrl+Shift+P, F1 Show Command Palette Ctrl+P Quick Open, Go to File… Ctrl+Shift+N New window/instance Ctrl+Shift+W Close window/instance Ctrl+, User Settings Ctrl+K Ctrl+S Keyboard Shortcuts Basic editing Ctrl+X Cut line (empty selection) Ctrl+C Copy line (empty selection) Alt+ ↑ / ↓ Move line up/down Shift+Alt + ↓ / ↑ Copy line up/down Ctrl+Shift+K Delete line Ctrl+Enter Insert line below Ctrl+Shift+Enter Insert line above Ctrl+Shift+\ Jump to matching bracket Ctrl+] / [ Indent/outdent line Home / End Go to beginning/end of line Ctrl+Home Go to beginning of file Ctrl+End Go to end of file Ctrl+↑ / ↓ Scroll line up/down Alt+PgUp / PgDn Scroll page up/down Ctrl+Shift+[ Fold (collapse) region Ctrl+Shift+] Unfold (uncollapse) region Ctrl+K Ctrl+[ Fold (collapse) all subregions Ctrl+K Ctrl+] Unfold (uncollapse) all subregions Ctrl+K Ctrl+0 Fold (collapse) all regions Ctrl+K Ctrl+J Unfold (uncollapse) all regions Ctrl+K Ctrl+C Add line comment Ctrl+K Ctrl+U Remove line comment Ctrl+/ Toggle line comment Shift+Alt+A Toggle block comment Alt+Z Toggle word wrap

2020-06-30

gamma函数C#

gamma函数 阶乘的推广 小数的阶层 // 参考数据 // gamma(0.1)=9.513507698668731836292487177265402192550578626088377343050 // gamma(0.2)=4.590843711998803053204758275929152003434109998293403017788 // gamma(0.3)=2.991568987687590628312516515904917791112806024921715112744 // gamma(0.4)=2.218159543757688223059054021907679450770566501771469582241 // gamma(0.5)=1.772453850905516027298167483341145182797549456122387128213 // gamma(0.6)=1.489192248812817102394333388321342281320599038759924735338 // gamma(0.7)=1.298055332647557785681171179152811617784141170553946247921 // gamma(0.8)=1.164229713725303373636320938268458693141961768891187752984 // gamma(0.9)=1.068628702119319354897305335694480778169838785060973179049 // gamma(1.0)=1 // gamma(0.227814641242585501358616865)=4 public static void Main(string[] args) { Console.WriteLine("Γ(0.22781464)={0:F3}", gamma(.22781464F)); Console.WriteLine("Γ(0.22781464)={0:F6}", gamma(.22781464D)); }

2019-02-16

PowerShellServer 2016

PowerShellServer2016 安装后可直接运行 # This example demonstrates how to generate an RSS feed from a call to the Get-ChildItem cmdlet (dir). # Check for user input $dir = $request['path'] if ( $dir -eq $null ) { $dir = 'c:\' } #Set the feed title and other basic feed attributes set-feedattr 'rss:title' "Directory listing for: $dir" ls $dir | %{ @{ 'rss:pubDate' = $_.LastWriteTime.ToString('R'); 'rss:title' = $_.Name; 'rss:description' = "Full Path: $($_.FullName)"; 'fullname' = $_.FullName; 'size' = $_.Length; 'directory' = $_.PSIsContainer; 'Mode' = $_.Mode; } }

2018-12-03

Boost程序库完全开发指南:深入C++_准_标准库 第3版 中文

Boost程序库完全开发指南:深入C++_准_标准库 第3版 中文

2018-11-01

生成验证码

一个常用的生成验证码的插件 public void PrintBmp(string filePath) { var bitmap = new Bitmap(filePath); var text = "\u001b3\0"; var array = new byte[text.Length]; int num; for (var i = 0; i < text.Length; i = num + 1) { array[i] = (byte) text[i]; num = i; } OutputByte(array); array[0] = 0; array[1] = 0; array[2] = 0; var array2 = new byte[5]; array2[0] = 27; array2[1] = 42; var array3 = array2; array3[2] = 33; array3[3] = (byte) (bitmap.Width % 256); array3[4] = (byte) (bitmap.Width / 256); for (var j = 0; j < bitmap.Height / 24 + 1; j = num + 1) { OutputByte(array3); for (var k = 0; k < bitmap.Width; k = num + 1) { for (var l = 0; l < 24; l = num + 1) { var flag = j * 24 + l < bitmap.Height; if (flag) { var flag2 = bitmap.GetPixel(k, j * 24 + l).R == 0; if (flag2) { var array4 = array; var num2 = l / 8; array4[num2] += (byte) (128 >> (l % 8)); } } num = l; } OutputByte(array); array[0] = 0; array[1] = 0; array[2] = 0; num = k; } byte[] mybyte = { 10 }; OutputByte(mybyte); num = j; } OutputStr("\n\n"); } }

2018-09-05

hello world 的 N 种写法

hello world 的 N 种写法 包含 批处理 汇编 vbs js c++ c# java boo 等近100种语言的HelloWorld

2018-08-06

cocos的入门级别项目

cocos的入门项目已经编译通过,仅供参考。。 已经预编译可加快编译速度

2018-08-06

成员函数用于回调函数

如qsort 等函数需要函数指针才能回调 用此函数库可以将成员函数指针转为普通函数指针 测试代码如下 #include <stdio.h> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <math.h> using cmpfunc = int(__cdecl*)(const void*, const void*); using DebugArrayFunc = void(__stdcall *)(std::string &out;); #include "thunk.h" class MySort { public: int Rule; MySort(int a):Rule(a){} // 回调函数 template<typename T> int __cdecl sort(const void* a, const void* b); }; class Test { public: std::vector<int> mm; void Sort(int (*comp)(const void *,const void *)) { return qsort(mm._Myfirst,mm.size(),sizeof(int),comp); } void Entry(DebugArrayFunc func) { std::string string; cmpfunc comp; TemplateThunk athunk; // 正序 comp = (cmpfunc)athunk.GetCall(&MySort;::sort<int>, &MySort;(0)); Sort(comp); func(string); std::cout << string << std::endl; // 逆序 comp = (cmpfunc)athunk.GetCall(&MySort;::sort<int>, &MySort;(1)); Sort(comp); func(string); std::cout << string << std::endl; } }; class CallBack { public: std::vector<int> *pthis; CallBack(std::vector<int> *ff):pthis(ff){} void __stdcall DebugArray(std::string &out;) { char buff[100]; char *aa = buff; for each (auto a in *pthis) { aa += sprintf(aa, "%d ", a); } out.assign(buff); } }; void main() { TemplateThunk athunk; Test tt; tt.mm = { 1, 3, 7, 8, 5, 6, 4, 2, 3, 10 }; tt.Entry(athunk.GetCall(&CallBack;::DebugArray,&CallBack;(&tt;.mm))); } template <typename T> int __cdecl MySort::sort(const void* a, const void* b) { return Rule ? *static_cast<const T*>(a)-*static_cast<const T*>(b) : *static_cast<const T*>(b)-*static_cast<const T*>(a); }

2018-08-03

lua反编译工具

lua反编译工具包括lua 5.1 与 lua 5.2 包括lua.exe luac.exe luadec.exe 等 可以用此工具加密lua为luac 也可以解密luac为lua

2018-05-10

luac解密工具

1代码中此处可能需要修改vcvarsall.bat文件位置 call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat" amd64 解密文件所在路径尽量不要出现中文 2只有用luac加密的资源才能解密 3需要vs环境自带java环境

2018-05-10

cocos2d 下载文件

cocos2d 利用thunk技术下载文件

2016-12-03

去除C++源文件注释

完美去除C++注释 包括 行注释 与 块注释

2015-10-19

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除