Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,599 for matchLen (0.2 sec)

  1. src/compress/flate/deflatefast.go

    	for _, v := range lit {
    		dst = append(dst, literalToken(uint32(v)))
    	}
    	return dst
    }
    
    // matchLen returns the match length between src[s:] and src[t:].
    // t can be negative to indicate the match is starting in e.prev.
    // We assume that src[s-4:s] and src[t-4:t] already match.
    func (e *deflateFast) matchLen(s, t int32, src []byte) int32 {
    	s1 := int(s) + maxMatchLength - 4
    	if s1 > len(src) {
    		s1 = len(src)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 19 18:48:17 UTC 2020
    - 9.4K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/imports.go

    	}
    	for _, spec := range gen.Specs {
    		impspec := spec.(*ast.ImportSpec)
    		if importPath(impspec) == path {
    			return true
    		}
    	}
    	return false
    }
    
    // matchLen returns the length of the longest path segment prefix shared by x and y.
    func matchLen(x, y string) int {
    	n := 0
    	for i := 0; i < len(x) && i < len(y) && x[i] == y[i]; i++ {
    		if x[i] == '/' {
    			n++
    		}
    	}
    	return n
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 10 21:56:21 UTC 2022
    - 13.4K bytes
    - Viewed (0)
  3. src/cmd/fix/fix.go

    		}
    		if ok && id.Obj != nil && id.Name == old && id.Obj.Name == new {
    			id.Name = id.Obj.Name
    			fixed = true
    		}
    	})
    
    	return fixed
    }
    
    // matchLen returns the length of the longest prefix shared by x and y.
    func matchLen(x, y string) int {
    	i := 0
    	for i < len(x) && i < len(y) && x[i] == y[i] {
    		i++
    	}
    	return i
    }
    
    // addImport adds the import path to the file f, if absent.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  4. src/compress/flate/deflate.go

    	for i := 1; i < end; i++ {
    		hb = (hb << 8) | uint32(b[i+3])
    		dst[i] = (hb * hashmul) >> (32 - hashBits)
    	}
    }
    
    // matchLen returns the number of matching bytes in a and b
    // up to length 'max'. Both slices must be at least 'max'
    // bytes in size.
    func matchLen(a, b []byte, max int) int {
    	a = a[:max]
    	b = b[:len(a)]
    	for i, av := range a {
    		if b[i] != av {
    			return i
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:40 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/runtime/memmove_test.go

    	for i := len(src) - 1; i >= 0; i-- {
    		dst[i] = src[i]
    	}
    }
    
    // Returns offset of difference
    func matchLen(a, b []byte, max int) int {
    	a = a[:max]
    	b = b[:max]
    	for i, av := range a {
    		if b[i] != av {
    			return i
    		}
    	}
    	return max
    }
    
    func cmpb(a, b []byte) int {
    	l := matchLen(a, b, len(a))
    	if l == len(a) {
    		return -1
    	}
    	return l
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:12 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  6. src/compress/flate/deflate_test.go

    				}
    			}
    		}
    	}
    }
    
    func TestBestSpeedShiftOffsets(t *testing.T) {
    	// Test if shiftoffsets properly preserves matches and resets out-of-range matches
    	// seen in https://github.com/golang/go/issues/4142
    	enc := newDeflateFast()
    
    	// testData may not generate internal matches.
    	testData := make([]byte, 32)
    	rng := rand.New(rand.NewSource(0))
    	for i := range testData {
    		testData[i] = byte(rng.Uint32())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 14 00:03:57 UTC 2023
    - 25.6K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/namespace/matcher.go

    }
    
    // Matcher decides if a request is exempted by the NamespaceSelector of a
    // webhook configuration.
    type Matcher struct {
    	NamespaceLister corelisters.NamespaceLister
    	Client          clientset.Interface
    }
    
    func (m *Matcher) GetNamespace(name string) (*v1.Namespace, error) {
    	return m.NamespaceLister.Get(name)
    }
    
    // Validate checks if the Matcher has a NamespaceLister and Client.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jul 15 00:53:08 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/matchconditions/matcher.go

    	return v.Expression
    }
    
    func (v *MatchCondition) ReturnTypes() []*cel.Type {
    	return []*cel.Type{cel.BoolType}
    }
    
    var _ Matcher = &matcher{}
    
    // matcher evaluates compiled cel expressions and determines if they match the given request or not
    type matcher struct {
    	filter      celplugin.Filter
    	failPolicy  v1.FailurePolicyType
    	matcherType string
    	matcherKind string
    	objectName  string
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 24 14:46:11 UTC 2023
    - 5K bytes
    - Viewed (0)
  9. pkg/test/framework/components/echo/match/matcher.go

    // GetServiceMatches returns the subset of echo.Services that match this Matcher.
    func (m Matcher) GetServiceMatches(services echo.Services) echo.Services {
    	out := make(echo.Services, 0)
    	for _, s := range services {
    		if len(s) > 0 && m(s[0]) {
    			out = append(out, s)
    		}
    	}
    	return out
    }
    
    // First finds the first Instance that matches the Matcher.
    func (m Matcher) First(i echo.Instances) (echo.Instance, error) {
    	for _, i := range i {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Jun 21 20:45:12 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/admission/plugin/webhook/predicates/object/matcher.go

    		return false
    	}
    	return selector.Matches(labels.Set(accessor.GetLabels()))
    
    }
    
    // MatchObjectSelector decideds whether the request matches the ObjectSelector
    // of the webhook. Only when they match, the webhook is called.
    func (m *Matcher) MatchObjectSelector(p ObjectSelectorProvider, attr admission.Attributes) (bool, *apierrors.StatusError) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Oct 26 00:41:14 UTC 2022
    - 1.8K bytes
    - Viewed (0)
Back to top