Cocos2d-x 3.5的lua项目生成后,变成了MVC模式,并且,加入了一个全局变量的检测功能。也就是说,你不小心用了全局变量,他会提示你出错! 比如 local temp = 1 temp = 10 ...
分类:
其他好文 时间:
2017-04-03 21:15:16
阅读次数:
178
基本数据类型: 数字 字符串 布尔值 列表 元祖 字典 所有对象所具备的功能都保存在相应的类中。 查看对象的类,或对象所具备的功能。 1、通过type()查看 temp = "alex"t = type(temp) 2、整体查看dir()快速列举 temp = "alex"t = type(temp ...
分类:
编程语言 时间:
2017-04-03 18:46:33
阅读次数:
186
public class First { public static void main(String[] args){ int []a={2,1,3,4,5,6,7,8,9,11}; int sum=0; for (int i=0;ia[j]){ int temp=a[i]; a[i]=a[j];... ...
分类:
编程语言 时间:
2017-04-03 16:14:23
阅读次数:
165
private static final String FILENAME = "c:\\temp\\in.txt"; public static void main(String[] args) { BufferedReader br = null; FileReader fr = null; tr... ...
分类:
其他好文 时间:
2017-04-03 11:29:42
阅读次数:
173
在很多编程语言中,我们大部分使用的都是值传递,然而值传递并不能真正地改变参数的数值。 下列值传递方法无法实现两个数的交换: C语言版: C++: Java版: //利用数组 void swap(int[] a,int x, int y ) { int temp = a[x]; a[x] = a[y] ...
分类:
其他好文 时间:
2017-04-02 12:41:35
阅读次数:
129
最近项目的测试哥们提了一个linux系统软链接攻击的问题,项目中导出服务器上某个文件的时,通过软连接漏洞可以获取到其他文件的信息。 具体过程自己写了个下载的Demo模拟了一下: 下载的servlet和html如下,下载/opt/temp/a.txt,国际惯例,内容是hello world,文件大小1 ...
分类:
编程语言 时间:
2017-04-01 22:48:36
阅读次数:
246
1 //回文判断 Codeforces Round #286 (Div. 2) 2 #include<iostream> 3 #include<cstdio> 4 int main() 5 { 6 string f,temp; cin>>f; 7 int len(f.size()); 8 for(c ...
分类:
其他好文 时间:
2017-04-01 16:21:16
阅读次数:
179
Win下的dos窗口输出中文Python2.7默认字符编码是ascii格式,即使指定字符编码为UTF-8也未必能够输出中文,测试如下:#_*_coding:utf-8_*_#定义一个变量内容为中文,字符集为UTF-8temp="中文"#输出变量temp的内容print(temp)用win下的dos窗口执行这个脚本,看看输出出来的是否为..
分类:
编程语言 时间:
2017-04-01 14:17:42
阅读次数:
186
1.写一个冒泡排序的算法 升序排列: int[] nums = {5,6,9,10,20,30,28,27,15}; for(int i = 0;i<nums.length;i++){ for(int j = 0;j<i-1;j++){ int temp = 0; if(nums[i]<nums[j ...
分类:
编程语言 时间:
2017-04-01 12:34:54
阅读次数:
167
定义list并将数组放入其中: List<Integer> temp = new ArrayList<Integer>(); List<String> temp = new ArrayList<String>(); 获得集合内元素个数:list.size(); 添加元素:默认添加:list.add( ...
分类:
编程语言 时间:
2017-03-30 22:26:45
阅读次数:
189