I hereby claim:
- I am dato2003 on github.
- I am darkninjad (https://keybase.io/darkninjad) on keybase.
- I have a public key ASDwnS0iyh2Kvc-AOha8Q3fF4IBZihJVvYrdy4pWwAFupAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| function script_path() | |
| local str = debug.getinfo(2, "S").source:sub(2) | |
| return str:match("(.*/)") | |
| end | |
| function doesFileExist(fname) | |
| local results = false | |
| local filePath = script_path() .. "/" .. fname | |
| if ( filePath ) then | |
| local file, errorString = io.open( filePath, "r" ) |
| local composer = require( "composer" ) | |
| local scene = composer.newScene() | |
| local Width = display.contentWidth | |
| local Height = display.contentHeight | |
| function scene:create( event ) | |
| local sceneGroup = self.view |
| cipher = "10101111" -- must be eight digit binary number | |
| --Returns the XOR of two binary numbers | |
| function xor(a,b) | |
| local r = 0 | |
| local f = math.floor | |
| for i = 0, 31 do | |
| local x = a / 2 + b / 2 | |
| if x ~= f(x) then | |
| r = r + 2^i |
| function doesFileExist( fname) | |
| local results = false | |
| local filePath = system.pathForFile( fname, system.DocumentsDirectory ) | |
| if ( filePath ) then | |
| local file, errorString = io.open( filePath, "r" ) | |
| if not file then | |
| print( "File error: " .. errorString ) | |
| else | |
| print( "File found: " .. fname ) | |
| results = true |