I hereby claim:
- I am pablomayobre on github.
- I am positive07 (https://keybase.io/positive07) on keybase.
- I have a public key ASCZxji-8G6JnQiV23l1l_gEOK5SrGTQ6FBnVLXzXyJT7Qo
To claim this, I am signing this object:
<?php | |
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits |
import { useState, useRef, useLayoutEffect } from "react"; | |
const useAnimationFrame = (callback) => { | |
const callbackRef = useRef(callback); | |
const frameRef = useRef(); | |
const timerRef = useRef(); | |
useLayoutEffect(() => { | |
callbackRef.current = callback; | |
}, [callback]); |
local Object = require 'lib.classic' | |
local function push (t, ...) | |
local pushed = select('#', ...) | |
for i=1, pushed do | |
t[t.n + i] = select(i, ...) | |
end | |
return t.n + pushed |
[url=https://itch.io/jam/love2d-jam-2019][img=https://i.imgur.com/OI9haBh.png]LÖVE Jam Banner[/img][/url] | |
Hey folks! I'll be hosting a new [url=https://itch.io/jam/love2d-jam-2019]LÖVE Jam[/url]! | |
Jam starts on [b][color=#004080]February 15th 23PM GMT+0[/color][/b] and ends on [b][color=#004080]February 18th 23PM GMT+0[/color][/b]. | |
[size=150]Rules[/size][list] | |
[*][b]Your game needs to be made with the LÖVE framework[/b] | |
[*]The game must be made during the jam — existing basecode and libraries can be used | |
[*]Assets must be made during the jam — exceptions are logo/intro/fonts |
local wyss = { | |
--OS detected by LÖVE | |
os = love.system.getOS(), | |
--Current LÖVE version (>= 11.0) | |
love = table.concat({love.getVersion()}, '.', 1, 3), | |
--Lua version (in case it was changed) | |
lua = _VERSION, | |
processor = { | |
--Number of threads/processors |
--MIT License | |
--Copyright (c) 2019 Arvid Gerstmann, Jake Besworth, Max Cahill, Pablo Mayobre, LÖVE Developers | |
--Original author: https://github.com/Leandros | |
--Max frame skip: https://github.com/jakebesworth | |
--Manual garbage collection: https://github.com/Geti | |
--Put it all together: https://github.com/Positive07 | |
--Original love.run: LÖVE Developers | |
local conf = { |
I hereby claim:
To claim this, I am signing this object:
enum DialogType | |
{ | |
DIALOG_SAVE, | |
DIALOG_OPEN, | |
DIALOG_FOLDER, | |
DIALOG_MULTIPLE; | |
DIALOG_MAX_ENUM | |
}; | |
#import <nfd.h> |
local function new (self, ...) | |
local obj = setmetatable({}, self) | |
if self.initialize then self.initialize(obj, ...) end | |
return obj | |
end | |
local mt = { __call = function (self, ...) | |
return self:new(...) | |
end } |
interface Callback <A, B> { | |
(key: A, value: B, map: BidirectionalMap <A, B>): void | |
} | |
const remove = <A, B> (item: A, from: A[], pair: B[]) => { | |
let index = from.indexOf(item) | |
if (index !== -1) { | |
from.splice(index, 1) | |
pair.splice(index, 1) |