RSS

MKM915 Personal Branding P3: BURBERRY MEMES

MEME1MEME2MEME3MEME4

 
Leave a comment

Posted by on March 4, 2020 in Uncategorized

 

Tags: ,

Image

MKM915 Personal Branding P2: Infographics

MKM915_PersonalBrandP2_Burberry_KelanLi

 
Leave a comment

Posted by on February 13, 2020 in Uncategorized

 

Phaser.io Physics Enable


// enables all objs in array
game.physics.arcade.enable([sprite, sprite2]);

// enable single obj
game.physics.arcade.enableBody(player);

link

 
Leave a comment

Posted by on September 22, 2017 in Knowledge

 

Tags: ,

C++: Passing by Reference

#include <iostream>
using namespace std;
class Ref{
	//p_data will be copied into _data1 by value
	//int _data1;

	int &_data2;
public:
	// This would reference _data to the parameter named p_data
	// not the variable i from main()
	//  Ref(int p_data):_data2(p_data){ 
	//  }

	// pass the reference of p_data to _data2
	// so now _data2 is an alias for i
	Ref(int &p_data):_data2(p_data){
	}

	ostream& print(ostream& os)const{
		return os<<_data2;
	}
};
ostream& operator<<(ostream& os,const Ref& C){
	return C.print(os);
}

int main(){
	char* s[] = {"Sdsd", "dfdf"};
	char as[] = "Sadsd";
	cout<<s[1]<<endl;
	cout<<as<<endl;
	int i = 10;
	Ref R(i);
	cout<<R<<endl;
	i = 234;
	cout<<R<<endl;
	return 0;
}
 
Leave a comment

Posted by on February 13, 2014 in Knowledge

 

Tags:

JavaScript Bracket use: Object vs. Array

//new object
var o = new object();
var o = {};

//new array
var a = new Array();
var a = [];

//equivalent to o.fname = "john";
o["fname"] = "john";

//set the first element to "hello"
a[0] = "hello";
 
Leave a comment

Posted by on January 14, 2014 in Knowledge

 

Tags: