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
// Does anybody know why | |
func tableView(_ tableView: UITableView!, | |
cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! | |
//morphed to | |
func tableView(_ tableView: UITableView, | |
cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell | |
// In the UITableViewDataSource Protocol ? (The difference is that all implicit unwrapped values are now norlmal - not-nil values) |
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
var myInt : Int = 20; | |
var myNSNumber : NSNumber = myInt; // Implicit conversion to NSNumber | |
var my2NSNumber : NSNumber = 20; // Implicit conversion to NSNumber | |
// Methods defined in Swift with signature : | |
// func testOfImplicitNSNumberConversion(number : NSNumber) | |
self.testOfImplicitNSNumberConversion(myInt); // Implicit conversion to NSNumber | |
self.testOfImplicitNSNumberConversion(20); // Implicit conversion to NSNumber | |
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
var myInt : Int = 20; | |
var myNSNumber : NSNumber = myInt; // Implicit conversion to NSNumber | |
var my2NSNumber : NSNumber = 20; // Implicit conversion to NSNumber | |
// Methods defined in Swift with signature : | |
// func testOfImplicitNSNumberConversion(number : NSNumber) | |
self.testOfImplicitNSNumberConversion(myInt); | |
self.testOfImplicitNSNumberConversion(20); | |
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
// Methods defined in Swift with signature : | |
// func testOfImplicitNSNumberConversion(number : NSNumber) | |
self.testOfImplicitNSNumberConversion(myInt); | |
self.testOfImplicitNSNumberConversion(20); |
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
<query type="area"> | |
<has-kv k="landuse" v="forest"/> | |
<bbox-query {{bbox}}/><!--this is auto-completed with the | |
current map view coordinates.--> | |
</query> | |
<print/> |
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
<query type="area"> | |
<around {{center}} radius="200.0"/> | |
<has-kv k="landuse" v="forest" /> | |
</query> | |
<print /> |
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
<query type="area"> | |
<around {{center}} radius="10000.0"/> | |
<has-kv k="landuse" v="forest" /> | |
</query> | |
<print /> |
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
perl: warning: Setting locale failed. | |
perl: warning: Please check that your locale settings: | |
LANGUAGE = (unset), | |
LC_ALL = (unset), | |
LANG = "en_US.UTF-8" | |
are supported and installed on your system. | |
perl: warning: Falling back to the standard locale ("C"). | |
locale: Cannot set LC_CTYPE to default locale: No such file or directory | |
locale: Cannot set LC_MESSAGES to default locale: No such file or directory | |
locale: Cannot set LC_ALL to default locale: No such file or directory |
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
// Wrong example // Load the net module to create a tcp server. | |
var net = require('net'); | |
// Setup a tcp server | |
var server = net.createServer(function (socket) { | |
// Every time someone connects, tell them hello and then close the connection. | |
socket.addListener("connect", function () { | |
sys.puts("Connection from " + socket.remoteAddress); |
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
// Load the http module to create an http server | |
var http = require('http'); | |
var server = http.createServer(function(request, response) { | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.end("Hello World\n"); | |
console.log("New Connection!" + new Date()); | |
}); | |
server.listen(8000); |