Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 5,349 for fmtX (0.18 sec)

  1. src/net/example_test.go

    	ipv4Public := net.ParseIP("8.8.8.8")
    	ipv4Broadcast := net.ParseIP("255.255.255.255")
    
    	fmt.Println(ipv6Global.IsGlobalUnicast())
    	fmt.Println(ipv6UniqLocal.IsGlobalUnicast())
    	fmt.Println(ipv6Multi.IsGlobalUnicast())
    
    	fmt.Println(ipv4Private.IsGlobalUnicast())
    	fmt.Println(ipv4Public.IsGlobalUnicast())
    	fmt.Println(ipv4Broadcast.IsGlobalUnicast())
    
    	// Output:
    	// true
    	// true
    	// false
    	// true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 13 16:36:59 UTC 2021
    - 8.5K bytes
    - Viewed (0)
  2. src/strconv/example_test.go

    	b16 = strconv.AppendUint(b16, 42, 16)
    	fmt.Println(string(b16))
    
    	// Output:
    	// uint (base 10):42
    	// uint (base 16):2a
    }
    
    func ExampleAtoi() {
    	v := "10"
    	if s, err := strconv.Atoi(v); err == nil {
    		fmt.Printf("%T, %v", s, s)
    	}
    
    	// Output:
    	// int, 10
    }
    
    func ExampleCanBackquote() {
    	fmt.Println(strconv.CanBackquote("Fran & Freddie's Diner ☺"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 22:57:37 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/testdata/gen/constFoldGen.go

    					fmt.Fprintf(w, "\ty = %d\n", d)
    					fmt.Fprintf(w, "\tr = x %s y\n", o.symbol)
    					want := ansS(c, d, s.name, o.symbol)
    					fmt.Fprintf(w, "\tif r != %s {\n", want)
    					fmt.Fprintf(w, "\t\tt.Errorf(\"%d %%s %d = %%d, want %s\", %q, r)\n", c, d, want, o.symbol)
    					fmt.Fprintf(w, "\t}\n")
    				}
    			}
    			fmt.Fprintf(w, "}\n")
    		}
    	}
    
    	// Special signed/unsigned cases for shifts
    	for _, ls := range szs {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 20 02:13:02 UTC 2022
    - 8.4K bytes
    - Viewed (0)
  4. test/map.go

    	// test len
    	if len(mib) != count {
    		panic(fmt.Sprintf("len(mib) = %d\n", len(mib)))
    	}
    	if len(mii) != count {
    		panic(fmt.Sprintf("len(mii) = %d\n", len(mii)))
    	}
    	if len(mfi) != count {
    		panic(fmt.Sprintf("len(mfi) = %d\n", len(mfi)))
    	}
    	if len(mif) != count {
    		panic(fmt.Sprintf("len(mif) = %d\n", len(mif)))
    	}
    	if len(msi) != count {
    		panic(fmt.Sprintf("len(msi) = %d\n", len(msi)))
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 06 21:02:55 UTC 2014
    - 14.9K bytes
    - Viewed (0)
  5. src/slices/example_test.go

    	grow := slices.Grow(numbers, 2)
    	fmt.Println(cap(numbers))
    	fmt.Println(grow)
    	fmt.Println(len(grow))
    	fmt.Println(cap(grow))
    	// Output:
    	// 4
    	// [0 42 -10 8]
    	// 4
    	// 8
    }
    
    func ExampleClip() {
    	a := [...]int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
    	s := a[:4:10]
    	clip := slices.Clip(s)
    	fmt.Println(cap(s))
    	fmt.Println(clip)
    	fmt.Println(len(clip))
    	fmt.Println(cap(clip))
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go

    			nil,
    		},
    		{
    			aggregate{fmt.Errorf("abc")},
    			aggregate{fmt.Errorf("abc")},
    		},
    		{
    			aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")},
    			aggregate{fmt.Errorf("abc"), fmt.Errorf("def"), fmt.Errorf("ghi")},
    		},
    		{
    			aggregate{aggregate{fmt.Errorf("abc")}},
    			aggregate{fmt.Errorf("abc")},
    		},
    		{
    			aggregate{aggregate{aggregate{fmt.Errorf("abc")}}},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jul 24 13:16:21 UTC 2022
    - 12.7K bytes
    - Viewed (0)
  7. src/math/example_test.go

    	fmt.Printf("%.2f\n", math.Dim(4, -2))
    	fmt.Printf("%.2f\n", math.Dim(-4, 2))
    	// Output:
    	// 6.00
    	// 0.00
    }
    
    func ExampleExp() {
    	fmt.Printf("%.2f\n", math.Exp(1))
    	fmt.Printf("%.2f\n", math.Exp(2))
    	fmt.Printf("%.2f\n", math.Exp(-1))
    	// Output:
    	// 2.72
    	// 7.39
    	// 0.37
    }
    
    func ExampleExp2() {
    	fmt.Printf("%.2f\n", math.Exp2(1))
    	fmt.Printf("%.2f\n", math.Exp2(-3))
    	// Output:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 07 18:09:53 UTC 2021
    - 3.7K bytes
    - Viewed (0)
  8. src/unicode/utf8/example_test.go

    	fmt.Println("runes =", utf8.RuneCountInString(str))
    	// Output:
    	// bytes = 13
    	// runes = 9
    }
    
    func ExampleRuneLen() {
    	fmt.Println(utf8.RuneLen('a'))
    	fmt.Println(utf8.RuneLen('界'))
    	// Output:
    	// 1
    	// 3
    }
    
    func ExampleRuneStart() {
    	buf := []byte("a界")
    	fmt.Println(utf8.RuneStart(buf[0]))
    	fmt.Println(utf8.RuneStart(buf[1]))
    	fmt.Println(utf8.RuneStart(buf[2]))
    	// Output:
    	// true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 05 21:29:18 UTC 2021
    - 3.6K bytes
    - Viewed (0)
  9. src/cmd/cgo/out.go

    			fmt.Fprint(fgo2, "\tif e != 0 {\n")
    			fmt.Fprint(fgo2, "\t\treturn ")
    			if !void {
    				fmt.Fprint(fgo2, "r, ")
    			}
    			fmt.Fprint(fgo2, "e\n")
    			fmt.Fprint(fgo2, "\t}\n")
    			fmt.Fprint(fgo2, "\treturn ")
    			if !void {
    				fmt.Fprint(fgo2, "r, ")
    			}
    			fmt.Fprint(fgo2, "nil\n")
    		} else if !void {
    			fmt.Fprint(fgo2, "\treturn r\n")
    		}
    
    		fmt.Fprint(fgo2, "}\n")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:10 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  10. src/cmd/internal/obj/loong64/asm_test.go

    	genSize2 := (1 << 21) + 16
    
    	fmt.Fprintln(buf, "TEXT f(SB),0,$0-0")
    	fmt.Fprintln(buf, "BEQ R5, R6, label18")
    	fmt.Fprintln(buf, "BNE R5, R6, label18")
    	fmt.Fprintln(buf, "BGE R5, R6, label18")
    
    	fmt.Fprintln(buf, "BGEU R5, R6, label18")
    	fmt.Fprintln(buf, "BLTU R5, R6, label18")
    
    	fmt.Fprintln(buf, "BLEZ R5, label18")
    	fmt.Fprintln(buf, "BGEZ R5, label18")
    	fmt.Fprintln(buf, "BLTZ R5, label18")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 17:39:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
Back to top