Search Options

Results per page
Sort
Preferred Languages
Advance

Results 141 - 150 of 185 for iota (0.1 sec)

  1. src/os/writeto_linux_test.go

    		32769,
    	}
    	t.Run("sendfile-to-unix", func(t *testing.T) {
    		for _, size := range sizes {
    			t.Run(strconv.Itoa(size), func(t *testing.T) {
    				testSendFile(t, "unix", int64(size))
    			})
    		}
    	})
    	t.Run("sendfile-to-tcp", func(t *testing.T) {
    		for _, size := range sizes {
    			t.Run(strconv.Itoa(size), func(t *testing.T) {
    				testSendFile(t, "tcp", int64(size))
    			})
    		}
    	})
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 18:12:56 UTC 2024
    - 4K bytes
    - Viewed (0)
  2. src/strconv/atoi.go

    }
    
    func baseError(fn, str string, base int) *NumError {
    	return &NumError{fn, stringslite.Clone(str), errors.New("invalid base " + Itoa(base))}
    }
    
    func bitSizeError(fn, str string, bitSize int) *NumError {
    	return &NumError{fn, stringslite.Clone(str), errors.New("invalid bit size " + Itoa(bitSize))}
    }
    
    const intSize = 32 << (^uint(0) >> 63)
    
    // IntSize is the size in bits of an int or uint value.
    const IntSize = intSize
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:26 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. src/runtime/testdata/testprog/numcpu_freebsd.go

    	return
    }
    
    func getList() ([]string, error) {
    	pid := syscall.Getpid()
    
    	// Launch cpuset to print a list of available CPUs: pid <PID> mask: 0, 1, 2, 3.
    	cmd := exec.Command("cpuset", "-g", "-p", strconv.Itoa(pid))
    	cmdline := strings.Join(cmd.Args, " ")
    	output, err := cmd.CombinedOutput()
    	if err != nil {
    		return nil, fmt.Errorf("fail to execute '%s': %s", cmdline, err)
    	}
    	output, _, ok := bytes.Cut(output, []byte("\n"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 30 20:09:46 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  4. src/os/exec_plan9.go

    	if e != nil {
    		return nil, &PathError{Op: "fork/exec", Path: name, Err: e}
    	}
    
    	return newPIDProcess(pid), nil
    }
    
    func (p *Process) writeProcFile(file string, data string) error {
    	f, e := OpenFile("/proc/"+itoa.Itoa(p.Pid)+"/"+file, O_WRONLY, 0)
    	if e != nil {
    		return e
    	}
    	defer f.Close()
    	_, e = f.Write([]byte(data))
    	return e
    }
    
    func (p *Process) signal(sig Signal) error {
    	switch p.pidStatus() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 22:06:47 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  5. src/strconv/itoa_test.go

    				t.Errorf("AppendUint(%q, %v, %v) = %q want %v",
    					"abc", uint64(test.in), test.base, x, test.out)
    			}
    		}
    
    		if test.base == 10 && int64(int(test.in)) == test.in {
    			s := Itoa(int(test.in))
    			if s != test.out {
    				t.Errorf("Itoa(%v) = %v want %v",
    					test.in, s, test.out)
    			}
    		}
    	}
    
    	// Override when base is illegal
    	defer func() {
    		if r := recover(); r == nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 15 21:09:39 UTC 2022
    - 5.8K bytes
    - Viewed (0)
  6. src/net/interface_plan9.go

    }
    
    func readInterface(i int) (*Interface, error) {
    	ifc := &Interface{
    		Index: i + 1,                             // Offset the index by one to suit the contract
    		Name:  netdir + "/ipifc/" + itoa.Itoa(i), // Name is the full path to the interface path in plan9
    	}
    
    	ifcstat := ifc.Name + "/status"
    	ifcstatf, err := open(ifcstat)
    	if err != nil {
    		return nil, err
    	}
    	defer ifcstatf.close()
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 06 14:00:54 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. src/math/big/intmarsh.go

    	return nil
    }
    
    // MarshalText implements the [encoding.TextMarshaler] interface.
    func (x *Int) MarshalText() (text []byte, err error) {
    	if x == nil {
    		return []byte("<nil>"), nil
    	}
    	return x.abs.itoa(x.neg, 10), nil
    }
    
    // UnmarshalText implements the [encoding.TextUnmarshaler] interface.
    func (z *Int) UnmarshalText(text []byte) error {
    	if _, ok := z.setFromScanner(bytes.NewReader(text), 0); !ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  8. src/internal/fuzz/worker_test.go

    	for sz := 1; sz <= len(bytes); sz <<= 1 {
    		sz := sz
    		input := []any{bytes[:sz]}
    		encodedVals := marshalCorpusFile(input...)
    		mem = <-ws.memMu
    		mem.setValue(encodedVals)
    		ws.memMu <- mem
    		b.Run(strconv.Itoa(sz), func(b *testing.B) {
    			i := 0
    			ws.fuzzFn = func(_ CorpusEntry) (time.Duration, error) {
    				if i == 0 {
    					i++
    					return time.Second, errors.New("initial failure for deflake")
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  9. src/archive/tar/stat_unix.go

    		if u, ok := userMap.Load(h.Uid); ok {
    			h.Uname = u.(string)
    		} else if u, err := user.LookupId(strconv.Itoa(h.Uid)); err == nil {
    			h.Uname = u.Username
    			userMap.Store(h.Uid, h.Uname)
    		}
    		if g, ok := groupMap.Load(h.Gid); ok {
    			h.Gname = g.(string)
    		} else if g, err := user.LookupGroupId(strconv.Itoa(h.Gid)); err == nil {
    			h.Gname = g.Name
    			groupMap.Store(h.Gid, h.Gname)
    		}
    	}
    	h.AccessTime = statAtime(sys)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:01:50 UTC 2024
    - 3.2K bytes
    - Viewed (0)
  10. test/typeparam/stringerimp.dir/main.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"./a"
    	"fmt"
    	"reflect"
    	"strconv"
    )
    
    type myint int
    
    func (i myint) String() string {
    	return strconv.Itoa(int(i))
    }
    
    func main() {
    	x := []myint{myint(1), myint(2), myint(3)}
    
    	got := a.Stringify(x)
    	want := []string{"1", "2", "3"}
    	if !reflect.DeepEqual(got, want) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 24 02:14:15 UTC 2022
    - 741 bytes
    - Viewed (0)
Back to top