Search Options

Results per page
Sort
Preferred Languages
Advance

Results 111 - 120 of 157 for iota (0.04 sec)

  1. src/net/http/mapping_test.go

    	"strconv"
    	"testing"
    )
    
    func TestMapping(t *testing.T) {
    	var m mapping[int, string]
    	for i := 0; i < maxSlice; i++ {
    		m.add(i, strconv.Itoa(i))
    	}
    	if m.m != nil {
    		t.Fatal("m.m != nil")
    	}
    	for i := 0; i < maxSlice; i++ {
    		g, _ := m.find(i)
    		w := strconv.Itoa(i)
    		if g != w {
    			t.Fatalf("%d: got %s, want %s", i, g, w)
    		}
    	}
    	m.add(4, "4")
    	if m.s != nil {
    		t.Fatal("m.s != nil")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 17:47:07 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  2. src/os/user/lookup_stubs.go

    }
    
    func currentUID() string {
    	if id := os.Getuid(); id >= 0 {
    		return strconv.Itoa(id)
    	}
    	// Note: Windows returns -1, but this file isn't used on
    	// Windows anyway, so this empty return path shouldn't be
    	// used.
    	return ""
    }
    
    func currentGID() string {
    	if id := os.Getgid(); id >= 0 {
    		return strconv.Itoa(id)
    	}
    	return ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 16:09:09 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  3. src/crypto/tls/alert.go

    	alertECHRequired:                  "encrypted client hello required",
    }
    
    func (e alert) String() string {
    	s, ok := alertText[e]
    	if ok {
    		return "tls: " + s
    	}
    	return "tls: alert(" + strconv.Itoa(int(e)) + ")"
    }
    
    func (e alert) Error() string {
    	return e.String()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:10:12 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  4. src/strconv/doc.go

    // of basic data types.
    //
    // # Numeric Conversions
    //
    // The most common numeric conversions are [Atoi] (string to int) and [Itoa] (int to string).
    //
    //	i, err := strconv.Atoi("-42")
    //	s := strconv.Itoa(-42)
    //
    // These assume decimal and the Go int type.
    //
    // [ParseBool], [ParseFloat], [ParseInt], and [ParseUint] convert strings to values:
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. src/math/big/intconv.go

    	if x == nil {
    		return "<nil>"
    	}
    	return string(x.abs.itoa(x.neg, base))
    }
    
    // Append appends the string representation of x, as generated by
    // x.Text(base), to buf and returns the extended buffer.
    func (x *Int) Append(buf []byte, base int) []byte {
    	if x == nil {
    		return append(buf, "<nil>"...)
    	}
    	return append(buf, x.abs.itoa(x.neg, base)...)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 11:59:09 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  6. src/crypto/internal/bigmod/_asm/nat_amd64_asm.go

    	for i := 0; i < bits/64; i++ {
    		hi, lo := GP64(), GP64()
    
    		Comment("Iteration " + strconv.Itoa(i))
    		MULXQ(x.Offset(i*8), lo, hi)
    		ADCXQ(carry, lo)
    		ADOXQ(z.Offset(i*8), lo)
    		MOVQ(lo, z.Offset(i*8))
    
    		i++
    
    		Comment("Iteration " + strconv.Itoa(i))
    		MULXQ(x.Offset(i*8), lo, carry)
    		ADCXQ(hi, lo)
    		ADOXQ(z.Offset(i*8), lo)
    		MOVQ(lo, z.Offset(i*8))
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 24 22:37:58 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. src/cmd/go/internal/gover/local.go

    	if TestVersion != "" {
    		toolVers = TestVersion
    	}
    	goVers = FromToolchain(toolVers)
    	if goVers == "" {
    		// Development branch. Use "Dev" version with just 1.N, no rc1 or .0 suffix.
    		goVers = "1." + strconv.Itoa(goversion.Version)
    		toolVers = "go" + goVers
    	}
    	return goVers, toolVers
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:20:23 UTC 2023
    - 1.1K bytes
    - Viewed (0)
Back to top