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
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
#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
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
<!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
-- struct.lua | |
--- defining a struct constructor --- | |
local function ordered_map (t) | |
local fields,keys = {},{} | |
for i,item in ipairs(t) do | |
local key,value = next(item) | |
fields[key] = value | |
keys[i] = key | |
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
-- globalsplus.lua | |
-- Like globals.lua in Lua 5.1.4 -- globalsplus.lua | |
-- Like globals.lua in Lua 5.1.4 but records fields in global tables too. | |
-- Probably works but not well tested. Could be extended even further. | |
-- | |
-- usage: lua globalsplus.lua example.lua | |
-- | |
-- D.Manura, 2010-07, public domain | |
-- | |
-- See http://lua-users.org/wiki/DetectingUndefinedVariables |
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 'android' | |
require 'android.intents' -- needed for creating an email.. | |
feedback_email = 'appfeedback@yourappsite.com' | |
_M = android.new! | |
with _M | |
-- compare to this more standard implementation: | |
--http://mobile.tutsplus.com/tutorials/android/android-sdk-creating-forms/ |
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 f = io.open('info.txt') | |
local line = f:read() | |
local Q = '"' | |
local QC = '",' | |
--local tags = dofile 'tags.lua' |
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
/* | |
* lint64.c | |
* int64 nummbers for Lua | |
* Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> | |
* Thu Aug 1 22:56:17 BRT 2013 | |
* This code is hereby placed in the public domain. | |
* Modified by Stevedonovan, Aug 3. | |
* __pow is defined by integer second arg | |
* new can be passed a hex literal string | |
* tohex will return a int64 as a hex string |