Skip to content

Instantly share code, notes, and snippets.

import java.util.*;
/**
* Nondeterministic finite automaton (ε-NFA) for recognising language of (ab ∪ a)*.
*
* @see http://www.dennis-grinch.co.uk/tutorial/enfa
* @author Dennis Grinch
*/
public class eNFA {
/**
* This is meeting storage service. Users will use this service for creating,
* deleting and updating their meetings.
*/
public interface MeetingService extends Remote {
List<Meeting> getMeetings() throws SQLException, RemoteException;
void createMeeting(Meeting meeting) throws SQLException, RemoteException;
/**
* Script for Elm application development which includes hot reloading.
* Note that bundled webpack files fill be served from the memory.
*/
import path from 'path';
import open from 'opn';
import chalk from 'chalk';
import express from 'express';
import webpack from 'webpack';
import webpackDevMiddleware from 'webpack-dev-middleware';
// This is single page application, therefore we route all the requests to the index.html
app.get('*', (req, res) => {
res.sendFile(path.join(__dirname, '../src/index.html'));
});
/**
* Webpack configuration for development.
*/
import Webpack from 'webpack';
import merge from 'webpack-merge';
import common from './webpack.common';
import AppConfig from '../app.confg';
export default merge.smart(common, {
devtool: 'inline-source-map',
/**
* Webpack configuration for production
*/
import UglifyJsWebpackPlugin from 'uglifyjs-webpack-plugin';
import ExtractTextWebpackPlugin from 'extract-text-webpack-plugin';
import CleanWebpackPlugin from 'clean-webpack-plugin';
import Webpack from 'webpack';
import merge from 'webpack-merge';
import common from './webpack.common';
import AppConfig from '../app.confg';
/**
* Common webpack configuration used by development and production.
*/
import HtmlWebpackPlugin from 'html-webpack-plugin';
export default {
target: 'web',
output: { filename: '[name].js', },
module: {
noParse: /\.elm$/, // we don't need to parse elm files
{
"scripts": {
"start:dev": "babel-node build_scripts/devServer.js",
"start": "npm-run-all --parallel start:dev",
"build": "babel-node build_scripts/build.js",
"postbuild": "babel-node build_scripts/prodServer.js"
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DG Elm Starter Kit</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div id="app"></div>
</body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>DG Elm Starter Kit</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="./main.css" rel="stylesheet"></head>
<body>
<div id="app"></div>
<script type="text/javascript" src="./main.js"></script></body>