Search Options

Results per page
Sort
Preferred Languages
Advance

Results 151 - 160 of 947 for asSlice (0.19 sec)

  1. test/typeparam/mapimp.dir/a.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package a
    
    // Map calls the function f on every element of the slice s,
    // returning a new slice of the results.
    func Mapper[F, T any](s []F, f func(F) T) []T {
    	r := make([]T, len(s))
    	for i, v := range s {
    		r[i] = f(v)
    	}
    	return r
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 28 21:40:40 UTC 2021
    - 397 bytes
    - Viewed (0)
  2. src/runtime/metrics/sample.go

    }
    
    // Implemented in the runtime.
    func runtime_readMetrics(unsafe.Pointer, int, int)
    
    // Read populates each [Value] field in the given slice of metric samples.
    //
    // Desired metrics should be present in the slice with the appropriate name.
    // The user of this API is encouraged to re-use the same slice between calls for
    // efficiency, but is not required to do so.
    //
    // Note that re-use has some caveats. Notably, Values should not be read or
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 16:59:11 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. pilot/pkg/util/network/ip.go

    	return resolvedAddr, nil
    }
    
    // AllIPv6 checks the addresses slice and returns true if all addresses
    // are valid IPv6 address, for all other cases it returns false.
    func AllIPv6(ipAddrs []string) bool {
    	for i := 0; i < len(ipAddrs); i++ {
    		addr, err := netip.ParseAddr(ipAddrs[i])
    		if err != nil {
    			// Should not happen, invalid IP in proxy's IPAddresses slice should have been caught earlier,
    			// skip it to prevent a panic.
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 21:27:21 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  4. tests/create_test.go

    		CheckPet(t, pet2, pet)
    	})
    
    	t.Run("Slice", func(t *testing.T) {
    		pets := []Pet{{
    			Name: "PolymorphicHasOne-Slice-1",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-1"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-2",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-2"},
    		}, {
    			Name: "PolymorphicHasOne-Slice-3",
    			Toy:  Toy{Name: "Toy-PolymorphicHasOne-Slice-3"},
    		}}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
  5. test/fixedbugs/issue29312.go

    // something of type *pwn. The way arg passing in Go works, the
    // backing store pointer for the outer slice becomes the "this"
    // pointer of the String method, which points to the inner []*pwn
    // slice.  The String method then modifies the length of that inner
    // slice.
    package main
    
    import "fmt"
    
    type pwn struct {
    	a [3]uint
    }
    
    func (this *pwn) String() string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 09 11:28:56 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  6. src/slices/sort_benchmark_test.go

    					return n
    				}
    				return cmp.Compare(a.n, b.n)
    			}
    			// Presort the slice so all benchmark iterations are identical.
    			slices.SortFunc(structs, cmpFunc)
    			b.ResetTimer()
    			for i := 0; i < b.N; i++ {
    				// Sort the slice twice because slices.SortFunc modifies the slice in place.
    				slices.SortFunc(structs, func(a, b *myStruct) int { return cmpFunc(b, a) })
    				slices.SortFunc(structs, cmpFunc)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 23:39:07 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/arguments.go

    // only the instances of this argument in the overrides to be applied.
    func ArgumentsToCommand(base []kubeadmapi.Arg, overrides []kubeadmapi.Arg) []string {
    	var command []string
    	// Copy the overrides arguments into a new slice.
    	args := make([]kubeadmapi.Arg, len(overrides))
    	copy(args, overrides)
    
    	// overrideArgs is a set of args which will replace the args defined in the base
    	overrideArgs := sets.New[string]()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Oct 06 11:01:00 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  8. common/scripts/kind_provisioner.sh

    from ipaddress import ip_network, IPv6Network;
    from itertools import islice;
    
    net = ip_network('$CIDR')
    net_bits = 128 if type(net) == IPv6Network else 32;
    net_len = pow(2, net_bits - net.prefixlen)
    start, end = int(net_len / 4 * 3), net_len
    if net_len > 2000:
      start, end = 1000, 2000
    
    [print(str(ip) + "/" + str(ip.max_prefixlen)) for ip in islice(ip_network('$CIDR').hosts(), start, end)]
    EOF
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Apr 08 19:12:55 UTC 2024
    - 17.3K bytes
    - Viewed (0)
  9. src/reflect/deepequal.go

    // or if they point to deeply equal values.
    //
    // Slice values are deeply equal when all of the following are true:
    // they are both nil or both non-nil, they have the same length,
    // and either they point to the same initial entry of the same underlying array
    // (that is, &x[0] == &y[0]) or their corresponding elements (up to length) are deeply equal.
    // Note that a non-nil empty slice and a nil slice (for example, []byte{} and []byte(nil))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:30 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  10. src/syscall/syscall_linux_amd64.go

    //sys	Setfsgid(gid int) (err error)
    //sys	Setfsuid(uid int) (err error)
    //sysnb	setrlimit(resource int, rlim *Rlimit) (err error) = SYS_SETRLIMIT
    //sys	Shutdown(fd int, how int) (err error)
    //sys	Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
    //sys	Statfs(path string, buf *Statfs_t) (err error)
    //sys	SyncFileRange(fd int, off int64, n int64, flags int) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 21 22:23:07 UTC 2023
    - 4.8K bytes
    - Viewed (0)
Back to top