Linux is a Free (libre), Open Source, Unix-like operating system.
-4
votes
0answers
30 views
Help writing a python program which asks the users to input data into a file.! [closed]
Help :x I've never had to use python before and now all of the sudden I need to write this out.
1
vote
0answers
29 views
x64 assembly clearmem / zeromem
I just started learning assembly yesterday, and the first useful thing I've written is a clearmem function. I'm looking for general feedback regarding my coding of this function, whether there any ...
1
vote
1answer
29 views
Bash script that can uncompress: tar, gzip, rar
This code generally works exactly as it is supposed to. I'm learning bash I'm looking for some constructive help that could help me improve my work.
#!/bin/bash
usage()
{
echo "Program for ...
2
votes
1answer
50 views
lightweight packet sniffer review
This is a simple packet sniffer that turns on LEDs when there's network activity. It works by picking up filters in a configuration file and listen for activity in those filters. When there's a ...
2
votes
0answers
23 views
Accelerate OpenGL 2d on python3
I used OpenGL to draw about 20 circles. Each circle has 2 lines, ~10 segments, and all of them have different colors and lenght. FPS ~=4. How can I do this faster?
I am using Python 3 on Ubuntu
Sorry ...
-1
votes
1answer
22 views
bash file manipulation [closed]
I have files in a directory named so:
1welcome.avi
2introdution.avi
I have a rhcsa.txt file that has what these files should be named as:
rhcsa_1_welcome.avi
rhcsa_2_introduction.avi
both the ...
1
vote
3answers
148 views
Possible improvements for this small C program?
I'm learning C and today I wrote a program that displays info about my hardware on ubuntu.
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch, file_name[25] = ...
1
vote
2answers
84 views
First Database Schema - How did I do?
I would really like some advice from any DB gurus who have a few minutes free. After doing some reading and playing with sqlfiddle over the weekend I have constructed this postgresql schema and it is ...
2
votes
2answers
84 views
Need some advice and feedback on my C code calling Bash functions
My intent is to use Bash functions defined in functions.sh in a C program. I am doing this so that I don't have to rewrite the Bash functionality again in C. I want to use one common library for ...
14
votes
5answers
871 views
Naive C++ Matrix Multiplication 100 times slower than BLAS?
I am taking a look at large matrix multiplication and ran the following experiment to form a baseline test:
Randomly generate two 4096x4096 matrixes X, Y from std normal (0 mean, 1 stddev).
Z = X*Y
...
1
vote
1answer
39 views
Are these set-uid scripts/binaries secure?
I have a system that needs to be able to reboot a different piece of hardware partway through a script that programs it. It used to wait for me to come and reboot the hardware halfway through, but ...
-1
votes
1answer
85 views
Readers and writers (writers-preference). I'm not sure whether my code is wrong or not [closed]
I've found on the wikipedia pseudo-code, so I've decided to try it.
That's the Wiki's code:
int readcount, writecount; (initial value = 0)
semaphore mutex_1, mutex_2, mutex_3, w, r ; (initial value ...
5
votes
3answers
72 views
Can I speed up this simple versioning/backup script?
I'm writing a simple automatic backup/versioning bash script.
It should basically mirror a directory structure somewhere, and then copy files over there when they've been altered. The ghost files ...
2
votes
0answers
173 views
Writing SIMD libraries for C++ on FASM in x86-64 Linux
I have recently started a project of SIMD libraries development for C++ on FASM for x86-64 Linux.
I would be glad to hear any opinion or feedback about the project, cleanness of the code and ...
1
vote
0answers
443 views
C++ TCP Socket Server for Unix
I'm very new to C++, (7 days ago I wrote "Hello World") but I really want to write good code and increase my development skill, so I ask you for some review.
Scheme of socket server
This is the ...