http://stackoverflow.com/questions/13967063/remove-duplicate-rows-in-r
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Título da sua página</title> | |
</head> | |
<body> | |
</body> | |
</html> |
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
random = (min, max) => | |
Math.floor(Math.random() * (max - min) + min) | |
data = [1..100].map(() -> random(0,1000)) | |
↑↑↑ Array length | |
// One line | |
data = [1..100].map(() -> Math.floor(Math.random() * (1000 - 0) + 0)) | |
↑↑↑ Array length ↑max ↑min ↑min |
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
var str = 'www.maybeyourwebsite.here' | |
document.querySelectorAll('a').forEach(function(e) { | |
if (e.href.indexOf(str) > 0) { | |
console.log(e.href) | |
}; | |
}) |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"file_exclude_patterns": | |
[ | |
"*.DS_store", | |
"*.gem", | |
"*.gz", |
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
var allCards = document.querySelectorAll('.card-project') | |
var cards = []; | |
allCards.forEach( function(element, index) { | |
var currElem = {} | |
var name = element.querySelector('.link-hidden') | |
var author = element.querySelector('.w-hidden-small.w-hidden-tiny.fontsize-smallest.fontcolor-secondary.u-marginbottom-20') | |
var description = element.querySelector('.w-hidden-small.w-hidden-tiny.fontcolor-secondary.fontsize-smaller .link-hidden') | |
var percentage = element.querySelector('.card-project-stats .fontsize-base.fontweight-semibold') | |
var money = element.querySelector('.card-project-stats .fontsize-smaller.fontweight-semibold') | |
currElem.name = name.innerText; |
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
library(TSP) | |
library(tspmeta) | |
coords.df <- data.frame(long=runif(40, min=0, max=100), lat=runif(40, min=0, max=100)) | |
coords.mx <- as.matrix(coords.df) | |
# Compute distance matrix | |
dist.mx <- dist(coords.mx) | |
# Construct a TSP object |
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
date,revenue,margin | |
24-Apr-07,93.24,80 | |
25-Apr-07,95.35,73.5 | |
26-Apr-07,98.84,72.6 | |
27-Apr-07,99.92,92.5 | |
30-Apr-07,99.80,99 | |
1-May-07,99.47,101 | |
2-May-07,100.39,102 | |
3-May-07,100.40,99 | |
4-May-07,100.81,106 |
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
[{"UNITS":216863.95,"AVG_SALE_PRICE":27.4027,"Date":1490918400000,"MARGIN":5942659.315,"REVENUE":1.700522824E7,"CONVERSION":2.02,"PAGEVIEWS":486060.09,"UNITS_PER_ORDER":1.9747},{"UNITS":203857.95,"AVG_SALE_PRICE":27.4316,"Date":1490832000000,"MARGIN":5592153.693,"REVENUE":1.557704542E7,"CONVERSION":2.09,"PAGEVIEWS":472342.68,"UNITS_PER_ORDER":1.9478},{"UNITS":191919.68,"AVG_SALE_PRICE":27.5003,"Date":1490745600000,"MARGIN":5277862.032,"REVENUE":1.474203095E7,"CONVERSION":2.11,"PAGEVIEWS":458506.18,"UNITS_PER_ORDER":1.9253},{"UNITS":187973.59,"AVG_SALE_PRICE":27.6123,"Date":1490659200000,"MARGIN":5190392.777,"REVENUE":1.51979661E7,"CONVERSION":2.07,"PAGEVIEWS":458921.95,"UNITS_PER_ORDER":1.8987},{"UNITS":201077.68,"AVG_SALE_PRICE":27.7819,"Date":1490572800000,"MARGIN":5586336.623,"REVENUE":1.747735456E7,"CONVERSION":2.03,"PAGEVIEWS":480242.68,"UNITS_PER_ORDER":1.9171},{"UNITS":215274.09,"AVG_SALE_PRICE":27.95,"Date":1490486400000,"MARGIN":6016915.571,"REVENUE":1.946879568E7,"CONVERSION":2.02,"PAGEVIEWS":504199 |
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
# Start Manually | |
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start | |
# Stop Manually | |
pg_ctl -D /usr/local/var/postgres stop -s -m fast |
OlderNewer