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
package com.example; | |
/* | |
* example snippet: Hello World | |
* | |
* For a list of all SWT example snippets see | |
* http://www.eclipse.org/swt/snippets/ | |
*/ | |
import org.eclipse.swt.widgets.Display; | |
import org.eclipse.swt.widgets.Shell; |
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
org.apache.commons.codec_1.4.0.20100820-0001.jar | |
org.apache.commons.httpclient_3.1.0.v201012070820.jar | |
org.apache.commons.logging_1.0.4.v201101211617.jar | |
org.eclipse.core.contenttype_3.4.200.v20120523-2004.jar | |
org.eclipse.core.jobs_3.5.200.v20120521-2346.jar | |
org.eclipse.core.net_1.2.200.v20120522-1148.jar | |
org.eclipse.core.runtime_3.8.0.v20120521-2346.jar | |
org.eclipse.ecf.filetransfer_5.0.0.v20120610-1946.jar | |
org.eclipse.ecf.identity_3.1.200.v20120610-1946.jar | |
org.eclipse.ecf.provider.filetransfer.httpclient.ssl_1.0.0.v20120610-1946.jar |
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
In this simple example, we are taking a List<String> of names, sorting them, creating Person objects and printing the result. The first way uses single line lambda expressions: | |
names.stream().sorted((o1, o2) -> o1.compareTo(o2)). | |
map(name -> new Person(name)). | |
forEach(p -> System.out.println(p.getName())); | |
The second one wraps each expression in a bracket and makes the types explicit: | |
names.stream().sorted(( String o1, String o2 ) -> | |
{ |
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
MyInterface r2 = () -> | |
System.out.println("Hello, world"); | |
System.out.println("Goodbye, world!"); | |
vs. | |
MyInterface r2 = () -> { | |
System.out.println("Hello, world"); | |
System.out.println("Goodbye, world!"); | |
}; |
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 CryptoJS = require('crypto-js'); | |
var total = 100000; | |
var counter = 0; | |
var empty = 0; | |
var other = 0; | |
function makeString(len) | |
{ | |
var text = ""; |
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 CryptoJS = require('crypto-js'); | |
var total = 100000; | |
var counter = 0; | |
var empty = 0; | |
var other = 0; | |
function makeString(len) | |
{ | |
var text = ""; |
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
package com.eclipsesource.j2v8.tutorial; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.nio.ByteBuffer; | |
import com.eclipsesource.v8.NodeJS; | |
import com.eclipsesource.v8.Releasable; | |
import com.eclipsesource.v8.V8Array; |
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
package com.eclipsesource.j2v8.tutorial; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import com.eclipsesource.v8.JavaCallback; | |
import com.eclipsesource.v8.NodeJS; | |
import com.eclipsesource.v8.V8; | |
import com.eclipsesource.v8.V8Array; |
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
#include <iostream> | |
#include <openssl/aes.h> | |
#include <openssl/evp.h> | |
#include <openssl/rsa.h> | |
#include <openssl/pem.h> | |
#include <openssl/ssl.h> | |
#include <openssl/bio.h> | |
#include <openssl/err.h> | |
#include <assert.h> |
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
#include <openssl/ssl.h> | |
#include <openssl/err.h> | |
#include <string.h> | |
#include <iostream> | |
using namespace std; | |
void handleOpenSSLErrors(void) | |
{ | |
ERR_print_errors_fp(stderr); | |
abort(); |
OlderNewer