Skip to content

Instantly share code, notes, and snippets.

Avatar

Zlatko Bratkovic oktalz

  • HAProxy Technologies
  • Zagreb, Croatia
View GitHub Profile
@oktalz
oktalz / main.go
Created Dec 3, 2018
Go example, go version 1.11, what happens with GC if we have a goroutine that is intensive
View main.go
package main
import (
"log"
"runtime"
"time"
)
func example1() {
//this example locks all threads
@oktalz
oktalz / GAMain.java
Last active Oct 23, 2018
My graduate college shutdown method when Genetic algorithm program for finding student schedules was shutting down
View GAMain.java
...
public static class RunWhenShuttingDown extends Thread {
public void run() {
if (perfect.test()) {
co.println("Shutting down...\n\n\n");
co.println("solution is here,\n");
co.println("The end is near,");
co.println("there is no fear,");
try {
@oktalz
oktalz / go-draft-ok.md
Last active Oct 23, 2018
Comment for new go error handling feature
View go-draft-ok.md

Comment on Go2ErrorHandlingFeedback

I like draft design

handle err {
    return fmt.Errorf("copy %s %s: %v", src, dst, err)
}

r := check some_func()