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
import csv | |
#Koden: | |
# | |
# with open("filenavn") as file: | |
# #kode der bruger filen her | |
# | |
#svare til at sige: | |
# | |
# file = open("filnavn") |
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
extern crate "parser-combinators" as parser; | |
use parser::{Parser, ParserExt}; | |
fn main() { | |
let good_test = "2 + 12 + 22"; | |
let integer = parser::spaces().with( | |
parser::chars1(parser::digit()).map(|s| s.parse::<i32>().unwrap()) | |
); |
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
[09/29/14 21:13:03] - Running wine-1.5.31 ScrollsLauncher.exe (Working directory : /home/avh/.PlayOnLinux/wineprefix/scrolls_newl/drive_c/Program Files/Scrolls) | |
fixme:ver:GetCurrentPackageId (0x33f5b0 (nil)): stub | |
Error(1): Cannot read file "C:\Program Files\Scrolls/game/launcher.jar". | |
Set run directory to C:\Program Files\Scrolls | |
fixme:wininet:InternetSetOptionExW Flags 00000000 ignored | |
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 3000 | |
fixme:wininet:InternetSetOptionExW Flags 00000000 ignored | |
fixme:wininet:InternetSetOptionW INTERNET_OPTION_SEND/RECEIVE_TIMEOUT/DATA_SEND_TIMEOUT 3000 | |
fixme:wininet:InternetSetOptionExW Flags 00000000 ignored | |
fixme:advapi:RegisterTraceGuidsW (0x583eef, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x603364, (null), (null), 0x6126c8,): stub |
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
#version 330 core | |
layout(location = 0) in vec3 vertexPosition_modelspace; | |
uniform mat4 MVP; | |
void main(){ | |
vec4 v = vec4(vertexPosition_modelspace,1); // Transform an homogeneous 4D vector | |
gl_Position = MVP * v; | |
//mat4 M = mat4( |
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
GLuint VertexArrayID; | |
glGenVertexArrays(1, &VertexArrayID); | |
glBindVertexArray(VertexArrayID); | |
GLfloat g_vertex_buffer_data[] = { | |
-1.0f, -1.0f, 0.0f, | |
1.0f, -1.0f, 0.0f, | |
0.0f, 1.0f, 0.0f, | |
}; |
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
values :: [Integer] -> [[Integer]] | |
values alph = do | |
v1 <- alph | |
v2 <- alph | |
v3 <- alph | |
v4 <- alph | |
v5 <- alph | |
return [v1, v2, v3, v4, v5] |
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
--Data der definere elementerne i mængden B (mængden af børn) | |
--Kon (Køn) er enten dreng, D, eller pige, P | |
data Kon = D | P | |
--Dag er den ugedag barnet er født. deriving (Eq) gør at lighed er defineret for typen. | |
data Dag = Ma | Ti | On | To | Fr | Lo | So deriving (Eq) | |
--Man konstruere et barn ved funktionen B, der tager et Køn og en dag. | |
data Barn = B Kon Dag | |
--Nyttige funktioner til at operer på elementerne |
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
;This program writes the first 24 terms of the Fibonacci sequence(after that it overflows anyways) to the | |
;display of the DCPU-16 from 0x10c. | |
;It is my first ever assembly program, so it is probably quite horribly, but there isn't that many examples | |
;floating around, so i thought this might be useful. | |
;this works in the dcpu-emu program by interfect(https://bitbucket.org/interfect/dcpu-emu/overview) it might | |
;work elsewhere too, but it think that one is the only one which has the display implemented. | |
;Last note: I wrote all the comments in like 5 minutes, so they are not that good, and there might be | |
;grammatical/spelling/other mistakes. | |