Skip to content

Instantly share code, notes, and snippets.

View scinetic's full-sized avatar

Kaloyan Stoyanov scinetic

View GitHub Profile
@scinetic
scinetic / gist:6c0906f0ce8bae27930f372150f6becd
Last active February 2, 2021 22:37
Combine multiple filters with Javascript
const arr = [1, 2, 3, 4, 5];
const upperBoundaryCheck = (value) => {
if (value < 10) {
return true;
}
return false;
};
const lowerBoundaryCheck = (value) => {
@scinetic
scinetic / gist:8f92c9377f44ccbaff778e75ff4ad292
Created November 14, 2018 18:55
brightness fish slider
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
.slidecontainer {
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
.slidecontainer {
DateTime birthDay; // Declaring variable 'birthDay' of type 'DateTime'
if (DateTime.TryParse(Console.ReadLine(), out birthDay)) // Getting birthdate and initializing it to 'birthDay'
{
DateTime today = DateTime.Today; // Getting the current date
int age = today.Year - birthDay.Year; //Getting the age
if (birthDay > today.AddYears(-age)) age--; // Checking for accuracy of the age
Console.WriteLine(age); // Displaying the current age
Console.WriteLine(age + 10); // Displaying the age after 10 years
}
else