package main
import "fmt"
func main() {
myString := "dog"
myByte := []byte("cat")
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
// Collection and Map are interfaces. | |
// compare to Array and Map in other languages. | |
import java.util.Collection | |
import java.util.Map | |
// sample methods of Collection interface: | |
// | |
// add | |
// clear | |
// equals | |
// isEmpty |
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
// --------------- catalog --------------- | |
// | |
// * basic data type and size(64-bit platforms) | |
// * padding for alignment requirements | |
// * a useful function to print number in binary | |
// * pointer and double pointer | |
// * printf | |
// * struct | |
// * initialize and access | |
// * access through pointer |
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
const puppeteer = require('puppeteer') | |
class Element { | |
constructor(parent, css='body') { | |
this._parent = parent | |
this._css = css | |
this._page = this._parent.constructor.name == 'Page' ? this._parent : this._parent._page | |
} | |
async goto(url) { |
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
# ========== theory ========== | |
# | |
# Mock and MagicMock are all classes in `unitest.mock` library. | |
# | |
# ---------- The MagicMock Class ---------- | |
# A MagicMock instance can: | |
# * capture the arguments that the method is called with | |
# * count how many times it's called | |
# * return values that we specify | |
# * return the same or different values each time the mocked method is called |
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
from locust import HttpUser, task, between | |
import uuid | |
class User(HttpUser): | |
wait_time = between(5, 9) | |
@task | |
def scenario_01(self): | |
self.view_computer() | |
self.create_computer() |
OlderNewer