Skip to content

Instantly share code, notes, and snippets.

View Teino1978-Corp's full-sized avatar

Teino Boswell Teino1978-Corp

  • Ocho Rios, Jamaica
View GitHub Profile
@Teino1978-Corp
Teino1978-Corp / pivot.rb
Created October 31, 2015 07:46 — forked from bridgpal/pivot.rb
Pivot Algorithm
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
@Teino1978-Corp
Teino1978-Corp / Latex config (debian)
Created October 31, 2015 07:54 — forked from pedroherub/Latex config (debian)
How to config LaTeX environment easily (TexLive)
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)
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++) {
@Teino1978-Corp
Teino1978-Corp / Main.Java
Created October 31, 2015 20:10 — forked from elizabet92/Main.Java
Problem 3 - Depedencies Resolving
/*
!!!!!
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;
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
@Teino1978-Corp
Teino1978-Corp / parse.clj
Created October 31, 2015 20:31 — forked from timsgardner/parse.clj
parse
(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])))
@Teino1978-Corp
Teino1978-Corp / ieee-conference.sublime-snippet
Created November 1, 2015 04:08 — forked from pipex/ieee-conference.sublime-snippet
Sublime Text 2 snippet for IEEE (IEEETran) conferences with my personal configuration preferences
<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}
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
@Teino1978-Corp
Teino1978-Corp / getCiteCounts.R
Created November 1, 2015 05:24 — forked from gadenbuie/getCiteCounts.R
Look up citation counts with rcrossref
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)
@Teino1978-Corp
Teino1978-Corp / EveryOUI
Created November 1, 2015 05:27 — forked from jeffThompson/EveryOUI
Every Organizationally Unique Identifier (OUI), via: http://standards-oui.ieee.org/oui.txt
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