国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
/* Copyright (c) 2018 Arvid Gerstmann. */ | |
/* This code is licensed under MIT license. */ | |
#ifndef AG_RANDOM_H | |
#define AG_RANDOM_H | |
class splitmix | |
{ | |
public: | |
using result_type = uint32_t; | |
static constexpr result_type (min)() { return 0; } |
// Firestore | |
export function writableFirestoreStore<T>() { | |
let unsubscribe: () => void = () => {} | |
let docRef: any | |
const store = writable<T | null>(null) | |
let storeSet = store.set | |
return { | |
subscribe: store.subscribe, |
国内从 Docker Hub 拉取镜像有时会遇到困难,此时可以配置镜像加速器。Docker 官方和国内很多云服务商都提供了国内加速器服务。
Dockerized 实践 https://github.com/y0ngb1n/dockerized
Ubuntu 16.04+、Debian 8+、CentOS 7+
<?php | |
//CSSとして使うPHPファイルの一番上に記述 | |
header('Content-Type: text/css;', 'charset=utf-8'); ?> | |
@charset "utf-8"; | |
<?php | |
//後はCSSを書く! | |
$bgcolor = 'pink'; | |
?> |
abstract class FilterableListAdapter<T, VH : RecyclerView.ViewHolder>( | |
diffCallback: DiffUtil.ItemCallback<T> | |
) : ListAdapter<T, VH>(diffCallback), Filterable { | |
private var originalList: List<T> = currentList.toList() | |
override fun getFilter(): Filter { | |
return object : Filter() { | |
override fun performFiltering(constraint: CharSequence?): FilterResults { | |
return FilterResults().apply { |
CTRL + A
: Move the cursor to the beginning of the line
CTRL + E
: Move the cursor to the end of the line
OPTION + Left Arrow
: Move the cursor one word backward
OPTION + Right arrow
: Move the cursor one word forward
Left Arrow
: Move the cursor one character backward
Right Arrow
: Move the cursor one character forward
#!/usr/bin/env python3 | |
class Pump(object): | |
def __init__(self, fuel_capacity): | |
self.fuel_capacity = fuel_capacity | |
self.car = None | |
class GasStation(object): |
#!/bin/sh | |
# sendmail-gcloud | |
# | |
# Installation instructions | |
# Copy the content of this file to /usr/sbin/sendmail-gcloud | |
# | |
# Google Account | |
# --------------- | |
# Create a Google Cloud account if you don't have one yet. Free trial is available at https://console.cloud.google.com/freetrial |
#include <lua.hpp> // LuaJIT header | |
#include <iostream> // Access to std::system("PAUSE") | |
#include <memory> | |
// A simple class to be bound in our Lua environment. | |
class MyClass | |
{ | |
public: | |
MyClass() | |
{ |