Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
{
"traceEvents": [
{
"name": "process_name",
"ph": "M",
"pid": 0,
"args": {
"name": "Allocators"
}
},
This file has been truncated, but you can view the full file.
{
"traceEvents": [
{
"name": "process_name",
"ph": "M",
"pid": 0,
"args": {
"name": "Allocators"
}
},

高流量的網址縮短器

顧名思義,這是個炫耀分享網址縮短器能做多快的小專案,峰值能處理 140+ qps,Github 連結在此

引言

最近投了 Dcard 實習,其中後端實習的功課就是寫個網址縮短器。然而,活在電腦世界中這麼久了,還沒好好用過 Redis/Load balancer 這些黑科技,為了在 Backend Taiwan 繼續混下去,我決定來好好跟黑科技奮戰一波。

架構設計

前端採用 Nginx 分配請求 (Request) 給後端,後端採用 Nodejs,資料庫採用 MySQL,記憶體快取 (Cache) 採用 Redis,下圖言簡意賅的顯示了整個架構。

#include <iostream>
#include <memory.h>
using namespace std;
int dp[6][6][6][6][6];
int promo_amount[5][100], promo_sum[100], amount[5], price[5];;
int id_mapping[1000];
int id = 0;
@lawrence910426
lawrence910426 / Hello world to MQL5
Created November 23, 2022 14:13
Hello world to quantitative trading with MT5
//+------------------------------------------------------------------+
//| HelloWorld.mq5 |
//| Copyright 2022, MetaQuotes Ltd. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, MetaQuotes Ltd."
#property link "https://www.mql5.com"
#property version "1.00"
#include <Trade\Trade.mqh>
# Copyright 2021 Optiver Asia Pacific Pty. Ltd.
#
# This file is part of Ready Trader Go.
#
# Ready Trader Go is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
#
# Ready Trader Go is distributed in the hope that it will be useful,
from collections import defaultdict, deque
from shioaji import BidAskFOPv1, Exchange
import shioaji as sj
import datetime
import pandas as pd
import talib as ta
import time
from math import ceil
import pysimulation
const int maxi = CHAR_MAX;
/* int is a int */
/* multiple lines
of comments */
const int maxi = CHAR_MAX;
#pragma token off
int main() {
int a = 1;

To whom it may concern,

It is my pleasure to recommend [Name of the person being recommended]. I had the privilege of working with [Name] at FinLab, a startup company specializing in quantitative investment. Through our professional relationship, I've come to deeply appreciate their expertise and dedication.

Academically, [Name]'s accomplishments speak volumes. [He/She] was honored as the SCC Global Overall Winner, a testament to [his/her] exceptional skills and capability. Moreover, [he/she] bagged the ICPC Taipei Hsinchu Station Bronze Award, which is a highly competitive and esteemed accolade. And as a Taiwan Representative Student at the GCC (Global Cybersecurity Camp), [Name] has showcased both [his/her] potential and prowess on an international platform.

Furthermore, [Name]'s internships at renowned institutions such as KKCompany (KKBox) and our shared workplace, FinLab at Jim Quant Capital, have provided [him/her] with invaluable practical experiences. These internships, coupled with [his/her] robus

To whom it may concern,

I am writing to highly recommend [Your Name] with whom I had the pleasure to work at FinLab, a pioneering startup dedicated to quantitative investment. Through our professional association, I have had ample opportunities to observe and appreciate the exemplary skill and ambition [Your Name] demonstrates in the field of quantitative analysis and financial technology.

[Your Name] has a remarkable academic background, evidenced by a plethora of accolades. Notably, [he/she] emerged as the SCC Global Overall Winner, a testimony to [his/her] intellectual prowess and a thorough understanding of complex computer architectures. Furthermore, the ICPC Taipei Hsinchu Station Bronze Award that [he/she] bagged, along with securing a position among the top 50 in the highly competitive Optiver Ready Trader Go Competition among a thousand contestants, speaks volumes about [his/her] aptitude and tenacity in tackling real-world challenges.

During [his/her] tenure at Jim Quant Capital and later at FinL