Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 271 - 280 of 3,469 for zone (0.02 seconds)

  1. cmd/shared-lock.go

    	ctx, cancel := context.WithCancel(context.Background())
    	go func() {
    		select {
    		case <-ctx1.Done():
    		case <-ctx2.Done():
    		// The lock acquirer decides to cancel, exit this goroutine
    		case <-ctx.Done():
    		}
    
    		cancel()
    	}()
    	return ctx, cancel
    }
    
    func (ld sharedLock) GetLock(ctx context.Context) (context.Context, context.CancelFunc) {
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Mon Feb 13 09:26:38 GMT 2023
    - 2.3K bytes
    - Click Count (0)
  2. docs_src/encoder/tutorial001_py310.py

    from fastapi import FastAPI
    from fastapi.encoders import jsonable_encoder
    from pydantic import BaseModel
    
    fake_db = {}
    
    
    class Item(BaseModel):
        title: str
        timestamp: datetime
        description: str | None = None
    
    
    app = FastAPI()
    
    
    @app.put("/items/{id}")
    def update_item(id: str, item: Item):
        json_compatible_item_data = jsonable_encoder(item)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 430 bytes
    - Click Count (0)
  3. cmd/os_other.go

    		maxEntries = opts.count
    	}
    
    	done := false
    	remaining := opts.count
    
    	for !done {
    		// Read up to max number of entries.
    		fis, err := d.Readdir(maxEntries)
    		if err != nil {
    			if err == io.EOF {
    				break
    			}
    			return nil, osErrToFileErr(err)
    		}
    		if opts.count > -1 {
    			if remaining <= len(fis) {
    				fis = fis[:remaining]
    				done = true
    			}
    		}
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Wed Sep 13 15:14:36 GMT 2023
    - 4K bytes
    - Click Count (0)
  4. docs/zh/docs/tutorial/body.md

    * 如果该参数也在**路径**中声明了,它就是路径参数。
    * 如果该参数是(`int`、`float`、`str`、`bool` 等)**单一类型**,它会被当作**查询**参数。
    * 如果该参数的类型声明为 **Pydantic 模型**,它会被当作请求**体**。
    
    /// note | 注意
    
    FastAPI 会根据默认值 `= None` 知道 `q` 的值不是必填的。
    
    `str | None` 并不是 FastAPI 用来判断是否必填的依据;是否必填由是否有默认值 `= None` 决定。
    
    但添加这些类型注解可以让你的编辑器提供更好的支持并检测错误。
    
    ///
    
    ## 不使用 Pydantic { #without-pydantic }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 5.9K bytes
    - Click Count (0)
  5. src/test/java/org/codelibs/curl/io/ContentOutputStreamTest.java

            assertFalse(cos.done);
            assertTrue(cos.isInMemory());
            cos.close();
            assertFalse(cos.done);
        }
    
        @Test
        public void inFile() throws IOException {
            ContentOutputStream cos = new ContentOutputStream(10, Curl.tmpDir);
            cos.write(new byte[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 });
            assertFalse(cos.done);
            assertFalse(cos.isInMemory());
    Created: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Sat Mar 21 12:00:34 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  6. docs_src/query_params_str_validations/tutorial008_an_py310.py

    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None,
            Query(
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
            ),
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 498 bytes
    - Click Count (0)
  7. fastapi/routing.py

            summary: str | None = None,
            description: str | None = None,
            response_description: str = "Successful Response",
            responses: dict[int | str, dict[str, Any]] | None = None,
            deprecated: bool | None = None,
            name: str | None = None,
            methods: set[str] | list[str] | None = None,
            operation_id: str | None = None,
            response_model_include: IncEx | None = None,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 193K bytes
    - Click Count (0)
  8. internal/hash/crc.go

    	// apply len2 zeros to crc1 (first square will put the operator for one
    	// zero byte, eight zero bits, in even)
    	crc1n := uint64(crc1)
    	for {
    		// apply zeros operator for this bit of len2
    		gf2MatrixSquare(even, odd)
    		if len2&1 != 0 {
    			crc1n = gf2MatrixTimes(even, crc1n)
    		}
    		len2 >>= 1
    
    		// if no more bits set, then done
    		if len2 == 0 {
    			break
    		}
    
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Mon Jan 20 14:49:07 GMT 2025
    - 5.8K bytes
    - Click Count (0)
  9. android/guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        Object one = new Object();
        assertThat(map.put(one, one)).isNull();
        assertThat(map.get(one)).isSameInstanceAs(one);
        assertThat(map.containsKey(one)).isTrue();
        assertThat(map.containsValue(one)).isTrue();
        Object two = new Object();
        assertThat(map.replace(one, two)).isSameInstanceAs(one);
        assertThat(map.containsKey(one)).isTrue();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 13.1K bytes
    - Click Count (0)
  10. guava-tests/test/com/google/common/cache/LocalLoadingCacheTest.java

        Object one = new Object();
        assertThat(map.put(one, one)).isNull();
        assertThat(map.get(one)).isSameInstanceAs(one);
        assertThat(map.containsKey(one)).isTrue();
        assertThat(map.containsValue(one)).isTrue();
        Object two = new Object();
        assertThat(map.replace(one, two)).isSameInstanceAs(one);
        assertThat(map.containsKey(one)).isTrue();
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Wed Mar 18 18:06:14 GMT 2026
    - 13.1K bytes
    - Click Count (0)
Back to Top