fourcolor

@fourcolor

Joined on Nov 6, 2021

  • 請同學透過以下連結將自己的 GitHub 帳號連結到 GitHub Classroom:lab01: https://classroom.github.com/a/-zt8cyd_ 接著會看到以下畫面 請點選自己的姓名以及學號,接著會出現以下畫面 點選 Accept this assignment ,就會被加到 class room 了 同學需要透過 git 來繳交作業
     Like 1 Bookmark
  • Background and Motivation As one of the team leaders, you know that nothing keeps your fellow elves more productive and motivated than a steady supply of candy canes! But all seven levels of the Candy Cane Forest are closed for revegetation, so the only ones available are stuck in the break room vending machines. And even though you receive free snacks on the job, the vending machines are always broken and don’t always give you what you want. Problem Definition Your objective is to find a strategy to beat your opponent as much as possible. Both participants will work with the same set of $N$ vending machines (bandits). Each bandit provides a random reward based on a probability distribution specific to that machine. Every round each player selects ("pulls") a bandit, the likelihood of a reward decreases by 3%. Each agent can see the move of the other agent, but will not see whether a reward was gained in their respective bandit pull.
     Like  Bookmark
  • Example1 App.java public class App{ public static void main(String []args){ Employee emp = new Employee(); emp.setName("James"); } }
     Like  Bookmark
  • JWT 介紹 JSON Web Token (JWT) 是一種基於 JSON 的開放標準(RFC 7519),基於 JSON object 的編碼,並透過這個編碼進行傳遞資訊。 JWT會透過HMAC、RSA、ECDS等演算法進行加密 https://jwt.io/ JWT 組成 JWT 分為 Header, Payload, Signature 三個部份以 Base64 編碼, 並且以 . 分開。 eg: xxxxx.yyyyy.zzzzz
     Like  Bookmark
  • 這次選擇使用auth0/nginx-jwt整合 Jwt 認證和 Nginx ,由於這次使用的套件是基於 OpenResty 所實現的,因此先來介紹 OpenResty OpenResty OpenResty是一個基於Nginx的Web平台,可以使用其LuaJIT引擎執行Lua。 worker_processes 1; events { worker_connections 1024; }
     Like  Bookmark
  • What is Message Queue ? Message Queue 本質就是一個 Queue 而 Queue 的內容存放的是 message 主要用途為不同 Pocess, Thread 或 Service 之間的溝通 Why Message Queue ? Message Queue 有以下優點: Better Performance: MQ 可以很容易的達到各個 Service 之間的非同步溝通( HTTP 為同步溝通 ) 在一些 Latency 不重要的情況下,client 只需要跟等待 web server 將資料丟進 Queue 的時間,不需要等待整個服務結束
     Like  Bookmark
  • 前言 由於耶誕節快要到各校都會舉辦耶誕舞會或者相關活動 也因此團隊也和不少活動進行合作 為了避免忽然衝高的使用人數超過伺服器承受上限進而導致系統癱瘓 因此我們需要在活動進行前做壓力測試檢視系統的耐受度 常見壓力測試軟體種類 JMeter Apache JMeter 是Apache 開發的壓力測試開源套件,以JAVA寫成。Apache JMeter可用於測試靜態和動態資源,Web動態應用程式的性能。 它可用於類比伺服器,伺服器組,網路或物件上的繁重負載,以測試其強度或分析不同負載類型下的整體性能。 https://jmeter.apache.org/ Locust Locust是一個開源負載測試工具。 使用 Python 代碼定義用戶行為,也可以模擬百萬個使用者。 Locust 是非常簡單易用,分散式,用戶負載測試工具。 Locust 主要為網站或者其他系統進行負載測試,能測試出一個系統可以併發處理多少使用者Locust 是完全基於時間的,因此單個機器支援幾千個併發使用者。 相比其他許多事件驅動的應用,Locust 不使用回調,而是使用輕量級的處理方式協程。
     Like  Bookmark
  • contributed by < fourcolor > 實驗環境 $ gcc --version gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ lscpu
     Like  Bookmark