如何创建一个精灵? 1. 使用一张特定的图像如创建 auto mySprite = Sprite::create("mySprite.png"); 注意:蓝色部分是背景。 2. 使用矩形 auto mySprite = Sprite::create("mySprite.png", Rect(0, 0 ...
分类:
其他好文 时间:
2020-03-04 19:23:13
阅读次数:
77
1、Ado.net Ado.net是一组由微软提供的使用C#操作数据库的类库 2、连接 首先引入: using System.Data.SqlClient; 需要使用连接字符串进行连接 using System; using System.Data.SqlClient; using System.T ...
分类:
数据库 时间:
2020-03-04 16:22:18
阅读次数:
89
pyinstaller打包一个exe动辄几十M几百M (特别是import pandas以后) 知乎上居然没有人po这方面的”知识“ 查了很多关于reduce pyinstaller打包出exe大小的方法 列举如下 玄学解法1 去除不必要的库 当我们用cmd/powershell 输入这一段神秘代码 ...
分类:
编程语言 时间:
2020-03-04 14:59:11
阅读次数:
349
1.自定义MessageCollection类: 1 each(function ($message) { 12 $message->markAsRead(); 13 }); 14 } 15 } 16 17 MessageCollection.php2.向Message中添加一个newCollect... ...
分类:
Web程序 时间:
2020-03-04 14:45:41
阅读次数:
118
一、编写第一个REST接口: /** * Spring Boot HelloWorld案例 * * Created by bysocket on 16/4/26. */@RestControllerpublic class HelloWorldController { @Autowired Envi ...
分类:
编程语言 时间:
2020-03-04 14:32:02
阅读次数:
69
Spring Boot版本:2.2.4 每个springboot的启动类都有一个@SpringBootApplication注解 import org.springframework.boot.SpringApplication; import org.springframework.boot.au ...
分类:
编程语言 时间:
2020-03-04 00:09:33
阅读次数:
92
本文阐述C++相关的链表的定义: 首先线来了解一下typedef 关于typedef的介绍: 先从初级的开始: 整形 typedef int x; // 定义了一个名为x的int类型 结构体 typedef struct { char c; } s; // 定义名为s的struct类型 指针 typ ...
分类:
编程语言 时间:
2020-03-03 22:39:52
阅读次数:
89
最近使用了epoll发现。在epoll_create返回的fd,被配置FD_CLOEXEC,是不起作用的。子进程可以继续使用它。并可以继续使用epoll_ctl增加侦听文件句柄。而父进程可以收到此句柄的读写事件。但是父进程由于没有此句柄,所以读失败。在高版本的epoll_create1(flags),此flags可以EPOLL_CLOEXEC,完成CLOEXEC的功能。——————————————
分类:
其他好文 时间:
2020-03-03 17:36:12
阅读次数:
79
获取两个路径之间的相对路径是一个很常见的问题,在Linux中怎么实现呢? 为了进行隔离,整个项目是用chroot跑的,有一次为了在chroot下建一个软链接,又不能用绝对路径,想自动计算一个路径相对于另一个路径的相对路径,怎么办呢? 经过一番搜索后发现,Linux中realpath和ln都有这个功能 ...
分类:
系统相关 时间:
2020-03-03 10:35:06
阅读次数:
75
开启倒计时,直接保存到vuex中,且存储到本地持久化 // state.js const runTime = localStorage.getItem('time'); paymentRunTime:runTime // mutations.js TimeReduction(state) { thi ...
分类:
其他好文 时间:
2020-03-03 09:20:04
阅读次数:
190