Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for Brunet (0.25 sec)

  1. src/bytes/buffer_test.go

    		}
    	})
    	if n > 0 {
    		t.Errorf("allocations occurred while appending")
    	}
    }
    
    func TestRuneIO(t *testing.T) {
    	const NRune = 1000
    	// Built a test slice while we write the data
    	b := make([]byte, utf8.UTFMax*NRune)
    	var buf Buffer
    	n := 0
    	for r := rune(0); r < NRune; r++ {
    		size := utf8.EncodeRune(b[n:], r)
    		nbytes, err := buf.WriteRune(r)
    		if err != nil {
    			t.Fatalf("WriteRune(%U) error: %s", r, err)
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Apr 26 13:31:36 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  2. src/bufio/scan.go

    // UTF-8-encoded rune as a token. The sequence of runes returned is
    // equivalent to that from a range loop over the input as a string, which
    // means that erroneous UTF-8 encodings translate to U+FFFD = "\xef\xbf\xbd".
    // Because of the Scan interface, this makes it impossible for the client to
    // distinguish correctly encoded replacement runes from encoding errors.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Oct 23 09:06:30 GMT 2023
    - 14.2K bytes
    - Viewed (0)
  3. src/bytes/bytes.go

    		// returning nil instead of empty slice if all spaces.
    		return nil
    	}
    	return s[start:stop]
    }
    
    // Runes interprets s as a sequence of UTF-8-encoded code points.
    // It returns a slice of runes (Unicode code points) equivalent to s.
    func Runes(s []byte) []rune {
    	t := make([]rune, utf8.RuneCount(s))
    	i := 0
    	for len(s) > 0 {
    		r, l := utf8.DecodeRune(s)
    		t[i] = r
    		i++
    		s = s[l:]
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  4. src/bufio/scan_test.go

    		}
    	}
    }
    
    // Test that the rune splitter returns same sequence of runes (not bytes) as for range string.
    func TestScanRune(t *testing.T) {
    	for n, test := range scanTests {
    		buf := strings.NewReader(test)
    		s := NewScanner(buf)
    		s.Split(ScanRunes)
    		var i, runeCount int
    		var expect rune
    		// Use a string range loop to validate the sequence of runes.
    		for i, expect = range test {
    			if !s.Scan() {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  5. src/bytes/example_test.go

    	fmt.Println(bytes.LastIndexFunc([]byte("go gopher!"), unicode.IsNumber))
    	// Output:
    	// 8
    	// 9
    	// -1
    }
    
    func ExampleMap() {
    	rot13 := func(r rune) rune {
    		switch {
    		case r >= 'A' && r <= 'Z':
    			return 'A' + (r-'A'+13)%26
    		case r >= 'a' && r <= 'z':
    			return 'a' + (r-'a'+13)%26
    		}
    		return r
    	}
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. src/bufio/bufio.go

    	b.lastRuneSize = -1
    	return nil
    }
    
    // ReadRune reads a single UTF-8 encoded Unicode character and returns the
    // rune and its size in bytes. If the encoded rune is invalid, it consumes one byte
    // and returns unicode.ReplacementChar (U+FFFD) with a size of 1.
    func (b *Reader) ReadRune() (r rune, size int, err error) {
    	for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Oct 12 14:39:08 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  7. src/bytes/buffer.go

    // included to match [bufio.Writer]'s WriteRune. The buffer is grown as needed;
    // if it becomes too large, WriteRune will panic with [ErrTooLarge].
    func (b *Buffer) WriteRune(r rune) (n int, err error) {
    	// Compare as uint32 to correctly handle negative runes.
    	if uint32(r) < utf8.RuneSelf {
    		b.WriteByte(byte(r))
    		return 1, nil
    	}
    	b.lastRead = opInvalid
    	m, ok := b.tryGrowByReslice(utf8.UTFMax)
    	if !ok {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  8. tensorflow/c/experimental/filesystem/plugins/gcs/ram_file_block_cache.h

          pruning_thread_.reset(
              TF_StartThread(&thread_options, "TF_prune_FBC", PruneThread, this));
        }
        TF_VLog(1, "GCS file block cache is %s.\n",
                (IsCacheEnabled() ? "enabled" : "disabled"));
      }
    
      ~RamFileBlockCache() {
        if (pruning_thread_) {
          stop_pruning_thread_.Notify();
          // Destroying pruning_thread_ will block until Prune() receives the above
          // notification and returns.
    C
    - Registered: Tue Apr 23 12:39:09 GMT 2024
    - Last Modified: Mon Aug 31 04:46:34 GMT 2020
    - 10.6K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/internal/transformation/impl/DefaultConsumerPomBuilder.java

                        .map(p -> prune(Profile.newBuilder(p, true), p).build())
                        .collect(Collectors.toList()));
    
                model = builder.build();
                String modelVersion = new MavenModelVersion().getModelVersion(model);
                model = model.withModelVersion(modelVersion);
            } else {
                Model.Builder builder = prune(
                        Model.newBuilder(model, true)
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Thu Apr 25 14:13:36 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  10. istioctl/pkg/dashboard/dashboard.go

    		Short: "Open Prometheus web UI",
    		Long:  `Open Istio's Prometheus dashboard`,
    		Example: `  istioctl dashboard prometheus
    
      # with short syntax
      istioctl dash prometheus
      istioctl d prometheus`,
    		RunE: func(cmd *cobra.Command, args []string) error {
    			client, err := ctx.CLIClientWithRevision(opts.Revision)
    			if err != nil {
    				return fmt.Errorf("failed to create k8s client: %v", err)
    			}
    
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Mon Apr 15 01:29:35 GMT 2024
    - 20.5K bytes
    - Viewed (0)
Back to top