原创 SwiftUI 的 Color cheat sheet
https://sarunw.com/posts/dark-color-cheat-sheet/
原创 python 中的函式定義 原
示例:定義一個斐波拉契數列 >>> def fib(n): # 打印 Fibonacci 序列到 n ... """打印到 n 的 Fibonacci 序列.""" ... a, b = 0, 1 ... wh
原创 Rails 命令及用法 原
生成 Controller (route views helpers assets) rails generate controller Welcome index 查看路由 rails routes 生成 Model rails g
原创 WebFlux 學習 —— 使用示例 原
中文示例 Spring Boot 文檔 官方指南 英文示例(源碼) 先看一遍官方文檔 通過註解的方式瞭解到,與 spirng mvc 不同之處在於Controller 方法的返回值(此外還有參數列表與方法體)不太一樣。 @RestContr
原创 Spring Security 支持 的 EL 表達式 原
參考一下 Spring Security 支持的所有SpEL表達式 安全表達式 計算結果 authentication 用戶認證對象 denyAll 結果始終爲false hasAnyRole(list of roles
原创 linux 命令學習記錄 頂 原
小鶴 ofyu 圓圈數字 i3wm xprop tmux 命令 tmux 進入 session <C-b> d 後臺掛起當前 session tmux ls 列出所有 session tmux a 恢復到之前的 sessi
原创 React 使用 linkState 組件 原
綁定事件到狀態 官方實現 npm 安裝 npm install react-link-state --save 使用示例 import React from 'react'; import linkState from 'react-li
原创 React 創建組件的 3種方式 原
無狀態和函數式(stateless) 寫法一 const Hello = (props) => ( <div> Hello {props.title} {props.name} </div> ) 寫法二 function Hell
原创 Java Web 相關面試題總結 原
Spring 相關的的面試題 1.什麼是 IoC 容器? 2.解釋下 Spring Bean 的生命週期 IoC 容器是 Spring Bean 居住的地方,Spring Bean 僅僅需要 pojo,從下面的幾個步驟來分析 Bea
原创 centos 下正向代理 原
安裝 bbr加速 使用 squid 作爲正向代理服務器 1.安裝squid yum install squid 2.修改默認文件 vim /etc/squid/squid.conf 簡單點,將其中 http_access deny all
原创 兔子問題 —— 遞歸的應用 原
兔子問題、遞歸 public class Test { /** * 兔子問題 * 斐波那契數列 */ @org.junit.Test public void test2(
原创 python 中的面向對象 原
原文 域和作用空間 本地域,函數域(nonlocal)和 全局域(global) def scope_test(): def do_local(): spam = "local spam" def do_n
原创 關於 瀏覽器中的 cookie 與 session 的相關闡述 原
1. 服務端只創建 cookie字符值: 客戶端向服務端發送請求,建立連接。服務端創建 cookie字符值,作爲響應頭返回。 注意:如果客戶端是瀏覽器,會自動存儲這個 Set-Cookie 的值到 瀏覽器的session 中。如果是腳
原创 docker-compose 文件的編寫 原
網絡連接問題 1. 如何連接未在 docker-compose.yaml 中聲明的服務? 創建一個專屬網絡 web-net ,並將已存在的容器添加進來 docker network create web-net # 除了使用命令鏈接,
原创 Redux - example 原
Redux Example Examples from http://redux.js.org/docs/introduction/Examples.html Counter Vanilla Run the Counter Vanilla