typescript – cloning object

Solving The Specific Issue You can use a type assertion to tell the compiler that you know better: Cloning Bear in mind that sometimes it is better to write your own mapping – rather than being totally dynamic. However, there are a few “cloning” tricks you can use that give you difference effects. I will … Read more

Git checkout – switching back to HEAD

You can stash (save the changes in temporary box) then, back to master branch HEAD. Jump Over Commits Back and Forth: Go to a specific commit-sha. $ git checkout <commit-sha> If you have uncommitted changes here then, you can checkout to a new branch | Add | Commit | Push the current branch to the remote. # checkout a new … Read more

How to use python 3.5.1 with a MySQL database

I did the steps below with Python 3.5.1 and it works: Download driver from here Driver installation in cmd, in this folder Python\Python35\PyMySQL-0.7.4\pymysqlpython setup.py build python setup.py install Copy folder Python\Python35\PyMySQL-0.7.4\pymysql to Python\Python35\pymysql Sample code in python IDEimport pymysql import pymysql.cursors conn= pymysql.connect(host=’localhost’,user=’user’,password=’user’,db=’testdb’,charset=’utf8mb4′,cursorclass=pymysql.cursors.DictCursor) a=conn.cursor() sql=’CREATE TABLE `users` (`id` int(11) NOT NULL AUTO_INCREMENT,`email` varchar(255) NOT NULL,`password` varchar(255) … Read more