Fork me on GitHub
打赏
摘要: 题目来源于牛客网 一、选择题 Go语言自带垃圾回收机制。 如果是值传递的话子函数对map修改不会影响父函数中的map,如果是地址传递则会影响。 go语言编译器会自动在以标识符、数字字面量、字母字面量、字符串字面量、特定的关键字(break、continue、fallthrough和return)、增 阅读全文
posted @ 2018-08-02 21:49 Zoctopus_Zhang 阅读(849) 评论(0) 推荐(0) 编辑
摘要: 一、目的 运用Go语言中的goroutine和通道实现一个简单的一个服务器端对多个客户端的在线聊天 软件环境:Goland,Go1.9 代码仓库链接 二、设计思路 与一对一的设计思路类似,就是加了个线程的操作。 1,服务器端声明一个map,并打开监听端口; 2,客户端打开监听端口,同时连入服务器端; 阅读全文
posted @ 2018-08-02 14:26 Zoctopus_Zhang 阅读(2800) 评论(0) 推荐(0) 编辑
// function btn_donateClick() { var DivPopup = document.getElementById('Div_popup'); var DivMasklayer = document.getElementById('div_masklayer'); DivMasklayer.style.display = 'block'; DivPopup.style.display = 'block'; var h = Div_popup.clientHeight; with (Div_popup.style) { marginTop = -h / 2 + 'px'; } } function MasklayerClick() { var masklayer = document.getElementById('div_masklayer'); var divImg = document.getElementById("Div_popup"); masklayer.style.display = "none"; divImg.style.display = "none"; } setTimeout( function () { document.getElementById('div_masklayer').onclick = MasklayerClick; document.getElementById('btn_donate').onclick = btn_donateClick; var a_gzw = document.getElementById("guanzhuwo"); a_gzw.href = "javascript:void(0);"; $("#guanzhuwo").attr("onclick","follow('33513f9f-ba13-e011-ac81-842b2b196315');"); }, 900);