Skip to content

Instantly share code, notes, and snippets.

View ReinierC's full-sized avatar

Reinier Caron ReinierC

View GitHub Profile

RC Logo

Nested loops & 2-dimensional arrays

Uses nested loops to print data from a 2-dimensional array.

Sample array:

var a = [[4, 2, 0], [8, 11, 9], [7, 0, 7], [7, 4, 28], [3, 10, 26]];

@ReinierC
ReinierC / ainfo.md
Last active January 5, 2018 15:41
blackjack card count

RC Logo

a card counting function.

It will receive a card parameter and increment or decrement the global count variable. the function will then return a string with the current count and the string "Bet" if the count is positive, or "Hold" if the count is zero or negative. The current count and the player's decision

@ReinierC
ReinierC / ainfo.md
Last active January 5, 2018 15:51
Get geolocation data

RC Logo

Get Geolocation from browser

Which could be the location of your Internet provider... or your current VPN server location.

@ReinierC
ReinierC / ainfo.md
Last active January 5, 2018 15:54
Is it July?

RC Logo

Is it July?

Checks if it's July. Or not...

@ReinierC
ReinierC / ainfo.md
Last active January 5, 2018 16:02
Woof-Meow / Copper-Lunch-Brake

RC Logo

An adaptation of Fizz-Buzz

@ReinierC
ReinierC / ainfo.md
Last active January 5, 2018 16:05
PHP math table

RC Logo

A math table

Creates a math table using PHP and HTML

@ReinierC
ReinierC / php-oop-get-send.html
Last active January 5, 2018 09:21
PHP OOP Get/Send
<?php
include 'users.inc.php';
?>
<!doctype html>
<html>
<head>
@ReinierC
ReinierC / calc.inc.php
Last active May 9, 2024 10:38
PHP OOP Calculator
<?php
class Calc {
public $num1;
public $num2;
public $cal;
public function __construct($num1Inserted, $num2Inserted, $calInserted) {
$this->num1 = $num1Inserted;
@ReinierC
ReinierC / modulus-php.html
Last active December 20, 2017 00:41
PHP modulus example
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>PHP Modulus example</title>
<style>p {font-size: 12px;}.alert {color: red;}</style>
</head>
<body>