Search Options

Results per page
Sort
Preferred Languages
Advance

Results 271 - 280 of 896 for toOptional (0.08 sec)

  1. android/guava/src/com/google/common/base/MoreObjects.java

       * Predicates.notNull())}, static importing as necessary.
       *
       * <p><b>Note:</b> if {@code first} is represented as an {@link Optional}, this can be
       * accomplished with {@link Optional#or(Object) first.or(second)}. That approach also allows for
       * lazy evaluation of the fallback instance, using {@link Optional#or(Supplier)
       * first.or(supplier)}.
       *
       * <p><b>Java 9 users:</b> use {@code java.util.Objects.requireNonNullElse(first, second)}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 10 15:41:27 UTC 2024
    - 16.1K bytes
    - Viewed (0)
  2. apache-maven/src/assembly/maven/bin/mvnyjp

    # Apache Maven YourKit Profiler Startup Script
    #
    # Environment Variable Prerequisites
    #
    #   JAVA_HOME       Must point at your Java Development Kit installation.
    #   MAVEN_OPTS      (Optional) Java runtime options used when Maven is executed.
    #   MAVEN_SKIP_RC   (Optional) Flag to disable loading of mavenrc files.
    # -----------------------------------------------------------------------------
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 18 11:01:21 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. tests/test_security_oauth2_optional.py

    
    def get_current_user(oauth_header: Optional[str] = Security(reusable_oauth2)):
        if oauth_header is None:
            return None
        user = User(username=oauth_header)
        return user
    
    
    @app.post("/login")
    def login(form_data: OAuth2PasswordRequestFormStrict = Depends()):
        return form_data
    
    
    @app.get("/users/me")
    def read_users_me(current_user: Optional[User] = Depends(get_current_user)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. tests/test_sub_callbacks.py

    from typing import Optional
    
    from dirty_equals import IsDict
    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, HttpUrl
    
    app = FastAPI()
    
    
    class Invoice(BaseModel):
        id: str
        title: Optional[str] = None
        customer: str
        total: float
    
    
    class InvoiceEvent(BaseModel):
        description: str
        paid: bool
    
    
    class InvoiceEventReceived(BaseModel):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 13.8K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/NetworkBuilder.java

    @ElementTypesAreNonnullByDefault
    public final class NetworkBuilder<N, E> extends AbstractGraphBuilder<N> {
      boolean allowsParallelEdges = false;
      ElementOrder<? super E> edgeOrder = ElementOrder.insertion();
      Optional<Integer> expectedEdgeCount = Optional.absent();
    
      /** Creates a new instance with the specified edge directionality. */
      private NetworkBuilder(boolean directed) {
        super(directed);
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Jun 03 01:21:31 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  6. impl/maven-core/src/main/java/org/apache/maven/artifact/factory/ArtifactFactory.java

                String groupId,
                String artifactId,
                VersionRange versionRange,
                String type,
                String classifier,
                String scope,
                boolean optional);
    
        Artifact createDependencyArtifact(
                String groupId,
                String artifactId,
                VersionRange versionRange,
                String type,
                String classifier,
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  7. tests/test_union_inherited_body.py

    from typing import Optional, Union
    
    from dirty_equals import IsDict
    from fastapi import FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: Optional[str] = None
    
    
    class ExtendedItem(Item):
        age: int
    
    
    @app.post("/items/")
    def save_union_different_body(item: Union[ExtendedItem, Item]):
        return {"item": item}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 5.2K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/query-params-str-validations.md

    So:
    
    ```Python
    q: Union[str, None] = Query(default=None)
    ```
    
    ...makes the parameter optional, with a default value of `None`, the same as:
    
    ```Python
    q: Union[str, None] = None
    ```
    
    And in Python 3.10 and above:
    
    ```Python
    q: str | None = Query(default=None)
    ```
    
    ...makes the parameter optional, with a default value of `None`, the same as:
    
    ```Python
    q: str | None = None
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  9. impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultProject.java

        }
    
        @Override
        public Path getRootDirectory() {
            return project.getRootDirectory();
        }
    
        @Override
        public Optional<Project> getParent() {
            MavenProject parent = project.getParent();
            return Optional.ofNullable(session.getProject(parent));
        }
    
        @Nonnull
        private DependencyCoordinates toDependency(org.apache.maven.api.model.Dependency dependency) {
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  10. tests/test_dependency_contextvars.py

    from contextvars import ContextVar
    from typing import Any, Awaitable, Callable, Dict, Optional
    
    from fastapi import Depends, FastAPI, Request, Response
    from fastapi.testclient import TestClient
    
    legacy_request_state_context_var: ContextVar[Optional[Dict[str, Any]]] = ContextVar(
        "legacy_request_state_context_var", default=None
    )
    
    app = FastAPI()
    
    
    async def set_up_request_state_dependency():
        request_state = {"user": "deadpond"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Feb 17 12:40:12 UTC 2022
    - 1.5K bytes
    - Viewed (0)
Back to top