This document contains a numbered list of all the problems from the CSES Problem Set. Two ordinal numbers are mentioned against each problem. The first number shows the position of the problem in the entire problem set. The second number shows the position of the problem within a section.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Design Pattern: functional options | |
// | |
// Go playground URL: https://play.golang.org/p/FiUmbyqEZgd | |
// | |
// References: | |
// Rob Pike, Self-referential functions and the design of options: https://commandcenter.blogspot.com/2014/01/self-referential-functions-and-design.html | |
// Dave Cheney; Functional options for friendly APIs: https://dave.cheney.net/2014/10/17/functional-options-for-friendly-apis | |
// Functional options on steroids, Márk Sági-Kazár: https://sagikazarmark.hu/blog/functional-options-on-steroids/ | |
package main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Go, builder design pattern | |
// | |
// Go playground URL: https://play.golang.org/p/ArweZ3i7Puc | |
package main | |
import "strconv" | |
import "fmt" | |
type Color string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do { echo -e "HTTP/1.0 200 OK\n\n $(date)" | nc -l -p 9090 -c }; done | |
# One line web-server for Shell (bash, zsh) returning current date and time. | |
# It's good enough to mimic k8s service. | |
# The server could be executed in busybox docker image/container. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ( | |
"reflect" | |
"runtime" | |
"strings" | |
) | |
// GetFuncName returns function name referenced by 'f' | |
func GetFuncName(f interface{}) string { | |
return strings.Split(runtime.FuncForPC(reflect.ValueOf(f).Pointer()).Name(), ".")[1] | |
} |
Marty Lobdell - Study Less Study Smart - YT video
- Don’t study for too long if you are not enjoying it. Take short breaks after 20-30 minutes.
- Don’t study in the living room, bedroom, etc. Study in a separate place dedicated to studying.
- Don’t try to memorize without understanding. Try to understand the concept first.
- Don’t always study alone. Studying in groups helps a lot.
- Don’t highlight text blindly. Highlighting doesn’t help that much. It only indicates Recognization not Recollection of the topic.
- Always take notes. Reviewing the notes after a short time helps a lot.
- Always try to teach others what you have learned. Teaching is the best way of learning.
- Sleep is so much important for pushing something into your long-term memory. Get at least 7-8 hours of sound sleep.
(rev. 01/19)
Civics (History and Government) Questions for the Naturalization Test
The 100 civics (history and government) questions and answers for the naturalization test are listed below. The civics test is an oral test and the USCIS Officer will ask the applicant up to 10 of the 100 civics questions. An applicant must answer 6 out of 10 questions correctly to pass the civics portion of the naturalization test.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq display-time-24hr-format t | |
display-time-format "%I:%M:%S" | |
display-time-interval 1) |
OlderNewer