Posts

Showing posts from February, 2022

mysql syntax

rename table      alter table equip.history rename to report;

use Git Bash on Windows from the VS Code terminal

Image
setting.json   "terminal.integrated.profiles.windows" : {     "PowerShell" : { "source" : "PowerShell" , "icon" : "terminal-powershell" },     "Command Prompt" : {       "path" : [         "${env:windir}\\Sysnative\\cmd.exe" ,         "${env:windir}\\System32\\cmd.exe"       ],       "icon" : "terminal-cmd"     },     "GitBash" : {       "path" : [ "C:\\Git\\bin\\bash.exe" ],       "icon" : "terminal-bash"     },   }, use "code" launch VScode $alias code=/c/Users/username/vscode/bin/code $ PATH=$PATH:code

install MySQL server and Workbrench in Win10

Image
 https://dev.mysql.com/downloads/file/?id=510038 Next > Execute next > next default setting Next > Next window + R > cmd $cd C:\Program Files\MySQL\MySQL Server 8.0\bin $mysql server -u root -p >show databases; >use mysql; >show tables; >select * from component; >create table  check path:  

Git install in window

Image
  then all "Next>" Done!

Go - string format

  d - decimal integer o - octal integer O - octal integer with 0o prefix b - binary integer x - hexadecimal integer lowercase X - hexadecimal integer uppercase f - decimal floating point, lowercase F - decimal floating point, uppercase e - scientific notation (mantissa/exponent), lowercase E - scientific notation (mantissa/exponent), uppercase g - the shortest representation of %e or %f G - the shortest representation of %E or %F c - a character represented by the corresponding Unicode code point q - a quoted character U - Unicode escape sequence t - the word true or false s - a string v - default format #v - Go-syntax representation of the value T - a Go-syntax representation of the type of the value p - pointer address % - a double %% prints a single % res := fmt.Sprintf("%s is %d years old", name, age) https://zetcode.com/golang/string-format/

MS SQL - install MSSQL on Mac

Image
  https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-docker-container-deployment?view=sql-server-ver15&pivots=cs1-bash $sudo docker pull mcr.microsoft.com/mssql/server:2019-latest $docker run --name sql_server -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=strong@pwd' -p 1401:1433 -d mcr.microsoft.com/mssql/server:2019-latest $docker ps $ npm install -g sql-cli docker ps $mssql -u sa -p <password> >>select @@version download AZURE connect MS SQL Server