精华内容
下载资源
问答
  • Networking

    2017-08-04 18:27:06
    Networking   You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables...

    Networking


     
    You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of points. For each possible route between two points, you are given the length of the cable that is needed to connect the points over that route. Note that there may exist many possible routes between two given points. It is assumed that the given possible routes connect (directly or indirectly) each two points in the area. 
    Your task is to design the network for the area, so that there is a connection (direct or indirect) between every two points (i.e., all the points are interconnected, but not necessarily by a direct cable), and that the total length of the used cable is minimal.
    Input
    The input file consists of a number of data sets. Each data set defines one required network. The first line of the set contains two integers: the first defines the number P of the given points, and the second the number R of given routes between the points. The following R lines define the given routes between the points, each giving three integer numbers: the first two numbers identify the points, and the third gives the length of the route. The numbers are separated with white spaces. A data set giving only one number P=0 denotes the end of the input. The data sets are separated with an empty line. 
    The maximal number of points is 50. The maximal length of a given route is 100. The number of possible routes is unlimited. The nodes are identified with integers between 1 and P (inclusive). The routes between two points i and j may be given as i j or as j i. 
    Output
    For each data set, print one number on a separate line that gives the total length of the cable used for the entire designed network.
    Sample Input
    1 0
    
    2 3
    1 2 37
    2 1 17
    1 2 68
    
    3 7
    1 2 19
    2 3 11
    3 1 7
    1 3 5
    2 3 89
    3 1 91
    1 2 32
    
    5 7
    1 2 5
    2 3 7
    2 4 8
    4 5 11
    3 5 10
    1 5 6
    4 2 12
    
    0
    Sample Output
    0
    17
    16
    26
    最裸的求最小生成树的题了,但是wa了好久就是因为sort函数没搞明白······
    以后做题还是要搞明白,毕竟不是为了应付
    #include<stdio.h>
    #include<algorithm>
    using namespace std;
    int pre[10000];
    int n,m;
    int i,j;
    struct node
    {
    	int u,v,w;
    }edge[10000];
    bool cmp(node a,node b)
    {
    	return a.w<b.w;
    }
    int find(int x)
    {
    	if(pre[x]==x)
    	return x;
    	else
    	{
    		pre[x]=find(pre[x]);
    		return pre[x];
    	}
    }
    int join(int x,int y)
    {
    	int fx=find(x);
    	int fy=find(y);
    	if(fx!=fy)
    	{
    		pre[fx]=fy;
    		return 1;
    	}
    	else
    	return 0;
    }
    int main()
    {
    	while(scanf("%d",&n)!=EOF)
    	{
    		if(n==0)
    		break;
    		scanf("%d",&m);
    		int count=0,sum=0;
    		for(i=1;i<=n;i++)
    			pre[i]=i;
    		if(n==0 && m==0)
    			break;
    		for(i=1;i<=m;i++)
    		{
    			scanf("%d%d%d",&edge[i].u,&edge[i].v,&edge[i].w);
    		}
    		sort(edge+1,edge+m+1,cmp);
    		for(i=1;i<=m;i++)
    		{
    			if(join(edge[i].u,edge[i].v))
    			{
    				count++;
    				sum=sum+edge[i].w;
    			}
    			if(count==n-1)
    				break;
    		}
    		printf("%d\n",sum);
    	}
    }

    展开全文
  • Networking Tests

    2020-12-02 05:04:24
    - Adds a networking test server that <em>must</em> be running for networking tests to pass. The networking tests will print out an error asking you to run the server if it can't connect. <p>Every ...
  • networking support

    2020-11-21 21:51:32
    networking" in my own repository for that. First step should be, is to create a server client architecture with onboard JME networking (see ...
  • Networking package

    2021-01-10 14:15:18
    <div><p>Moved all shared networking logic between client and server into the com.hazelcast.internal.networking package. This way it is a lot easier to understand what is member specific and what is ...
  • Networking.

    2021-01-04 03:03:53
    <div><p>I found an OS created on top of a Cosmos fork which has networking implemented, with DHCP, TCP, UDP, ICMP and more. I also found that there are two developers in common in this and in that OS ...
  • Networking Fix

    2020-12-01 16:46:23
    <div><p>This is the networking fix, they changed the network interface naming scheme. I would hold off on pull requests until I confirm the network interface changes on physical ubuntu machines.</p><p...
  • Java Networking

    千次阅读 2014-11-20 09:07:52
    Java Networking


    Java Networking 

    1Java Networking
    2Java Networking: Socket
    3Java Networking: ServerSocket
    4Java Networking: UDP DatagramSocket
    5Java Networking: URL + URLConnection
    6Java Networking: JarURLConnection
    7Java Networking: InetAddress
    8Java Networking: Protocol Design

    Java Networking

     
    By Jakob Jenkov
     Connect with me: 
    Rate article:
    <iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" tabindex="0" vspace="0" width="100%" id="I0_1416445641285" name="I0_1416445641285" src="https://apis.google.com/se/0/_/+1/fastbutton?usegapi=1&origin=http%3A%2F%2Ftutorials.jenkov.com&url=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-networking%2Findex.html&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.zh_CN.0KI2lcOUxJ0.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Ft%3Dzcms%2Frs%3DAGLTcCPnLWTRWXjQ3yHtGTFSsUVyRcOV5g#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh&id=I0_1416445641285&parent=http%3A%2F%2Ftutorials.jenkov.com&pfname=&rpctoken=41058523" data-gapiattached="true" style="position: absolute; top: -10000px; width: 450px; margin: 0px; border-style: none;"></iframe>
    Share article:
    <iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" tabindex="0" vspace="0" width="100%" id="I1_1416445641289" name="I1_1416445641289" src="https://apis.google.com/se/0/_/+1/sharebutton?plusShare=true&usegapi=1&action=share&height=24&annotation=none&origin=http%3A%2F%2Ftutorials.jenkov.com&url=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-networking%2Findex.html&gsrc=3p&ic=1&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.zh_CN.0KI2lcOUxJ0.O%2Fm%3D__features__%2Fam%3DAQ%2Frt%3Dj%2Fd%3D1%2Ft%3Dzcms%2Frs%3DAGLTcCPnLWTRWXjQ3yHtGTFSsUVyRcOV5g#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&id=I1_1416445641289&parent=http%3A%2F%2Ftutorials.jenkov.com&pfname=&rpctoken=26664239" data-gapiattached="true" style="position: absolute; top: -10000px; width: 450px; margin: 0px; border-style: none;"></iframe>

    Java has a reasonably easy-to-use builtin networking API which makes it easy to communicate via TCP/IP sockets or UDP sockets over the internet. TCP is typically used more often than UDP, but both options are explained in this tutorial.

    There are three other tutorials here at tutorials.jenkov.com that are relevant to this Java networking tutorial. These are:

    1. Java IO Tutorial
    2. Java NIO Tutorial
    3. Java Multithreaded Servers Tutorial

    Even though the Java Networking APIs enable you to open and close network connections via sockets, all communication happens via the Java IO classes InputStream and OutputStream.

    Alternatively you can use the networking classes in the Java NIO API. These classes are similar to the classes found in the Java Networking API, except the Java NIO API can work in non-blocking mode. Non-blocking mode may give a performance boost in some situations.

    Java TCP Networking Basics

    Typically a client opens a TCP/IP connection to a server. The client then starts to communicate with the server. When the client is finished it closes the connection again. Here is an illustration of that:



    A client may send more than one request through an open connection. In fact, a client can send as much data as the server is ready to receive. The server can also close the connection if it wants to.

    Java Socket's and ServerSocket's

    When a client wants to open a TCP/IP connection to a server, it does so using a Java Socket. The socket is told what IP address and TCP port to connect to and the rest is done by Java.

    If you want to start a server that listens for incoming connections from clients on some TCP port, you have to use aJava ServerSocket. When a client connects via a client socket to a server's ServerSocket, a Socket is assigned on the server to that connection. The client and server now communicates Socket-to-Socket.

    Socket's and ServerSocket's are covered in more detail in later texts.

    Java UDP Networking Basics

    UDP works a bit differently from TCP. Using UDP there is no connection between the client and server. A client may send data to the server, and the server may (or may not) receive this data. The client will never know if the data was received at the other end. The same is true for the data sent the other way from the server to the client.

    Because there is no guarantee of data delivery, the UDP protocol has less protocol overhead.

    There are several situations in which the connectionless UDP model is preferable over TCP. These are covered in more detail in the text on Java's UDP DatagramSocket's.








    展开全文
  • Networking Benchmarks

    2017-05-17 15:47:57
    Networking benchmarks

    今天来审视一下自己测试的benchmark和其他的一些当年NP还流行时候的一些测试。


    Npbench

    NPbench的论文

    1. 分类方式
      将测试用例们根据其按照功能和意义来进行分类,主要有三大类:
      TOG —— Traffic-management and QoS Group
      SMG —— Security and Media processing Group
      PPG —— Packet Processing Group
    2. test suites
      TOG类:

      • Weighted Fair Queuing(WFQ)
      • Random Early Detection(RED)
      • Secure Sockets Layer Dispatcher (SSLD)
      • Multi Protocol Layer Switching (MPLS): 多协议标签交换技术

      SMG类:

      • Media Transcoding (MTC)
      • Advanced Encryption Standard(RijnDael) (AES)
      • Message Digestion algorithm (MD5)
      • Diffie-Hellman key exchange (DH)

      PPG类:

      • FRAG : a packet fragmentation application
      • Cyclic Redundancy Check (CRC)

    EEMBC networking benchmark V2.0

    EEMBC networkingV2.0 主页
    netwoking benchmarkV2.0的说明文档

    test suites
    -IP重组:基于 NetBSD实现。 消耗data cache。
    -IP Packet Check:计算校验和。尤其是IPv4包的checksum。
    - NAT:仍然基于 NetBSD实现。
    - OSPF:使用了Dijkstra最短路径算法,更新路由节点信息。
    - QoS:其实这里也是调度进来的packet的队列,使负载均衡。WFQ和RED在其中都被使用。基于 NetBSD。
    - Route Lookup:路由查找算法,这个东西本身就是一个值得研究的点。使用的是Patricia Tree lookup算法。
    - TCP


    NetBench

    描述Netbench的paper

    1. 分类方式
      参照网络七层的IOS标准来进行分类,也大致分为三层:
      • Micro-level program,这个可以看做是链路层及其以下所运行的programs
      • IP-Level program,在 IP层处理和运算的programs
      • Application-Level program,处于IP之上的应用层,TCP/UDP等高层用户协议运作的地方。
    2. test suites
      Micro level programs:
      • CRC
      • table lookup routine (TL)
        IP level programs :
      • Route table lookup (RTL) : table lookup along with internet checksum.
      • Deficit-round robin scheduling (DRR)
      • Network Address Translation (NAT)
      • IPCHAINS : 防火墙应用
        Application level programs
      • URL
      • DH
      • MD5

    Commbench

    Commbench的主页(内含paper一篇)

    1. 分类方式
      按照报文结构来分,分为两类:一组是针对报文头的操作,Header-Processing Applications;另一组是对报文搭载内容本身进行的操作,Payload-Processing Applications。
    2. test suite
      Header-Processing Applications:
      • RTR : 也是route table lookup的一种,利用的是radix-tree routing algorithm,来源于 NetBSD操作系统。
      • FRAG : 针对报文头修改和校验和计算的操作。
      • DRR : 调度算法的一种,Deficti Round Robin fair scheduling algorithm。和前面的WQF的作用是一样的。
      • TCP : TCP流量监控应用。
        Payload Processing Applications:
      • CAST : CAST-128 block cipher algorithm。一个加密算法。
      • ZIP : 压缩算法,在压缩传输当中比较常见。Lempel-Ziv(LZ77)算法的一个变种。
      • REED : reed-rolomon forward error correction,前向纠错码和前向纠错算法。
      • JPEG : 无损压缩图片的一个算法。相比都已经很熟悉啦。

    MyNetBench

    接下来是我的了,我也沿用了IOS分层的方法。下面是我的test suites:
    - LZW 压缩算法
    - OSPF
    - CRC
    - RS-FEC:与前面的reed-Solomon code编码那个一致的。
    - MD5
    - DRR
    - Route table lookup
    - Token bucket
    - HASH
    - SHA

    以上。

    展开全文
  • Storm Unity Networking

    2019-03-11 14:46:12
    Storm Unity Networking is a fast, simple and flexible networking solution for server-client multiplayer games. Storm hides you from the complexity of the using sockets, allows to use high-level API ...
  • Networking ARDemo

    2019-01-18 12:44:51
    unity 局域网Unet Networking ARDemo 资源包,使用Unity内置Unet实现AR对战
  • NETWORKING PRE-READING 网络读前活动 To help you get ready for our lectures in this module, I’d like you to read up a bit. I’m waiting with lots of exciting things to teach you about networking. ...

    NETWORKING PRE-READING

    网络读前活动

    To help you get ready for our lectures in this module, I’d like you to read up a bit. I’m waiting with lots of exciting things to teach you about networking. But, to help you understand these lectures, please review the information in these links first.

    为了帮助你们准备好这节课的内容,我想让你们先预习一下。我在等着教你很多关于人际交往的令人兴奋的事情。但是,为了帮助您理解这些讲座,请先查看这些链接中的信息。

    From the TCP/IP Guide

    Introduction to Networking

    • What Is Networking?
    • The Advantages (Benefits) of Networking
    • The Disadvantages (Costs) of Networking
    • 网络是什么?

      网络的好处

      网络的缺点(成本)

    Fundamental Network Characteristics 

    基本网络特征

    • Protocols: What Are They, Anyway?
    • Circuit Switching and Packet Switching Networks
    • Connection-Oriented and Connectionless Protocols
    • Messages: Packets, Frames, Datagrams and Cells
    • Message Formatting: Headers, Payloads and Footers
    • Message Addressing and Transmission Methods: Unicast, Broadcast and Multicast Messages
    • Network Structural Models and Client/Server and Peer-to-Peer Networking
    • 协议:到底是什么?

      电路交换和分组交换网络

      面向连接和无连接协议

      消息:包、帧、数据报和单元格

      消息格式:标题、有效负载和页脚

      消息寻址和传输方法:单播、广播和多播消息

      网络结构模型和客户机/服务器以及对等网络

    Backgrounder: Data Representation and the Mathematics of Computing 

    背景:数据表示和计算的数学

    • Binary Information and Representation: Bits, Bytes, Nibbles, Octets and Characters
    • Decimal, Binary, Octal and Hexadecimal Numbers
    • Decimal, Binary, Octal and Hexadecimal Number Conversion
    • Binary, Octal and Hexadecimal Arithmetic
    • Boolean Logic and Logical Functions
    • Bit Masking (Setting, Clearing and Inverting) Using Boolean Logical Functions
    • 二进制信息和表示:位、字节、字节、八进制数和字符

      十进制、二进制、八进制和十六进制数

      十进制、二进制、八进制和十六进制数字转换

      二进制、八进制和十六进制算术

      布尔逻辑和逻辑函数

      位屏蔽(设置、清除和反转)使用布尔逻辑函数

    History of the OSI Reference Model

    OSI参考模型的历史

    General Reference Model Issues

    一般参考模型问题

    • The Benefits of Networking Models
    • Why Understanding The OSI Reference Model Is Important To You
    • How To Use The OSI Reference Model
    • Comparing the OSI Reference Model to Network Architectures and Protocol Stacks
    • 网络模型的好处

      为什么理解OSI参考模型对你很重要

      如何使用OSI参考模型

      比较OSI参考模型与网络架构和协议栈

    Key OSI Reference Model Concepts 

    • OSI Reference Model Networking Layers, Sublayers and Layer Groupings
    • "N" Notation and Other OSI Model Layer Terminology
    • Interfaces: Vertical (Adjacent Layer) Communication
    • Protocols: Horizontal (Corresponding Layer) Communication
    • Data Encapsulation, Protocol Data Units (PDUs) and Service Data Units (SDUs)
    • Indirect Device Connection and Message Routing
    • 关键OSI参考模型概念


      OSI参考模型网络层,子层和层组

      “N”符号和其他OSI模型层术语

      接口:垂直(相邻层)通信

      协议:水平(对应层)通信

      数据封装、协议数据单元(pdu)和服务数据单元(sdu)

      间接设备连接和消息路由

    Understanding The OSI Reference Model: An Analogy 

    OSI Reference Model Layers 

    • Physical Layer (Layer 1)
    • Data Link Layer (Layer 2)
    • Network Layer (Layer 3)
    • Transport Layer (Layer 4)
    • Session Layer (Layer 5)
    • Presentation Layer (Layer 6)
    • Application Layer (Layer 7)
    • 理解OSI参考模型:一个类比


      OSI参考模型层


      物理层(层1)

      数据链路层(层2)

      网络层(层3)

      传输层(层4)

      会话层(层5)

      表示层(层6)

      应用层(第7层)

    转载于:https://www.cnblogs.com/sec875/articles/10339215.html

    展开全文
  • Mastering Python Networking

    2018-09-08 16:28:07
    Mastering Python Networking Your one stop solution to using Python for network automation, DevOps, and SDN Eric Chou
  • <div><p>Currently the networking implementation supports network=none and network=bridge. Docker swarm overlay networking needs to be supported to enable clusterwide networking. <p>Requires ...
  • Linux Kernel Networking

    2016-07-17 21:41:42
    Linux Kernel Networking,其中802.11一节还不错
  • Add networking support

    2020-12-26 09:35:16
    <div><p>This patch adds basic networking capabilities to XQEMU. Currently the emulation is not exactly hardware-accurate, but is functional enough for basic packet tx/rx with both the official ...
  • Cf networking 2.0

    2020-12-02 11:50:36
    <div><p>add opsfiles for cf-networking/silk 2.x <p>Use pinned versions for networking and silk</p><p>该提问来源于开源项目:cloudfoundry/cf-deployment</p></div>
  • Update Networking docs

    2021-01-05 12:43:59
    <p>Study this topic and related topics: <a href="https://kubernetes.io/docs/concepts/cluster-administration/networking/">Cluster Networking</a>. Bring all of the networking content into a coherent set...
  • Refactor networking module

    2020-12-28 19:25:53
    <div><p>Refactored the networking/p2p module to integrate rpc. This is working, but some features are still missing, to be built out in a future PR for the sync module. Eg: emitting request events and...
  • Trunk Networking

    2018-05-25 19:28:01
    为了解决VLAN awre VM的问题,Openstack引入了Trunk Networking方案。Trunk Networking方案需解决的问题有:1 VM aware的VLAN ID,在Host内部不能冲突。2 VM aware的VLAN ID,不需要在Host之间的物理网络透传。3 ...
  • Need networking management

    2020-12-05 02:31:05
    <p>class Networking extends ApiGroup { constructor(options) { const resources = [ 'networkpolicies' ]; options = Object.assign({}, options, { path: 'apis/networking.k8s.io&#...
  • lxd networking documentation

    2021-01-07 08:01:56
    <div><p>I would greatly appreciate some writeup/documentation on the networking topics around lxd. I'd like to use lxd as a faster alternative to Virtualbox for testing and development and also ...
  • Qemu Networking

    2019-08-16 10:38:50
    Qemu 网网络 提供guest虚拟的网络设备 网络的后端和模拟的网卡交互。 默认情况下,Qemu会创造一个SLiRP用户网络后端和为guest...Network Backends -netdev TYPE,id=Name,... User Networking(SLIRP) 用户网络是默...
  • Java Networking
  • Support bonded networking

    2020-12-25 20:56:58
    <div><p>I tried to set up bonded networking. There were several issues I ran into. <pre><code> NetworkManager conflicts with Rockstor and they both try to use different interface names and overwrite ...
  • Andriod networking

    2018-12-15 11:10:59
    Andriod networking 本人从今天开始,会不定时的更新博客,写出自己对Android network 的一些感悟与知识总结。由于本人也在学习之中,如果有错误之处还请五湖四海的各位大神批评指正,感激不尽! ...
  • <div><p>The current networking implementation support bridge networking. <p>We need to support at least one overlay network framework. The first overlay network we need to enable is swarm with the ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 23,193
精华内容 9,277
关键字:

networking