This file contains 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> | |
<script src="/flot/jquery.min.js" type="text/javascript"></script> | |
<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="/media/flot/excanvas.min.js"></script><![endif]--> | |
<script language="javascript" type="text/javascript" src="/flot/jquery.flot.min.js"></script> | |
<script language="javascript" type="text/javascript" src="/flot/jquery.flot.navigate.js"></script> | |
<style type="text/css"> | |
.center { text-align:center; } |
This file contains 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 com.example.testchart; | |
import java.util.*; | |
import java.io.*; | |
import java.text.DateFormat; | |
import android.os.Bundle; | |
import android.app.Activity; | |
import android.util.Log; | |
import android.view.*; |
This file contains 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
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
#ifdef WIN32 | |
#define EXPORT __declspec(dllexport) | |
#else | |
#define EXPORT | |
#endif | |
static const char * lua_code = \ |
This file contains 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
local packages = { | |
bit="liblua5.1-bitop0", -- -- fast bit manipulation library for the Lua language v | |
cgilua="liblua5.1-cgi0", -- -- CGI library for the Lua language version 5.1 | |
sapi="liblua5.1-cgi0", -- -- CGI library for the Lua language version 5.1 | |
copas="liblua5.1-copas0", -- -- Copas is a dispatcher of concurrent TCP/IP requests | |
cosmo="liblua5.1-cosmo0", -- -- A template library for the Lua langua version 5.1 | |
coxpcall="liblua5.1-coxpcall0", -- -- Protected function calls across coroutines for Lua 5 | |
curl="liblua5.1-curl0", -- -- libcURL bindings for the Lua language version 5.1 | |
luaevent="liblua5.1-event0", -- -- asynchronous event notification library for Lua vers | |
lxp="liblua5.1-expat0", -- -- libexpat bindings for the Lua language version 5.1 |
This file contains 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
require 'pl' | |
class.Array(List) | |
function Array.__add (a1,a2) | |
return a1:map2('+',a2) | |
end | |
function Array.__sub (a1,a2) | |
return a1:map2('-',a2) |
This file contains 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
----------------- | |
-- Microlight - a very compact Lua utilities module | |
-- | |
-- Steve Donovan, 2012; License MIT | |
-- @module ml | |
local ml = {} | |
--- String utilties. | |
-- @section string |
This file contains 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 insert,concat,remove from table | |
class List | |
new: (t) => | |
@ls = t or {} | |
add: (item) => | |
insert @ls,item |
This file contains 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 csvdata | |
// csvdata complements the csv package by allowing you to map a custom structure to | |
// the columns of data in a CSV file. The struct needs to be annotated so that each | |
// field can match a column in the data | |
// | |
// type Person struct { | |
// FirstName string `field:"First Name"` | |
// Second_Name string | |
// Age int | |
// } |
This file contains 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
-- This allows a more restricted module() style; the key feature | |
-- is that each module is loaded in a custom environment, and the actual module | |
-- table is a copy of that environment after initial load. | |
-- clone _G so that globals from the program don't invade the module | |
local lua_libs = {} | |
for k,v in pairs(package.loaded._G) do | |
lua_libs[k] = v | |
end |
This file contains 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
--[[ | |
See http://steved-imaginaryreal.blogspot.com/2011/09/htmlification-with-lua.html | |
Example usage: | |
-- test2.lua | |
require 'html' | |
html { | |
body { title 'Test' }, | |
h2 'title', | |
p 'first para', |