Here's the simplest example showing how to do functional options in Golang.
They're a great way to enable users to set options and ease adding new options later.
package main
import (
"flag"
"fmt"
var webpackConfig = require('./webpack.config'); | |
webpackConfig.devtool = 'inline-source-map'; | |
module.exports = function (config) { | |
config.set({ | |
browsers: [ 'PhantomJS' ], | |
singleRun: true, | |
frameworks: [ 'mocha', 'chai', 'sinon', 'sinon-chai' ], | |
files: [ | |
'*/*.spec.js' |
(ns typehint.core) | |
;; A little type hint hint... | |
(set! *warn-on-reflection* true) | |
;; There are two ways to type hint the return value of a function, but one is | |
;; (technically) wrong: | |
(defn ^String as-string0 |
/** | |
* This class takes an Excel spreadsheet and converts it into a Guava Table format. | |
* When other formats of the file are to be supported (like CSV, TSV etc.,) implement the apply method with that format. | |
*/ | |
@Component | |
public class ExcelToTableLoader implements TableGenerator<File> { | |
private static final Logger logger = org.slf4j.LoggerFactory.getLogger(ExcelToTableLoader.class); |
import java.util.Arrays; | |
import com.vladsch.flexmark.ast.Node; | |
import com.vladsch.flexmark.ast.NodeVisitor; | |
import com.vladsch.flexmark.ast.Text; | |
import com.vladsch.flexmark.ast.VisitHandler; | |
import com.vladsch.flexmark.html.HtmlRenderer; | |
import com.vladsch.flexmark.parser.Parser; | |
import com.vladsch.flexmark.parser.ParserEmulationProfile; | |
import com.vladsch.flexmark.util.options.MutableDataHolder; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.1.1.js"></script> | |
<title>Weather API</title> | |
<!-- to be in a script.js --> | |
<script type="text/javascript"> |
Here's the simplest example showing how to do functional options in Golang.
They're a great way to enable users to set options and ease adding new options later.
package main
import (
"flag"
"fmt"
#!/usr/bin/env python | |
import os | |
import re | |
import threading | |
import time | |
import subprocess | |
from os.path import splitext, expanduser, normpath | |
import click |
public class LambdaTypeDetectionSample { | |
public static void main(String[] args) { | |
Function<Integer, String> lambdaFunction = i -> i.toString(); | |
Function<Integer, String> oldschoolFunction = new Function<Integer, String>() { | |
public String apply(Integer t) { | |
return t.toString(); | |
} |
$ wget -e robots=off -r -np 'http://example.com/folder/'