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
template <class Fun> | |
class ScopeGuard { | |
Fun f_; | |
bool active_; | |
public: | |
ScopeGuard(Fun f) | |
: f_(std::move(f)) | |
, active_(true) { | |
} | |
~ScopeGuard() { if (active_) f_(); } |
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
devtools::load_all() | |
envir <- as.environment("package:darn") | |
deps <- mvbutils::foodweb(where = envir, plotting = FALSE) | |
funmat <- deps$funmat | |
funs <- mget(colnames(funmat), envir, mode = "function") | |
fun_files <- | |
lapply(funs, attr, "srcref") %>% |
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
wget -np -k -e robots=off -r -l 1 https://github.com/krlmlr/tibble/milestones/ https://github.com/krlmlr/tibble/issues/ https://github.com/krlmlr/tibble/labels/ |
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
--- | |
title: "Applying a function over rows of a data frame" | |
author: "Winston Chang" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(collapse = TRUE, comment = "#>") | |
``` |
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(devtools) | |
devtools::load_all() | |
#' # Testing revdep_check() | |
#' | |
#' Functions: | |
create_deps_tested <- function() { | |
deps <- list( | |
testee = character(), |
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
withCallingHandlers( | |
remake::make(remake::list_targets()), | |
message = function(e) { | |
if (grepl("Joining, ", e$message)) { | |
by_clause <- gsub("Joining(.*)\n", "\\1", e$message) | |
clipr::write_clip(by_clause) | |
srcref <- testthat:::find_first_srcref(sys.calls()[-1:-15]) | |
srcfile <- attr(srcref, "srcfile")$filename | |
rstudioapi::navigateToFile(srcfile, srcref[1], srcref[2]) | |
stop("Insert by clause: ", by_clause) |
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
diff --git a/src/sqlite3/sqlite3.h b/src/sqlite3/sqlite3.h | |
index 37d1024..0f55423 100644 | |
--- a/src/sqlite3/sqlite3.h | |
+++ b/src/sqlite3/sqlite3.h | |
@@ -248,8 +248,11 @@ typedef struct sqlite3 sqlite3; | |
** between 0 and +18446744073709551615 inclusive. | |
*/ | |
#ifdef SQLITE_INT64_TYPE | |
+ #ifndef SQLITE_UINT64_TYPE | |
+ #define SQLITE_UINT64_TYPE unsigned SQLITE_INT64_TYPE |
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
> devtools::install_github("tidyverse/dplyr") | |
Downloading GitHub repo tidyverse/dplyr@master | |
from URL https://api.github.com/repos/tidyverse/dplyr/zipball/master | |
Installing dplyr | |
Downloading GitHub repo hadley/rlang@ac7498c9 | |
from URL https://api.github.com/repos/hadley/rlang/zipball/ac7498c9 | |
Installing rlang | |
"C:/PROGRA~1/R/R-33~1.3/bin/x64/R" --no-site-file --no-environ --no-save | |
--no-restore --quiet CMD \ | |
INSTALL \ |
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
Africa/Abidjan | |
Africa/Accra | |
Afr/Addis_Abab | |
Africa/Algiers | |
Africa/Asmara | |
Africa/Asmera | |
Africa/Bamako | |
Africa/Bangui | |
Africa/Banjul | |
Africa/Bissau |
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
# Add this to your .Rprofile | |
options( | |
error = quote(rlang::entrace()), | |
rlang__backtrace_on_error = "collapse" # or "branch" or "full" | |
) |