View challenge.java
package demoproject; | |
import java.math.BigInteger; | |
public class blah { | |
public static void main(String[] args) { | |
BigInteger big = BigInteger.valueOf(2).pow(500000).subtract(BigInteger.ONE); | |
String[] num = big.toString().split("(?!^)"); | |
int number = 0; |
View GitHub-HQ.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View classlib.lua
-- Developer: sbx320 | |
-- License: MIT | |
-- Github Repos: https://github.com/sbx320/lua_utils | |
--// classlib | |
--|| @type: Shared | |
--|| @desc: A library providing several tools to enhance OOP with Lua | |
--|| @info: Registers itself into the global namespace | |
--\\ | |
local elementClasses = {} |
View emptyfiles.sh
# replaces the contents with "$FILENAME\n======" (representing a markdown header with the filename). | |
find . -type f -exec sh -c 'printf "$1 \n======" > "$1"' sh {} \; | |
# append extension ".md" | |
find . -type f -exec sh -c 'mv "$1" "$1.md"' sh {} \; |
View pathfinding.go
package main | |
import ( | |
"io/ioutil" | |
"log" | |
"os" | |
"path" | |
"strings" | |
) |
View gist:4fdfc2317b62fdcf328a
-- Developer: sbx320 | |
-- License: MIT | |
-- Github Repos: https://github.com/sbx320/lua_utils | |
--// classlib | |
--|| A library providing several tools to enhance OOP with MTA and Lua | |
--\\ | |
SERVER = triggerServerEvent == nil | |
CLIENT = not SERVER | |
DEBUG = DEBUG or false |
View velo2.patch
Index: MTA10/mods/shared_logic/lua/CLuaMain.cpp | |
=================================================================== | |
--- MTA10/mods/shared_logic/lua/CLuaMain.cpp (revision 6938) | |
+++ MTA10/mods/shared_logic/lua/CLuaMain.cpp (working copy) | |
@@ -163,7 +163,7 @@ | |
lua_classfunction ( luaVM, "getPosition", CLuaOOPDefs::GetElementPosition ); | |
lua_classfunction ( luaVM, "getRotation", CLuaOOPDefs::GetElementRotation ); | |
lua_classfunction ( luaVM, "getMatrix", CLuaOOPDefs::GetElementMatrix ); | |
- lua_classfunction ( luaVM, "getVelocity", "getElementVelocity" ); | |
+ lua_classfunction ( luaVM, "getVelocity", CLuaOOPDefs::GetElementVelocity ); |
View edf.patch
Index: edf/edf.lua | |
=================================================================== | |
--- edf/edf.lua (revision 1024) | |
+++ edf/edf.lua (working copy) | |
@@ -408,7 +408,7 @@ | |
for dataField, dataDefinition in pairs(elementDefinition.data) do | |
local checkedData = edfCheckElementData(theElement, dataField, dataDefinition) | |
if checkedData == nil then | |
- outputDebugString('Failed validation for ' .. elementType .. '!' .. dataField) | |
+ exports.editor_gui:outputMessage("Unable to create element; validation failed for "..elementType.."!"..dataField) |
View uwot.patch
Index: MTA10/mods/deathmatch/_Deathmatch 2008.vcproj | |
=================================================================== | |
--- MTA10/mods/deathmatch/_Deathmatch 2008.vcproj (revision 7004) | |
+++ MTA10/mods/deathmatch/_Deathmatch 2008.vcproj (working copy) | |
@@ -1266,6 +1266,10 @@ | |
RelativePath="..\shared_logic\lua\oopdefs\CLuaOOPFunctionDefs.Drawing.cpp" | |
> | |
</File> | |
+ <File | |
+ RelativePath="..\shared_logic\lua\oopdefs\CLuaOOPFunctionDefs.RadarArea.cpp" |
View sound.c.lua
local sounds = { | |
"hello.mp3", | |
"2a.mp3", | |
"a.as.mp3", | |
"ahe.wav" | |
} | |
local currentNumber; | |
addCommandHandler("startPlaylist", function() |
OlderNewer