$ zig version
0.14.0-dev.1392+37df6ba86const std = @import("std");
const fmt = std.fmt;
const debugPrint = std.debug.print;$ zig version
0.14.0-dev.1392+37df6ba86const std = @import("std");
const fmt = std.fmt;
const debugPrint = std.debug.print;const std = @import("std");
const fmt = std.fmt;
const debugPrint = std.debug.print;
pub fn main() !void {
const src = "hogehgoehgoe";
const ch = 'A';
var dst = [_]u8{0} ** 0x20;| const std = @import("std"); | |
| const c = std.c; | |
| fn ahi(val: ?*anyopaque) callconv(.C) ?*anyopaque { | |
| const p = @as(*u32, @ptrCast(@alignCast(val))); | |
| std.debug.print("val 0x{x}\n", .{p.*}); | |
| return p; | |
| } | |
| pub fn main() !void { |
| const std = @import("std"); | |
| const debugPrint = std.debug.print; | |
| const Thread = std.Thread; | |
| const Mutex = Thread.Mutex; | |
| fn hoge(m: *Mutex, val: *u32) void { | |
| const ret: u32 = val.* * 2; | |
| { | |
| m.lock(); | |
| defer m.unlock(); |
| const std = @import("std"); | |
| const c = std.c; | |
| const fs = std.fs; | |
| const Child = std.process.Child; | |
| pub fn main() !void { | |
| var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
| const allocator = gpa.allocator(); | |
| const fd = try fs.cwd().createFile("hoge", .{}); | |
| defer { |
| const std = @import("std"); | |
| const Child = std.process.Child; | |
| const ArrayList = std.ArrayList; | |
| pub fn main() !void { | |
| var gpa = std.heap.GeneralPurposeAllocator(.{}){}; | |
| const allocator = gpa.allocator(); | |
| defer { | |
| const deinit_status = gpa.deinit(); | |
| _ = deinit_status; |
sudo apt remove xdg-desktop-portalResolving Waybar not starting issue
host: Kubuntu 24.04LTS
Encountered an error Error calling StartServiceByName for org.freedesktop.portal.Desktop: Timeout was reached when trying to start Waybar, which prevented it from showing up. Resolved the issue with the following steps:
Solution:
| (defun bunkai (n) | |
| (let ((limit (floor (sqrt n)))) | |
| (labels ((f (n divisor acc) | |
| (if (and (not (= 1 n)) | |
| (<= divisor limit)) | |
| (if (zerop (mod n divisor)) | |
| (f (/ n divisor) | |
| divisor | |
| (cons divisor acc)) | |
| (f n |
| sudo pmset -a disablesleep 1 |
| #include <stdio.h> | |
| int main(void) | |
| { | |
| printf("Hello, world!!\n"); | |
| return 0; | |
| } |