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 | |
function my_str_rev($str) | |
{ | |
$reversed = ''; | |
$strArr = str_split($str); | |
for (end($strArr); key($strArr)!==null; prev($strArr)){ | |
$reversed .= current($strArr); | |
} | |
return $reversed; | |
} |
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 | |
//echo('<pre>'); | |
$strdat1=date_create("17-SEP-2018 01:13:39 PM"); | |
$strdat2 = strtoupper($strdat1->format('d-M-Y')); | |
$strdat2 = strtoupper($strdat2." 07:00:00 PM"); | |
$strdat2=date_create($strdat2); | |
//print_r($strdat1); | |
//print_r($strdat2); | |
$diff=date_diff($strdat1,$strdat2); | |
$v= $diff->format('%H:%I:%S'); |
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 | |
echo('<pre>'); | |
$strdat1=date_create("14-SEP-2018 09:31:45 AM"); | |
$strdat2 = strtoupper($strdat1->format('d-M-Y')); | |
$strdat2 = strtoupper($strdat2." 07:00:00 PM"); | |
$strdat2=date_create($strdat2); | |
//print_r($strdat1); | |
//print_r($strdat2); | |
$diff=date_diff($strdat1,$strdat2); | |
$v= $diff->format('%H:%I:%S'); |
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 | |
echo('<pre>'); | |
$strdat1=date_create("14-SEP-2018 10:00:00 AM"); | |
$strdat2 = strtoupper($strdat1->format('d-M-Y')); | |
$strdat2 = strtoupper($strdat2." 7:00:00 PM"); | |
$strdat2=date_create($strdat2); | |
//print_r($strdat1); | |
//print_r($strdat2); | |
$diff=date_diff($strdat1,$strdat2); | |
$v= $diff->format('%H:%I:%S'); |
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 | |
class Event { | |
private static $events = []; | |
public static function Regist($eventName, Callable $callback) { | |
if(!is_callable($callback)) return false; | |
if(!array_key_exists($eventName, self::$events)) { | |
self::$events[$eventName] = []; | |
} | |
self::$events[$eventName][] = $callback; | |
return true; |
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 | |
function convertToMultiArray($in, $out = []) | |
{ | |
if (count($in) === 0) { | |
return '---'; | |
} | |
$data = []; | |
$key = array_shift($in); | |
$data[$key] = convertToMultiArray($in, $data); |
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 | |
header("Content-type: text/plain"); | |
$headerString ="Invoice No..... Sale Type Desc...... Misc Amt.... Misc Acc.. Misc Acc Desc....................................."; | |
$fieldIndexes = [ 15+1, 20+1, 12+1, 10+1, 50+1]; | |
function getParts($string, $positions){ | |
$parts = array(); |
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.0"> | |
<title>Safety</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> |
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.0"> | |
<title>Safety</title> | |
<link rel="stylesheet" href="styles/style.css"> | |
</head> |
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
@import url("https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600i,700"); | |
* { | |
box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
-webkit-font-smoothing: antialiased; | |
-moz-font-smoothing: antialiased; | |
-o-font-smoothing: antialiased; | |
font-smoothing: antialiased; |