Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for factor (0.09 sec)

  1. docs/recipes.md

                for (i in 2..997) {
                  sink.writeUtf8(String.format(" * $i = ${factor(i)}\n"))
                }
              }
    
              private fun factor(n: Int): String {
                for (i in 2 until n) {
                  val x = n / i
                  if (x * i == n) return "${factor(x)} × $i"
                }
                return n.toString()
              }
            }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 17:01:12 UTC 2025
    - 47.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/BloomFilter.java

       */
      public long approximateElementCount() {
        long bitSize = bits.bitSize();
        long bitCount = bits.bitCount();
    
        /*
         * Each insertion is expected to reduce the # of clear bits by a factor of
         * `numHashFunctions/bitSize`. So, after n insertions, expected bitCount is `bitSize * (1 - (1 -
         * numHashFunctions/bitSize)^n)`. Solving that for n, and approximating `ln x` as `x - 1` when x
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 26.9K bytes
    - Viewed (0)
  3. okhttp-sse/api/okhttp-sse.api

    }
    
    public abstract interface class okhttp3/sse/EventSource$Factory {
    	public static final field Companion Lokhttp3/sse/EventSource$Factory$Companion;
    	public static fun create (Lokhttp3/Call$Factory;)Lokhttp3/sse/EventSource$Factory;
    	public abstract fun newEventSource (Lokhttp3/Request;Lokhttp3/sse/EventSourceListener;)Lokhttp3/sse/EventSource;
    }
    
    public final class okhttp3/sse/EventSource$Factory$Companion {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.9K bytes
    - Viewed (0)
  4. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt

          listener: EventSourceListener,
        ): EventSource
    
        companion object {
          /**
           * Wraps a [Call.Factory] into [EventSource.Factory].
           */
          @JvmStatic
          @JvmName("create")
          fun Call.Factory.asEventSourceFactory(): Factory =
            Factory { request, listener ->
              val actualRequest =
                if (request.header("Accept") == null) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  5. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

        replaceWith =
          ReplaceWith(
            expression = "callFactory.asEventSourceFactory()",
            imports = ["okhttp3.sse.EventSource.Factory.Companion.asEventSourceFactory"],
          ),
        level = DeprecationLevel.WARNING,
      )
      @JvmStatic
      fun createFactory(callFactory: Call.Factory): EventSource.Factory = callFactory.asEventSourceFactory()
    
      @Deprecated(
        message = "Moved to extension function.",
        replaceWith =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  6. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceFactoryTest.java

      @StartStop
      private final MockWebServer server = new MockWebServer();
    
      @Test
      public void testEventSourceFactory() throws Exception {
        OkHttpClient client = new OkHttpClient();
        EventSource.Factory factory = EventSource.Factory.create(client);
        server.enqueue(
          new MockResponse.Builder()
            .body("data: hello\n\n")
            .setHeader("content-type", "text/event-stream")
            .build()
        );
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 2.8K bytes
    - Viewed (0)
  7. README.md

    ```
    
    ### Gradle Dependency
    ```gradle
    implementation 'org.codelibs:corelib:0.7.0'
    ```
    
    ## 📖 Usage Examples
    
    ### Bean Utilities
    ```java
    import org.codelibs.core.beans.*;
    import org.codelibs.core.beans.factory.BeanDescFactory;
    import org.codelibs.core.beans.util.BeanUtil;
    import org.codelibs.core.beans.util.CopyOptions;
    
    // Bean metadata introspection
    BeanDesc beanDesc = BeanDescFactory.getBeanDesc(MyBean.class);
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sun Aug 31 02:56:02 UTC 2025
    - 12.7K bytes
    - Viewed (0)
  8. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

          Request
            .Builder()
            .url(server.url("/"))
        if (accept != null) {
          builder.header("Accept", accept)
        }
        val request = builder.build()
        val factory = client.asEventSourceFactory()
        return factory.newEventSource(request, listener)
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 30 11:47:47 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  9. android/guava-testlib/src/com/google/common/collect/testing/TestsForListsInJavaUtil.java

            .createTestSuite();
      }
    
      // We are testing Vector / testing our tests on Vector.
      @SuppressWarnings("JdkObsolete")
      private Test testsForVector() {
        return ListTestSuiteBuilder.using(
                new TestStringListGenerator() {
                  @Override
                  protected List<String> create(String[] elements) {
                    return new Vector<>(MinimalCollection.of(elements));
                  }
                })
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Sep 04 15:04:05 UTC 2025
    - 12K bytes
    - Viewed (0)
  10. guava/src/com/google/common/collect/TopKSelector.java

    import org.jspecify.annotations.Nullable;
    
    /**
     * An accumulator that selects the "top" {@code k} elements added to it, relative to a provided
     * comparator. "Top" can mean the greatest or the lowest elements, specified in the factory used to
     * create the {@code TopKSelector} instance.
     *
     * <p>If your input data is available as a {@link Stream}, prefer passing {@link
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sun Aug 31 13:15:26 UTC 2025
    - 11.4K bytes
    - Viewed (0)
Back to top