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
| package main.cz.jpenzes.jsim.simulator; | |
| public abstract class BaseEvent<TimeStamp extends Comparable<TimeStamp>> implements Event<TimeStamp> { | |
| public abstract void execute(Simulator<TimeStamp> simulator); | |
| } |
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
| /** | |
| * Always returns true. | |
| */ | |
| public boolean isAvailable() { | |
| return false; | |
| } |
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
| dm-id: 1 | |
| dm-name: Miroslav Bajtoš a vývoj Node.js | |
| dm-date: 1. 6. 2013 | |
| dm-mp3: http://feeds.soundcloud.com/stream/117006007-devminutes-1-miroslav-bajtos.mp3 | |
| dm-soundcloud: https://soundcloud.com/devminutes/1-miroslav-bajtos | |
| dm-resources: | |
| dm-resource: Miroslav Bajtoš | |
| Twitter||https://twitter.com/bajtos | |
| LinkedIn||http://cz.linkedin.com/in/bajtos |
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
| namespace GraphAnalyzer.RTree | |
| { | |
| public interface IRTreeEdge<out T> | |
| { | |
| IRTreePoint FromRTreePoint { get; set; } | |
| IRTreePoint ToRTreePoint { get; set; } | |
| T Value { get; } | |
| bool Contains(double x, double y); | |
| } | |
| } |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using NUnit.Framework; | |
| namespace GraphAnalyzer.Core.Graph.Tests | |
| { | |
| class GraphTests | |
| { |
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
| function sleep(millis) | |
| { | |
| var startDate = new Date(); | |
| var currentDate = null; | |
| do { | |
| currentDate = new Date(); | |
| } | |
| while(currentDate - startDate < millis); | |
| } |
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
| (defn mod35 [number] | |
| (or | |
| (zero? (mod number 3)) | |
| (zero? (mod number 5)))) | |
| (reduce + (filter mod35 (range 1 1000))) |
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
Show hidden characters
| // installed Clojure packages: | |
| // | |
| // * BracketHighlighter | |
| // * lispindent | |
| // * SublimeREPL | |
| // * sublime-paredit | |
| { | |
| "word_separators": "/\\()\"',;!@$%^&|+=[]{}`~?", | |
| "paredit_enabled": true, |
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 is backed up at /Users/jpenzes/Library/Application Support/LightTable/User/user.behaviors.bak | |
| [ | |
| [:app :lt.objs.style/set-skin "dark"] | |
| [:app :lt.objs.style/font-settings "consolas" "9" "1.5"] | |
| ;;[:app :lt.objs.app/set-default-zoom-level "-0.5"] | |
| [:app :lt.objs.settings/pair-keymap-diffs] | |
| [:editor :lt.objs.editor/no-wrap] | |
| [:editor :lt.objs.editor/line-numbers true] | |
| [:editor :lt.objs.editor/tab-settings false 2 2] |
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 jpenzes.swap (:require [clojure.test :refer :all])) | |
| (defn swap [v i1 i2] | |
| (let [t (get v i1)] | |
| (assoc (assoc v i1 (get v i2)) i2 t))) | |
| (deftest swap-test | |
| (testing "Should swap two items by index in a vector" | |
| (let [test-vector [1 2 3 4 5 6 7 8 9] | |
| expected [1 8 3 4 5 6 7 2 9]] |