
Binance Card 办卡教程
https://www.binance.com/en/cards/写在之前:为什么选择币安卡?无需出金、免去冻卡困扰、web3的资金直接消费购物相比depay等平台、省去每次用的时候单独充值步骤、也没有平台跑路的风险(暂且认为币安是可靠的)国外旅游直接刷卡消费:银联不如visa通用中国公民是否可以办理?可以、基础认证必须是护照/帕劳;身份证不行,因为卡片上需要印刷名字拼音;所以务必使用带拼音的证件去完成基础认证。基础认证已经是身份证了怎么办?方法1: 通过如下方式re-set你基础认证kyc https://www.binance.com/en/my/settings/profile/reset-kyc方法2: 如果方法1对你不适用、可找客服帮你重置你的基础kyc;理由是申请币安卡用;借记卡还是信用卡?借记卡(Visa通道支付/不支持银联Pos机刷卡)使用范围可绑定 支付宝 线上消费或者线下实体商户消费 可绑定 Google Pay Amazon 线上消费 支持全部海外线上服务订阅:Netflix订阅、ChatGPT订阅、Quizlet订阅、Spotify订阅等 实体卡可在任意支...

Table - number of mobile phones and personal computers
The table below shows the number of mobile phones and personal computers per thousand people in six different countries in 2003. Summarise the information by selecting and reporting the main features, and make comparisons where relevant.The table gives information about the number of handsets and personal computers every 1000 people had in six countries in 2003. It is noticeable that the majority of Icelandic citizens had mobile phones, and most San Marino citizens had personal computers. As ...

Monad 高阶领水教程 (四)
背景信息Monad测试网目前水龙头几乎不可用、项目方没有加验证码和钱包余额验证、导致科学家们集体脚本并发领取、目前水龙头基本瘫痪; 如下是曲线救国的领水方案:Get fucet eth sepolia somewhere(faucet.quicknode.com)Bridge eth from sepolia to monad testnet via (testnet.orbiter.finance)Swap eth in monad testnet to mon via (monad.ambient.finance)整个过程分为3个步骤: 第一个步骤:空白账户领取ETH的sepolia测试网ETH代币(很多方式 可自行百度) 第二个步骤:桥接sepolia测试网的eth转账到Monad的测试网 第三个步骤:在Monad测试网用eth交易Mon、直接购买到Mon测试代币即可。领取测试ETHhttps://cloud.google.com/application/web3/faucet/ethereum/sepolia桥接ETH代币到Monadhttps://testnet.orb...
Workout | English | Tec | Crypto

Binance Card 办卡教程
https://www.binance.com/en/cards/写在之前:为什么选择币安卡?无需出金、免去冻卡困扰、web3的资金直接消费购物相比depay等平台、省去每次用的时候单独充值步骤、也没有平台跑路的风险(暂且认为币安是可靠的)国外旅游直接刷卡消费:银联不如visa通用中国公民是否可以办理?可以、基础认证必须是护照/帕劳;身份证不行,因为卡片上需要印刷名字拼音;所以务必使用带拼音的证件去完成基础认证。基础认证已经是身份证了怎么办?方法1: 通过如下方式re-set你基础认证kyc https://www.binance.com/en/my/settings/profile/reset-kyc方法2: 如果方法1对你不适用、可找客服帮你重置你的基础kyc;理由是申请币安卡用;借记卡还是信用卡?借记卡(Visa通道支付/不支持银联Pos机刷卡)使用范围可绑定 支付宝 线上消费或者线下实体商户消费 可绑定 Google Pay Amazon 线上消费 支持全部海外线上服务订阅:Netflix订阅、ChatGPT订阅、Quizlet订阅、Spotify订阅等 实体卡可在任意支...

Table - number of mobile phones and personal computers
The table below shows the number of mobile phones and personal computers per thousand people in six different countries in 2003. Summarise the information by selecting and reporting the main features, and make comparisons where relevant.The table gives information about the number of handsets and personal computers every 1000 people had in six countries in 2003. It is noticeable that the majority of Icelandic citizens had mobile phones, and most San Marino citizens had personal computers. As ...

Monad 高阶领水教程 (四)
背景信息Monad测试网目前水龙头几乎不可用、项目方没有加验证码和钱包余额验证、导致科学家们集体脚本并发领取、目前水龙头基本瘫痪; 如下是曲线救国的领水方案:Get fucet eth sepolia somewhere(faucet.quicknode.com)Bridge eth from sepolia to monad testnet via (testnet.orbiter.finance)Swap eth in monad testnet to mon via (monad.ambient.finance)整个过程分为3个步骤: 第一个步骤:空白账户领取ETH的sepolia测试网ETH代币(很多方式 可自行百度) 第二个步骤:桥接sepolia测试网的eth转账到Monad的测试网 第三个步骤:在Monad测试网用eth交易Mon、直接购买到Mon测试代币即可。领取测试ETHhttps://cloud.google.com/application/web3/faucet/ethereum/sepolia桥接ETH代币到Monadhttps://testnet.orb...
Workout | English | Tec | Crypto

Subscribe to Robin

Subscribe to Robin
<100 subscribers
<100 subscribers
Share Dialog
Share Dialog


var wg sync.WaitGroup
func f1(i int) {
defer wg.Done()
time.Sleep(time.Second * time.Duration(rand.Intn(5)))
fmt.Println(i)
}
func main() {
for i := 0; i < 10; i++ {
wg.Add(1)
go f1(i)
}
wg.Wait()
}
var wg sync.WaitGroup
// 1. 启动一个goroutin 生成100个数发送到ch1
func f1(ch1 chan int) {
defer wg.Done()
for i := 0; i < 100; i++ {
ch1 <- i
}
close(ch1)
}
// 2. 启用一个routine,从ch1中取值,计算平方放到ch2
func f2(ch1, ch2 chan int) {
defer wg.Done()
for {
x, ok := <-ch1
if !ok {
break
}
ch2 <- x * x
}
close(ch2)
}
// 3. 在main中从ch2取值打印出来
func main() {
a := make(chan int, 50)
b := make(chan int, 100)
wg.Add(2)
go f1(a)
go f2(a, b)
wg.Wait()
for ret := range b {
fmt.Println(ret)
}
}
var wg sync.WaitGroup
func worker(id int, jobs <-chan int, results chan<- int) {
defer wg.Done()
fmt.Printf("worker:%d has started.\n", id)
for j := range jobs {
fmt.Printf("worker:%d start job:%d\n", id, j)
time.Sleep(time.Second * 1)
fmt.Printf("worker:%d end job:%d\n", id, j)
results <- j * 2
}
}
func main() {
jobs := make(chan int, 100)
results := make(chan int, 100)
// 启动10个线程worker处理数据
for w := 1; w <= 10; w++ {
wg.Add(1)
go worker(w, jobs, results)
}
time.Sleep(time.Second * 3)
fmt.Println("All of workers have already started.")
// 后台生成100个job任务
go func() {
for j := 1; j <= 100; j++ {
jobs <- j
}
close(jobs)
}()
wg.Wait()
fmt.Println("Finished all jobs.")
}
// 使用goroutin和channel实现一个计算int64随机数各位和的程序
// 1. 开启一个goroutin循环生成int64类型随机数,发送到jobChan
// 2. 开启24个goroutin从jobChan中取出随机数计算各位的和,将结果发送到resultChan
// 3. 主goroutine从resultChan中取出来结果并打印到终端
var wg sync.WaitGroup
type job struct {
value int64
}
type result struct {
job *job
sum int64
}
var jobChan = make(chan *job, 100)
var resultChan = make(chan *result, 100)
func producer(jobs chan<- *job) {
defer wg.Done()
// 循环生成int64类型随机数,发送到jobChan
for {
x := rand.Int63()
newJob := &job{
value: x,
}
jobs <- newJob
time.Sleep(time.Millisecond * 500)
}
}
func consumer(jobs <-chan *job, r chan<- *result) {
defer wg.Done()
// 从jobChan中取出随机数计算各位的和,将结果发送到resultChan
for {
job := <-jobs
sum := int64(0)
n := job.value
for n > 0 {
sum += n % 10
n = n / 10
}
newResult := &result{
job: job,
sum: sum,
}
resultChan <- newResult
}
}
func main() {
wg.Add(1)
go producer(jobChan)
wg.Add(24)
for i := 0; i < 24; i++ {
go consumer(jobChan, resultChan)
}
for result := range resultChan {
fmt.Printf("value:%d sum:%d\n", result.job.value, result.sum)
}
wg.Wait()
}
var wg sync.WaitGroup
func f1(i int) {
defer wg.Done()
time.Sleep(time.Second * time.Duration(rand.Intn(5)))
fmt.Println(i)
}
func main() {
for i := 0; i < 10; i++ {
wg.Add(1)
go f1(i)
}
wg.Wait()
}
var wg sync.WaitGroup
// 1. 启动一个goroutin 生成100个数发送到ch1
func f1(ch1 chan int) {
defer wg.Done()
for i := 0; i < 100; i++ {
ch1 <- i
}
close(ch1)
}
// 2. 启用一个routine,从ch1中取值,计算平方放到ch2
func f2(ch1, ch2 chan int) {
defer wg.Done()
for {
x, ok := <-ch1
if !ok {
break
}
ch2 <- x * x
}
close(ch2)
}
// 3. 在main中从ch2取值打印出来
func main() {
a := make(chan int, 50)
b := make(chan int, 100)
wg.Add(2)
go f1(a)
go f2(a, b)
wg.Wait()
for ret := range b {
fmt.Println(ret)
}
}
var wg sync.WaitGroup
func worker(id int, jobs <-chan int, results chan<- int) {
defer wg.Done()
fmt.Printf("worker:%d has started.\n", id)
for j := range jobs {
fmt.Printf("worker:%d start job:%d\n", id, j)
time.Sleep(time.Second * 1)
fmt.Printf("worker:%d end job:%d\n", id, j)
results <- j * 2
}
}
func main() {
jobs := make(chan int, 100)
results := make(chan int, 100)
// 启动10个线程worker处理数据
for w := 1; w <= 10; w++ {
wg.Add(1)
go worker(w, jobs, results)
}
time.Sleep(time.Second * 3)
fmt.Println("All of workers have already started.")
// 后台生成100个job任务
go func() {
for j := 1; j <= 100; j++ {
jobs <- j
}
close(jobs)
}()
wg.Wait()
fmt.Println("Finished all jobs.")
}
// 使用goroutin和channel实现一个计算int64随机数各位和的程序
// 1. 开启一个goroutin循环生成int64类型随机数,发送到jobChan
// 2. 开启24个goroutin从jobChan中取出随机数计算各位的和,将结果发送到resultChan
// 3. 主goroutine从resultChan中取出来结果并打印到终端
var wg sync.WaitGroup
type job struct {
value int64
}
type result struct {
job *job
sum int64
}
var jobChan = make(chan *job, 100)
var resultChan = make(chan *result, 100)
func producer(jobs chan<- *job) {
defer wg.Done()
// 循环生成int64类型随机数,发送到jobChan
for {
x := rand.Int63()
newJob := &job{
value: x,
}
jobs <- newJob
time.Sleep(time.Millisecond * 500)
}
}
func consumer(jobs <-chan *job, r chan<- *result) {
defer wg.Done()
// 从jobChan中取出随机数计算各位的和,将结果发送到resultChan
for {
job := <-jobs
sum := int64(0)
n := job.value
for n > 0 {
sum += n % 10
n = n / 10
}
newResult := &result{
job: job,
sum: sum,
}
resultChan <- newResult
}
}
func main() {
wg.Add(1)
go producer(jobChan)
wg.Add(24)
for i := 0; i < 24; i++ {
go consumer(jobChan, resultChan)
}
for result := range resultChan {
fmt.Printf("value:%d sum:%d\n", result.job.value, result.sum)
}
wg.Wait()
}
No activity yet