This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
- (NSUInteger *)binaryGap(NSInteger N) { | |
NSMutableString *str = [NSMutableString stringWithFormat:@""]; | |
for (NSInteger NCopy = N; NCopy > 0; NCopy >>= 1) { | |
[str insertString:((NCopy & 1) ? @"1": @"0") atIndex:0]; | |
} | |
unichar buffer[str.length]; | |
[str getCharacters:buffer range:NSMakeRange(0, str.length)]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup.hbs | |
{{#if stepOne}} | |
<ol> | |
<li class="active"><span class="step"><i class="icon-check"></i><span class="num">1</span></span></li> | |
<li><a class="step" {{action "toStepTwo"}}><i class="icon-check"></i><span class="num">2</span></a></li> | |
<li><span class="step"> <i class="icon-check"></i><span class="num">3</span></span></li> | |
</ol> | |
{{/if} | |
// {{#if stepTwo}}... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ npm install ws --verbose | |
npm info it worked if it ends with ok | |
npm verb cli [ 'e:\\nodejs\\node.exe', | |
npm verb cli 'e:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', | |
npm verb cli 'install', | |
npm verb cli 'ws', | |
npm verb cli '--verbose' ] | |
npm info using npm@1.4.14 | |
npm info using node@v0.10.29 | |
npm verb cache add [ 'ws', null ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80 default_server; | |
listen [::]:433 ssl; | |
listen [::]:80 default_server ipv6only=on; | |
server_name mydomain.com; # Replace with your domain | |
root /usr/share/nginx/html; | |
index index.html index.htm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HORUS /e/test/node-sqlite3(remote-binary) $ npm test | |
> sqlite3@2.1.15 pretest e:\test\node-sqlite3 | |
> node test/support/createdb.js | |
Creating test database... This may take several minutes. | |
> sqlite3@2.1.15 test e:\test\node-sqlite3 | |
> mocha -R spec --timeout 200000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> ws@0.4.30 install C:\Users\David\AppData\Roaming\npm\node_modules\jitsu\node_m | |
odules\nodejitsu-api\node_modules\preacher-api\node_modules\ws | |
> (node-gyp rebuild 2> builderror.log) || (exit 0) | |
C:\Users\David\AppData\Roaming\npm\node_modules\jitsu\node_modules\nodejitsu-api | |
\node_modules\preacher-api\node_modules\ws>node "e:\nodejs\node_modules\npm\bin\ | |
node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild | |
Building the projects in this solution one at a time. To enable parallel build, | |
please add the "/m" switch. |