Skip to content

Instantly share code, notes, and snippets.

0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0
@EugW
EugW / hamming.cpp
Last active March 2, 2021 07:53
Hamming code assignment
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
string encode(string original); // Прототип функции посимвольного кодирования
string decode(string original); // Прототип функции декодирования кода
string corrupt(string original); // Прототип функции внесения одиночных ошибок
string repair(string original); // Прототип функции поиска и исправления ошибки
@EugW
EugW / lab7.c
Last active December 22, 2020 10:04
Лаб7
#include <stdio.h> // Стандартный ввод/вывод
#include <stdlib.h> // Стандартная библиотека
#ifdef _WIN32
#define CLEAR_COMM "cls"
#else
#define CLEAR_COMM "clear"
#endif
typedef enum { // Перечисление типов ламп
@EugW
EugW / main.log
Created November 25, 2020 18:59
Лаб5/6 выполнение
----------------------------------------------
Address of int = 000000419718FAC4
Value of pointer to int = 1
Address of pointer to int = 000000419718FB28
Value of int = 1
Size of int = 4
Size of pointer to int = 8
----------------------------------------------
Address of char = 000000419718FAE4
Value of pointer to char = z
@EugW
EugW / main.c
Last active November 25, 2020 19:16
Лаб5/6
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// d)
char* getAlphabet() {
char* pAlp = malloc(26); //Выделение памяти
if (pAlp == NULL) {
printf("Cannot allocate memory");
return NULL;
@EugW
EugW / diff.sh
Created May 7, 2020 18:01
Differences in zip
echo "$1 vs $2"
mkdir temp/
unzip -q $1 -d temp/$1.d/
unzip -q $2 -d temp/$2.d/
cd temp
cd $1.d
find -type f > ../$1.txt
cd ..
cd $2.d
find -type f > ../$2.txt
@EugW
EugW / main.kt
Created September 29, 2019 09:21
SystemColorAndroid
val array = theme.obtainStyledAttributes(intArrayOf(android.R.attr.colorAccent))
val backgroundcolor = array.getColor(0, 0xFF00FF)
println(String.format("#%06X", (0xFFFFFF and backgroundcolor)))
@EugW
EugW / main.kt
Last active September 29, 2019 09:22
Language to TrainedData for Tesseract OCR
val langData = mapOf(
Pair("English", "eng.traineddata"),
Pair("Spanish", "spa.traineddata"),
Pair("Italian", "ita.traineddata"),
Pair("Russian", "rus.traineddata"),
Pair("Polish", "pol.traineddata"),
Pair("French", "fra.traineddata"),
Pair("German", "deu.traineddata"),
Pair("Portuguese", "por.traineddata"),
Pair("Japanese", "jpn.traineddata"),
@EugW
EugW / login.kt
Created May 21, 2018 15:45
kundelik login
package pro.eugw.lessoncountdown.dialog
import android.content.Context
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.android.volley.RequestQueue
import com.android.volley.Response
@EugW
EugW / login.kt
Created May 21, 2018 15:42
kundelik login
package pro.eugw.lessoncountdown.dialog
import android.content.Context
import android.os.Bundle
import android.support.v4.app.DialogFragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.android.volley.RequestQueue
import com.android.volley.Response