摘要: 在模块定义local function,使用local function时,需要在使用前就定义,不能通过self:localfunction 或者self.locakfunction 因为是模块内的局部方法 结果: 关于module函数详解:lua module 函数_最远有多远的博客-CSDN博客 阅读全文
posted @ 2022-09-16 18:48 darkif 阅读(311) 评论(0) 推荐(0) 编辑
摘要: using System; using System.IO; using System.Text; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.OpenSsl; using Org.BouncyCastle.Security; usin 阅读全文
posted @ 2022-07-21 17:51 darkif 阅读(227) 评论(0) 推荐(0) 编辑
摘要: boost教程:http://zh.highscore.de/cpp/boost/ 改写7.4网络编程案例,服务器支持连接多个客户端 服务端: #include <iostream> #include <string> #include <boost/asio.hpp> /// <summary> 阅读全文
posted @ 2021-12-15 17:18 darkif 阅读(284) 评论(0) 推荐(0) 编辑
摘要: 个推消息推送主要步骤:1.获取鉴权token 2.发送推送消息 1.获取鉴权token(会过期,需要间隔时间获取一次): tokenUrl = "https://restapi.getui.com/v2/" + appId + "/auth"; private string GetToken() { 阅读全文
posted @ 2021-08-24 13:52 darkif 阅读(841) 评论(0) 推荐(0) 编辑
摘要: 记一次接入谷歌广告验证 官方文档:https://developers.google.cn/admob/android/rewarded-video-ssv 需要httpserver进行验证,项目里有httpserver,因此通过将服务端ip端口绑定域名的方法进行验证回调。 验证回调:在官网添加应用 阅读全文
posted @ 2021-05-24 15:10 darkif 阅读(647) 评论(0) 推荐(0) 编辑
摘要: string a = "hello}"; string s = string.Format($"{a}"); 上面这种情况,会报格式错误,会把hello}中的}当做一个字符串结束; 结果: 修改: string a = "hello}"; string s = string.Format("{0}" 阅读全文
posted @ 2021-04-21 20:52 darkif 阅读(390) 评论(0) 推荐(0) 编辑
摘要: Thread.Join()在MSDN中的解释:Blocks the calling thread until a thread terminates 阻塞calling thread,直到当前join的线程完成 什么是calling thread:开启新线程所在的线程 例如:在main函数创建一个线 阅读全文
posted @ 2021-01-13 11:15 darkif 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 实现方法: private static void RunBat(string program, string parm) { try { Process proc = new Process(); proc.StartInfo.FileName = program; proc.StartInfo. 阅读全文
posted @ 2021-01-06 20:28 darkif 阅读(1190) 评论(0) 推荐(0) 编辑
摘要: 前台线程 会随进程一起结束 不管是否完成,后台线程需要执行完毕,进程才能结束 例子: class Program { static void Main(string[] args) { Thread t = new Thread(Run); //t.IsBackground = true; //前台 阅读全文
posted @ 2020-12-30 11:34 darkif 阅读(135) 评论(0) 推荐(0) 编辑
摘要: class RSACryptoItem { public RSACryptoServiceProvider Provider; public List<byte> PubKeyBytes; } public class RSAManager { private RSACryptoItem item; 阅读全文
posted @ 2020-12-23 16:26 darkif 阅读(1788) 评论(0) 推荐(0) 编辑