This file contains 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
/*Geo map for COLOMBIA WITH COORDS https://developers.google.com/chart/interactive/docs/gallery/geomap*/ | |
function drawVisualization() { | |
var dataTable = new google.visualization.DataTable(); | |
dataTable.addRows(3); | |
dataTable.addColumn('number', 'LATITUDE', 'Latitude'); | |
dataTable.addColumn('number', 'LONGITUDE', 'Longitude'); | |
dataTable.addColumn('number', 'Votantes', 'Value'); // Won't use this column, but still must define it. |
This file contains 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
require 'roo' | |
require 'axlsx' | |
require 'fileutils' | |
class XlsScript | |
attr_accessor :file_path | |
def initialize(file_path) | |
@file_path = file_path |
This file contains 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
# based on Haversine formula | |
# http://en.wikipedia.org/wiki/Haversine_formula | |
distance = (lat1, lon1, lat2, lon2) -> | |
R = 6371 | |
a = 0.5 - Math.cos((lat2 - lat1) * Math.PI / 180) / 2 + Math.cos(lat1 * Math.PI / 180) * Math.cos(lat2 * Math.PI / 180) * (1 - Math.cos((lon2 - lon1) * Math.PI / 180)) / 2 | |
R * 2 * Math.asin(Math.sqrt(a)) |
This file contains 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
import Ember from 'ember'; | |
import DS from 'ember-data'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); | |
var adapter = new DS.Adapter(); | |
console.log(adapter); |
This file contains 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 namespace std; | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> | |
#include <climits> | |
#include <cstdlib> |
This file contains 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
declare namespace oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"; | |
declare namespace xdb="http://exist-db.org/xquery/xmldb"; | |
declare namespace request="http://exist-db.org/xquery/request"; | |
declare namespace dc="http://purl.org/dc/elements/1.1/"; | |
declare namespace oai_lom="http://ltsc.ieee.org/xsd/LOM"; | |
declare namespace functx = "http://www.functx.com"; | |
declare function local:term-callback($term as xs:string, $data as xs:int+) as element() { | |
<term freq="{$data[1]}" docs="{$data[2]}" n="{$data[3]}">{$term}</term> | |
}; |
This file contains 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
// jQuery code on the client-side showing how Event-Driven programming works | |
// When a button is pressed, an Event occurs - deal with it | |
// directly right here in an anonymous function, where all the | |
// necessary variables are present and can be referenced directly | |
$("#myButton").click(function(){ | |
if ($("#myTextField").val() != $(this).val()) | |
alert("Field must match button text"); | |
}); |
This file contains 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
{ | |
"_id" : "bc2a41170621c326ec68382f846d5764", | |
"_rev" : "2612672603", | |
"item" : "apple", | |
"prices" : { |
This file contains 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
/* | |
Esteban Arango Medina | |
*/ | |
#include <algorithm> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <sstream> | |
#include <fstream> | |
#include <cassert> |
This file contains 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
CODEFORCES -> http://codeforces.com/contests | |
TOPCODER -> http://community.topcoder.com/tc?module=Static&d1=calendar&d2=thisMonth | |
UVA -> http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=12 ó http://acm.uva.es/contest/ | |
PKU -> http://poj.org/contests | |
SGU -> http://acm.sgu.ru/contests.php | |
CONTESTS ANDMEJ -> http://contests.factorcomun.org/ | |
Z-TRENING -> http://www.z-trening.com/competitions.php | |
TJU -> http://acm.tju.edu.cn/toj/vcontest/ | |
CODECHEF -> http://www.codechef.com/contests | |
ZOJ -> http://acm.zju.edu.cn/onlinejudge/showContests.do |
OlderNewer