- Create a folder at the root of your user home folder
(Example:
C:/Users/uname/
) called.ssh
. - Create the following files if they do not already exist (paths begin from the root of your user home folder):
.ssh/config
# (https://stackoverflow.com/questions/1826519/how-to-assign-from-a-function-which-returns-more-than-one-value) | |
':=' <- function(lhs, rhs) { | |
frame <- parent.frame() | |
lhs <- as.list(substitute(lhs)) | |
if (length(lhs) > 1) | |
lhs <- lhs[-1] | |
if (length(lhs) == 1) { | |
do.call(`=`, list(lhs[[1]], rhs), envir=frame) | |
return(invisible(NULL)) | |
} |
CRAN policy: | |
''Packages which use Internet resources should fail gracefully with an | |
informative message if the resource is not available (and not give a | |
check warning nor error).' | |
Copied from https://stackoverflow.com/questions/953481/find-and-restore-a-deleted-file-in-a-git-repository | |
Find the last commit that affected the given path. As the file isn't in the HEAD commit, this commit must have deleted it. | |
git rev-list -n 1 HEAD -- <file_path> | |
Then checkout the version at the commit before, using the caret (`^`) symbol: | |
git checkout <deleting_commit>^ -- <file_path> |
<?php | |
$curl = curl_init('http://landregistry.data.gov.uk/landregistry/query'); | |
curl_setopt_array($curl, array( | |
CURLOPT_VERBOSE => true, | |
CURLOPT_ENCODING => 'gzip,deflate', | |
CURLOPT_HTTPHEADER => array('Accept: text/plain'), | |
)); |
cd
to navigate to where you want to put your project<!-- If you’re not using GitHub or you want to create a tag without a release on GitHub. | |
You can use the follow git commands: --> | |
git tag -a v1.0.0 -m "Releasing version v1.0.0" | |
git push --tags |
pkgs <- c("readxl", "lubridate", "zoo", "dplyr") | |
lapply(pkgs, require, character.only = TRUE) | |
temp <- paste0(tempfile(), ".xls") | |
file <- download.file("http://www.econ.yale.edu/~shiller/data/ie_data.xls", | |
destfile = temp, mode = "wb") | |
sp500 <- read_excel(path = temp, | |
sheet = "Data", | |
col_types = c("text", "skip", "skip", "skip", |
library(doParallel) | |
# Choose number of iterations | |
n <- 100 | |
# Progress combine function | |
f <- function(iterator){ | |
pb <- txtProgressBar(min = 1, max = iterator - 1, style = 3) | |
count <- 0 | |
function(...) { |