Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 72 for factor (0.19 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

                sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
              }
              sink.close();
            } catch (IOException | InterruptedException e) {
              e.printStackTrace();
            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + i;
            }
            return Integer.toString(n);
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
  2. 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()
              }
            }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Feb 18 08:52:22 GMT 2022
    - 40.2K bytes
    - Viewed (1)
  3. samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java

            sink.writeUtf8("-------\n");
            for (int i = 2; i <= 997; i++) {
              sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i)));
            }
          }
    
          private String factor(int n) {
            for (int i = 2; i < n; i++) {
              int x = n / i;
              if (x * i == n) return factor(x) + " × " + i;
            }
            return Integer.toString(n);
          }
        };
    
        Request request = new Request.Builder()
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 2.1K bytes
    - Viewed (0)
  4. okhttp-sse/api/okhttp-sse.api

    public final class okhttp3/sse/EventSources {
    	public static final field INSTANCE Lokhttp3/sse/EventSources;
    	public static final fun createFactory (Lokhttp3/Call$Factory;)Lokhttp3/sse/EventSource$Factory;
    	public static final synthetic fun createFactory (Lokhttp3/OkHttpClient;)Lokhttp3/sse/EventSource$Factory;
    	public static final fun processResponse (Lokhttp3/Response;Lokhttp3/sse/EventSourceListener;)V
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Dec 17 14:39:59 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/platform/android/AndroidSocketAdapterTest.kt

      }
    
      companion object {
        @JvmStatic
        fun data(): Collection<SocketAdapter> {
          return listOfNotNull(
            DeferredSocketAdapter(ConscryptSocketAdapter.factory),
            DeferredSocketAdapter(AndroidSocketAdapter.factory("org.conscrypt")),
            StandardAndroidSocketAdapter.buildIfSupported("org.conscrypt"),
          )
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/Address.kt

     * address also includes the SSL socket factory, hostname verifier, and certificate pinner.
     *
     * HTTP requests that share the same [Address] may also share the same [Connection].
     */
    class Address(
      uriHost: String,
      uriPort: Int,
      /** Returns the service that will be used to resolve IP addresses for hostnames. */
      @get:JvmName("dns") val dns: Dns,
      /** Returns the socket factory for new connections. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  7. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt

        val builder =
          Request.Builder()
            .url(server.url("/"))
        if (accept != null) {
          builder.header("Accept", accept)
        }
        val request = builder.build()
        val factory = createFactory(client)
        return factory.newEventSource(request, listener)
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 6.6K bytes
    - Viewed (0)
  8. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

      private val listener: EventSourceListener,
    ) : EventSource, ServerSentEventReader.Callback, Callback {
      private var call: Call? = null
    
      @Volatile private var canceled = false
    
      fun connect(callFactory: Call.Factory) {
        call =
          callFactory.newCall(request).apply {
            enqueue(this@RealEventSource)
          }
      }
    
      override fun onResponse(
        call: Call,
        response: Response,
      ) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  9. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

     *
     * Steps to run in your own code
     *
     * 1. In your main method `WireSharkListenerFactory.register()`
     * 2. Create Listener factory `val eventListenerFactory = WireSharkListenerFactory(
    logFile = File("/tmp/key.log"), tlsVersions = tlsVersions, launch = launch)`
     * 3. Register with `client.eventListenerFactory(eventListenerFactory)`
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  10. okhttp/api/okhttp.api

    }
    
    public final class okhttp3/OkHttp {
    	public static final field INSTANCE Lokhttp3/OkHttp;
    	public static final field VERSION Ljava/lang/String;
    }
    
    public class okhttp3/OkHttpClient : okhttp3/Call$Factory, okhttp3/WebSocket$Factory {
    	public static final field Companion Lokhttp3/OkHttpClient$Companion;
    	public final fun -deprecated_authenticator ()Lokhttp3/Authenticator;
    	public final fun -deprecated_cache ()Lokhttp3/Cache;
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top