socat -d -d TCP-LISTEN:12345,fork,bind=127.0.0.1 UNIX:/var/run/usbmuxd
lsof -i tcp:[PORT]
lldb -p [PROCESS_ID]
$ call (int)close([FILE_ID])
https://gcc.gnu.org/onlinedocs/libstdc++/manual/ext_demangling.html
#include <exception>
#include <iostream>
#include <cstdlib>
#include <cxxabi.h>
struct empty { };
template
https://github.com/protocolbuffers/protobuf-go
diff --git a/compiler/protogen/protogen.go b/compiler/protogen/protogen.go
index 431e880..5e6b263 100644
--- a/compiler/protogen/protogen.go
+++ b/compiler/protogen/protogen.go
@@ -550,11 +550,14 @@ func newEnumValue(gen *Plugin, f *File, message *Message, enum *Enum, desc proto
// An enum value contained in a message is: MessageName_ValueName
//
// For historical reasons, enum value names are not camel-cased.
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.c | |
// pthread_cond_wait | |
// | |
// Created by larryhou on 2023/4/12. | |
// | |
#include <pthread.h> | |
#include <unistd.h> | |
#include <stdlib.h> |
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
package io | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
) | |
type Buffer struct { | |
b bytes.Buffer |
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
#!/usr/bin/env python | |
from email.mime import image | |
import os | |
import sys | |
from PIL import Image | |
def main(): | |
canvas = None # type: Image | |
data = [(2,1),(0,1),(1,0),(1,2),(1,1),(3,1)] |
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> | |
#include <stdlib.h> | |
#include <math.h> | |
#define HALF_EXPONENT 5 | |
#define HALF_FRACTION (16-HALF_EXPONENT-1) | |
#define SINGLE_EXPONENT 8 | |
#define SINGLE_FRACTION (32-SINGLE_EXPONENT-1) |
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
#!/usr/bin/env python | |
import argparse | |
import math | |
import os | |
import re | |
import sys | |
from PIL import Image |
NewerOlder