I hereby claim:
- I am panta on github.
- I am panta (https://keybase.io/panta) on keybase.
- I have a public key ASDUiEThogcBU_9EUVhqmG6v2v8lDrUxi6qip7lYAPxHSAo
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am panta on github. | |
* I am mpanta (https://keybase.io/mpanta) on keybase. | |
* I have a public key ASBlrf84tM1kT1bX3d-dotvBNsZVtnDisa19ZqcHpJgeAAo | |
To claim this, I am signing this object: |
I hereby claim:
To claim this, I am signing this object:
package logging | |
import ( | |
"github.com/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
"gopkg.in/natefinch/lumberjack.v2" | |
"os" | |
"path" | |
"io" | |
) |
package logging | |
import ( | |
"go.uber.org/zap/zapcore" | |
"go.uber.org/zap" | |
//"github.com/natefinch/lumberjack" | |
"gopkg.in/natefinch/lumberjack.v2" | |
"os" | |
"path" | |
"strings" |
#include <stdio.h> | |
#include <stdint.h> | |
#define STACK_SIZE 1000 | |
// ATTENZIONE! | |
// qui utilizziamo delle variabili globali a titolo di esempio | |
// ma dovremmo invece utilizzare una struttura e passare | |
// il puntatore alla struttura a tutte le funzioni che operano |
#include <stdio.h> | |
#include <stdint.h> | |
#define STACK_SIZE 1000 | |
struct stack { | |
int elements[STACK_SIZE]; | |
int sp; | |
}; |
#include <stdio.h> | |
#include <stdint.h> | |
// NOTA: queste funzioni operano correttamente solo sulle piattaforme | |
// in cui float occupa esattamente 32 bit! | |
// (Solitamente vero in C99 e garantito in C99 su x86 e amd64) | |
// float_to_repr32() ritorna l'intero a 32 bit | |
// che "codifica" il float passato come argomento | |
// secondo IEEE754. |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int main(void) { | |
/* set up pipe. */ | |
int pfd[2]; | |
if (pipe(pfd) < 0) { | |
perror("pipe()"); |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <sys/wait.h> | |
const char *handle_child_process_output(const char *buffer, ssize_t count) { | |
// we just print it, but we could do any other processing here... | |
write(STDOUT_FILENO, buffer, (size_t)count); |