Wesley13 Wesley13
3年前
2014 春节发帖第 9 天:Go 语言的 RPC 介绍
标准库的RPCRPC是远程调用的简称,简单的说就是要调用本地函数一样调用服务器的函数.Go语言的标准库已经提供了RPC框架和不同的RPC实现.下面是一个服务器的例子:type Echo intfunc (t Arith) Hi(args string, reply string
Wesley13 Wesley13
3年前
Java中不同包下类与类之间的访问
Java中不同包下类与类之间的访问(1)我们多次使用一个带包的类,都需要加包的全路径,非常的麻烦,这个时候,Java就提供了导包的功能,提供了一个关键字import。(2)格式:import包名.包名....包名.类名;这种方式导入的是:到类的名称。另一种:imp
Stella981 Stella981
3年前
Linux C基于进程并发的服务器简单示例
//serverinclude<stdio.hinclude<unistd.hinclude<stdlib.hinclude<string.hinclude<malloc.hinclude<pthread.hinclude<semaphor
Stella981 Stella981
3年前
Delphi 目录操作
删除目录:function DelDirectory(const Source:string): boolean; var   fo: TSHFILEOPSTRUCT; begin   FillChar(fo, SizeOf(fo), 0);   with fo do   begi
Stella981 Stella981
3年前
BlockingQueue队列的使用
import java.util.concurrent.ArrayBlockingQueue;import java.util.concurrent.BlockingQueue;public class BlockingQueueTest { public static void main(String args) 
Stella981 Stella981
3年前
C++ Map运用实例
CMap运用实例!复制代码(https://common.cnblogs.com/images/copycode.gif)include<mapinclude<string\include<iostreaminclude<iomanipusingnamespacestd;intmain(){
Wesley13 Wesley13
3年前
JSON序列——根据JSON生成事务性SQL
JSON序列——根据JSON生成事务性SQLprocedureTForm1.Button5Click(Sender:TObject);beginvarjson:string:'''{''"table":"tunit",''"
Stella981 Stella981
3年前
JavaScript 转换数字为整数的方法
本文将会列举并说明JavaScript把一个number(或者numerical的对象)转换成一个整数相关方法。使用parseIntparseInt的语法如下:parseInt(string,radix)参数string的表示要解析的字符串,也可以是一个对象,会自动调用对象的toString函数得到要解析的字符
Wesley13 Wesley13
3年前
go 比较两个字符串的版本号大小
packagemainimport"fmt"funcVersionOrdinal(versionstring)string{//ISO/IEC14651:2011constmaxByte1<<81vo:make(byte,0,len
Stella981 Stella981
3年前
CountDownLatch 计数栓
import java.util.concurrent.CountDownLatch;/  Created by zyBourn on 15/12/25. /public class Entity {    public static void main(String args)