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
void bininsert (FILE* f) | |
{ | |
if (!f) return; | |
fseek(f, 0, 2); | |
fpos_t i, j, n = ftell(f); | |
int tmp, sd; | |
for ( i = sizeof(int); i < n; i += sizeof(int) ) | |
{ | |
j = i - sizeof(int); | |
fsetpos(f, &i); |
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
FILE* interflow(FILE* f1, FILE* f2) | |
{ | |
if (!f1 || !f2) return NULL; | |
FILE *f3 = fopen("3","wb"); | |
fseek(f2,0,2); | |
fseek(f1,0,2); | |
fpos_t pos1 = 0, pos2; | |
pos2 = ftell(f2) - sizeof(int); |
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/bash | |
sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist~ && curl -o /etc/pacman.d/mirrorlist https://www.archlinux.org/mirrorlist/?country=AU |
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
void ignore() { | |
while ( cin.get() != '\n' ); | |
} | |
Matrix::Matrix() { | |
bool firstInput = true; | |
do { | |
cin.clear(); | |
if ( firstInput == true ) | |
firstInput = 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
void Manager::saveData() { | |
QFile settings ("sbsettings"); | |
if ( settings.open ( QIODevice::WriteOnly ) == false ) { | |
std::cerr << "Cannot open settings" << std::endl; | |
exit(1); | |
} | |
QDataStream stngs (&settings); | |
int size = profiles.size(); | |
stngs << size | |
<< currentProfile; |
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 <unistd.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
char* itoa( int number); | |
int main (int argc, char** argv) | |
{ |
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 | |
# sudo ln -s mk.py /usr/local/bin/mk | |
## USAGE | |
## mk lab1 | |
## mk clean lab1 | |
from sys import argv, exit | |
from os import system |
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 <termios.h> | |
char _getch() | |
{ | |
struct termios old, new; | |
char ch; | |
tcgetattr(0, &old); | |
new = old; | |
new.c_lflag &= ~(ICANON | ECHO); | |
tcsetattr(0, TCSANOW, &new); |
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
char* itoa( int number) | |
{ | |
int count = 0; | |
int copy = number; | |
do { | |
count++; | |
} while ( copy /= 10 ); | |
char* result = (char*) calloc( number+1, 1); | |
int i = count - 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 python3 | |
# 0 -> install matplotlib & numpy & sympy | |
# tut vse napisano http://matplotlib.org/users/installing.html | |
# 1 -> Pastnite vashi data iz faila s tipovim v proizvolnu | |
# 2 -> Kinte fail v papku so skriptom | |
# 3 -> vizovite skript v duhe ./script_name <poryadkovy nomer grafika iz 10 zadania> <imya faila s dannimy> | |
# -> gde: | |
# 1 - F*(x) | |
# 2 - r'avnointervalnaya functsiya |
OlderNewer