So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
- https://twitter.com/bterlson/status/1093624668903268352
- https://news.ycombinator.com/item?id=19102367
There are, however, a few problems:
Templates and generics allow us to achieve very similar results using very similar code syntax in C++ and Java respectively. But despite that, the implementation of these two features and their semantics are vastly different under the hood.
Let us consider first the case of a template called Pair
in C++.
This file has been truncated, but you can view the full file.
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
9254835974458887629672873635789957411886024698554157393849494864228024962939550688297074527198420261051675205999609689838587412 | |
7948702662533481896767559573369920938242346354580061545409242090168773727371802699309443935396635866263937828773324526334321892 | |
7929250312741837331511829643632683169694074912332726993582394725302853411901337696207186358524323117172520907433878952968176465 | |
9486937364148093931718552300016332142708943190856638524388888569011747617956915519539025796115901484762122047712200094207683584 | |
0703675740855407318047361595661595146837376373951978537785605481083388906490085533348547865459237835407372374738389274773789264 | |
3524314516560200536698529022539598732463389124803873184044464663165630452635665559603483233341839268186056673186867104904449866 | |
3388466377320953222057779182433549144340237502432464295061371141084500222833875925546082542869030852833895137466510262849050187 | |
2359980877010447170873386178573828860442255448874794721230413368694441497441338856684036949118353204002591974711928301953002372 |
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
class IPCameraView: UIView, NSURLSessionDataDelegate { | |
var imageView:UIImageView | |
var url: NSURL | |
var endMarkerData: NSData | |
var receivedData: NSMutableData | |
var dataTask: NSURLSessionDataTask | |
init(frame: CGRect) { |
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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
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
#!/bin/bash | |
# | |
# This is free and unencumbered software released into the public domain. | |
# | |
# Requires bc, dc, openssl, xxd | |
# | |
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708 | |
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z}) | |
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$" |