##分布式系统(Distributed System)资料
介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.
import io.reactivex.Flowable | |
import io.reactivex.schedulers.Schedulers | |
import java.util.* | |
class Demo { | |
data class Result(val a: String, val b: String, val c: String) | |
fun start() { | |
val a = Flowable.just("A") | |
val b = Flowable.just("B") |
<style name="AppTheme.AppBarOverlay.Transplant" parent="ThemeOverlay.AppCompat.Dark.ActionBar"> | |
<item name="colorPrimary">@android:color/transparent</item> | |
<item name="android:background">@android:color/transparent</item> | |
<item name="elevation">0dp</item> | |
</style> |
val toggle = object : ActionBarDrawerToggle(this, drawer_layout, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close) { | |
override fun onDrawerClosed(drawerView: View?) { | |
super.onDrawerClosed(drawerView) | |
val recyclerView = navigationView.getChildAt(0) as RecyclerView | |
recyclerView.layoutManager.scrollToPosition(0) | |
} | |
} | |
drawer_layout.addDrawerListener(toggle) |
class CenterSnappedSmoothScroller(context: Context) : LinearSmoothScroller(context) { | |
override fun calculateDtToFit(viewStart: Int, viewEnd: Int, boxStart: Int, boxEnd: Int, snapPreference: Int): Int { | |
return center(super.calculateDtToFit(viewStart, viewEnd, boxStart, boxEnd, snapPreference), viewEnd - viewStart) | |
} | |
private fun center(dx: Int, viewWidth: Int): Int { | |
return if (dx < 0) { | |
dx + (viewWidth / 2) | |
} else { | |
dx - (viewWidth / 2) |
class A : Serializable { | |
var b: B? = null | |
} | |
// without serializable | |
class B { | |
} | |
= install on mac = | |
== Install == | |
1. `brew update && brew upgrade` | |
2. `brew install go` or `brew install go` | |
== env settings == |
body { | |
font-family: 'Roboto', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; | |
font-size: 14px; | |
line-height: 20px; | |
font-weight: 400; | |
letter-spacing: 0.1px; | |
color: rgba(0, 0, 0, 0.87); | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-rendering: optimizeLegibility; |
# 0 is too far from ` ;) | |
set -g base-index 1 | |
# Automatically set window title | |
set-window-option -g automatic-rename on | |
set-option -g set-titles on | |
#set -g default-terminal screen-256color | |
set -g status-keys vi | |
set -g history-limit 10000 |
##分布式系统(Distributed System)资料
介绍:这是一篇介绍在动态网络里面实现分布式系统重构的paper.论文的作者(导师)是MIT读博的时候是做分布式系统的研究的,现在在NUS带学生,不仅仅是分布式系统,还有无线网络.如果感兴趣可以去他的主页了解.
#!/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-zA-Z0-9' | fold -w 32 | head -n 1 |