Skip to content

Instantly share code, notes, and snippets.

@kolman
kolman / gol.clj
Created Jan 31, 2015
Game of Life in Clojure, slightly modified from original here: http://clj-me.cgrand.net/2011/08/19/conways-game-of-life/
View gol.clj
(ns joyful-game.game-of-life)
(defn neighs [[x y]]
(for [dx [-1 0 1]
dy [-1 0 1]
:when (not (= 0 dy dx))]
[(+ x dx) (+ y dy)]))
(defn should-be-alive [nc is-alive]
(or (= nc 3)
View gist:7889661

Vážení a milí účastníci!

Sobotní CodeRetreat se blíží a tak nám dovolte seznámit Vás s organizačními informacemi:

Co budete potřebovat?

Vemte si notebook s rozchozeným IDE nějakého jazyka, ve kterém umíte napsat a spustit test. Na jazyku nezáleží, vyberte si takový, který je vám sympatický:)

Jak budeme programovat?

View gist:6281615
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1190)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3454)
View gist:1761691
<Sarcasm>
<Sarcasm.Style>
<Style TargetType="Sarcasm">
<Setter Property="FontWeight" Value="Heavy" />
</Style>
</Sarcasm.Style>
<Sarcasm.Content>You know what would be great? If we could code everything in XAML.</Sarcasm.Content>
</Sarcasm>
@kolman
kolman / gist:1427422
Created Dec 3, 2011
Game of Life rules
View gist:1427422
module CodeRetreat
open Xunit
type Cell =
| DeadCell of int
| LiveCell of int
let hasChanceToLife (cell:Cell) =
match cell with
@kolman
kolman / gist:1297625
Created Oct 19, 2011
Test WSDL generated by WCF
View gist:1297625
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel.Description;
using System.Text;
using System.Xml.Schema;
using Gmc.Fido.WebServices.Api.SurveyDataService;
using NUnit.Framework;
using ServiceDescription = System.Web.Services.Description.ServiceDescription;
View A Message from Planet XAML
<Label Content="(default)">
<Label.Style>
<Style TargetType="Label">
<Style.Triggers>
<DataTrigger Binding="{Binding Path=DefaultOutput, Converter={x:Static Converters:StringIsEmptyConverter.Instance}}" Value="False">
<Setter Property="Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
You can’t perform that action at this time.