- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for setSeed (0.18 sec)
-
src/hash/maphash/maphash_test.go
for i := 0; i < 1000; i++ { h := new(Hash) h.SetSeed(s) m[h.Sum64()] = struct{}{} } if len(m) != 1 { t.Errorf("seeded hash is random: got %d, want 1", len(m)) } } func TestHashGrouping(t *testing.T) { b := bytes.Repeat([]byte("foo"), 100) hh := make([]*Hash, 7) for i := range hh { hh[i] = new(Hash) } for _, h := range hh[1:] { h.SetSeed(hh[0].Seed()) } hh[0].Write(b)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 14 00:03:57 UTC 2023 - 5.2K bytes - Viewed (0) -
src/hash/maphash/maphash.go
// // Each Seed value is local to a single process and cannot be serialized // or otherwise recreated in a different process. type Seed struct { s uint64 } // Bytes returns the hash of b with the given seed. // // Bytes is equivalent to, but more convenient and efficient than: // // var h Hash // h.SetSeed(seed) // h.Write(b) // return h.Sum64()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 19:15:34 UTC 2023 - 7.9K bytes - Viewed (0) -
src/hash/maphash/example_test.go
fmt.Printf("%#x\n", h.Sum64()) // Reset discards all data previously added to the Hash, without // changing its seed. h.Reset() // Use SetSeed to create a new Hash h2 which will behave // identically to h. var h2 maphash.Hash h2.SetSeed(h.Seed()) h.WriteString("same") h2.WriteString("same") fmt.Printf("%#x == %#x\n", h.Sum64(), h2.Sum64())
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 24 01:59:55 UTC 2020 - 933 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/suggest/request/popularwords/PopularWordsRequestBuilder.java
} public PopularWordsRequestBuilder addLanguage(final String lang) { request.addLanguage(lang); return this; } public PopularWordsRequestBuilder setSeed(final String seed) { request.setSeed(seed); return this; } public PopularWordsRequestBuilder setWindowSize(final int windowSize) { request.setWindowSize(windowSize); return this; }
Registered: Wed Jun 12 15:38:08 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 2.3K bytes - Viewed (0) -
src/hash/maphash/smhasher_test.go
t.Errorf("hash depends on bytes outside key") } } } } } func bytesHash(b []byte) uint64 { var h Hash h.SetSeed(fixedSeed) h.Write(b) return h.Sum64() } func stringHash(s string) uint64 { var h Hash h.SetSeed(fixedSeed) h.WriteString(s) return h.Sum64() } const hashSize = 64 func randBytes(r *rand.Rand, b []byte) { r.Read(b) // can't fail }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:41:38 UTC 2024 - 11K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/helper/PopularWordHelper.java
.setQueryFreqThreshold(fessConfig.getSuggestPopularWordQueryFreqAsInteger()); popularWordsRequestBuilder.setSeed(baseSeed); stream(baseTags).of(stream -> stream.forEach(tag -> popularWordsRequestBuilder.addTag(tag))); stream(baseRoles).of(stream -> stream.forEach(role -> popularWordsRequestBuilder.addRole(role)));
Registered: Wed Jun 12 13:08:18 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 5.6K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/suggest/request/popularwords/PopularWordsRequest.java
public void setIndex(final String index) { this.index = index; } public void setSize(final int size) { this.size = size; } public void setSeed(final String seed) { this.seed = seed; } public void setWindowSize(final int windowSize) { this.windowSize = windowSize; } public void addTag(final String tag) {
Registered: Wed Jun 12 15:38:08 UTC 2024 - Last Modified: Thu Feb 22 01:36:54 UTC 2024 - 7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/shift/dead.go
func updateDead(info *types.Info, dead map[ast.Node]bool, node ast.Node) { if dead[node] { // The node is already marked as dead. return } // setDead marks the node and all the children as dead. setDead := func(n ast.Node) { ast.Inspect(n, func(node ast.Node) bool { if node != nil { dead[node] = true } return true }) } switch stmt := node.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 06 18:23:38 UTC 2018 - 2.2K bytes - Viewed (0) -
platforms/core-configuration/file-collections/src/main/java/org/gradle/api/internal/file/DefaultConfigurableUserClassFilePermissions.java
@Inject public DefaultConfigurableUserClassFilePermissions(int unixNumeric) { setRead(isRead(unixNumeric)); setWrite(isWrite(unixNumeric)); setExecute(isExecute(unixNumeric)); } @Override public void unix(String unixSymbolic) { setRead(isRead(unixSymbolic)); setWrite(isWrite(unixSymbolic)); setExecute(isExecute(unixSymbolic)); }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu Sep 28 09:51:04 UTC 2023 - 1.4K bytes - Viewed (0) -
pkg/test/framework/components/echo/portgen.go
protocol.MySQL: tcpBase, protocol.Redis: tcpBase, protocol.UDP: tcpBase, }, used: make(map[int]struct{}), } } // SetUsed marks the given port as used, so that it will not be assigned by the // generator. func (g *portGenerator) SetUsed(port int) *portGenerator { g.used[port] = struct{}{} return g } // IsUsed indicates if the given port has already been used.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Fri Mar 04 00:24:04 UTC 2022 - 2.5K bytes - Viewed (0)