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
-- arrow test | |
-- http://www.iforce2d.net/b2dtut/sticky-projectiles | |
-- video: http://screencast.com/t/vcPLSJR6xkIq | |
require("mathlib") | |
local sWidth, sHeight = display.actualContentWidth, display.actualContentHeight | |
local centerX, centerY = sWidth/2, sHeight/2 |
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
-- DropBox API v2 Library | |
require("utils") -- https://gist.github.com/HoraceBury/9321964 | |
local iolib = require("iolib") -- https://gist.github.com/HoraceBury/d8d2fa3382f82a7c7faa | |
iolib.isdebug = false | |
local lib = {} | |
local function printer(str) | |
iolib.isdebug = lib.IsDebug |
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
-- swipe library | |
--[[ Libraries ]]-- | |
local composer = require("composer") | |
--[[ Fields ]]-- | |
local mainstage = display.getCurrentStage() | |
local stage = composer.stage |
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 t = [[ your html ]] | |
-- list of strings to replace (the order is important to avoid conflicts) | |
local cleaner = { | |
{ "&", "&" }, -- decode ampersands | |
{ "—", "-" }, -- em dash | |
{ "’", "'" }, -- right single quote | |
{ "“", "\"" }, -- left double quote | |
{ "”", "\"" }, -- right double quote | |
{ "–", "-" }, -- en dash |
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
Moving groups of physics objects | |
https://forums.coronalabs.com/topic/74929-moving-group-of-phyics-objects/ | |
Setting a physics body's position | |
https://forums.coronalabs.com/topic/74900-how-to-permanently-set-bodys-x-position/ | |
Collision events | |
https://forums.coronalabs.com/topic/74846-collision-events-order/ | |
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
-- debug console | |
local widget = require("widget") | |
local lib = {} | |
local originalPrintFunc = print | |
local debugPrintFunc = nil | |
local showingDebugConsole = false |
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
-- io operations | |
local json = require("json") | |
local lfs = require( "lfs" ) | |
local iolib = {} | |
--[[ FACILITIES ]]-- | |
local function toDate( timestamp ) |
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
-- catmull-rom-spline library | |
-- Resources: | |
-- https://gist.github.com/1383576 | |
-- http://codeplea.com/simple-interpolation | |
-- http://codeplea.com/introduction-to-splines | |
require("tablelib") -- https://gist.github.com/HoraceBury/9307117 | |
require("mathlib") -- https://gist.github.com/HoraceBury/9431861 |
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 lib = {} | |
function lib.newShadowLayer( shadowgroup ) | |
local function refresh() | |
if (shadowgroup and shadowgroup.numChildren) then | |
for i=1, shadowgroup.numChildren do | |
local shadow = shadowgroup[i] | |
local object = shadowgroup[i].shadowparent | |
if (not shadow.isBodyActive) then |
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
using System; | |
using NUnit.Framework; | |
using System.Data; | |
namespace RandomTests | |
{ | |
[TestFixture] | |
public class NumberTests | |
{ | |
public static void Main(string[] args) |