Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 307 for grow (0.18 sec)

  1. src/bytes/buffer.go

    	return m
    }
    
    // Grow grows the buffer's capacity, if necessary, to guarantee space for
    // another n bytes. After Grow(n), at least n bytes can be written to the
    // buffer without another allocation.
    // If n is negative, Grow will panic.
    // If the buffer can't grow it will panic with [ErrTooLarge].
    func (b *Buffer) Grow(n int) {
    	if n < 0 {
    		panic("bytes.Buffer.Grow: negative count")
    	}
    	m := b.grow(n)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Oct 13 17:10:31 GMT 2023
    - 15.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/escape/CharEscaper.java

          // This is the size needed to add the replacement, not the full size
          // needed by the string. We only regrow when we absolutely must, and
          // when we do grow, grow enough to avoid excessive growing. Grow.
          int sizeNeeded = destIndex + charsSkipped + rlen;
          if (destSize < sizeNeeded) {
            destSize = sizeNeeded + DEST_PAD_MULTIPLIER * (slen - index);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/escape/Platform.java

        return requireNonNull(DEST_TL.get());
      }
    
      /**
       * A thread-local destination buffer to keep us from creating new buffers. The starting size is
       * 1024 characters. If we grow past this we don't put it back in the threadlocal, we just keep
       * going and grow as needed.
       */
      private static final ThreadLocal<char[]> DEST_TL =
          new ThreadLocal<char[]>() {
            @Override
            protected char[] initialValue() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Dec 15 19:31:54 GMT 2023
    - 1.6K bytes
    - Viewed (0)
  4. src/bytes/buffer_test.go

    	}
    }
    
    func TestGrowOverflow(t *testing.T) {
    	defer func() {
    		if err := recover(); err != ErrTooLarge {
    			t.Errorf("after too-large Grow, recover() = %v; want %v", err, ErrTooLarge)
    		}
    	}()
    
    	buf := NewBuffer(make([]byte, 1))
    	const maxInt = int(^uint(0) >> 1)
    	buf.Grow(maxInt)
    }
    
    // Was a bug: used to give EOF reading empty slice at EOF.
    func TestReadEmptyAtEOF(t *testing.T) {
    	b := new(Buffer)
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Thu Apr 20 01:07:29 GMT 2023
    - 18.1K bytes
    - Viewed (0)
  5. src/bytes/example_test.go

    	fmt.Println(buf2.Cap())
    	// Output:
    	// 10
    	// 10
    }
    
    func ExampleBuffer_Grow() {
    	var b bytes.Buffer
    	b.Grow(64)
    	bb := b.Bytes()
    	b.Write([]byte("64 bytes or fewer"))
    	fmt.Printf("%q", bb[:b.Len()])
    	// Output: "64 bytes or fewer"
    }
    
    func ExampleBuffer_Len() {
    	var b bytes.Buffer
    	b.Grow(64)
    	b.Write([]byte("abcde"))
    	fmt.Printf("%d", b.Len())
    	// Output: 5
    }
    
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  6. android/guava/src/com/google/common/io/ReaderInputStream.java

              result.throwException();
              return 0; // Not called.
            }
          }
        }
      }
    
      /** Returns a new CharBuffer identical to buf, except twice the capacity. */
      private static CharBuffer grow(CharBuffer buf) {
        char[] copy = Arrays.copyOf(buf.array(), buf.capacity() * 2);
        CharBuffer bigger = CharBuffer.wrap(copy);
        Java8Compatibility.position(bigger, buf.position());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 9.3K bytes
    - Viewed (0)
  7. manifests/charts/UPDATING-CHARTS.md

    # Updating charts and values.yaml
    
    ## Acceptable Pull Requests
    
    Helm charts `values.yaml` represent a complex user facing API that tends to grow uncontrollably over time
    due to design choices in Helm.
    The underlying Kubernetes resources we configure have 1000s of fields; given enough users and bespoke use cases,
    eventually someone will want to customize every one of those fields.
    Plain Text
    - Registered: Wed Apr 24 22:53:08 GMT 2024
    - Last Modified: Thu Jul 27 18:28:55 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. src/main/webapp/css/bootstrap.min.css

    -left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0...
    CSS
    - Registered: Mon Apr 22 08:04:10 GMT 2024
    - Last Modified: Wed Dec 25 08:05:52 GMT 2019
    - 155.8K bytes
    - Viewed (0)
  9. guava-tests/benchmark/com/google/common/cache/LoadingCacheSingleThreadBenchmark.java

                        return (int) misses.incrementAndGet();
                      }
                    });
    
        // To start, fill up the cache.
        // Each miss both increments the counter and causes the map to grow by one,
        // so until evictions begin, the size of the map is the greatest return
        // value seen so far
        while (cache.getUnchecked(nextRandomKey()) < maximumSize) {}
    
        requests.set(0);
        misses.set(0);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3.4K bytes
    - Viewed (0)
  10. callbacks/create.go

    					}
    					db.Statement.AddClause(clause.Returning{Columns: fromColumns})
    				}
    			}
    		}
    
    		if db.Statement.SQL.Len() == 0 {
    			db.Statement.SQL.Grow(180)
    			db.Statement.AddClauseIfNotExists(clause.Insert{})
    			db.Statement.AddClause(ConvertToCreateValues(db.Statement))
    
    			db.Statement.Build(db.Statement.BuildClauses...)
    		}
    
    Go
    - Registered: Sun Apr 21 09:35:09 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
Back to top