element with flex/inline-flex affects its child nodes!
{display:flex; flex-direction:row;} /*horizontal*/
{display:flex; flex-direction:column;} /*vertical*/| select * | |
| NOT IN | |
| != //index失効 | |
| <> //index失効 | |
| is null //index失効, 方法:NOT NULL, default=0, where xxx=0 | |
| where OR //index失効失効 | |
| 改善前: | |
| select id from t where num=10 or num=20 | |
| 改善後: | |
| select id from t where num=10 | 
| * strong, weak, assign | |
| http://stackoverflow.com/questions/8927727/objective-c-arc-strong-vs-retain-and-weak-vs-assign | |
| * bridge (void* => id, id => void*) | |
| http://stackoverflow.com/questions/18976016/how-to-specify-property-to-c-pointer-in-arc-environment | |
| * arr.indexOf | |
| ```Objective-C | |
| //BAD: it returns max int. | |
| (int)[arr indexOfObject:obj]>0 | 
| 1: keychain->[Keychain access]->[Certificates Assistants]->[Request ...]->{email:YOURs, Common Name:"APP_NAME PUSH"}->[save to disk] (f1.certSigningRequest) | |
| * DON'T forget to set [Common Name]="APP_NAME PUSH", or you won't find it later | |
| * DON'T through away f1.certSigningRequest, it can be used while renew a year later. | |
| 2: dev center->certificates->[Identifiers]->App IDs-> [+] button | |
| -> check enable Push -> [Create Certificate...] -> [continue] -> upload the file of #1 (f1.certSigningRequest) -> [Generate] -> [Download] => you got a "aps_development.cer" file (f2.cer) | |
| * DON'T forget to install f2.cer by double click! | |
| 3: keychain->certificates->[your app buldle id]->right click->export ... ->save as f3.p12 | |
| * YOU may have to specify a password of at least 4 bit ! | |
| 4: make PEM file with your f3.p12, u will get cert.pem (a cert pem file) | |
| ```Bash | 
| https://faces.fiverr.com | |
| http://urban-walks.com/ | |
| http://gameit.us/ | |
| https://www.quizup.com/en | 
| $pattern = '/foo(?=bar)/'; | |
| preg_match($pattern,'Hello foo'); // BAD | |
| preg_match($pattern,'Hello foobar'); // OK | |
| <?php | |
| trait DynamicDefinition { | |
| public function __call($name, $args) { | |
| if (is_callable($this->$name)) { | |
| return call_user_func($this->$name, $args); | |
| } | |
| else { | |
| throw new \RuntimeException("Method {$name} does not exist"); | |
| } |