Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 275 for asSlice (0.13 sec)

  1. src/cmd/asm/internal/lex/slice.go

    	"cmd/internal/src"
    )
    
    // A Slice reads from a slice of Tokens.
    type Slice struct {
    	tokens []Token
    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    	return &Slice{
    		tokens: tokens,
    		base:   base,
    		line:   line,
    		pos:    -1, // Next will advance to zero.
    	}
    }
    
    func (s *Slice) Next() ScanToken {
    	s.pos++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 29 22:49:50 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/runtime/splice_test.go

    				sb.Splice(testBytes0)
    				buf.Write(testBytes0)
    
    				sb.Reset()
    				buf.Reset()
    			},
    		},
    		{
    			name: "Write/Splice, Reset, Write/Splice",
    			run: func(sb runtime.Splice, buf *bytes.Buffer) {
    				sb.Splice(testBytes0)
    				buf.Write(testBytes0)
    
    				sb.Reset()
    				buf.Reset()
    
    				sb.Splice(testBytes1)
    				buf.Write(testBytes1)
    			},
    		},
    		{
    			name: "Write, Reset, Splice",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 05 18:03:48 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  3. src/internal/poll/splice_linux.go

    // splice wraps the splice system call. Since the current implementation
    // only uses splice on sockets and pipes, the offset arguments are unused.
    // splice returns int instead of int64, because callers never ask it to
    // move more data in a single call than can fit in an int32.
    func splice(out int, in int, max int, flags int) (int, error) {
    	n, err := syscall.Splice(in, nil, out, nil, max, flags)
    	return int(n), err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. src/os/zero_copy_linux.go

    	// Streams benefit the most from the splice(2), non-streams are not even supported in old kernels
    	// where splice(2) will just return EINVAL; newer kernels support non-streams like UDP, but I really
    	// doubt that splice(2) could help non-streams, cuz they usually send small frames respectively
    	// and one splice call would result in one frame.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/dec.rules

          (OffPtr <typ.BytePtrPtr> [config.PtrSize] ptr)
          mem)
    
    (SlicePtr x:(Load <t> ptr mem)) && t.IsSlice() => @x.Block (Load <t.Elem().PtrTo()> ptr mem)
    (SliceLen x:(Load <t> ptr mem)) && t.IsSlice() => @x.Block (Load <typ.Int>
          (OffPtr <typ.IntPtr> [config.PtrSize] ptr)
          mem)
    (SliceCap x:(Load <t> ptr mem)) && t.IsSlice() => @x.Block (Load <typ.Int>
          (OffPtr <typ.IntPtr> [2*config.PtrSize] ptr)
          mem)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. test/typeparam/issue51925.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    type IntLike interface {
    	~int | ~int64 | ~int32 | ~int16 | ~int8
    }
    
    func Reduce[T any, U any, Uslice ~[]U](function func(T, U) T, sequence Uslice, initial T) T {
    	result := initial
    	for _, x := range sequence {
    		result = function(result, x)
    	}
    	return result
    }
    
    func min[T IntLike](x, y T) T {
    	if x < y {
    		return x
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 963 bytes
    - Viewed (0)
  7. docs_src/security/tutorial003_an_py310.py

            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
            "email": "alice@example.com",
            "hashed_password": "fakehashedsecret2",
            "disabled": True,
        },
    }
    
    app = FastAPI()
    
    
    def fake_hash_password(password: str):
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/universe.go

    	okforbool[types.TBOOL] = true
    
    	okforcap[types.TARRAY] = true
    	okforcap[types.TCHAN] = true
    	okforcap[types.TSLICE] = true
    
    	ir.OKForConst[types.TBOOL] = true
    	ir.OKForConst[types.TSTRING] = true
    
    	okforlen[types.TARRAY] = true
    	okforlen[types.TCHAN] = true
    	okforlen[types.TMAP] = true
    	okforlen[types.TSLICE] = true
    	okforlen[types.TSTRING] = true
    
    	okforeq[types.TPTR] = true
    	okforeq[types.TUNSAFEPTR] = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/reflectdata/helpers.go

    	return kindRType(pos, typ, types.TCHAN)
    }
    
    // sliceElemRType asserts that typ is a slice type, and returns an
    // expression that yields the *runtime._type value representing typ's
    // element type.
    func sliceElemRType(pos src.XPos, typ *types.Type) ir.Node {
    	base.AssertfAt(typ.IsSlice(), pos, "want slice type, have %v", typ)
    	return TypePtrAt(pos, typ.Elem())
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  10. src/internal/types/testdata/spec/assignability.go

    // proto-types for tests
    
    type (
    	_Basic     = int
    	_Array     = [10]int
    	_Slice     = []int
    	_Struct    = struct{ f int }
    	_Pointer   = *int
    	_Func      = func(x int) string
    	_Interface = interface{ m() int }
    	_Map       = map[string]int
    	_Chan      = chan int
    
    	Basic     _Basic
    	Array     _Array
    	Slice     _Slice
    	Struct    _Struct
    	Pointer   _Pointer
    	Func      _Func
    	Interface _Interface
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 5.1K bytes
    - Viewed (0)
Back to top