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
| import A from './module'; | |
| import AA, { doSomething } from './module'; | |
| A.doSomething() === doSomething() | |
| AA.doSomethingElse() | |
| ////////////////////////////////// | |
| export default const publicApi = { | |
| doSomething() { |
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
| interface Future<T> { | |
| /** | |
| * Creates a {@code Future} with the given java.util.concurrent.CompletableFuture, backed by the {@link #DEFAULT_EXECUTOR_SERVICE} | |
| * | |
| * @param completableFuture A {@link java.util.concurrent.CompletableFuture} | |
| * @param <T> Result type of the Future | |
| * @return A new {@code Future} wrapping the result of the Java future | |
| * @throws NullPointerException if future is null | |
| */ | |
| static <T> Future<T> fromJavaCompletableFuture(CompletableFuture<T> completableFuture) { |
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
| <html> | |
| <body> | |
| <div id="app"></div> | |
| <script src="https://unpkg.com/react/dist/react.min.js" type="text/javascript"></script> | |
| <script src="https://unpkg.com/react-dom/dist/react-dom.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| (function() { | |
| var h = React.createElement; | |
| var Hello = React.createClass({ | |
| render: function() { |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test with ES6 and JSX</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/css/materialize.min.css"> | |
| <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <div id="app"></div> |
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
| import play.api.libs.json._ | |
| import scala.xml.{Elem, Node} | |
| package object pretty { | |
| trait CanPrettify[A] { | |
| def prettify(value: A): String | |
| } |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Hello World with React</title> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script src="https://unpkg.com/react/dist/react.min.js" type="text/javascript"></script> | |
| <script src="https://unpkg.com/react-dom/dist/react-dom.min.js" type="text/javascript"></script> |
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
| const express = require('express'); | |
| const graphqlHTTP = require('express-graphql'); | |
| const { schema } = require('./graphql-wines'); | |
| const app = express(); | |
| app.use('/graphql', graphqlHTTP({ | |
| schema: schema, | |
| pretty: true, | |
| })); |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Test</title> | |
| </head> | |
| <body> | |
| <div id="app"></div> | |
| <script src="https://unpkg.com/react/dist/react.min.js" type="text/javascript"></script> | |
| <script src="https://unpkg.com/react-dom/dist/react-dom.min.js" type="text/javascript"></script> |
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
| package old.play | |
| import java.sql.Connection | |
| import java.util.concurrent.atomic.{AtomicInteger, AtomicReference} | |
| import java.util.concurrent.{Executors, ThreadFactory} | |
| import akka.actor.{ActorSystem, Scheduler} | |
| import akka.stream.Materializer | |
| import play.api.ApplicationLoader.Context | |
| import play.api.Mode.Mode |
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 AutoImage = function AutoImage(message) { | |
| if (_.trim(message.html)) { | |
| message.html = message.html.split(/ /).map(function (part, index) { | |
| if (part && part.length && part.length > 0) { | |
| var codeMatch = part.match(/(?:```(\w*)[\n ]?([\s\S]*?)```+?)|(?:`(?:[^`]+)`)/); | |
| var imgHrefMatch = part.match(/href=/i); | |
| if (!codeMatch && !imgHrefMatch) { | |
| return part.replace(/(https?:\/\/.*\.(?:png|jpeg|jpg|gif))/i, '<img src="$1" />'); | |
| } else { | |
| return part; |