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
#! /bin/sh | |
# /etc/acpi/actions/lm_lid.sh | |
case $(cat /proc/acpi/button/lid/LID/state | cut -d' ' -f7) in | |
closed) /usr/sbin/s2ram ;; | |
esac |
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
[main 2019-12-08T12:32:58.248Z] Starting VS Code | |
[main 2019-12-08T12:32:58.250Z] from: /usr/lib/code | |
[main 2019-12-08T12:32:58.250Z] args: { | |
_: [], | |
diff: false, | |
add: false, | |
goto: false, | |
'new-window': false, | |
'reuse-window': false, | |
wait: false, |
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
int | |
func(int a, int b) | |
{ | |
return a + b; | |
} | |
int | |
main(void) | |
{ | |
int c = func(2, 3); |
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
#include <stdio.h> | |
int | |
main(void) | |
{ | |
short v; | |
int data = 80; | |
printf("please input number: "); | |
scanf("%d", v); |
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
#include <stdio.h> | |
int | |
main(void) | |
{ | |
short v; | |
int data = 80; | |
printf("please input number: "); | |
scanf("%d", &v); |
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
const std = @import("std"); | |
fn read_num(comptime T: type, stdin: *const std.fs.File) T { | |
var buf: [64]u8 = undefined; | |
const len = stdin.read(&buf) catch |err| { | |
std.debug.warn("Error while reading number: {}\n", .{err}); | |
std.os.exit(1); | |
}; | |
if (len == buf.len) { | |
std.debug.warn("Input is too big!\n", .{}); |