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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple JavaScrip Test</title> | |
</head> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous"> | |
<style type="text/css"> | |
</style> | |
<body> |
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
(function ($) { | |
$.fn.tooltip = function (options) { | |
var timeout = null, | |
margin = 5; | |
// Defaults | |
var defaults = { | |
delay: 350, | |
tooltip: '', | |
position: 'bottom', |
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
/*USAGE: YOU CAN OPEN A MODAL FROM A CONTROLLER | |
(function(){ | |
angular | |
.module("myModule") | |
.controller("myController", myController) | |
myController.$inject = ["Modal", "$scope"]; | |
function myController(Modal, $scope){ | |
var vm = this; |
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
<?php | |
/* | |
* @param $data (variable) -> can be any valid type | |
* @author MrXploder | |
*/ | |
function sanitizeInput($data) { | |
$data = trim($data); | |
$data = stripslashes($data); | |
$data = htmlspecialchars($data); |
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
<?php | |
/* | |
* @params $length (number) -> length of the random alphanumeric token | |
* @author MrXploder | |
*/ | |
function randomKey($length) { | |
$pool = array_merge(range(0,9), range('a', 'z'),range('A', 'Z')); | |
for($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
<?php | |
/* | |
* @params $nbr (number) -> first, second, third or fourth day of month | |
* @params $day (string) -> name of the day in the week | |
* @params $mon (number) -> number of the month to seach | |
* @params $year (number) -> number of the year to search | |
* @author MrXploder | |
*/ | |
function nth_day_of_month($nbr, $day, $mon, $year){ |