Skip to content

Instantly share code, notes, and snippets.

@FelixZhang00
FelixZhang00 / destructor.cpp
Created July 15, 2017 02:57
C++反汇编 析构函数的例子
#include <stdio.h>
class BaseClass {
public:
BaseClass(){x=1;y=2;};
virtual ~BaseClass(){printf("~BaseClass()\n");};
virtual void vfunc1() = 0;
private:
int x;//4字节
int y;
@FelixZhang00
FelixZhang00 / baseclass.cpp
Last active July 15, 2017 02:56
C++反汇编 虚函数的例子
```c++
#include <stdio.h>
class BaseClass {
public:
BaseClass(){x=1;y=2;};
virtual void vfunc1() = 0;
virtual void vfunc2(){};
virtual void vfunc3();
virtual void vfunc4(){};
@FelixZhang00
FelixZhang00 / NinePatchBitmapFactory.java
Created February 11, 2017 08:02 — forked from briangriffey/NinePatchBitmapFactory.java
Create 9-patches simlar to - (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.NinePatch;
import android.graphics.Rect;
import android.graphics.drawable.NinePatchDrawable;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/**
@FelixZhang00
FelixZhang00 / 0_reuse_code.js
Created February 4, 2017 07:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console