Search Options

Results per page
Sort
Preferred Languages
Advance

Results 981 - 990 of 1,080 for Str (0.02 sec)

  1. docs/zh/docs/advanced/security/http-basic-auth.md

    以下是更完整的示例。
    
    使用依赖项检查用户名与密码是否正确。
    
    为此要使用 Python 标准模块 <a href="https://docs.python.org/3/library/secrets.html" class="external-link" target="_blank">`secrets`</a> 检查用户名与密码。
    
    `secrets.compare_digest()` 需要仅包含 ASCII 字符(英语字符)的 `bytes` 或 `str`,这意味着它不适用于像`á`一样的字符,如 `Sebastián`。
    
    为了解决这个问题,我们首先将 `username` 和 `password` 转换为使用 UTF-8 编码的 `bytes` 。
    
    然后我们可以使用 `secrets.compare_digest()` 来确保 `credentials.username` 是 `"stanleyjobson"`,且 `credentials.password` 是`"swordfish"`。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/body-updates.md

        * Это сравнимо с повторным использованием метода модели `.dict()`, но при этом происходит проверка (и преобразование) значений в типы данных, которые могут быть преобразованы в JSON, например, `datetime` в `str`.
    * Сохранить данные в своей БД.
    * Вернуть обновленную модель.
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="28-35"
    {!> ../../docs_src/body_updates/tutorial002_py310.py!}
    ```
    
    ////
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. common/scripts/kind_provisioner.sh

    net_bits = 128 if type(net) == IPv6Network else 32;
    net_len = pow(2, net_bits - net.prefixlen)
    start, end = int(net_len / 4 * 3), net_len
    if net_len > 2000:
      start, end = 1000, 2000
    
    [print(str(ip) + "/" + str(ip.max_prefixlen)) for ip in islice(ip_network('$CIDR').hosts(), start, end)]
    EOF
    }
    
    function ips_to_cidrs() {
      IP_RANGE_START="$1"
      IP_RANGE_END="$2"
      python3 - <<EOF
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Wed Aug 21 04:47:23 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  4. src/main/java/jcifs/internal/smb2/ServerMessageBlock2.java

                c = "SMB2_OPLOCK_BREAK";
                break;
            default:
                c = "UNKNOWN";
            }
            String str = this.status == 0 ? "0" : SmbException.getMessageByCode(this.status);
            return new String(
                "command=" + c + ",status=" + str + ",flags=0x" + Hexdump.toHexString(this.flags, 4) + ",mid=" + this.mid + ",wordCount=" + this.wordCount
                        + ",byteCount=" + this.byteCount);
    Registered: Sun Nov 03 00:10:13 UTC 2024
    - Last Modified: Sun Sep 30 10:47:31 UTC 2018
    - 19.9K bytes
    - Viewed (0)
  5. ci/official/containers/linux_arm64/devel.usertools/squash_testlogs.py

      # Just ignore any failures, they're probably not important
      try:
        r = JUnitXml.fromfile(f)
      except Exception as e:  # pylint: disable=broad-except
        print("Ignoring this XML parse failure in {}: ".format(f), str(e))
    
      source_file = re.search(
          r"/(bazel_pip|tensorflow)/.*", f.decode("utf-8")
      ).group(0)
      for testsuite in r:
        testsuite._elem.set("source_file", source_file)
        # Remove empty testcases
    Registered: Tue Nov 05 12:39:12 UTC 2024
    - Last Modified: Mon Sep 18 19:00:37 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  6. docs/fr/docs/deployment/docker.md

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Optional[str] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    * Vous devriez maintenant avoir une structure de répertoire telle que :
    
    ```
    .
    ├── app
    │   └── main.py
    └── Dockerfile
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_path.py

    
    def test_path_str_foobar():
        response = client.get("/path/str/foobar")
        assert response.status_code == 200
        assert response.json() == "foobar"
    
    
    def test_path_str_42():
        response = client.get("/path/str/42")
        assert response.status_code == 200
        assert response.json() == "42"
    
    
    def test_path_str_True():
        response = client.get("/path/str/True")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 34.4K bytes
    - Viewed (0)
  8. src/bytes/buffer_test.go

    func check(t *testing.T, testname string, buf *Buffer, s string) {
    	bytes := buf.Bytes()
    	str := buf.String()
    	if buf.Len() != len(bytes) {
    		t.Errorf("%s: buf.Len() == %d, len(buf.Bytes()) == %d", testname, buf.Len(), len(bytes))
    	}
    
    	if buf.Len() != len(str) {
    		t.Errorf("%s: buf.Len() == %d, len(buf.String()) == %d", testname, buf.Len(), len(str))
    	}
    
    	if buf.Len() != len(s) {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Tue Sep 03 20:55:15 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  9. istioctl/pkg/validate/validate.go

    func fromSchemaAndJSONMap(schema resource.Schema, data any) (config.Spec, error) {
    	// Marshal to json bytes
    	str, err := json.Marshal(data)
    	if err != nil {
    		return nil, err
    	}
    	out, err := schema.NewInstance()
    	if err != nil {
    		return nil, err
    	}
    	if err = config.ApplyJSONStrict(out, string(str)); err != nil {
    		return nil, err
    	}
    	return out, nil
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Aug 15 22:27:47 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  10. docs/nl/docs/environment-variables.md

    Dat betekent dat **elke waarde** die in Python uit een omgevingsvariabele wordt gelezen **een `str` zal zijn** en dat elke conversie naar een ander type of elke validatie in de code moet worden uitgevoerd.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 20 11:13:32 UTC 2024
    - 8.6K bytes
    - Viewed (0)
Back to top