This file contains hidden or 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
| {} |
This file contains hidden or 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
| const fullWidthToHalfWidth = (str) => | |
| str.replace(/[\uff01-\uff5e]/g, (ch) => | |
| String.fromCharCode(ch.charCodeAt(0) - 0xfee0) | |
| ); |
This file contains hidden or 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
| NSURL *url = [NSURL URLWithString: | |
| @"http://www.onevcat.com/2011/11/debug/;param?p=307#more-307"]; | |
| NSLog(@“Scheme: %@”, [url scheme]); | |
| NSLog(@“Host: %@”, [url host]); | |
| NSLog(@“Port: %@”, [url port]); | |
| NSLog(@“Path: %@”, [url path]); | |
| NSLog(@“Relative path: %@”, [url relativePath]); | |
| NSLog(@“Path components as array: %@”, [url pathComponents]); | |
| NSLog(@“Parameter string: %@”, [url parameterString]); | |
| NSLog(@“Query: %@”, [url query]); |
This file contains hidden or 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
| 'use strict' | |
| var MongoClient = require('mongodb').MongoClient | |
| var readline = require('readline') | |
| var fs = require('fs') | |
| let url = 'mongodb://xxxxxx' | |
| MongoClient.connect(url) | |
| .then(db => { |