Search Options

Results per page
Sort
Preferred Languages
Advance

Results 3221 - 3230 of 7,967 for aclass (0.05 sec)

  1. android/guava-tests/test/com/google/common/primitives/IntsTest.java

        assertThrows(IllegalArgumentException.class, () -> Ints.tryParse("0", Character.MAX_RADIX + 1));
      }
    
      public void testTryParse_radixTooSmall() {
        assertThrows(IllegalArgumentException.class, () -> Ints.tryParse("0", Character.MIN_RADIX - 1));
      }
    
      public void testTryParse_withNullGwt() {
        assertThat(Ints.tryParse("null")).isNull();
        assertThrows(NullPointerException.class, () -> Ints.tryParse(null));
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/primitives/LongsTest.java

            .isEqualTo(new long[] {(long) 1, (long) 0, (long) 0});
      }
    
      public void testEnsureCapacity_fail() {
        assertThrows(IllegalArgumentException.class, () -> Longs.ensureCapacity(ARRAY1, -1, 1));
        assertThrows(IllegalArgumentException.class, () -> Longs.ensureCapacity(ARRAY1, 1, -1));
      }
    
      public void testJoin() {
        assertThat(Longs.join(",", EMPTY)).isEmpty();
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 02:56:12 UTC 2024
    - 29.8K bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008b.py

    app = FastAPI()
    
    
    data = {
        "plumbus": {"description": "Freshly pickled plumbus", "owner": "Morty"},
        "portal-gun": {"description": "Gun to create portals", "owner": "Rick"},
    }
    
    
    class OwnerError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except OwnerError as e:
            raise HTTPException(status_code=400, detail=f"Owner error: {e}")
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 735 bytes
    - Viewed (0)
  4. docs_src/dependencies/tutorial008d_an.py

    from fastapi import Depends, FastAPI, HTTPException
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    class InternalError(Exception):
        pass
    
    
    def get_username():
        try:
            yield "Rick"
        except InternalError:
            print("We don't swallow the internal error here, we raise again 😎")
            raise
    
    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 744 bytes
    - Viewed (0)
  5. docs_src/path_operation_advanced_configuration/tutorial007.py

    from typing import List
    
    import yaml
    from fastapi import FastAPI, HTTPException, Request
    from pydantic import BaseModel, ValidationError
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        tags: List[str]
    
    
    @app.post(
        "/items/",
        openapi_extra={
            "requestBody": {
                "content": {"application/x-yaml": {"schema": Item.model_json_schema()}},
                "required": True,
            },
        },
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 822 bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/base/Converter.java

     *
     * Fortunately, if anyone does want to use a Converter as a `Function<@Nullable A, @Nullable B>`,
     * it's easy to get one: `converter::convert`.
     *
     * [*] In annotating this class, we're ignoring LegacyConverter.
     */
    public abstract class Converter<A, B> implements Function<A, B> {
      private final boolean handleNullAutomatically;
    
      // We lazily cache the reverse view to avoid allocating on every call to reverse().
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Feb 15 16:12:13 UTC 2024
    - 23K bytes
    - Viewed (0)
  7. docs/pt/docs/advanced/advanced-dependencies.md

    Porém nós queremos poder parametrizar o conteúdo fixo.
    
    ## Uma instância "chamável"
    
    Em Python existe uma maneira de fazer com que uma instância de uma classe seja um "chamável".
    
    Não propriamente a classe (que já é um chamável), mas a instância desta classe.
    
    Para fazer isso, nós declaramos o método `__call__`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="12"
    {!> ../../docs_src/dependencies/tutorial011_an_py39.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/bigger-applications.md

    You import it and create an "instance" the same way you would with the class `FastAPI`:
    
    ```Python hl_lines="1  3" title="app/routers/users.py"
    {!../../docs_src/bigger_applications/app/routers/users.py!}
    ```
    
    ### *Path operations* with `APIRouter`
    
    And then you use it to declare your *path operations*.
    
    Use it the same way you would use the `FastAPI` class:
    
    ```Python hl_lines="6  11  16" title="app/routers/users.py"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/helper/AccessTokenHelper.java

    import org.codelibs.core.lang.StringUtil;
    import org.codelibs.fess.exception.InvalidAccessTokenException;
    import org.codelibs.fess.util.ComponentUtil;
    
    import jakarta.servlet.http.HttpServletRequest;
    
    public class AccessTokenHelper {
    
        protected static final String BEARER = "Bearer";
    
        protected Random random = new SecureRandom();
    
        public String generateAccessToken() {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/fess/es/config/exentity/JobLog.java

    import org.codelibs.core.lang.StringUtil;
    import org.codelibs.fess.Constants;
    import org.codelibs.fess.es.config.bsentity.BsJobLog;
    import org.codelibs.fess.util.ComponentUtil;
    
    /**
     * @author FreeGen
     */
    public class JobLog extends BsJobLog {
    
        private static final long serialVersionUID = 1L;
    
        private ScheduledJob scheduledJob;
    
        public JobLog() {
        }
    
        public JobLog(final ScheduledJob scheduledJob) {
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:37:57 UTC 2024
    - 2.4K bytes
    - Viewed (0)
Back to top