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
-- file: ch04/InteractWith.hs | |
-- Save this in a source file, e.g. Interact.hs | |
import System.Environment (getArgs) | |
interactWith function inputFile outputFile = do | |
input <- readFile inputFile | |
writeFile outputFile (function input) | |
main = mainWith myFunction |
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
lastButOne :: [a] -> a | |
lastButOne xs = | |
if xs == [] then "Empty list :P" | |
if (length xs) == 1 then "You need more items in your list :P" | |
else last (init xs) |
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
lastButOne :: [a] -> a | |
lastButOne xs | |
| xs == [] = "Sorry, empy list!" | |
| length xs == 1 = "Sorry, too short list!" | |
| otherwise = last (init xs) |
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
(gdb) bt | |
#0 WINS_Init () at libs/l_net/l_net_berkley.c:176 | |
#1 0x000000000058cfc6 in Net_Setup () at libs/l_net/l_net.c:330 | |
#2 0x00000000005735c7 in CWatchBSP::SetupListening (this=this@entry=0x949580) | |
at radiant/watchbsp.cpp:503 | |
#3 0x0000000000573664 in CWatchBSP::DoEBeginStep (this=this@entry=0x949580) | |
at radiant/watchbsp.cpp:514 | |
#4 0x0000000000573a24 in CWatchBSP::DoMonitoringLoop (this=0x949580, pCmd=pCmd@entry= | |
0x164c160, sBSPName=<optimized out>, sBSPName@entry=0x1690780 "mcts1") | |
at radiant/watchbsp.cpp:783 |
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
tracepath www.xonotic-gaming.org | |
1: h85-30-59-72.static.se.alltele.net 0.095ms pmtu 1500 | |
1: h85-30-56-1.static.se.alltele.net 1.610ms | |
1: h85-30-56-1.static.se.alltele.net 1.120ms | |
2: 10.11.35.177 2.765ms | |
3: 10.11.0.2 1.449ms | |
4: h87-241-80-1.static.se.alltele.net 1.911ms | |
5: v2021-0-te-3-2.cr2.sth1.se.alltele.net 12.263ms | |
6: no reply | |
7: level3.sto01.atlas.cogentco.com 13.087ms |
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
first copy paste this in the terminal: | |
git clone https://github.com/hutty/ps-xonotic.git && cd ps-xonotic && git remote add upstream https://github.com/klrr/ps-xonotic.git && git fetch upstream && mkdir maps textures demos other && git add maps textures other | |
then add your files and such, also use "git add" for each one and then do: | |
git commit -m "trololol" && git push origin master | |
then go to https://github.com/klrr/ps-xonotic and click the pull-request button ;) |
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
git add #your files && git commit -m "trololol" && git push origin master |
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
git clone https://github.com/hutty/ps-xonotic.git && cd ps-xonotic && git remote add upstream https://github.com/klrr/ps-xonotic.git && git fetch upstream && mkdir maps textures demos other && git add maps textures other |
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
reverseString :: [a,b,c] -> [c,b,a] | |
reverseString [] error "empty string or list" | |
reverseString [a,b,c] = [c,b,a] |
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 XMonad | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Util.Run(spawnPipe) | |
import XMonad.Util.EZConfig(additionalKeys) | |
import System.IO | |
main = do | |
xmproc <- spawnPipe "/usr/bin/xmobar /home/klr/.xmobarrc" |