[✔] Environment
- OS: Windows 10.0.22631 X64
✔ WebView2: 124.0.2478.97
✔ MSVC: Visual Studio Community 2022
✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
✔ cargo: 1.77.1 (e52e36006 2024-03-26)
✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
- node: 20.12.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cargo : Compiling sherpa-rs-sys v0.1.0 (C:\Users\User\Documents\code\sherpa-rs\sys) | |
At line:1 char:1 | |
+ cargo run --example basic_use 2>error.txt | |
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
+ CategoryInfo : NotSpecified: ( Compiling sh...\sherpa-rs\sys):String) [], RemoteException | |
+ FullyQualifiedErrorId : NativeCommandError | |
error: failed to run custom build command for `sherpa-rs-sys v0.1.0 (C:\Users\User\Documents\code\sherpa-rs\sys)` | |
Caused by: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// windows = { version = "0.58.0", features = ["Win32", "Win32_UI", "Win32_UI_WindowsAndMessaging"] } | |
#[tauri::command] | |
fn set_app_visible(app: AppHandle, visible: bool) { | |
use windows::Win32::UI::WindowsAndMessaging::{ | |
GetWindowLongPtrW, SetWindowLongPtrW, GWL_EXSTYLE, WS_EX_APPWINDOW, WS_EX_TOOLWINDOW, | |
}; | |
use windows::Win32::Foundation::HWND; | |
use std::os::raw::c_void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sqlite3 | |
conn = sqlite3.connect('company.db') | |
cursor = conn.cursor() | |
cursor.execute(''' | |
CREATE TABLE IF NOT EXISTS departments ( | |
department_id INTEGER PRIMARY KEY AUTOINCREMENT, | |
name TEXT NOT NULL | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip insatll numpy==1.26.4 | |
# pip insatll soundfile | |
# pip install transformers | |
# pip install | |
# pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu | |
from transformers import VitsModel, AutoTokenizer | |
import torch | |
import soundfile as sf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dumpbin /disasm required.dll > dll_disasm.asm |
- Open
notepad.exe
- Open github.com/settings/emails
- Copy your Github email to notepad (ends with
@users.noreply.github.com
) - Open
cmd.exe
- Create new ssh key
ssh-keygen -t ed25519 -C "{email}"
Copy folder exclude subdirectory
rsync -av --exclude target/ make1/ make2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn main() { | |
// Set up a panic hook to print the backtrace | |
std::panic::set_hook(Box::new(|info| { | |
let mut message = String::new(); | |
message.push_str(&format!("thread '{}' ", std::thread::current().name().unwrap_or("unknown"))); | |
message.push_str(&format!("{}", info)); | |
if let Ok(var) = std::env::var("RUST_BACKTRACE") { | |
if var == "1" { | |
let backtrace = std::backtrace::Backtrace::capture(); | |
message.push_str(&format!("{}", backtrace)); |
NewerOlder