摘要: new BrowserWindow({ width:800, height:800, webPreferences:{ nodeIntegration:true, //表示node所有功能都可以在渲染进程中使用 contextIsolation:false, //解决Uncaught Referen 阅读全文
posted @ 2023-01-11 22:44 tetrachloroethylene 阅读(18) 评论(0) 推荐(0) 编辑
摘要: { "name": "ele", "version": "1.0.0", "main": "main.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": 阅读全文
posted @ 2023-01-11 20:23 tetrachloroethylene 阅读(22) 评论(0) 推荐(0) 编辑
摘要: index.html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" 阅读全文
posted @ 2023-01-11 19:25 tetrachloroethylene 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 安装Node.js 新建文件夹,如e:/ele VSCode-打开文件夹-e:/ele,在终端中依次键入 npm init //此时生成package.json npm install electron --save-dec //非全局安装,全局使用-g, 很慢,要等 npx electron -v 阅读全文
posted @ 2023-01-11 18:58 tetrachloroethylene 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #define prt(s, format)(printf("您按下的是:%"#format"\n", s)) const char* keys[] = { "F1", "F2", "F3", "F4", "F5" }; //事件循环 SDL_Event e; bool quit = false; 阅读全文
posted @ 2022-11-21 17:31 tetrachloroethylene 阅读(43) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include "include/SDL/SDL.h" //主窗口 SDL_Window* gWindow = NULL; //主窗口内含的主表面 SDL_Surface* gScreenSurface = NULL; //图片表面 SDL_Surface* 阅读全文
posted @ 2022-11-21 16:26 tetrachloroethylene 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 饿汉模式:上来不管三七二十一直接创建对象再说。 饿汉模式创建方式: 1.先创建一个私有的构造函数(防止其它地方直接实例化) 2.定义私有变量 3.提供公共的获取实例的方法 public class Single { //饿汉模式 //先创建一个表示单例的类 static class Singleto 阅读全文
posted @ 2022-11-21 13:04 tetrachloroethylene 阅读(268) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define A(x, y)((x) * (y)) #define B(x, y)(x * y) void main() { //非表达式参数 printf("%d\n", A(11, 3)); //33 (11)*3 printf("%d\n", B(11, 阅读全文
posted @ 2022-11-18 11:27 tetrachloroethylene 阅读(920) 评论(0) 推荐(0) 编辑
摘要: tuple的应用场景: 1.多参和多返回值 #include <iostream> #include <tuple> using namespace std; tuple<string, int32_t, int64_t, float> f() { string s("string"); int32 阅读全文
posted @ 2022-11-17 11:30 tetrachloroethylene 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 练习题2.1 A.将0x8F7A93转换为二进制 B.将1011011110011100转换为十六进制 C.将0xC4E5D转换为二进制 D.将1101011011011111100110转换为十六进制 二进制、十进制和十六进制对应表: 0 1 2 3 4 5 6 7 8 9 A B C D E F 阅读全文
posted @ 2022-11-04 11:34 tetrachloroethylene 阅读(15) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示