- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 53 for lambda (0.04 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
fastapi/encoders.py
ENCODERS_BY_TYPE: dict[type[Any], Callable[[Any], Any]] = { bytes: lambda o: o.decode(), Color: str, # ty: ignore[deprecated] datetime.date: isoformat, datetime.datetime: isoformat, datetime.time: isoformat, datetime.timedelta: lambda td: td.total_seconds(), Decimal: decimal_encoder, Enum: lambda o: o.value, frozenset: list, deque: list, GeneratorType: list,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 10.9K bytes - Click Count (0) -
tests/test_jsonable_encoder.py
encoded_instance = jsonable_encoder( instance, custom_encoder={safe_datetime: lambda o: o.strftime("%H:%M:%S")} ) assert encoded_instance["dt_field"] == instance["dt_field"].strftime("%H:%M:%S") encoded_instance = jsonable_encoder( instance, custom_encoder={datetime: lambda o: o.strftime("%H:%M:%S")} ) assert encoded_instance["dt_field"] == instance["dt_field"].strftime("%H:%M:%S")Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.2K bytes - Click Count (0) -
android/guava/src/com/google/common/cache/CacheLoader.java
* } * }; * LoadingCache<Key, Graph> cache = CacheBuilder.newBuilder().build(loader); * } * * <p>Since this example doesn't support reloading or bulk loading, if you're able to use lambda * expressions it can be specified even more easily: * * {@snippet : * CacheLoader<Key, Graph> loader = CacheLoader.from(key -> createExpensiveGraph(key)); * } * * @author Charles Fry * @since 10.0 */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jan 28 22:39:02 GMT 2026 - 9.7K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
* } * ``` */ fun interface Interceptor { @Throws(IOException::class) fun intercept(chain: Chain): Response companion object { /** * Constructs an interceptor for a lambda. This compact syntax is most useful for inline * interceptors. * * ```kotlin * val interceptor = Interceptor { chain: Interceptor.Chain -> * chain.proceed(chain.request()) * }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 8.9K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/job/JobExecutorTest.java
}; assertFalse(flag.get()); listener.onShutdown(); assertTrue(flag.get()); } @Test public void test_shutdownListener_lambda() { // Test lambda implementation of ShutdownListener final AtomicBoolean flag = new AtomicBoolean(false); ShutdownListener listener = () -> flag.set(true); assertFalse(flag.get()); listener.onShutdown();Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 9.4K bytes - Click Count (0) -
guava/src/com/google/common/cache/CacheLoader.java
} /** * Returns a cache loader that uses {@code function} to load keys, without supporting either * reloading or bulk loading. This allows creating a cache loader using a lambda expression. * * <p>The returned object is serializable if {@code function} is serializable. * * @param function the function to be used for loading values; must never return {@code null}Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jan 28 22:39:02 GMT 2026 - 9.5K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/testing/GcFinalization.java
* <li>clearing weak references to unreachable referents * <li>enqueuing weak references to unreachable referents in their reference queue * </ul> */ @DoNotMock("Implement with a lambda") public interface FinalizationPredicate { boolean isDone(); } /** * Waits until the given weak reference is cleared, invoking the garbage collector as necessary to
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 12 20:19:19 GMT 2026 - 12.3K bytes - Click Count (0) -
scripts/people.py
} } } } } } rateLimit { cost remaining resetAt } } """ LowerStr = Annotated[ str, BeforeValidator(lambda v: v.lower() if isinstance(v, str) else v) ] class Author(BaseModel): login: str avatarUrl: str | None = None url: str | None = None class CommentsNode(BaseModel):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 23 13:51:24 GMT 2026 - 15K bytes - Click Count (0) -
android/guava/src/com/google/common/collect/Comparators.java
o -> orElseNull(o), Comparator.nullsLast(valueComparator)); } @IgnoreJRERequirement // helper for emptiesFirst+emptiesLast /* * If we make these calls inline inside the lambda inside emptiesFirst()/emptiesLast(), we get an * Animal Sniffer error, despite the @IgnoreJRERequirement annotation there. For details, see * ImmutableSortedMultiset. */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Feb 23 19:19:10 GMT 2026 - 11.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/graph/ValueGraphTest.java
* we read one of the fields declared in that class. */ Set<Integer> unused = graph.successors(first); return null; // so the lambda is a Callable to propagate checked await() exceptions })); } // For more about this test, see the equivalent in AbstractNetworkTest. for (Future<?> future : futures.build()) {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Mar 17 19:26:39 GMT 2026 - 17.9K bytes - Click Count (0)