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 parse-form [down-tok?, up-tok?, [tok & toks]] | |
(loop [frm [tok], toks toks] | |
(if-let [[tok2 & toks2] (seq toks)] | |
(cond | |
(down-tok? tok2) (let [[res toks3] (parse-form down-tok?, up-tok?, toks)] | |
(recur (conj frm res) toks3)) | |
(up-tok? tok2) [(conj frm tok2) toks2] | |
:else (recur (conj frm tok2) toks2)) | |
[frm nil]))) |
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
tokenBase = token showTok posFromTok | |
where showTok (p, t) = show t | |
posFromTok (p, t) = p | |
match x = tokenBase testTok | |
where testTok (p, t) = if t == x then Just t else Nothing | |
advance = tokenBase testTok | |
where testTok (p, t) = Just t |
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
/* | |
!!!!! | |
For resolving the problem, I am using org.json files. They can be downloaded from: http://www.json.org/java/index.html | |
!!!!! | |
*/ | |
package Main; | |
import org.json.*; | |
import java.io.File; | |
import java.io.FileNotFoundException; |
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
var collection_helper = (function () { | |
var collection = [], | |
$collection = $(collection), | |
inCollection = function (item) { | |
//debugger; | |
var index = -1, | |
iterator = 0, | |
total_iterator = $collection.length; | |
for (iterator; iterator < total_iterator; iterator++) { |
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
TexLive (global) -> /usr/share/texlive | |
TexLive (local) -> /usr/local/share/texlive | |
Downloading new packages: @ /usr/share/texmf/tex/latex (then => sudo texhash) | |
Searching for new packages: apt-cache search "package" | |
Latex local fonts: | |
(global) put map line here -> /usr/local/share/texmf/web2c/updmap.cfg (then => sudo updmap-sys) | |
(local) put map line here -> $HOME/texmf/web2c/updmap.cfg (then => updmap) |
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
input = [1, 4, 6, 3, 2] | |
def get_pivot(input=[]) | |
1.upto(input.length-2) do |pivot| | |
left = input[0...pivot].inject(:+) | |
right = input[pivot+1..-1].inject(:+) | |
return pivot if left == right | |
end | |
return -1 | |
end |
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
\documentclass[12pt]{article} | |
% math typesetting | |
\usepackage{array, amsmath, amssymb, amsfonts} | |
% layout control | |
\usepackage[paper=a4paper,left=25mm,right=25mm,top=20mm,bottom=25mm]{geometry} | |
\usepackage[onehalfspacing]{setspace} | |
\setlength{\parskip}{.5em} | |
\usepackage{rotating} |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
$ctable = Hash.new(0) # table of string => count | |
def clearTerm | |
print "\e[2J\e[f" | |
end |
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
// | |
// rui_test.h | |
// Quanta | |
// | |
// Created by Justin Bowes on 2014-11-06. | |
// Copyright (c) 2014 Informi Software Inc. All rights reserved. | |
// | |
#ifndef rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h | |
#define rui_test__B2BD1D7_F65A_4026_B67F_437E3C640A18_h |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.