Install the OpenSSL on Debian based systems
sudo apt-get install openssl
If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:
let
and const
statements. For the purposes of the React documentation, you can consider them equivalent to var
.class
keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this
in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/JavDear all Github friends,
I moved this gist to the Github repository.
Following this repository https://github.com/nijicha/install_nodejs_and_yarn_homebrew
//: Playground - noun: a place where people can play | |
import Foundation | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
var request = URLRequest(url: URL(string: "https://api.github.com/")!) | |
request.httpMethod = "GET" | |
let task = URLSession.shared.dataTask(with: request) { data, response, error in | |
guard let data = data, error == nil else { |
enum JSON: Decodable { | |
case bool(Bool) | |
case double(Double) | |
case string(String) | |
indirect case array([JSON]) | |
indirect case dictionary([String: JSON]) | |
init(from decoder: Decoder) throws { | |
if let container = try? decoder.container(keyedBy: JSONCodingKeys.self) { | |
self = JSON(from: container) |
class EventEmitter | |
/// Shared Instance. | |
public static var sharedInstance = EventEmitter() | |
// ReactNativeEventEmitter is instantiated by React Native with the bridge. | |
private static var eventEmitter: ReactNativeEventEmitter! | |
private init() {} |
//: # Swift 3: URLSessionDelegate | |
//: The following example shows how to use `OperationQueue` to queue the network requests. This is useful in many ways (for delaying queued requests when the networking goes down for example) | |
import Foundation | |
import PlaygroundSupport | |
class Requester:NSObject { | |
let opQueue = OperationQueue() | |
var response:URLResponse? |
// xcode 7.3 | |
import Foundation | |
/** | |
Struct representing values returned by `SecPKCS12Import` from the Security framework. | |
This is what Cocoa and CocoaTouch can tell you about a PKCS12 file. | |
*/ |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.List; | |
import com.google.common.collect.ComparisonChain; | |
import org.apache.commons.beanutils.BeanComparator; | |
import org.apache.commons.collections.comparators.ComparatorChain; | |
import org.apache.commons.lang3.builder.CompareToBuilder; |