Skip to content

Instantly share code, notes, and snippets.

View nikoladimitroff's full-sized avatar
🐲

Nikola Dimitroff nikoladimitroff

🐲
View GitHub Profile
<title>Exam prep</title>
<title>Exam prep</title>
@nikoladimitroff
nikoladimitroff / Solutions.h
Last active February 7, 2019 16:42
Exam prep
#pragma once
#include <iostream>
double MyAbs(double a)
{
return a < 0 ? -a : a;
}
double Calc(double a, double b,
double epsilon, long end)
@nikoladimitroff
nikoladimitroff / functions.h
Created January 16, 2019 12:08
ExamPreparationIntroToProgramming
#include <iostream>
#include <string.h>
using namespace std;
void Revert( char *arr )
{
int length = strlen(arr);
for(int i=0; i<length; i++)
{
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fmidemo;
public class ForestTerrain {
static int findLargestAreaAround(char[][] terrain, boolean[][] visited, int i, int j) {
@nikoladimitroff
nikoladimitroff / ArraySymmetricElements.java
Last active May 29, 2018 07:04
Решение на задачи 1 и 2 от ДИ 12.07.2016
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package fmidemo;
/**
*
* @author Nikola
@nikoladimitroff
nikoladimitroff / .gitignore
Created December 29, 2015 14:25
gitignore for UE4 + VS2015
## Ignore UE4 files and VS / XCode solutions and projects
*.sln
*.vcxproj
*.xcodeproj
Binaries/
Build/
DerivedDataCache/
Intermediate/
Saved/
@nikoladimitroff
nikoladimitroff / nameplates.css
Created December 2, 2014 15:01
Coherent UI GT nameplates demo
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(Roboto-Bold.ttf) format('ttf');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
html, body {
margin: 0;
@nikoladimitroff
nikoladimitroff / Paint
Created July 14, 2014 11:54
Canvas + Sockets
# Online Paint
There are many [collaborative drawing tools](http://www.webdistortion.com/2011/01/22/best-online-collaborative-drawing-tools/) and today you&#39;ll create one more. In short, these applications allow multiple people to draw on the same canvas simultaneously.
## 1. Lone drawing
Start off by creating the barebones of your tool. Create a canvas you can paint black curves on by dragging the mouse. The easiest way to do that is draw small circles whenever the mouse is pressed and moving i.e.:
```javascript
function onMouseMove(){