Client sends a request, then server parses and then processes the request, finally send a response to the client, which parses it and consumes.
- Web, HTTP, DNS. SSH
- RPC (Remote Procedure Call)
import sys | |
import pickle | |
import time | |
import webbrowser | |
import pywhatkit | |
from datetime import datetime | |
import pyautogui as pg | |
now = datetime.now() |
import os | |
fn C.execvp(file charptr, argv &charptr) int | |
fn main() { | |
final_editor_cmd := os.file_name(os.args[0])[1..] | |
if os.args.len < 2 { | |
eprintln('Usage: `v$final_editor_cmd FILE:LINE: ...`') | |
exit(1) | |
} |
pub fn (mut c Checker) can_type_cast(from table.Type, to table.Type) bool { | |
from_type_sym := c.table.get_type_symbol(from) | |
to_type_sym := c.table.get_type_symbol(to) | |
// check basic types | |
if c.check_types(from, to) { | |
return true | |
} | |
if to == table.bool_type || to_type_sym.kind == .none_ || from == table.none_type { | |
return false | |
} |
import os { flush } | |
struct Print { | |
sep string = ' ' | |
end string = '\n' | |
} | |
fn (p Print) print(args ...string) { | |
for i, arg in args { | |
print(arg) |
module is_thirteen | |
import math | |
import time | |
import strings | |
const ( | |
thirteen_strs = [ | |
"xiii", // Roman numeral 13 | |
"1.3", // Basically 13, see proof in https://github.com/jezen/is-thirteen/pull/420 |
https://play.golang.org/p/4ZGpGd9Dq-q |