LMJW Blog My notes.

Install GMP on windows 10 machine

Recently, I was trying to install GMP library on my windows 10 machine.

The first problem that I was facing is

‘gcc’ is not recognized as an internal or external command, operable program or batch file."

Then I did some searches and I found this page which showed how to install GMP on windows. However, it is a bit outdated, I still encounter some problems in following its steps. Luckily I figured out how to solve the problems and installed the GMP successfully.

python subprocess

Python subprocess examples Description This is a collection of python subprocess examples for easy usage. Although I found the python documents are very comprehensive, I found there is not much examples of showing how to use. This document act as a note of how to use python subprocess package. Environment settings OS Windows 10 home python Anaconda, python 3.6.3 Main functions subprocess.run() the code is executed in IDLE command line window. >>> import subprocess as sb >>> bash_exec = "C:\\Program Files\\Git\\bin\\bash.exe" >>> sb.run([bash_exe, '-c','pwd'], stdout=sb.PIPE) CompletedProcess(args=[‘C:\Program Files\Git\bin\bash.

An experiment using golang and python to execute command in docker

Description:

Using golang to execute python code, which can in turn execute docker command to control docker container.

我的软件清单

为了方便查看,我将本贴收录在我的博客中,请支持此贴的原作者,田琦的博客

整理了下自己喜欢的软件,列出了这个清单。

我的原则是:尽量使用免费开源软件,不使用破解软件。

本文长期更新,欢迎推荐。

Markdown Style Guide

This is a forked syntax cheatsheet for Jekyll. View the markdown used to create this post. [View the markdown used to create this post](https://raw.githubusercontent.com/barryclark/www.jekyllnow.com/gh-pages/_posts/2014-6-19-Markdown-Style-Guide.md). This is a paragraph, it’s surrounded by whitespace. Next up are some headers, they’re heavily influenced by GitHub’s markdown style. Header 2 (H1 is reserved for post titles)## ## Header 2 (H1 is reserved for post titles)## Header 3 ### Header 3 Header 4 #### Header 4 A link to Jekyll Now. A big ass literal link http://github.com/barryclark/jekyll-now/ A link to [Jekyll Now](http://github.com/barryclark/jekyll-now/). A big ass literal link <http://github.com/barryclark/jekyll-now/> An image, located within /images

common knowledge cheat sheet

Rust String.push(char) takes char Vec has reverse method where as iterator has rev method String and &str both have chars method that convert string to Char String and &str can be split_whitespace they also can call split(pat: P) e.g split(' ') is equivalent to split by whitespace NOTE: in rust usize -1 could overflow to max, this might causing algorithm not working properly If we are dealing with linked list with Option<Box<Node>>, we can potentially using Box::clone() to overcome some limitation due to borrow checker. Box::clone should be relatively not expensive as mentioned in rust book: a box is a smart pointer to a heap allocated value of T.