This file contains hidden or 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 Data.List (isSuffixOf) | |
main :: IO () | |
main = do | |
mapM_ putStrLn . filter (\w -> any (`isSuffixOf` w) extensions) . lines =<< readFile "enable1.txt" | |
where | |
extensions = | |
words "hs py asp do go js rb" |
This file contains hidden or 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
def longest(input_string): | |
# no need for the type check. | |
# str is built-in. use another name(and use the right variable) | |
longest_len = 0 | |
words = input_string.split() | |
longest = '' | |
for word in words: | |
if len(word) > len(longest): | |
longest = word |
This file contains hidden or 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 <assert.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include "pprint.h" | |
void ppDeclList(const DeclList *); |
This file contains hidden or 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/python | |
import sys | |
import os | |
import cv2 | |
import numpy as np | |
from binascii import b2a_hex | |
from matplotlib import pyplot as plt | |
This file contains hidden or 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
void prettyDeclList(DeclList* declList) { | |
return; | |
} | |
void prettyStaList(DeclList* staListj) { | |
Decl* ptr = staList->head; | |
while(ptr != NULL) { |
This file contains hidden or 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
void prettyDeclList(DeclList* declList) { | |
return; | |
} | |
void prettyStaList(DeclList* staListj) { | |
Decl* ptr = staList->head; | |
while(ptr != NULL) { |
This file contains hidden or 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
(ns theland.core | |
(:require-macros [cljs.core.async.macros :refer [go]]) | |
(:require [om.core :as om :include-macros true] | |
[om.dom :as dom :include-macros true] | |
[cljs.core.async :refer [put! chan <!]] | |
)) | |
(enable-console-print!) | |
;; define your app data so that it doesn't get over-written on reload |
This file contains hidden or 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<stdio.h> | |
#include<ctype.h> // isspace | |
#include<stdlib.h> // malloc, realloc | |
#define SIZE 100 | |
// Hvis man tæller mellemrum, så giver man forskellige resultater | |
// afhængigt af om strengen slutter med et mellemrum eller ej | |
// "hej med dig" -> 2 ord pga 2 mellemrum | |
// "hej med dig " -> 3 ord pga 3 mellerum |
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
int main() | |
{ | |
srand(time (0)); | |
int array[20]; // erklærer et integer array med 20 pladser | |
int i, n = 20, count = 0; |
This file contains hidden or 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
build-depends: MonadRandom | |
, array | |
, base | |
, megaparsec | |
, mtl | |
, random | |
, shelly | |
, text >= 1.2.2.1 | |
, hsc |