This file contains hidden or 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
class CryptoJSAES | |
{ | |
public function encrypt($passphrase, $data, $salt = null): string | |
{ | |
$salt = $salt ?: openssl_random_pseudo_bytes(8); | |
[$key, $iv] = $this->_evpKDF($passphrase, $salt); | |
$ct = openssl_encrypt($data, 'aes-256-cbc', $key, true, $iv); | |
return $this->_encode($ct, $salt); | |
} |
This file contains hidden or 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
catchError(err => { | |
const errorCode = err.code; | |
let errorMessage = this.VerifyErroCode(errorCode); | |
if (errorMessage == null) { | |
errorMessage = err.message; | |
} | |
console.log(errorMessage); | |
}) |
This file contains hidden or 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
// define the array of numbers and objects | |
const array = [{ | |
nome: 'joão', | |
idade: 14 | |
},{ | |
nome: 'joão', | |
idade: 14 | |
},7,9,8,5,15,3,9,8,6]; | |
// remove duplicate numbers only, items of type object are not affected |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1"> | |
<title>XLSX Reader JS</title> | |
<link rel="stylesheet" href="screen.css" media="screen"> | |
</head> | |
<body> |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |
<title>Title</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
<style> | |
.col-sm-2 { | |
padding: 0 !important; |
This file contains hidden or 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 pegaDDD(ddd) { | |
return parseInt(ddd.substr(1, 2)); | |
} | |
function inArray(ddd) { | |
var dddArray = [11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 27, 28, 31, 32, 33, 34, 35, 37, 38, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 53, 54, 55, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 73, 74, 75, 77, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99]; | |
return dddArray.indexOf(ddd) != -1; | |
} |
This file contains hidden or 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 | |
$date_expire = '2016-04-16'; | |
$date = new DateTime($date_expire); | |
$now = new DateTime(); | |
//echo $date->diff($now)->format("%d days, %h hours and %i minuts"); | |
//$time = $date->diff($now)->format("%d"); | |
//echo $time; |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>teste</title> | |
<style> | |
ul { | |
list-style: none; | |
-moz-column-count: 4; | |
-moz-column-gap: 20px; |
This file contains hidden or 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 <?php language_attributes(); ?>> | |
<head> | |
<meta charset="<?php bloginfo( 'charset' ); ?>"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title><?php bloginfo('name') ?></title> | |
<link type="text/css" rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/materialize.min.css" media="screen,projection"> | |
<link type="text/css" rel="stylesheet" href="<?= get_template_directory_uri(); ?>/style.css"> | |
<style> |
NewerOlder