Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 520 for Reset (0.14 sec)

  1. src/main/java/org/codelibs/core/zip/ZipInputStreamUtil.java

            }
        }
    
        /**
         * {@link ZipInputStream#reset()}の例外処理をラップするメソッドです。
         *
         * @param zis
         *            {@link ZipInputStream}。{@literal null}であってはいけません
         * @see ZipInputStream#reset()
         */
        public static void reset(final ZipInputStream zis) {
            assertArgumentNotNull("zis", zis);
    
            try {
                zis.reset();
            } catch (final IOException e) {
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 2.9K bytes
    - Viewed (0)
  2. src/bytes/buffer.go

    func (b *Buffer) Truncate(n int) {
    	if n == 0 {
    		b.Reset()
    		return
    	}
    	b.lastRead = opInvalid
    	if n < 0 || n > b.Len() {
    		panic("bytes.Buffer: truncation out of range")
    	}
    	b.buf = b.buf[:b.off+n]
    }
    
    // Reset resets the buffer to be empty,
    // but it retains the underlying storage for use by future writes.
    // Reset is the same as [Buffer.Truncate](0).
    func (b *Buffer) Reset() {
    	b.buf = b.buf[:0]
    	b.off = 0
    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)
  3. guava-tests/test/com/google/common/io/FileBackedOutputStreamTest.java

          }
        }
        out.close();
    
        // Check that source returns the right data
        assertTrue(Arrays.equals(data, source.read()));
    
        // Make sure that reset deleted the file
        out.reset();
        if (file != null) {
          assertFalse(file.exists());
        }
      }
    
    
      public void testThreshold_resetOnFinalize() throws Exception {
        testThreshold(0, 100, true, true);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 5.5K bytes
    - Viewed (0)
  4. docs_src/sql_databases_peewee/sql_app/main.py

    database.db.connect()
    database.db.create_tables([models.User, models.Item])
    database.db.close()
    
    app = FastAPI()
    
    sleep_time = 10
    
    
    async def reset_db_state():
        database.db._state._state.set(db_state_default.copy())
        database.db._state.reset()
    
    
    def get_db(db_state=Depends(reset_db_state)):
        try:
            database.db.connect()
            yield
        finally:
            if not database.db.is_closed():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 2.2K bytes
    - Viewed (0)
  5. doc/next/6-stdlib/1-time.md

    now unbuffered, with capacity 0.
    The main effect of this change is that Go now guarantees
    that for any call to a `Reset` or `Stop` method, no stale values
    prepared before that call will be sent or received after the call.
    Earlier versions of Go used channels with a one-element buffer,
    making it difficult to use `Reset` and `Stop` correctly.
    A visible effect of this change is that `len` and `cap` of timer channels
    Plain Text
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Apr 12 20:57:18 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  6. tests/test_dependency_contextvars.py

    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
        contextvar_token = legacy_request_state_context_var.set(request_state)
        yield request_state
        legacy_request_state_context_var.reset(contextvar_token)
    
    
    @app.middleware("http")
    async def custom_middleware(
        request: Request, call_next: Callable[[Request], Awaitable[Response]]
    ):
        response = await call_next(request)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  7. cmd/bucket-stats_gen_test.go

    		t.Log("WARNING: TestEncodeDecodeBucketReplicationStat Msgsize() is inaccurate")
    	}
    
    	vn := BucketReplicationStat{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeBucketReplicationStat(b *testing.B) {
    	v := BucketReplicationStat{}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Wed Aug 30 08:00:59 GMT 2023
    - 20.5K bytes
    - Viewed (0)
  8. cmd/batch-job-common-types_gen_test.go

    	if buf.Len() > m {
    		t.Log("WARNING: TestEncodeDecodeBatchJobKV Msgsize() is inaccurate")
    	}
    
    	vn := BatchJobKV{}
    	err := msgp.Decode(&buf, &vn)
    	if err != nil {
    		t.Error(err)
    	}
    
    	buf.Reset()
    	msgp.Encode(&buf, &v)
    	err = msgp.NewReader(&buf).Skip()
    	if err != nil {
    		t.Error(err)
    	}
    }
    
    func BenchmarkEncodeBatchJobKV(b *testing.B) {
    	v := BatchJobKV{}
    	var buf bytes.Buffer
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 02 10:51:33 GMT 2023
    - 11.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/Java8Compatibility.java

        b.limit(limit);
      }
    
      static void mark(Buffer b) {
        b.mark();
      }
    
      static void position(Buffer b, int position) {
        b.position(position);
      }
    
      static void reset(Buffer b) {
        b.reset();
      }
    
      private Java8Compatibility() {}
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 28 20:13:02 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/CountingInputStreamTest.java

        counter.mark(5);
        counter.read();
        assertEquals(11, counter.getCount());
        counter.reset();
        assertEquals(10, counter.getCount());
        assertEquals(10, counter.skip(100));
        assertEquals(20, counter.getCount());
      }
    
      public void testMarkNotSet() {
        IOException expected = assertThrows(IOException.class, () -> counter.reset());
        assertThat(expected).hasMessageThat().isEqualTo("Mark not set");
      }
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 3.5K bytes
    - Viewed (0)
Back to top