I'm problems solution (haha, ̶ s̶h̶u̶t̶ ̶u̶p̶ ).
Are u ready?
Open your CMD, Power Shell and among others... (admin permission)
<?php | |
function in_string( $needle, $haystack ){ | |
if( !isset( $needle ) || isset( $needle ) && !is_string( $needle ) ){ | |
$error['needle'] = 'Param $needle invalid'; | |
} | |
if( !isset( $haystack ) || isset( $haystack ) && !is_string( $haystack ) ){ | |
$error['$haystack'] = 'Param $needle invalid'; | |
} |
<?php | |
/** | |
* Check string is JSON | |
* | |
* @param string $json JSON to check | |
* | |
* @return boolean|array | |
*/ | |
function is_json( $json = null, $_return = false ){ | |
if( ! is_string( $json ) ){ |
window.requestAnimFrame = function(){ | |
return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || | |
function( callback ){ | |
window.setTimeout( callback, 1000 / 60 ); | |
}; | |
}; | |
// main function | |
function scrollToY( scrollTargetY, speed, easing ){ | |
/** |
function getOffset( element ){ | |
var rect = element.getBoundingClientRect(); | |
return { | |
top: rect.top + window.pageYOffset, | |
left: rect.left + window.pageXOffset, | |
}; | |
} |
<?php | |
function dias_feriados( $year = null ){ | |
if( $year === null ){ | |
$year = intval( date( 'Y' ) ); | |
} | |
/** | |
* easter_date() will generate a warning | |
* if the year is outside of the range | |
* for Unix timestamps (i.e. before 1970 or after 2037). |
<?php | |
preg_match_all("/\b(?:(?:https?|ftp|mailto|tel):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/m", $urls, $callback); |
var win = window, | |
lockOrientation = win.screen.lockOrientation || win.screen.mozLockOrientation || win.screen.msLockOrientation || function(){ | |
return null; | |
} | |
if( lockOrientation ){ | |
/** | |
* Parameters | |
* [ portrait-primary, portrait-secondary, landscape-primary, landscape-secondary, portrait, landscape, default ] | |
*/ |
<?php | |
function get_ip(){ | |
if( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ){ | |
$ip = $_SERVER['HTTP_CLIENT_IP']; | |
} | |
elseif( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ){ | |
$ip = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
} | |
else{ | |
$ip = $_SERVER['REMOTE_ADDR']; |