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
#pragma once | |
#include <iostream> | |
double MyAbs(double a) | |
{ | |
return a < 0 ? -a : a; | |
} | |
double Calc(double a, double b, | |
double epsilon, long end) |
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 <iostream> | |
#include <string.h> | |
using namespace std; | |
void Revert( char *arr ) | |
{ | |
int length = strlen(arr); | |
for(int i=0; i<length; 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
/* | |
* 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) { |
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
/* | |
* 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 |
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
## Ignore UE4 files and VS / XCode solutions and projects | |
*.sln | |
*.vcxproj | |
*.xcodeproj | |
Binaries/ | |
Build/ | |
DerivedDataCache/ | |
Intermediate/ | |
Saved/ |
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
@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; |
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
# Online Paint | |
There are many [collaborative drawing tools](http://www.webdistortion.com/2011/01/22/best-online-collaborative-drawing-tools/) and today you'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(){ |