System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go directory by:
| // Run this in the F12 javascript console in chrome | |
| // if a redirect happens, the page will pause | |
| // this helps because chrome's network tab's | |
| // "preserve log" seems to technically preserve the log | |
| // but you can't actually LOOK at it... | |
| // also the "replay xhr" feature does not work after reload | |
| // even if you "preserve log". | |
| window.addEventListener("beforeunload", function() { debugger; }, false) |
#Intro
Kotlin is a new programming language for the JVM. It produces Java bytecode, supports Android and generates JavaScript. The latest version of the language is Kotlin M5.3
Kotlin project website is at kotlin.jetbrains.org.
All the codes here can be copied and run on Kotlin online editor.
Let's get started.
| git reset --hard | |
| git clean -f -d | |
| Description: | |
| ============ | |
| Git Tips: Remove untracked files and directories from the working | |
| tree when switching branches or checking out different commits. | |
| Explanation: |
| // by alex evans, 2011. released into the public domain. | |
| // based on a first ever reading of the png spec, it occurs to me that a minimal png encoder should be quite simple. | |
| // this is a first stab - may be buggy! the only external dependency is zlib and some basic typedefs (u32, u8) | |
| // | |
| // VERSION 0.02! now using zlib's crc rather than my own, and avoiding a memcpy and memory scribbler in the old one | |
| // by passing the zero byte at the start of the scanline to zlib first, then the original scanline in place. WIN! | |
| // | |
| // more context at http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. | |
| // | |
| // follow me on twitter @mmalex http://twitter.com/mmalex |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
The Client Blob Cache is a new Bedrock optimization - it allows blocks and biomes to be cached on Clients to avoid resending identical chunks over and over. Chunks and biomes make up the vast majority of network traffic in a lot of common cases (eg. login, teleport or dimension switches) but at the same time, they rarely change. Allowing the Client to reuse chunks it has seen in the past can save a ton of traffic and latency!
The Client Cache is a Content Addressed Storage (a bit like git) that stores Blobs and retrieves them based on their full hashes (BlobIds). This means that the cache doesn't actually know about Chunks - in the future, we might start using it for more types of data, like skins or data driven entities.
A nice thing we get from the CAS approach is that the cache is persistent: returning players will be able to reuse content that was sent them in previous sessions or even previous sessions in different servers as long as tha
| package pb | |
| import ( | |
| "fmt" | |
| "reflect" | |
| st "github.com/golang/protobuf/ptypes/struct" | |
| ) | |
| // ToStruct converts a map[string]interface{} to a ptypes.Struct |
| /* ---------------------------------------------------------------------------------------------------- | |
| Super Form Reset | |
| A couple of things to watch out for: | |
| - IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
| - The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
| - You NEED to set the font-size and family on all form elements | |
| - Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
| // This is a value (de|en)coder for the github.com/google/uuid UUID type. For best experience, register | |
| // mongoRegistry to mongo client instance via options, e.g. | |
| // clientOptions := options.Client().SetRegistry(mongoRegistry) | |
| // | |
| // Only BSON binary subtype 0x04 is supported. | |
| // | |
| // Use as you please | |
| package repository | |
| import ( |