Skip to content

Instantly share code, notes, and snippets.

Dennis Felsing def-

Block or report user

Report or block def-

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1ca961af4617333e6fc55b0769a53844
==22735== Conditional jump or move depends on uninitialised value(s)
==22735== at 0x214699: str_utf8_decode (system.c:3094)
==22735== by 0x2762BB: CTextRender::TextEx(CTextCursor*, char const*, int) (text.cpp:924)
==22735== by 0x2758A3: CTextRender::TextWidth(void*, float, char const*, int, float*) (text.cpp:758)
==22735== by 0x34C3AE: CUI::DoLabel(CUIRect const*, char const*, float, int, int) (ui.cpp:390)
==22735== by 0x34C55A: CUI::DoLabelScaled(CUIRect const*, char const*, float, int, int) (ui.cpp:403)
==22735== by 0x2D34C5: CMenus::RenderNews(CUIRect) (menus.cpp:917)
==22735== by 0x2D3DDD: CMenus::Render() (menus.cpp:1038)
==22735== by 0x2D8178: CMenus::OnRender() (menus.cpp:1812)
==22735== by 0x3228F5: CGameClient::OnRender() (gameclient.cpp:608)
View x.cpp
// g++ -o x x.cpp && ./x
#include <iostream>
struct CMeteor
{
CMeteor(unsigned x)
{
std::cout << x << std::endl;
}
View x.py
import re
import timeit
def deslugify2(string):
try:
n = u''
t = 0
i = 0
for c in string:
View app.nim
import math
const
params = 2'i32
print = 10000'i32
generations = 100000'i32
popsize = 100
mutate = 0.5
bound_from = 0.0
bound_to = 100.0
View x.nim
import os, osproc, strutils, rdstdin
type UserNotFound = object of Exception
const
userFields = ["Full Name", "Account active", "Account expires", "Password last set"]
userNotFound = "The user name could not be found"
proc getDomainUser(username: string): seq[string] =
result = @[]
View foo.nim
proc fib(n: int): int =
if n <= 0: 1
else: fib(n-1) + fib(n-2)
static:
echo fib(3)
View foo.nim
import tables, sequtils
let t = {1: "one", 2: "two"}.toTable
let k = toSeq(t.keys())
echo k
View foo.nim
import sequtils
proc `[]`[T](s: openarray[T], x: int, y: Slice[int]): seq[T] =
result = newSeq[T]()
for i in countup(x, y.b, y.a - x):
result.add(s[i])
let x = toSeq(0..20)
echo x[3,5..13]
View foo.nim
import times
proc fib(n: int32): int32 =
if n <= 1: n
else: fib(n-1) + fib(n-2)
proc main =
let timeStart = epochTime()
var result: int32 = 0
View primes.nim
import os, times, future, math, sequtils, strutils
proc get_primes7(n: int32): seq[int32] =
if n < 2:
return @[]
result = @[2'i32]
if n == 2:
return
You can’t perform that action at this time.