[Solved] I do not know ‘glibc detected’ in C

It means you have heap corruption in your program. You likely allocate some memory using malloc, but write outside the actual bounds, corrupting the heap. When you call free, glibc detects the corruption and reports it (specifically, the size of the next free chunk is overwritten). You should definitely fix this problem. Valgrind can be … Read more

[Solved] what does this shellscript do? [closed]

This script deactivates swap obtains the amount of RAM in bytes mounts a ramdisk equal to available RAM writes zeros to the ramdisk via dd Attempts to set the dd process to be first on the chopping block for the Out Of Memory killer prints the process ID of dd and its current status for … Read more

[Solved] Install a C program to another machine without share code [closed]

The simplest way to share your program is compile it and share the binaries. There are a lot of open question you will have to solve (libraries dependencies, specific distribution configurations, …). You must to precompile for every targeted hardware architecture (x86-64, ARM, …) and for every specific SO (BSD, Linux, … even Windows). As … Read more

[Solved] How to save uint64_t bytes to file on C?

EDIT. Since my compiler does not have uint64_t I have shown two ways to save a 64-bit value to file, by using unsigned long long. The first example writes it in (hex) text format, the second in binary. Note that unsigned long long may be more than 64 bits on some systems. #include <stdio.h> int … Read more

[Solved] Can not convert 13 digit UNIX timestamp in python

#!python2 # Epoch time needs to be converted to a human readable format. # Also, epoch time uses 10 digits, yours has 13, the last 3 are milliseconds import datetime, time epoch_time = 1520912901432 # truncate last 3 digits because they’re milliseconds epoch_time = str(epoch_time)[0: 10] # print timestamp without milliseconds print datetime.datetime.fromtimestamp(float(epoch_time)).strftime(‘%m/%d/%Y — %H:%M:%S’) … Read more

[Solved] How to create makefile

Why not try something like this: CC=g++ CFLAGS=-c -Wall LDFLAGS= SOURCES= p4KyuCho.cpp Stack.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=hello all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) *TAB* $(CC) $(LDFLAGS) $(OBJECTS) -o $@ .cpp.o: *TAB* $(CC) $(CFLAGS) $< -o $@ From: http://mrbook.org/tutorials/make/ SPACING/TABBING IS VERY, I REPEAT, VERY IMPORTANT IN MAKEFILES. read up on that. solved How to create makefile