Sunday, 15 January 2017

[C++] return by address/reference


 int *createArrayAddr(int n) {  
   int *a = new int(5);  
     
   cout << (void*) a << endl;  
     
   return a;  
 }  
   
 int &createArrayRef(int &n) {  
     
   cout << &n << endl;  
     
   return n;  
 }  
   
 int main(int argc, const char * argv[]) {  
   int *a = createArrayAddr(5);  
   cout << (void*) a << endl;  
     
   int n = 55;  
   cout << &n << endl;  
   int &n2 = createArrayRef(n);  
   cout << &n2 << endl;  
   
   return 0;  
 }  

RESULT:

 0x1001054d0  
 0x1001054d0  
 0x7fff5fbff7f4  
 0x7fff5fbff7f4  
 0x7fff5fbff7f4  

Thursday, 12 January 2017

Your body language shapes who you are



Self-fulfill, faith, you believed in who you are, and you could be the one you want.

1-Bit Music from Tristan Perich

There's a composer named Tristan Perich composes his album as 1-bit music, more interested thing is when you get his CDs, there's no CD in it, you could just plug your ear phone in and listen to his music.

Try to listen to his CertainMovement in the 1st album.



















Refer http://www.1bitmusic.com/ to get to know him more.

Sunday, 5 June 2016

The Pretty Reckless - Make Me Wanna Die

This is Make Me Wanna Die. (wiki)

Like Taylor Momsen's voice very much, full of rock power!

Key: Fm

Intro
|    7    |  1  3 4  |
|    1    |  1  3 4  | *3

Verse
|    1  3   |   7  6#   |
|    6  5   |  5 4 3 2  |
|    1  3   |   7  6#   |
|    6  5   |    5   |

Chorus
|    1    |    3    |    4    |    5    |
|  6  7  |  1  7  |
|    4    |  5 4 3 2  |

Interlude
|    1    |  1  3 4  | *2

Bridge
|    1    |    3    |    7    |    4    | * 3
|    1    |    3    |    4    |    5    |


Progressing

Intro

Verse
Pre-Chorus
Chorus

Interlude

Verse
Pre-Chorus
Chorus

Bridge

Chorus


Thursday, 19 May 2016

RHCP - Californication

The 1st song is Californication. (wiki)


Key: Am -> modulation of A (solo)

Am
Intro / Verse 1 / Interlude
|    6m    |     4     |    6m    |     4     | * 2
do extension on 6m (sus2, sus4 & 1) & 4 (sus2)

Verse 2
|    1    |    5    |    4    |    2m    |

Pre-chorus
|    6m    |    4maj7    |    6m    |     4maj7     | * 3

Chorus
|    1    |    5    |    2m    |    6    | * 2

A
Solo
|    6    |    4    |    6    |    4    |
|    2    4    |    1    5    |

|    6    |    4    |    6    |    4    |
|    2    4    |    1    5    |
|    2    4    |    1    5    |
|    2    4    |    1    5    |


Progressing

Intro

Verse 1
Verse 2

Interlude

Verse 1 
Verse 2
Pre-chorus
Chorus

Interlude

Verse 1
Verse 2

Interlude

Verse 1
Verse 2
Pre-chorus
Chorus * 2

Solo

Interlude

Verse 1
Verse 2
Pre-chorus
Chorus * 2