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
module NG.FS.GUIDemo | |
open System | |
open System.Collections.Generic | |
open NG | |
open NG.FS.GUI | |
open NG.FS.GUI.Common | |
open NG.FS.GUI.Windows | |
open NG.FS.GUI.Widgets | |
open NG.FS.Coroutines |
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
type DefaultWindowStyle () as this = | |
member val Color = ShadowedTextColor(RGBA8.White, RGBA8(0, 0, 0, 127)) with get, set | |
member val Alignment = TextAlignment.Left with get, set | |
member val Ellipsis = Char.ConvertToUtf32("…", 0) with get, set | |
member val Font = getFont guiResourceGroup "fonts/dejavu.font" with get, set | |
member val DecorNine : LazyNineAtlasTextures = getNineAtlasTextures guiResourceGroup "atlases/gui.atlas#decor" with get, set | |
member val HandleSizes = lazy (this.DecorNine.Sizes |> Array.map (Vec2i.Max (Vec2i 5))) | |
interface IWindowStyle with | |
override s.AdditionalSize w = nineAdditionalSize s.DecorNine.Sizes |
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
module NG.FS.ResourceCache | |
open NG | |
open NG.FS.Coroutines | |
open System | |
open System.Collections.Generic | |
type private SharedResource<'T> (r : 'T) = | |
member val Mutex = Mutex() | |
member val Loaded = false with get, set |
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
module NG.SExp | |
open FParsec | |
type Node = | |
| Scalar of string | |
| List of Node list | |
let grammar = | |
// special char is the one that cannot be part of a naked scalar value |
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
module NG.FS.Coroutines | |
open System | |
open System.Threading | |
open System.Collections.Generic | |
open System.Collections.Concurrent | |
type Type = | |
| CPU = 0 | |
| IO = 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
-- Iterate over all lines in `text`, use it like this (handles only | |
-- plain "\n", not "\r\n"): | |
-- for line_num, line in Lines(text) do | |
-- -- line_num - number of the line, starting from 1 | |
-- -- line - contents of the line without "\n" | |
-- end | |
local function Lines(text) | |
local function next_line(state) | |
local text, begin, line_n = state[1], state[2], state[3] | |
if begin < 0 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
// Marching Cubes configurations, packed to 64 bit each. | |
// | |
// Offset 0 bits - a 4 bit integer, the number of indices. | |
// Offset 4 bits and further - 4 bit numbers, edge indices. | |
// | |
// Edges configuration: | |
// | |
// 3 | |
// +-----------------------+ | |
// / | / | |
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
# Maintainer: Rodrigo Bezerra <rodrigobezerra21 at gmail dot com> | |
# Contributor: delor <bartekpiech@gmail com> | |
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com> | |
# Contributor: Dan Vratil <progdan@progdansoft.com> | |
# Contributor: thotypous <matiasΘarchlinux-br·org> | |
# Contributor: Imanol Celaya <ornitorrincos@archlinux-es.org> | |
# Contributor: heinz from #qt-creator | |
pkgname=qtcreator-git | |
pkgver=3.0.1.840.gaa2a063 |
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 <cstdio> | |
const int Size = 256; | |
static int opti_killer = 2; | |
int test1() { | |
int *buf = new int[Size*Size*2]; | |
int out = 0; | |
#define bufget(buf, x, y, z) buf[y*Size+x+((z)%2)] | |
for (int z = 0; z < Size; z++) { |
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
#!/usr/bin/env lua | |
local function sh(fmt, ...) | |
local cmd = string.format(fmt, ...) | |
return os.execute(cmd) | |
end | |
local function sh_or_err(fmt, ...) | |
local cmd = string.format(fmt, ...) | |
if not os.execute(cmd) then |