ppp

PPP Server on Windows

微笑、不失礼 提交于 2019-11-29 13:06:20
问题 We have a solution where some hardware connects to a COM port on a Win 7 machine, and interacts with our Java app. The hardware wants to use a PPP Server to transparently connect to an other server over TCP/IP. Does anyone have a suggestion on how to do this? Start an OS native PPP Server from the Java app, with a connection to the COM port? How is this done? 回答1: You may be surprised to find that Win7 still supports PPP natively. Follow these steps (or something like them) and you should be

Z-Algorithm详解

混江龙づ霸主 提交于 2019-11-27 15:21:35
Z-Algorithm详解 0.前言 给你一个文本串 t t t 和一个模式串 p p p ,让你寻找 p p p 在 t t t 中出现的所以位置。 例如, t = " a b a c a b a b a c " t="abacababac" t = " a b a c a b a b a c " , p = " a b a " p="aba" p = " a b a " ,那么 p p p 在 t t t 中出现了 3 3 3 次,起始位置在 t t t 中的下标分别是 1 1 1 , 5 5 5 , 7 7 7 。 很显然可以想到 O ( ∣ t ∣ ∗ ∣ p ∣ ) O(|t|*|p|) O ( ∣ t ∣ ∗ ∣ p ∣ ) 的暴力算法,即以每一个位置为起始位置,暴力匹配每一个字符。但是如果 t t t 和 p p p 的长度都是 1 0 5 10^5 1 0 5 级别的就会超时,我们需要更高效的方法。在中国有一个 K M P KMP K M P 算法比较流行,但是我个人比较喜欢 Z − a l g o r i t h m Z-algorithm Z − a l g o r i t h m 。这里我给大家讲一下这个。 1.一些函数的定义 我们定义 z i ( s ) z_i(s) z i ​ ( s ) 为对于所有的 2 ≤ i ≤ ∣ s ∣ 2 \leq i