1、this引用句柄this指的就是调用该方法的对象class A{ String name; public A(String x) { name=x; } public void func1() { System.out.printl...
分类:
编程语言 时间:
2015-11-05 22:19:07
阅读次数:
236
参考:C# WinForm程序安装字体或直接调用非注册字体 参考:百度知道 在Debug文件夹下面新建一个font的文件夹,然后将字体的文件复制到里面,使用的时候,直接调用字体文件! private void Form1_Load(object sender, EventArgs e...
流水账。首先是生命周期函数:voidAwake()voidOnEnable()voidStart()voidOnDisable()void OnDestroy()在cocos2d-x中,一个物体的行为通常是利用定义一个类进行。而U3D中的物体并非由类表示,而是脚本。可以说,脚本定义了物体的自定义行为...
分类:
编程语言 时间:
2015-11-05 20:45:31
阅读次数:
292
运行下面这段程序:public static void main(String args[]){ double i; for(i=0; i!=10; i+=0.1){ System.out.printf("%f\n",i); } }抛开无限循环不说,这个程序直观看来应该是输出除了10.0以...
分类:
其他好文 时间:
2015-11-05 20:32:30
阅读次数:
244
public void getPixels(int[] pixels, int offset, int stride,int x, int y, int width, int height) 获取原Bitmap的像素值存储到pixels数组中。 参数: pixels???? 接收位图颜色值的数组 offset???? 写...
分类:
其他好文 时间:
2015-11-05 19:13:06
阅读次数:
272
static void Main(string[] args) { Console.Write("请输入性别;"); string s = Console.ReadLine(); Consol...
分类:
其他好文 时间:
2015-11-05 18:53:13
阅读次数:
163
该代码TLE,实在不清why#include#define lson n>1; Build(lson); Build(rson); Push;}void Update(int n,int pos,int val){ if(a[n].l==pos&&a[n].r==pos) ...
分类:
其他好文 时间:
2015-11-05 18:40:11
阅读次数:
219
1 问题背景 当交换两个包含了指针成员的类,我们最想看到的是直接交换其指针。但是当我们调用std::swap标准库这个模板函数时,通常它都会复制3个指针指向的对象作为交换所用,缺乏效率。如下:1 namespace std{2 template3 void swap(T& a, T...
分类:
编程语言 时间:
2015-11-05 18:39:23
阅读次数:
308
即动态获取ListView和GridView的高度一、对于ListViewListViewlistview= new ListView(this);setListViewHeightBasedOnChildren(listview);即可 1 public static void setListVi...
分类:
其他好文 时间:
2015-11-05 18:24:37
阅读次数:
240
glBlendFunc 定义像素算法。void WINAPI glBlendFunc(GLenum sfactor,GLenum dfactor);参数编辑sfactor指定红绿蓝和 alpha 源混合因子如何计算。初始值为GL_ONE。 接受了九个符号常量: GL_ONE_MINUS_DST_AL...
分类:
其他好文 时间:
2015-11-05 18:22:08
阅读次数:
261