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
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.*; | |
public class LocalVariableTypeInferenceTest { | |
private void processOrder(String order) { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleDocumentTypes</key> | |
<array> | |
<dict> |
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
var employees = { "neal", "s", "stu", "j", "rich", "bob" } | |
var result = employees.where(\s -> s.length > 1) | |
.map(\s -> s.capitalize()) | |
.join(",") |
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
static Void main() { | |
employees := ["neal", "s", "stu", "j", "rich", "bob"] | |
Str result := employees.findAll { it.size > 1 } | |
.map { it.capitalize } | |
.join(",") | |
} |
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
void main() { | |
value employees = {"neal", "s", "stu", "j", "rich", "bob"}; | |
String result = ",".join(employees | |
.filter((String e) => e.longerThan(1)) | |
.map((String s) => s.segment(0, 1).uppercased + s.spanFrom(1)) | |
); | |
// using a for comprehension | |
String result = ", ".join { | |
for (i in employees) |
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
def static void main(String[] args) { | |
val employees = Arrays.asList("neal", "s", "stu", "j", "rich", "bob") | |
val result = employees.stream | |
.filter[length() > 1] | |
.map[toFirstUpper()] | |
.reduce[x, y | x + "," + y] | |
} | |
// without map() | |
def static void main(String[] args) { |
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
fun main(args: Array<String>) { | |
val employees = array("neal", "s", "stu", "j", "rich", "bob") | |
val result = employees filter { it.length > 1 } map { it.capitalize() } reduce { x, y -> x + "," + y } | |
} |
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
trigger seeding of SecureRandom | |
done seeding SecureRandom | |
Using SSLEngineImpl. | |
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 | |
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 | |
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 | |
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 |
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
X509KeyManager passed to SSLContext.init(): need an X509ExtendedKeyManager for SSLEngine use | |
trigger seeding of SecureRandom | |
done seeding SecureRandom | |
Using SSLEngineImpl. | |
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA | |
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 | |
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 | |
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 |
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
employees.parallelStream() | |
.filter(e -> e.length() > 1) | |
.map(s -> s.substring(0, 1).toUpperCase() + s.substring(1)) | |
.collect(joining(",")); |