- 博客(12)
- 收藏
- 关注
原创 C#基本异步操作
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Numerics;using System.Text;using System.Threadin
2015-07-28 16:28:17
781
原创 C#文件操作大全
最近重新学习了C#,将零碎的知识系统化。今天学习了文件操作的知识——将各种功能集成到一个样例程序里面。工程链接:http://pan.baidu.com/s/1sjr82Ah全部代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using Syste
2015-07-28 16:23:19
516
原创 C++调用最新版Lua5.3
开始入手Lua游戏开发,第一个问题便是在VS2013中搭建C++调用Lua的开发环境。百度了很多博文,发现都过时了(Lua版本偏低),因此特写本文,介绍Lua5.3.0的搭建。总体步骤:1.将Lua源文件编译为C语言静态库。2.在C++里调用Lua文件的Demo编写。第一部分:将Lua源文件编译为C语言静态库——建立如下工程:将l
2015-05-03 02:36:14
2340
原创 自测题V——Shuffling Machine(20)
模拟洗牌程序,按照给定的次序,洗牌N遍。寻找规律可以发现,我们只需要保存给定次序,使用tmpOrder[i]=order[tmpOrder[i]];进行嵌套即可。由于粗心搞错次序,提交了6次才Pass.....#include #include #define CARDNUM 54using namespace std;int main(){ int n, order[
2015-04-26 16:31:40
374
原创 自测题IV——Have Fun with Numbers (20)
注意char与int的ASCII转换方法即可。算法思路:创建一个统计数组啊count[9][2]={{1,0},{2,0},.......},其中第一个下标存放数字,第二个下标存放对应数字出现的次数。输入时,读取数字到string类型的num中,然后遍历num,每一个数字在统计数组里对应+1,得到num的统计数组。二倍处理,注意进位。遍历,每一个数字在统计数组里对应-1,得到num
2015-04-26 15:11:09
534
原创 自测题III——数组元素循环右移问题 (20)
无需数组真正的排序,直接输出即可。#include using namespace std;int main(){ int n, m,a[100]; cin >> n >> m; m = m%n; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = n-m; i < n; i++) cout << a[i]<<"
2015-04-25 19:48:48
344
原创 自测题II—— 素数对猜想 (20)
前5个测试可以通过,最后一个无法通过.....正在排查原因。#include using namespace std;int main(){ int n,m=3,count=0; cin >> n; int *a = new int[n]; a[0] = 2, a[1] = 3, a[2] = 5; for (int i = 5 ; i <= n; i += 2) if
2015-04-23 21:49:00
312
原创 自测题I——打印沙漏(20)
#include using namespace std;int main(){ int n, i = 1, q = 1; char c; cin >> n >> c; if (n <= 0){ cout << 0; return 0; } while (2 * q*q - 1<= n && ++q); i = 2 * q - 3; for (int j = 1; j <=
2015-04-23 21:47:33
390
原创 Unity之megaFierstext翻书插件控制代码分析
本文主要分析了megaFierstext翻页插件的控制代码,然后在分析的基础上进行了一些个性化的改动,实现了一键翻页的效果。
2015-04-18 10:58:47
2722
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人