摘要:
using namespace std;class TestNew {private: int ID;public: TestNew(int ID); ~TestNew();};TestNew::TestNew(int ID) { //this->ID = ID; cout ID << " 执行析构函数" << std::endl;}void Test() { TestNew test(1); //创建对象1,不使用new,在栈上创建,用完内存会自动释放回收 cout << "--------" << 阅读全文
摘要:
//============================================================================// Name : HelloWorld.cpp// Author : // Version :// Copyright : Your copyright notice// Description : Hello World in C++, Ansi-style//=======================================================================... 阅读全文
摘要:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(new SampleView(this)); } private static class SampleView extends View { private Bitmap mBitmap; public SampleView(Context context) { super(context); ... 阅读全文
摘要:
1.#include using android::CallStack;2.... 3.CallStack stack; 4.stack.update(); 5.stack.dump("xxx");注意:此方法只适合c++,不适合c,因为c不存在这种::命名空间。 阅读全文
摘要:
JNI中的对应表:"()V""(II)V""(Ljava/lang/String;Ljava/lang/String;)V"实际上这些字符是与函数的参数类型一一对应的。"()" 中的字符表示参数,后面的则代表返回值。例如"()V" 就表示void Func();"(II)V" 表示 void Func(int, int);具体的每一个字符的对应关系如下字符 Java类型 C类型V void voidZ jboolean booleanI jintintJjlong longD 阅读全文
摘要:
摘抄自:http://www.cnblogs.com/limingblogs/archive/2011/10/04/2199186.htmlpackage com.example.matrixtest1;import android.os.Bundle;import android.app.Activity;import android.graphics.Bitmap;import android.graphics.BitmapFactory;import android.graphics.Matrix;import android.view.Menu;import android.view. 阅读全文
摘要:
验证decode,把此格式的图片放到图库里面,看gallery 显示(decode)出来的是否正常。验证encode,jpg的encode用手机就能验,拍照片用hw的encode,在gallery裁剪照片然后保存成jpg是sw encode,decode验证同上。至于png和webp的encode验证,用以下程序即可:#include "SkBitmap.h"#include "SkPaint.h"#include "SkCanvas.h"#include "SkColorPriv.h"#include " 阅读全文
摘要:
1.CString -->TCHR* CString s = "XXXXX"; TCHAR filename[270]; _tcscpy(filename,bitmapPath); 阅读全文
摘要:
判断路径是否存在,若不存在,则创建CString namep = _T("e:\\fb\\"); if(!PathIsDirectory(namep)){ CreateDirectory(namep,NULL); //if create fail,alert message box. //MessageBox(L"Cannot create save path!", NULL, MB_OK); //return; }拼接string和int int imagenum = xxx;//变量 char* nam... 阅读全文
摘要:
先break all, new data breakpoint 才能从disable到enable。 阅读全文