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
| 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
| 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
| /* | |
| !!!!! | |
| 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
| 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
| (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
| <snippet> | |
| <content><![CDATA[ | |
| % Don't forget IEEETRAN.cls and IEEETran.bst | |
| % on your source folder | |
| \documentclass[10pt,conference]{IEEEtran} | |
| % AMS Packages | |
| \usepackage{amsmath} | |
| \usepackage{amsfonts} | |
| \usepackage{amssymb} |
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
| pdflatex final-writeup.tex | |
| This is pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) | |
| restricted \write18 enabled. | |
| entering extended mode | |
| (./final-writeup.tex | |
| LaTeX2e <2009/09/24> | |
| Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge | |
| rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi | |
| c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis | |
| h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis |
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
| getCiteCounts <- function(citekeys, bibtex){ | |
| ## This function takes a list of citation keys, for ex. from lit review notes | |
| ## and a master bibtex file with citekeys and DOIs | |
| ## Returns a vector of number of times each article was cited from CrossRef | |
| # Check for and load/install required packages | |
| # --> stringr, rcrossref | |
| if (!'stringr' %in% installed.packages()) install.packages('stringr') | |
| require(stringr, quietly=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
| EVERY ORGANIZATIONALLY UNIQUE IDENTIFIER (OUI) | |
| Via: http://standards-oui.ieee.org/oui.txt | |
| Details: http://en.wikipedia.org/wiki/Organizationally_unique_identifier | |
| "Azimut" Production Association JSC | |
| "RPC "Energoautomatika" Ltd | |
| +plugg srl | |
| 01DB-METRAVIB | |
| 100fio networks technology llc | |
| 10NET COMMUNICATIONS/DCA |