Skip to content

Instantly share code, notes, and snippets.

View BitPuffin's full-sized avatar
🤡
clowning about

Isak BitPuffin

🤡
clowning about
View GitHub Profile
nimrod c -p:. -r linagl/vector.nim
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/linagl-0.1.1' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/x11-1.0' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/scrypt.nim-0.1.0' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/babel-0.2.0' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/nim-portaudio-0.1.1' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/fowltek-0.9.3' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/nim-vorbis-0.1.1' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/nim-glfw-0.1.0' [Path]
config/nimrod.cfg(36, 2) Hint: added path: '/Users/isak/.babel/pkgs/opengl-1.0' [Path]
#include <iostream>
#include <string>
using namespace std;
int main() {
std::string sentencetheytyped; // string variable aka placeholder aka memory banks for the sentence they are asked to type
cout << "type a sentence" << endl; //asks them to type the sentence to be translated, it asks inside the terminal. the endl just is like hitting enter in a word proccessor, so endl just makes it look nice. every output after it will now be on a new line
import asyncio, sockets, logging
var socket: PAsyncSocket
var port: int
proc setupSocket() =
debug("Creating asynchronous socket")
socket = asyncsocket(AF_INET, SOCK_DGRAM, IPPROTO_UDP, false)
doAssert(socket != nil, "Socket creation was unsuccessful")
debug("Done.")
import jester
get "/redirected":
bind TCActionSend, newStringTable
response.data[0] = TCActionSend
response.data[1] = Http303
response.data[2]["Location"] = url
response.data[3] = ""
return
proc createUserObjectFromQueryResult(queryResult: seq[TRow]): PUser =
if queryResult.len == 0:
return nil
let id = queryResult[0].parseInt
let email = queryResult[1]
let password = queryResult[2]
let firstname = queryResult[3]
let lastname = queryResult[4]
result = PUser(id: id, email: email, password: password, firstname: firstname, lastname: lastname)
proc setup*(db: TDbConn) =
db.Exec(sql("""
create table if not exists $#(
id $#,
email $# unique not null,
password $#,
username $# unique not null,
firstname $# not null,
lastname $# not null
)
cancelDownloads = ^void() {
NSLog(@"Cancelling download!");
cancelled = YES;
[operationQueue cancelAllOperations];
cancelDownloads = defaultCancelBlock;
};
NSLog(@"WHAT DOES THIS: %@ LOOK LIKE IN BASE?", [NSString stringWithFormat:@"%@:%@", user, password]);
NSData *base64Data = [[NSString stringWithFormat:@"%@:%@", user, password] dataUsingEncoding:NSUTF8StringEncoding];
NSString *base64 = [base64Data base64Encoding];
NSLog(@"ALL YOUR BASE ARE BELONG TO US 64: %@", base64);
## Author: Isak Andersson
from math import pow, sqrt
from macros import error
type
TVector*[T; D: static[int]] = array[0..D-1, T] ## T = Type, I = Indices - will possibly later be changed to Dimension (number)
TVec2* = TVector[float32, 2]
TVec3* = TVector[float32, 3]
TVec4* = TVector[float32, 4]
./manage.py syncdb
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session