- Sort Score
- Result 10 results
- Languages All
Results 461 - 470 of 1,654 for writeLn (0.12 sec)
-
docs_src/background_tasks/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 696 bytes - Viewed (0) -
guava/src/com/google/common/math/PairedStats.java
* versions. */ public byte[] toByteArray() { ByteBuffer buffer = ByteBuffer.allocate(BYTES).order(ByteOrder.LITTLE_ENDIAN); xStats.writeTo(buffer); yStats.writeTo(buffer); buffer.putDouble(sumOfProductsOfDeltas); return buffer.array(); } /** * Creates a {@link PairedStats} instance from the given byte representation which was obtained by
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri May 12 17:02:53 UTC 2023 - 12.6K bytes - Viewed (0) -
internal/config/config.go
b.WriteString(ep.Value) b.WriteString(KvNewline) } } } // WriteTo writes the string representation of the configuration to the given // builder. When off is true, adds a comment character before the config system // output. It also ignores values when empty and deprecated. func (cs *SubsysInfo) WriteTo(b *strings.Builder, off bool) { cs.AddEnvString(b) if off { b.WriteString(KvComment)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Sep 03 18:23:41 UTC 2024 - 37.7K bytes - Viewed (0) -
docs_src/background_tasks/tutorial002_an.py
from fastapi import BackgroundTasks, Depends, FastAPI from typing_extensions import Annotated app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 725 bytes - Viewed (0) -
.github/workflows/submit-github-dependency-graph.yml
name: Submit Dependency Graph on: workflow_dispatch: push: branches: - master permissions: {} jobs: generate-and-submit: permissions: contents: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: temurin java-version: 17 - name: Setup Gradle
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Oct 11 18:32:33 UTC 2024 - 933 bytes - Viewed (0) -
cmd/hasher.go
} // getSHA256Hash returns SHA-256 sum of given data. func getSHA256Sum(data []byte) []byte { hash := sha256.New() hash.Write(data) return hash.Sum(nil) } // getMD5Sum returns MD5 sum of given data. func getMD5Sum(data []byte) []byte { hash := md5.New() hash.Write(data) return hash.Sum(nil) } // getMD5Hash returns MD5 hash in hex encoding of given data. func getMD5Hash(data []byte) string {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 27 13:00:19 UTC 2022 - 1.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ByteSinkTest.java
assertFalse(sink.wasStreamClosed()); out.write(new byte[] {1, 2, 3, 4}); out.close(); assertTrue(sink.wasStreamClosed()); assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes()); } public void testWrite_bytes() throws IOException { assertArrayEquals(new byte[0], sink.getBytes()); sink.write(bytes); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSinkTest.java
assertFalse(sink.wasStreamClosed()); out.write(new byte[] {1, 2, 3, 4}); out.close(); assertTrue(sink.wasStreamClosed()); assertArrayEquals(new byte[] {1, 2, 3, 4}, sink.getBytes()); } public void testWrite_bytes() throws IOException { assertArrayEquals(new byte[0], sink.getBytes()); sink.write(bytes); assertTrue(sink.wasStreamOpened() && sink.wasStreamClosed());
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Sep 06 17:04:31 UTC 2023 - 3.7K bytes - Viewed (0) -
okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/GenerateIdnaMappingTableCode.kt
import java.io.File import okio.FileSystem import okio.Path.Companion.toPath fun main(vararg args: String) { val data = loadIdnaMappingTableData() val file = generateMappingTableFile(data) file.writeTo(File(args[0])) } fun loadIdnaMappingTableData(): IdnaMappingTableData { val path = "/okhttp3/internal/idna/IdnaMappingTable.txt".toPath() val table = FileSystem.RESOURCES.read(path) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/FakeDns.kt
fun allocate(count: Int): List<InetAddress> { val from = nextAddress nextAddress += count return (from until nextAddress) .map { return@map InetAddress.getByAddress( Buffer().writeInt(it.toInt()).readByteArray(), ) } } /** Allocates and returns `count` fake IPv6 addresses like [::ff00:64, ::ff00:65]. */ fun allocateIpv6(count: Int): List<InetAddress> {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.6K bytes - Viewed (0)