Skip to content

Instantly share code, notes, and snippets.

👨‍🎓
studying

Alexander Calugari afishr

👨‍🎓
studying
Block or report user

Report or block afishr

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View html_meta
<!-- Meta -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<title></title>
<!-- Favicon -->
View Preferences.sublime-settings — User
{
"auto_complete ": true,
"binary_file_patterns":
[
"node_modules/**"
],
"bold_folder_labels": true,
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme",
"draw_indent_guides": true,
"draw_white_space": "selection",
@afishr
afishr / OpenWithSublimeText3.bat
Created Jan 24, 2018 — forked from roundand/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 7)
View OpenWithSublimeText3.bat
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
View IDEA .gitignore
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
View bubble_sort.c
// Bubble sort
for (int i = 0; i < N; i++)
{
for (int j = 0; j < N - i; j++)
{
if (array[j] > array[j + 1])
{
swap(array[j+1], array[j]);
}
}
View insertion_sort.c
// Insertion sort
for (int i = 0; i < N; i++)
{
int j = i;
while (j > 0 && array[j] < array[j-1])
{
// Swap array[j] and array[j-1]
swap(array[j], array[j-1]);
j--;
}
View quicksort.c
// Quicksort
template <typename T>
void quicksort(T arr, int l, int r)
{
int i, j;
i = l;
j = r;
int middle = arr[(i + j) / 2];
do
View spiral_array.c
//Array in a spiral
int main()
{
int i,j,n,w=3,l=0; // w и l - позволяют ориентироваться внутри массива
//w - отступ до дальней стенки, l - отступ от ближней
int a[4][4]={5,3,2,7,1,8,4,3,2,6,9,7,5,6,3,2}; //Массив 4 на 4
i=0;
j=0;
for (n=0;n<16;++n) //Повторяется *кол-во элементов* раз
View GCD_LCM.c
//GCD_LCM
int a1 = a,
b1 = b;
while (b1 != 0)
{
a1 %= b1;
swap(a1, b1);
}
View stones_generating-binary-sequences
#include <bits/stdc++.h>
using namespace std;
bool b[18];
int n;
void get(int a,int n)
{
for ( int i= 0; i < n; i ++)
{
if (a%2==0) b[i]=false;
else b[i]=true;
You can’t perform that action at this time.