There are two systems running on my Microsoft machine.
Change user permission;
Windows username/R library path;
library(devtools)
find_rtools()
Sys.setenv(PATH = paste(Sys.getenv("PATH"), "C:/Rtools/bin/",
"C:/Rtools/mingw_64/bin", sep = ";"))
Sys.setenv(BINPREF = "C:/Rtools/mingw_64/bin/")
Sys.getenv()[grep("LIB|PATH", names(Sys.getenv()))]
.fixdevtools <- function() { httr::set_config( httr::config( ssl_verifypeer = 0L ) ) }
.fixdevtools()
write("TMP = C:/tmp", file=file.path(Sys.getenv('R_USER'), '.Renviron'))
.libPaths()
Extentions;
Emmet Live (div>ul>li5, p{some text}, ul>li6{$})
indent-rainbow by oderwat
Python by Microsoft (linting)
VSC hotkeys;
exit()
shift+tab = move each tab
For document, refer to tmux. For tutorial, refer to tmux.
Tmux configuration;
Hotkeys;
For breif tutorial, refer to VIM.
For book Learn Vimscript the Hard Way.
Show Nerdtree.
.vimrc configuration;
Hotkeys;
install to ubuntu;
Useless emmet-vim stuffs in my folder;
set | less (entire environment), ls /etc/bash*
, ls /etc/bash*
,
sudo !! (permission denied, redo last command as root)
which, touch, cp, mv, ls -lart, ls -alh, ls -la, ls -a, ls -l, ll, ls, \ls
, grep.
Windows hotkeys (version 1809 or above);
For tutorial, refer to html begainer.
For html layout, refer to w3school.
html tags;
! html 5 document, language is en
,<html>
<head>
<meta name="" content="">, <link>, <script>, <title>, <style>
,<body>
<header>, <nav>
,<main>, <article>, <section>
,<aside>, <details>, <summary>
,<footer>, " ©
<script src="">
,</body>
<div><img src="../logo_original.png"/></div>, (block)
<span>, (inline)
<hr>, <br>, <strong>, <b>, <big>, <i>, <em>, <blockquote>, <code>, <sup>, <pre> (prefix),
<h1>, <h2 id="world">World ecomonic</h2>
<p class="aside"></p>, <p style="color: red; background-color: blue;">,
<ul>, <li>, <ol type="I">, <dl><dt><dd>,
<table><thead><tbody><caption><tr><th><td colspan="">,
<figure><img src="" alt="" width=10% height=10%><figcaption>This</figcaption></figure>
<a href="#n3" target="_blank">back to top</a>, (external link/internal id/about html/img/text button)
<iframe src="" frameborder="0">, <video src="" controls>, (insert vedios/website)
<form action="" method="">
<label for="id">, (or directly use <p>)
<input type="text/file" name="" id="id" value = "Enter" />, <textarea rows="10">,
<button type="submit">, (or use <a>)
<select>, <option value="">,
</form>
import d3js: <script src="https://unpkg.com/d3@5.9.7/dist/d3.min.js"></script>
For css tutorial, refer to freecodecamp full.
For grid tutorial, refer to freecodecamp.
For practice, refer to Netflix Landing Page.
For clean css code, refer to CSS trick.
selectors;
pseudo elements (add html in css);
media;
browser prefix;
units;
color;
text;
list-style-type: none; (remove bullet points)
font-style: italic;
text-shadow: 1px 1px 3px red;
a:link{}; a:visited{}; a:active{}; a:hover{}; cursor: pointer;
transform/transition/animaion;
transform: translate (move); rotate (45deg); scale (enlarge); skew (20deg);
transition: all 3s ease-in (linear) 2s;
animation-fill-mode: forwards; (stay the last status after animation)
border;
box-shadow: 1px 1px 3px red;
padding (clockwise);
z-index: (z axis, default is 0, far away -2, only for position relative and absolute);
display: block (4dim), inline (2dim), inline-block, none, flex (direction, 1dim), grid (2dim),
grid;
grid-auto-rows;
grid-column: 1/3 (-1); grid-cloumn: auto/span 2; grid-cloumn: span 2;
.grid div:nth-child(){},
grid-area;
bootstrap;
<div class="row">
<div class="col-xs-4 menu"></div>
<div class="col-xs-8 content"></div>
</div>
svg tags;
<svg width="" height="">
<circle cx="100" cy="100" r="100" fill="red">
<rect x y width height>
<g transform="translate(x, y)" transform="scale(1.5)" fill="blue" stroke="black" stroke-width="5">
<line x1 y1 x2 y2 stroke stroke-width>; (M: move to, L: lie to)
<path d="M300 280 L350 200" stroke="black" stroke-width="5" stroke-linejoin="round" fill="none">
</g>
</svg>
For document, refer to d3js.
For tutorial, refer to Data Visualization.
I am unable to import {select arc} from ‘d3’
d3.select,
* svg.style, .append, .attr, .transition().duration.attr,
For js book, refer to jsbook.
For official document, refer to ECMAScript 6.
For relevant document, refer to MDN.
For js tutorial, refer to js crash 2019.
For js practice, refer to .
operators/object/array;
(newline),
${js}`, .,+, concat(), ++, –, +=,
var, const, let,
const{address: { city }} = objective; (object destruction)
JSON.stringify(cars, null, 2); const newCars = JSON.parse(``);
cars.forEach(car=>{console.log(car.price);}); (todos.forEach(function(todo){})
reduce;
let formatCar = car=>`${car.year} ${car.make} ${car.model}: $${car.price}`;
let formatCar = car=>{const{year, make, model, price}=car; return `${year} ${make} ${model}: $${price}`;}
cars
.filter(cars=>car.price<2000)
.map(formatCar)
.join(`\n`);
OOP;
Keywords: Person, this, prototype, constructor, super,
conditional;
switch(color){case ‘red’: console.log(); break; default:}
const color = x>10 ? ‘red’ : ‘black’; (? :)
functions;
DOM;
on website: console.log(window), alert, fetch, document, monitor, localStorage,
getElementByClassName, getElementByTagName,
ul.addEventListener();
document.createElement(‘li’); li.appendChild(document.createTextNode());
new Promise((resolve, reject)=>{;}); myPromise.then(()=>{;}); resolve(message);
* btn.style.background='red';
* btn.addEventListener('click', (e) => {e.preventDefault(); document.querySelector('#my-form').style.background = 'red';});,
For download, refer to nodejs.
For download to ubuntu, refer to How to install Node.js, npm on Ubuntu.
install to windows;
install to ubuntu;
For theory, refer to React JS Crash Course 2019.
For details, refer to beginners 2019.
For practice, refer to React JS Crash Course - 2019.
For npx reactjs, refer to facebook github.
install to windows;
theory;
import ReactDOM from ‘react-dom’; (compare Virtual DOM to real DOM)
const element = <h1>Hellow<h1>; (JSX)
ReactDOM.render(element, document.getElementById(‘root’)); (Render components)
<input>{' '}
,
App.js -> Component.js -> Item.js ->
functions;
<ul>{this.state.tags.map(tag => <li key={tags.id}>{tag}</li>)}</ul>
constructor(){
super();
this.handleIncrement = this.handleIncrement.bind(this);
}
handleIncrement = (product) => {}
this.setState({count: this.state.count+1})
onClick={() => this.handleIncrement(product)}
componentDidMount(){
axios.get('https://API server')
.then(res => this.setState({todos: res.data}))
}
axios.post("https://APT server", {title, completed: false})
.then(res => this.setState({todos: [...this.state.todos, res.data]}));
axios.delete(`https://API server/${id}`)
.then(res => this.setState({todos: [...this.state.todos.filter(todo => todo.id !== id)]}));
To make a desktop application. Install in the way which is same as reactjs.
For beginner tutorial Traversy Media.
For beginner tutorial codedamn.
Install to ubuntu;
download to windows;
install to ubuntu;
For Django tutorial, refer to Python Django Web Framework - Full Course for Beginners 2019.
For python tutorial, refer to Mosh.
install to windows;
For download, refer to python.org.
install to ubuntu;
IDE;
For Microsoft Rtools.
For animation ImageMagick.
For PDF pandoc. It is included in new version package.
For PDF MikTex. Use tinytex.
Basic workflow;
When you install those most important R packages, such as tidyverse
and tidymodel
, you have all other important dependency packages too.
Must have;
Window manager dvm
Whiteboard Bamboo
Share html slides netlify
Flowchart yED
Film resolve