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
<?php | |
/** | |
* Logger with CouchDB backend | |
* | |
* Available parameters: | |
* - url: the couchdb server url (optional, default: http://localhost:5984) | |
* - dbname: the name of the database (required) | |
* - timeout: seconds waiting for the server (optional, default: 0.5) | |
* |
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
#!/bin/bash | |
apt-get install libgtk-3-dev libgtksourceview-3.0-dev gsettings-desktop-schemas-dev | |
cd /tmp | |
wget http://ftp.gnome.org/pub/gnome/sources/gitg/0.2/gitg-0.2.5.tar.bz2 | |
tar xjf gitg-0.2.5.tar.bz2 | |
cd gitg-0.2.5 | |
./configure | |
make |
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
#!/bin/bash | |
apt-get install libgtk2.0-dev libgtksourceview2.0-dev gsettings-desktop-schemas-dev | |
cd /tmp | |
wget http://ftp.gnome.org/pub/gnome/sources/gitg/0.1/gitg-0.1.2.tar.gz | |
tar xzf gitg-0.1.2.tar.gz | |
cd gitg-0.1.2 | |
./configure | |
make |
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
-- az elso nyers megvalositas szambol -> szoveg | |
fizzbuzzText n = | |
if n `mod` 3 == 0 then | |
if n `mod` 5 == 0 then | |
"FizzBuzz" | |
else | |
"Fizz" | |
else | |
if n `mod` 5 == 0 then | |
"Buzz" |
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
-- array($year, $model, $price) | |
-- (Int, String, Int) | |
type Price = Int | |
data CarType = Ford | Chevrolet deriving (Show) | |
data Vehicle = Car Int CarType Price | |
| Bicycle Price deriving (Show) | |
type Store = [Vehicle] | |
storePrice :: Store -> Price |
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
-- array($year, $model, $price) | |
-- (Int, String, Int) | |
type Price = Int | |
data CarType = Ford | Chevrolet deriving (Show) | |
data Vehicle = Car Int CarType Price | |
| Bicycle Price | |
| Motor Price deriving (Show) | |
data Accessory = SteeringWheel Price | Brake Price deriving (Show) | |
type Store = [Vehicle] |
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
-- array($year, $model, $price) | |
-- (Int, String, Int) | |
type Price = Int | |
data CarType = Ford | Chevrolet deriving (Show) | |
data Vehicle = Car Int CarType Price | |
| Bicycle Price | |
| Motor Price deriving (Show) | |
data Accessory = SteeringWheel Price | Brake Price deriving (Show) | |
type Store = [Vehicle] |
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
io | |
redis | |
*.hi | |
*.o | |
bin | |
config | |
vendor |
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
module MyJson where | |
import Data.List | |
data JValue = JString String | |
| JBool Bool | |
| JNumber Double | |
| JNull | |
| JList [JValue] | |
| JObject [(String, JValue)] |
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
$ php -a | |
Interactive shell | |
php > $obj = new stdClass; | |
php > $numKey = 123; | |
php > $obj->{$numKey} = 'foo'; | |
php > $ary = (array) $obj; | |
php > var_dump($obj, $ary); | |
class stdClass#1 (1) { | |
public $123 => |
OlderNewer