A Few Powerful Options For Git Stash

Git stash has many common operations that can be represented by following commands. git stash git stash list git stash pop [–index] [stash_id] git stash apply [–index] [stash_id] git stash drop [stash_id] git stash clear Now we will learn a few other powerful options. git stash push After October 2017, Read more…

Compile Code And Run It With Mono In Docker

The Basic Knowledge About Docker. To find all containers and images: [parallels@localhost ~]$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES [parallels@localhost ~]$ docker images REPOSITORY TAG IMAGE ID CREATED SIZE mono latest 2ba93b1033ba 2 weeks ago 690MB hello-world latest fce289e99eb9 11 months ago 1.84kB To read information Read more…

Using LLDB To Explore Why My Program Crashed

Last night I read some pages in VTKUsersGuide to learn VTK factory mechanism. I got the basic steps of defining my own factory and use it. Implement virtual function which is declared in vtkObjectFactory. virtual const char* GetVTKSourceVersion(); virtual const char* GetDescription(); Create Object Use the protected function RegisterOverride which Read more…

Python Edit Simple Text File

Read a single txt file and indent every paragraph. myReader.py def getText( filePath ): with open( filePath ) as file: content = file.read() paragraphs = content.split( ‘\n’ ) file.close() newContent = “” for para in paragraphs: newContent = newContent + ” ” + para + “\n” return newContent main.py import Read more…

Use Python To Handle Simple PDF Edit Tasks

The article shows a few simple examples which use python to edit PDF. Copy And Encrypt PDF Just copy an existing PDF and generate a new file which is encrypted import PyPDF2 fileName = “/Users/weiyang/Desktop/Test.pdf” newFileName = “/Users/weiyang/Desktop/NewTest.pdf” file = open( fileName, ‘rb’ ) reader = PyPDF2.PdfFileReader( file ) writer Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X