This post described how to create an application with mithril 0.2.x. Now that ver 1.0 is out, some things are a little differnent.
The example is updated with the current version of mithril, though.
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Boostrap Number</title> | |
| <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
| <style> | |
| .input-group{ text-align: center; padding: 5px; } | |
| </style> | |
| <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script> |
| latch_pin = 2 | |
| gpio.mode(latch_pin, gpio.OUTPUT) | |
| gpio.write(latch_pin, gpio.LOW) | |
| result = spi.setup(1, spi.MASTER, spi.CPOL_HIGH, spi.CPHA_LOW, spi.DATABITS_8, 0) | |
| print(result) | |
| while true do | |
| for i=1,255,1 do | |
| print(i) |
| // BSD License (http://lemurproject.org/galago-license) | |
| package org.lemurproject.galago.utility.json; | |
| public class JSONUtil { | |
| public static String escape(String input) { | |
| StringBuilder output = new StringBuilder(); | |
| for(int i=0; i<input.length(); i++) { | |
| char ch = input.charAt(i); | |
| int chx = (int) ch; |
This post described how to create an application with mithril 0.2.x. Now that ver 1.0 is out, some things are a little differnent.
The example is updated with the current version of mithril, though.
| #!/bin/bash | |
| #title :wildfly-install.sh | |
| #description :The script to install Wildfly 8.x | |
| #more :http://sukharevd.net/wildfly-8-installation.html | |
| #author :Marek Polcar, Dmitriy Sukharev | |
| #date :20140601 | |
| #usage :/bin/bash wildfly-install.sh | |
| WILDFLY_VERSION=8.2.0.Final | |
| WILDFLY_FILENAME=wildfly-$WILDFLY_VERSION |
| #!/bin/sh | |
| # Sublime Text 3 Install (last update: Monday 13 March 2017) | |
| # | |
| # No need to download this script, just run it on your terminal: | |
| # | |
| # curl -L git.io/sublimetext | sh | |
| # Detect the architecture |
| public class Base62 { | |
| public static final String ALPHABET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; | |
| public static final int BASE = ALPHABET.length(); | |
| private Base62() {} | |
| public static String fromBase10(int i) { | |
| StringBuilder sb = new StringBuilder(""); |
| /* | |
| * net/balusc/webapp/FileServlet.java | |
| * | |
| * Copyright (C) 2009 BalusC | |
| * | |
| * This program is free software: you can redistribute it and/or modify it under the terms of the | |
| * GNU Lesser General Public License as published by the Free Software Foundation, either version 3 | |
| * of the License, or (at your option) any later version. | |
| * | |
| * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without |