e[dit] | evil-edit |
w[rite] | evil-write |
wa[ll] | evil-write-all |
sav[eas] | evil-save |
r[ead] | evil-read |
b[uffer] | evil-buffer |
bn[ext] | evil-next-buffer |
bp[revious] | evil-prev-buffer |
bN[ext] | bprevious |
sb[uffer] | evil-split-buffer |
This file contains hidden or 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
<?php | |
$port = fopen('/dev/ttyUSB0', 'w'); | |
fwrite($port, 'A'); | |
fwrite($port, 'a'); | |
fclose($port); |
This file contains hidden or 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
; This code is hereby released by its author (Per Vognsen) into the public domain. | |
; It's mostly a proof of concept though it was surprisingly usable for how simple it was to code. | |
; If you want to use it as a starting point for a more polished package, go right ahead. | |
(require 'cl) | |
(defstruct wm-window buffer (point 0) (start 0) (hscroll 0) dedicated) | |
(defvar wm-windows) | |
(defvar wm-windows-alist) |
This file contains hidden or 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
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
This file contains hidden or 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
;; Try to ensure sensible window splitting, independent of frame and font size. | |
;; Things I don't want: | |
;; - excessive horizontal splitting (generally I prefer no more than 2 windows across) | |
;; - horizontal splitting when frame is tall and narrow (causing eg useless narrow man page formatting) | |
;; So, aim for a simple policy: popup windows shall be half width in a wide frame, | |
;; half height in a tall frame. | |
;; | |
;; Emacs' window splitting behaviour is complex and must be read carefully. | |
;; In particular, note: it checks split-window-height first, and if that permits it to | |
;; split vertically, it does that and split-window-horizontally is ignored. |
This file contains hidden or 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
#include <Rcpp.h> | |
using namespace Rcpp; | |
// q is a vector of quantiles to calculate for each column of x | |
// [[Rcpp::export]] | |
NumericMatrix colQuantiles(NumericMatrix x, NumericVector q) { | |
int c = x.ncol(); | |
int r = x.nrow(); | |
int n = q.length(); | |
NumericMatrix out(n, c); |