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
(setq inhibit-startup-message t) | |
(switch-to-buffer "*scratch*") | |
;(global-linum-mode) | |
(global-set-key (kbd "\C-x c") 'clipboard-kill-ring-save) | |
(global-set-key (kbd "\C-x p") 'clipboard-yank) | |
(setq make-backup-files t) | |
(setq version-control t) | |
(setq backup-directory-alist (quote ((".*" . "~/.emacs.d/.emacs_backups/")))) |
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
;;;;;;;;;;;; ---- diff.clj ------------------------ | |
(ns diffclj.diff) | |
;; so what is diff | |
;; diff of two files | |
;; basic unit is line. | |
;; maximize the no of common lines. | |
;; longest-common-subseq. | |
(defn- make-pairs |
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
;; a single unit has forward value and backward gradient. | |
(defrecord Unit | |
[value gradient]) | |
(defrecord Gate | |
[^:Unit input-a ^:Unit input-b]) | |
(defprotocol GateOps | |
(forward [this]) | |
(backward [this back-grad])) |
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
#include <iostream> | |
#include <string> | |
#include <sstream> | |
#include <vector> | |
#include <algorithm> | |
#include <cctype> | |
#include <map> | |
namespace patch | |
{ |
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
/* | |
* Fetch the data from public api. | |
* categorize the incidents in groups of | |
* { | |
category-id : [ | |
for-each-category-a-list-of-list-of-incidents. | |
A-list-of-incidents : stores some nearby incidents. | |
] | |
} |
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
module Main where | |
import System.Environment | |
import Text.ParserCombinators.Parsec hiding (spaces) | |
import Control.Monad | |
import Numeric | |
import Data.Char (digitToInt, toLower) | |
-- our symbols are defined in here. | |
-- our word should start from one of these. | |
symbol :: Parser Char |
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
Thanks for quartzite. | |
I am trying to make quartz work with jdbc store. However, i find that new jobs are not triggering. | |
I can see all new jobs and triggers in my database. My `defjobs` from another files also work. | |
It is just that jobs are not getting triggered. | |
My scheduler code is : | |
```clj | |
(ns theophrastus.utils | |
(:require [clojurewerkz.quartzite.scheduler :as qsched] | |
[clojurewerkz.quartzite.triggers :as qtrigger] |
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
-- Sometimes we want to decode value of type a from a json list of a.. but each with some little differences.. | |
-- Like server sends json: [{"name" : "a"},{"name" : "b"}] | |
-- and we have | |
type alias Player = | |
{ name : String | |
, color : Color | |
} | |
-- color is view specific and server is not sending it.. |
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 learn-clj.chan-patterns | |
(:require [clojure.core.async :as async])) | |
;; first create a channel.. | |
(def mychan (async/chan)) | |
;; # principles | |
;; #1 : taking/putting on a channel blocks if no one is putting/taking from it. | |
;; => can cause deadlocks if done synchronously. | |
;; so, do everything asynchronous or max 1 operation synchronous. |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 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
"Time of Day","Process Name","PID","Operation","Path","Result","Detail" | |
"1:24:35.1974924 PM","dotnet.exe","2380","Process Start","","SUCCESS","Parent PID: 2644, Command line: D:\Users\testadm\dotnet\dotnet.exe --version, Current directory: D:\Users\testadm\Downloads\SysinternalsSuite\, Environment: | |
; =::=::\ | |
; =D:=D:\Users\testadm\Downloads\SysinternalsSuite | |
; =ExitCode=80008083 | |
; ALLUSERSPROFILE=D:\ProgramData | |
; APPDATA=D:\Users\testadm\AppData\Roaming | |
; CLIENTNAME=ASNEGI-PC | |
; CommonProgramFiles=D:\Program Files\Common Files | |
; CommonProgramFiles(x86)=D:\Program Files (x86)\Common Files |