一、创建卡片类
首先想想卡片是一个精灵,那么我们就继承精灵类。然后还要有数字,背景颜色。基本就这些,那么看代码吧。
Card.h代码
#ifndef _CARD_H_
#define _CARD_H_
#include "cocos2d.h"
USING_NS_CC ;
class CardSprite : public Sprite
{
public :
...
分类:
其他好文 时间:
2014-05-10 09:25:46
阅读次数:
280
import org.junit.Test;
public class AllSort {
public void permutation(char[] buf, int start, int end) {
if (start == end) {// 当只要求对数组中一个字母进行全排列时,只要就按该数组输出即可
for (int i = 0; i <= end; i++) {
...
分类:
编程语言 时间:
2014-05-07 08:26:47
阅读次数:
364
public class LinkedList {
Node head = null;
Node tail = null;
int length = 0;
public void add(Object object) {
Node node = new Node(object, null);
if (head == null) {
head = tail = nod...
分类:
其他好文 时间:
2014-05-07 08:24:17
阅读次数:
306
public class ArrayList {
Object[] objects = new Object[10];
int index = 0;
public void add(Object object) {
if (index == objects.length) {
Object[] newObjects = new Object[objects.length*2];
...
分类:
其他好文 时间:
2014-05-07 07:57:10
阅读次数:
257
在加载矢量数据时直接转到IFeatureWorkspace接口即可,但是在加载栅格数据时要转到IRasterWorkspaceEx接口。效果图如下,双击即可添加到Globe中。
代码如下:
public partial class SDEDataViewer : DevComponents.DotNetBar.Office2007Form
{
#regio...
分类:
其他好文 时间:
2014-05-07 07:53:47
阅读次数:
405
在zigbee规范中,引入了profile, cluster的概念。具体说来,假设规范一个profile(可以理解成一套规定),这个profile用来规范智能家居领域的相关产品都要满足那些要求,那么home automation public profile就规定了智能家居都要做什么。当然了,你可以自己规范一个自己的profile,称为provite profile,而zigbee联盟则已经规范了...
分类:
其他好文 时间:
2014-05-07 07:45:25
阅读次数:
249
Action代码: public function index(){
$prod = I("get.prod_en");
$id = I("get.id", 0, "int");
if ($prod == ""){
$serviceProduct = array();//多重循环遍历的数组 //数据保存在两张表中,这里通过循环初始化$serviceProduct数组...
分类:
Web程序 时间:
2014-05-07 07:13:02
阅读次数:
440
import org.junit.Test;
public class Multiple {
public void printMultiple99() {
int i = 1;
for (; i < 10; i++)
for (int j = 1; j <= i; j++)
System.out.print(j + "*" + i + "=" + i * j + " ...
分类:
其他好文 时间:
2014-05-07 06:46:25
阅读次数:
359
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import org.junit.Test;
public class ListFile {
public void listJavaFil...
分类:
编程语言 时间:
2014-05-07 06:31:39
阅读次数:
377
package mydata;
public class MyMergeSort {
/**
*
* 1.递归拆分
* 2.合并
* 归并排序 先将初始的序列表看成是n个长度为1的有序表
* (1)定义指针i,指向第一个序列表的第一个元素
* (2)定义指针j,指向第二个序列表的第一个元素
* (3)比较i,j指向的元素大小,若前者大,将后者插入到新表中 否...
分类:
编程语言 时间:
2014-05-07 06:21:54
阅读次数:
275