Alex Jiang


Web, iOS, Design, Literature

Road To iOS Series 0

Dynamic Binding in Objective-C

What is Dynamic Binding

Determining the methods of different kinds of objects to invoke at runtime rather than at compile-time.

Read more...

Perl Cheatsheet 3

RegEx cont.


Variables

  • Match vars.
    • if regex have parens i.e. groups
    • if group got successful match
      • then the content of matched pattern stored in $1, meaning first match against first group
      • e.g. /(\S+)(\S+),(\S+)/ corresponding matched content is print $1 $2 $3
    • classical match idiom: if(xx =~ xx) do sth else die
    • three special vars.
      • a regex matching a string divides the string into 3 pars
      • $&: the part actually matched
      • $\backslash: the part before matched
      • $': the part after matched
Read more...

Perl Cheatsheet 2

SLP week1: A review

Design Choice

  • Perl, is eager to give you the answer, and try its best to guess an answer for you!
  • No reserved word, prefix with var distinguish data from build-ins (so developers can add more build-ins later on without conflicts)
Read more...