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
class Test { | |
interface Foo { | |
int doFoo(); | |
} | |
interface Bar { | |
int doBar(); | |
} | |
// here we use the union type parameter: Foo & Bar |
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
printf '\33]50;%s%d\007' "xft:Terminus:pixelsize=" 20 | |
- python properties ----------------------------------------------------------------------- | |
>>> props.py >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> | |
| def python_properties(): | |
| with open("/home/fire/python.txt", "r") as f: | |
| print(f.read()) | |
| |
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
[GNOME Session] | |
Name=xmonad-gnome session | |
RequiredComponents=gnome-settings-daemon; | |
RequiredProviders=windowmanager;notifications; | |
DefaultProvider-windowmanager=xmonad | |
DefaultProvider-notifications=notification-daemon |
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
{-# LANGUAGE TemplateHaskell, FlexibleContexts #-} | |
import Data.Lenses | |
import Data.Lenses.Template | |
-- data structures to work on | |
-- for fields ending with an underscore, special lens accessor functions | |
-- can be created with "deriveLenses" | |
data TD = TD { name_ :: String | |
, td_ :: TD |
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
{-# LANGUAGE TemplateHaskell, FlexibleContexts #-} | |
import Data.Lenses | |
import Data.Lenses.Template | |
-- data structures to work on | |
-- for fields ending with an underscore, special lens accessor functions | |
-- can be created with "deriveLenses" | |
data Address = Address { street_ :: String | |
, houseNumber_ :: Int |
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
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Collections.Generic; | |
namespace WriterMonadExample | |
{ | |
public interface Monoid<T> | |
{ | |
T Mempty { get; } |
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
using System; | |
using System.Linq; | |
using System.Text; | |
using System.Collections.Generic; | |
namespace KnightsMove | |
{ | |
public static class KnightsMoveMain | |
{ | |
static string Show<T>(this IEnumerable<T> xs) { return "[" + string.Join(", ", xs) + "]"; } |
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
Software development | |
- Which platforms (Linux, Windows, Mac, Embedded) will I develop for? | |
- What programming languages are you using for which kind of projects / applications? | |
- What Development Environment are you using? | |
- Are you using any coding style guidelines? If yes, can I take a look at the document? | |
- Are you actively supporting / allowing time for keeping your code base maintainable and up to date? | |
- How do you handle documentation? Is there time reserved specifically for documenting projects? |
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
user=> (defn slow-double [n] (Thread/sleep 100) (* n 2)) | |
#'user/slow-double | |
user=> (defn calls-slow-double [] (map slow-double [1 2 1 2 1 2])) | |
#'user/calls-slow-double | |
user=> (calls-slow-double ) | |
(2 4 2 4 2 4) | |
user=> (time (dorun (calls-slow-double))) | |
"Elapsed time: 601.008572 msecs" | |
nil | |
user=> (defn demo-memoize [] |
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 Control.Monad.Error | |
execAna :: Int -> Either String (Int, Int) | |
execAna 0 = Left "ERROR" | |
execAna n = Right (n - 1, n + 1) | |
report :: Either String () -> IO () | |
report (Left err) = putStrLn $ "failed: " ++ err | |
report _ = putStrLn "complete" |
NewerOlder