https://docs.rs/odbc-api/latest/src/odbc_api/cursor.rs.html#260-263
pub struct CursorImpl<Stmt: AsStatementRef> {
/// A statement handle in cursor mode.
statement: Stmt,
}
https://docs.rs/odbc-api/latest/src/odbc_api/cursor.rs.html#260-263
pub struct CursorImpl<Stmt: AsStatementRef> {
/// A statement handle in cursor mode.
statement: Stmt,
}
O_TMPFILE https://man7.org/linux/man-pages/man2/open.2.html#DESCRIPTION
FILE_FLAG_DELETE_ON_CLOSE FILE_ATTRIBUTE_TEMPORARY https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
https://github.com/newca12/dictionary-builder
Caveat: most implementations need a DOM
Without DOM: https://stackoverflow.com/questions/7215931/reading-huge-xml-file-using-stax-and-xpath#comment64010759_7216021
[package] | |
name = "sqlite-ext" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
bindgen = { version = "0.66", default-features = false, features = ["runtime"] } | |
quote = { version = "1", default-features = false } | |
syn = { version = "2.0", features = ["full", "extra-traits", "visit-mut"] } | |
regex = { version = "1.8", default-features = false, features = ["std"] } |
#![feature(c_variadic)] | |
use atomic::{Atomic, Ordering}; | |
#[allow(non_camel_case_types)] | |
pub struct sqlite3_api_routines { | |
pub db_config: ::std::option::Option< | |
unsafe extern "C" fn( | |
//arg1: *mut sqlite3, | |
arg2: ::std::os::raw::c_int, | |
... |
#include <stdlib.h> | |
#include <stdio.h> | |
#include "sqlite3.h" | |
sqlite3 *open(const char *path) { | |
fprintf(stdout, "opening %s\n", path); | |
sqlite3 *db = NULL; | |
int rc = sqlite3_open_v2(path, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_URI, NULL); | |
if (db == NULL || SQLITE_OK != rc) { | |
fprintf(stderr, "Error opening %s: %d, %s\n", path, rc, sqlite3_errmsg(db)); |
public class LockedFiles { | |
/** | |
* Like {@link java.nio.file.Files#write(Path, byte[], OpenOption...)} but with a lock | |
*/ | |
public static void write(Path path, byte[] bytes) throws IOException { | |
if (bytes == null) { | |
return; | |
} | |
log.debug("Writing {}", path); | |
try (FileChannel chan = FileChannel.open(path, TRUNCATE_EXISTING, WRITE, CREATE, DSYNC); |
name;cpuid;Intel;Rust;Clang | |
_mm256_and_pd;AVX;vandpd;vandps; | |
_mm256_andnot_pd;AVX;vandnpd;vandnps; | |
_mm256_cmp_pd;AVX;vcmppd;vcmpeqpd;@llvm.x86.avx.cmp.pd.256 | |
_mm256_cmp_ps;AVX;vcmpps;vcmpeqps;@llvm.x86.avx.cmp.ps.256 | |
_mm256_load_pd;AVX;vmovapd;vmovaps; | |
_mm256_load_si256;AVX;vmovdqa;vmovaps; | |
_mm256_loadu_pd;AVX;vmovupd;vmovups; | |
_mm256_loadu_si256;AVX;vmovdqu;vmovups; | |
_mm256_or_pd;AVX;vorpd;vorps; |
#![feature(read_initializer)] | |
use std::fs::File; | |
use std::io::{self, BufRead, Read}; | |
// Like a `BufReader` but with a growable buffer. | |
#[derive(Debug)] | |
struct Scanner<R: Read> { | |
inner: R, | |
buf: Vec<u8>, |
package main | |
import ( | |
"database/sql" | |
"fmt" | |
"log" | |
"math/rand" | |
"sync" | |
"time" |