Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"name": "vue-cli-service-tests", | |
"request": "launch", | |
"env": { | |
"NODE_ENV": "test" | |
}, |
/* | |
https://scalafiddle.io/sf/sniohcZ/3 | |
(old version: https://scalafiddle.io/sf/sniohcZ/1) | |
Use PassThroughFlow when you have a message that should be used in a | |
flow that trasform it but you want to maintain the original message for | |
another following flow. | |
For example if you consume messages from Kafka (CommittableMessage). | |
You process the message (transform, save it inside a database, ...) and then you need again the original message | |
to commit the offset. |
object Example { | |
import cats._, implicits._ | |
import cats.effect._ | |
import fs2._ | |
import scala.concurrent.ExecutionContext | |
// start N streams concurrently, and stream their results in order | |
// e.g. download a file from a server in N parts concurrently, and stream it | |
abstract class Channel[F[_], A] { |
port module Spelling exposing (..) | |
import Html exposing (..) | |
import Html.App as App | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import String | |
main = |
// paste in your console | |
speechSynthesis.onvoiceschanged = function() { | |
var msg = new SpeechSynthesisUtterance(); | |
msg.voice = this.getVoices().filter(v => v.name == 'Cellos')[0]; | |
msg.text = Object.keys(window).join(' '); | |
this.speak(msg); | |
}; |
// npm install browserify -g | |
// npm install tsd -g | |
// npm install react tsify | |
// tsd install react | |
// browserify app.tsx -p [tsify --jsx=react] -o bundle.js | |
/// <reference path="typings/react/react.d.ts" /> | |
import React = require("react"); | |
interface HelloWorldComponentProps extends React.Props<any> { |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document); | |
Node.prototype.on = window.on = function (name, fn) { | |
this.addEventListener(name, fn); | |
} | |
NodeList.prototype.__proto__ = Array.prototype; |
var webpack = require('webpack'); | |
var HtmlWebpackPlugin = require('html-webpack-plugin'); | |
var path = require('path'); | |
var folders = { | |
APP: path.resolve(__dirname, '../app'), | |
BUILD: path.resolve(__dirname, '../build'), | |
BOWER: path.resolve(__dirname, '../bower_components'), | |
NPM: path.resolve(__dirname, '../node_modules') | |
}; |
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |