Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 565 for iterfile (0.21 sec)

  1. docs_src/custom_response/tutorial008.py

    some_file_path = "large-video-file.mp4"
    app = FastAPI()
    
    
    @app.get("/")
    def main():
        def iterfile():  # (1)
            with open(some_file_path, mode="rb") as file_like:  # (2)
                yield from file_like  # (3)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jul 19 19:14:58 GMT 2021
    - 360 bytes
    - Viewed (0)
  2. docs/de/docs/advanced/custom-response.md

    3. Dieses `yield from` weist die Funktion an, über das Ding namens `file_like` zu iterieren. Und dann für jeden iterierten Teil, diesen Teil so zurückzugeben, als wenn er aus dieser Generatorfunktion (`iterfile`) stammen würde.
    
        Es handelt sich also hier um eine Generatorfunktion, die die „generierende“ Arbeit intern auf etwas anderes überträgt.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 23 13:05:12 GMT 2024
    - 13.5K bytes
    - Viewed (0)
  3. guava/src/com/google/common/collect/Iterables.java

      /** Returns an unmodifiable view of {@code iterable}. */
      public static <T extends @Nullable Object> Iterable<T> unmodifiableIterable(
          final Iterable<? extends T> iterable) {
        checkNotNull(iterable);
        if (iterable instanceof UnmodifiableIterable || iterable instanceof ImmutableCollection) {
          @SuppressWarnings("unchecked") // Since it's unmodifiable, the covariant cast is safe
          Iterable<T> result = (Iterable<T>) iterable;
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 42.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/collect/IterablesTest.java

      public void testSize0() {
        Iterable<String> iterable = Collections.emptySet();
        assertEquals(0, Iterables.size(iterable));
      }
    
      public void testSize1Collection() {
        Iterable<String> iterable = Collections.singleton("a");
        assertEquals(1, Iterables.size(iterable));
      }
    
      public void testSize2NonCollection() {
        Iterable<Integer> iterable =
            new Iterable<Integer>() {
              @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Mar 07 18:34:03 GMT 2024
    - 46K bytes
    - Viewed (0)
  5. guava/src/com/google/common/collect/FluentIterable.java

       * already a {@code FluentIterable}.
       *
       * <p><b>{@code Stream} equivalent:</b> {@link Collection#stream} if {@code iterable} is a {@link
       * Collection}; {@link Streams#stream(Iterable)} otherwise.
       */
      public static <E extends @Nullable Object> FluentIterable<E> from(final Iterable<E> iterable) {
        return (iterable instanceof FluentIterable)
            ? (FluentIterable<E>) iterable
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jan 30 00:14:39 GMT 2024
    - 35.3K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/base/SplitterTest.java

      }
    
      public void testCharacterSimpleSplitWithNoDelimiter() {
        String simple = "a,b,c";
        Iterable<String> letters = Splitter.on('.').split(simple);
        assertThat(letters).containsExactly("a,b,c").inOrder();
      }
    
      public void testCharacterSplitWithDoubleDelimiter() {
        String doubled = "a,,b,c";
        Iterable<String> letters = COMMA_SPLITTER.split(doubled);
        assertThat(letters).containsExactly("a", "", "b", "c").inOrder();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 29.8K bytes
    - Viewed (0)
  7. android/guava-testlib/test/com/google/common/collect/testing/MinimalIterableTest.java

    public class MinimalIterableTest extends TestCase {
    
      public void testOf_empty() {
        Iterable<String> iterable = MinimalIterable.<String>of();
        Iterator<String> iterator = iterable.iterator();
        assertFalse(iterator.hasNext());
        try {
          iterator.next();
          fail();
        } catch (NoSuchElementException expected) {
        }
        try {
          iterable.iterator();
          fail();
        } catch (IllegalStateException expected) {
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 2.8K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/reflect/TypeTokenSubtypeTest.java

        public Iterable<UseIterable<? extends Iterable<?>>>
            wildcardOfImplicitBoundedIsSubtypeOfWildcardOfExplicitlyBounded(
                List<UseIterable<?>> withImplicitBounds) {
          return isSubtype(withImplicitBounds);
        }
    
        @TestSubtype(suppressGetSupertype = true, suppressGetSubtype = true)
        public Iterable<UseSerializableIterable<? extends Iterable<?>>>
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 20.3K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/base/SplitterTest.java

      }
    
      public void testCharacterSimpleSplitWithNoDelimiter() {
        String simple = "a,b,c";
        Iterable<String> letters = Splitter.on('.').split(simple);
        assertThat(letters).containsExactly("a,b,c").inOrder();
      }
    
      public void testCharacterSplitWithDoubleDelimiter() {
        String doubled = "a,,b,c";
        Iterable<String> letters = COMMA_SPLITTER.split(doubled);
        assertThat(letters).containsExactly("a", "", "b", "c").inOrder();
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/collection/IndexedIterator.java

         *
         * @param <T>
         *            {@link Iterable}の要素型
         * @param iterable
         *            {@link Iterable}。{@literal null}であってはいけません
         * @return {@link IndexedIterator}をラップした{@link Iterable}
         */
        public static <T> Iterable<Indexed<T>> indexed(final Iterable<T> iterable) {
            assertArgumentNotNull("iterable", iterable);
    Java
    - Registered: Fri Apr 26 20:58:09 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 3.7K bytes
    - Viewed (0)
Back to top