Tuesday

leetcode study methods

Barbara Oakley repetition method seems like a lot of work , but could be most reliable:
A.Many users of spaced repetition strive for three additional exposures to new information within the first 24 hours of learning it.
B.Following that, they aim to revisit the content daily for the next week.
C.After the first week, they make a point of revisiting the content from time to time so it doesn’t fade from memory.

Laura method 
A.Setting up education schedule - helps with motivation and consistency
B.have consitent pattern when and where you want to start working and which topic on particular day  
C.leetcoding 30 min to 1h a day max 
D.Topics: arrays,trees, graphs, strings, dfs/bfs,bit manipulations,stacks, queue


Process:
 pick two problems from the topics:
 20 minutes for the first problem 
 20 minutes for the second problem

Day 1: 
Work on problem from topic (solving steps aka SS ):
1.define assumptions, inputs/outputs,edge cases, potential working solution in plain english and hadwritten code 
2.translate to leetcode editor
3.compare solution to official 
4.If you cannot solve it for 5-10 minutes look for solution 

Day 2: 
Switch to second topic and do SS for problem from second topic.

Day 3: 
Quick reflection on problem from Day 1: where did u go wrong, and do handwritten solution again and retype solution and repeat all SS steps. 
Plus solve one extra problem of same topic from Day1. 

Day 4:
Quick reflection on problem from Day 2: where did u go wrong, and do handwritten solution again and retype solution and repeat all SS steps. 
Plus solve one extra problem of same topic from Day2. 

Day 5:
Quick reflection on problem from Day 3: where did u go wrong, and do handwritten solution again and retype solution and repeat all SS steps. 
Plus solve one extra problem of same topic from Day3. 

Day 6:
Quick reflection on problem from Day 4: where did u go wrong, and do handwritten solution again and retype solution and repeat all SS steps. 
Plus solve one extra problem of same topic from Day4. 

Day 7: rest and leetcode free day :).

Tips: 
G1.Goal is to solve problem (even with bruteforce solution)
Make most obvious bruteforce solution first  - translate to leetcode editor, fix bugs 
in next session think how to optimise solution and what are trade-offs -  
G2.practice solving problems out loud - on the interview u kinda freeze up and u need to talk out loud to let interviewwer ur thoughts  
G3.record urself answering leetcode Qs out loud or do mock interview  
G4.create club w/ur friends


Thursday

"This file requires a newer version of Anki" apkg error resolved

Unfortunately, anki software just jammed all those fields into one field the database with some kind of separator.Which is a very messy way to store data. And apparently different version of Anki storing data into different database inside apkg file. Here is new version of apkg converters that reads data from correct database.

Friday

convert excel file into sql and import all data

  • Here are steps how to convert convert excel file into sql and import all data
  • In step 1:Click on Open input file and open excel file
  • Click on Next Step button
  • In step 2:Specify sql database type (sql server, mysql, sqlite)
  • Click on Next Step button
  • In step 3:Click on Save Result file to save SQL script
  • sql script will have create table and insert instructions
  • Run sql script into database tool to export data from excel into database.

excel-to-sql

Wednesday

powershell lambda syntax and returing multiple values from function

  

#function returns multiple params including lambda 
function test1{
    param(
    $a,$b,$c
    )
    return ($c, $b,$a , {param($x) Write-Host "a1$x" })
}

#receiving multiple results (including lambda ) from function call 
($d,$e,$f, $a2) = test1 1 2 3

#printing result
Write-Host "$d $e $f"
#invoking lambda
$a2.invoke("inv")

Thursday

windows 10 text font is too large

here is how to fix it

Here's how I fixed it on mine, thanks to G. Ortega...

"if the characters are big but windows configuration windows says that scalling it's at 100%.

the solution that worked for me was:

1.- set it to 125%.

2.- log out (windows requires it) -> log in.

3.- set it back to 100%.

4.- repeat step 2.

5.- now everything it's back to normal. 

imagemagic add text to image

rem different types of text annotations on existing images rem cyan yellow orange gold rem -gravity SouthWest rem draw text and anno...