创建android app,编译后生成apk,手机安装后无法运行,弹出以下错误:JS errorreport errorassets/egret-game/libs/core/egret/context/devices/nativedevicecontext.js:203:egret_native....
分类:
移动开发 时间:
2014-09-22 23:47:03
阅读次数:
735
如果指针写数据失败, 比如
*p = 1
可以进一步看, 究竟为何失败
可以用察看 /proc/{pid}/maps, 但往往这个时候,程序已经crash 了,就找不到这个文件。
那就只能在crash 之前code 插入代码看了。
写一个copyfile 的函数
static void copyfile(char * rfile, char * wfile) {
int rfd...
分类:
其他好文 时间:
2014-09-22 19:47:53
阅读次数:
153
The kth great number
Xiao Ming and Xiao Bao are playing a simple Numbers game. In a round Xiao Ming can choose to write down a number, or ask Xiao Bao what the kth great number is. Because the numb...
分类:
其他好文 时间:
2014-09-22 19:12:13
阅读次数:
197
What do Leonard Nimoy, Stana Katic, and RobertDowney Jr. have in common? They all have a Bacon number of 2. The Six Degreesof Kevin Bacon, a game crea...
分类:
其他好文 时间:
2014-09-22 06:43:22
阅读次数:
181
火焰的图片我是没找到,找到了几张雷电的,就在d3dcoder.net 的directx10那本书代码下载的Bolt Animations for Chapter 9 里面
里面很多张图片,由于c++也是初学,一时来不及弄字符串拼接的函数。 只能定义很多个帧bmp 然后一个一个载入了
具体代码是建立在那个"crate" 例子工程, 就是那个木箱子的代码基础上。
添加的代码如下:
I...
分类:
其他好文 时间:
2014-09-22 00:59:31
阅读次数:
258
题目:给你一个1000*1000的01矩阵,求里面全是1的最大矩形面积。
分析:dp,单调队列。zju1985升级版 ^_^ 继上次那道题想了一天。
本来想用O(N^2)的最大正方形求解,想错了今天仔细一看,其实这道题目就是二维的最大矩形;
我们将问题分解成最大矩形,即求解以k行为底边的图形中的最大矩形,然后合并,求最大的矩形;
...
分类:
其他好文 时间:
2014-09-21 23:55:21
阅读次数:
349
http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3§ionid=1&problemid=10 1 #include 2 #include 3 #include 4 #define maxn 300000 5 usi...
分类:
其他好文 时间:
2014-09-21 22:04:01
阅读次数:
303
Tree Recovery
Time Limit: 2 Seconds Memory Limit: 65536 KB
Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with ...
分类:
其他好文 时间:
2014-09-21 21:55:21
阅读次数:
204
CodeForces 468A. 24 Game(数学构造)...
分类:
其他好文 时间:
2014-09-21 19:40:01
阅读次数:
341
雾 : 说白了就是一层有颜色的(一般是白色,灰色) 蒙蒙的感觉 混在光线里面。 不管是白天还是黑天。
龙书里面是这样实现的:
1. 给雾定义一个颜色 float3 gFogColor={0.7f,0.7f,0.7f};
2. 然后呢在顶点着色器里面计算出 顶点级别的雾化需要的颜色加成比例
加成比例: 意思是当距离摄像机,就是你的眼睛越远,雾的浓度越大,就是颜色越深。 根据这个得出一个(0...
分类:
其他好文 时间:
2014-09-21 19:14:01
阅读次数:
378