Fork me on GitHub
打赏
摘要: 一、目的 使用Go语言实现一个服务器端与客户端的聊天室。 软件:Goland,Go1.9 代码仓库地址 二、思路 1,首先启动服务器端,使用listen_socket函数监听IP地址上的客户端连接; 2,启动客户端,并向服务器端发送数据,发送结束后端口阻塞,等待服务器端的消息; 3,服务器端接收到由 阅读全文
posted @ 2018-08-01 16:18 Zoctopus_Zhang 阅读(1679) 评论(0) 推荐(0) 编辑
摘要: 注:题目来源均出自牛客网。 一、选择题 Map(集合)属于Go的内置类型,不需要引入其它库即可使用。 Go-Map_菜鸟教程 在函数声明中,返回的参数要么都有变量名,要么都没有。 C选项函数声明语法有错误,error是返回类型,但没有返回名。 go语言中字符串是UTF-8编码并存储的,它语言不定长的 阅读全文
posted @ 2018-08-01 11:41 Zoctopus_Zhang 阅读(818) 评论(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);