Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Email</title>
</head>
<body>
<center>
<table align="center">
<tr>
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.2/angular.min.js"> </script> </head> <body ng-app> Amount : <input type="text" ng-model="amount"/><br/> Year : <input type="text" ng-model="year"/><br/> Rate : <input type="text" ng-model="rate"/><br/> <br/> EMI = {{amount*year*rate}} </body> </html>
<?php
$str = " iVBORw0KGgoAAAANSUhEUgAAAb4AAACpCAMAAABj96hMAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURQAAAP7rhMmoYq/lxexxU8pEO5duNvmgh+WqNVa8rNGsYv/6pa2PSps7c5JnMrXoyM2AKF26panfv3tLMLSZW/Lqnt6cNOLDSciXNlewnYNPMmXBr/HjjqB3OdefQue7O85QRKY5TNm5Q7qJMtWMMlW7rJNeOXXKtaWBSNGYSe7Ze+mwTa6AN+vUadimPWa7npvbvlOGeeaqNFlcYaRpMpvOYFJwas6pQr+WQsd7KGaWg+FkTK2QSuXAYLFMXFdHS7ecXdrKe0CVhnynNovVvcl4lFegkq7kxfCLcuezOdx2XfzKt4VbJOeuN3O5ktJzNrGbVuDisb9ohObqpuauN7dvL+eyPOesNa5dcearNtWEcc2gK1Z3dlW6q3dOG6Xp3nZ1X7zgsJHDVeCmgLGZVa+RTPvqh6LNqtFfQFZbYZRyTreOeIa2R+jDQs1hZHCGe2Sqe/3omYvIsLTGprObUtXWu/33o/mznFp/fHOimf7wmLqtg/zxkllhZcCkU8bWkn3Ovfzsh2VaXs69U4+dcfjmla3nz5iciv/Kt89EO/v1ptigXPznrfztipvGj1dZXpeBaeptUaC0ZLHoztNfOOfJaLfAYqRCU1exo1e5qYtbOs1/Js18kk2EgtqeNf/MuuGbhoBFJeHq1YJHJ9Li18k9N4pTNNfl1W1CMEskI5UwdoVKKmkzG3U7WW44Hmk/EHtCJJBXMns6H+nIPv2WMHU9If3heVMvKViQh1ooFP2VJIlOLXZFMJpeMOvQUkEWFV04LPqeMVQkDOfLTmEuGE4dDfvWbLw+NsWTH/LxsueUtPqqPN2DmuKMpW2aKvrIXUerq9l6jMl1FqUvJU5cTeXqx0k6L8f678F2Zo0vPIZDVFfRqfu5TkxMPk9rWaFXP81hULtRQF
<?php
class MyClass {
public function __call($name, $args) {
switch ($name) {
case 'funcOne':
switch (count($args)) {
case 1:
return call_user_func_array(array($this, 'funcOneWithOneArg'), $args);
case 3:
@pssubashps
pssubashps / php
Created July 12, 2016 07:05
Access public property
<?php
class MyClass {
public $prop;
public $variable = "Hello";
function myfunc(){
$this->variable = 'value';
}
}
$obj = new MyClass;
@pssubashps
pssubashps / public-access-specifier.php
Created July 12, 2016 08:49
Public Access Specifier in PHP example
<?php
class Employees {
/**
* public variable
**/
public $organization ;
function __construct() {
$this->organization = 'Nidhi Infotech';
}
@pssubashps
pssubashps / private-access-specifier.php
Created July 12, 2016 12:41
Private Access Specifier in PHP
<?php
class Employees {
private $fistname;
private $lastname;
/**
* public variable
**/
public $organization ;
function postToUrl(message) {
var request = require('request');
var postParam = {};
postParam.state = message.state;
postParam.input = message.input;
postParam.outputKeyPrefix = message.outputKeyPrefix;
var options = {
method: 'post',
body: postParam, // Javascript object
json: true, // Use,If you are sending JSON data
@pssubashps
pssubashps / ngsw-config.json
Created January 23, 2018 12:00
Sample Service worker config Angular5
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
@pssubashps
pssubashps / gist:883373ce0bb225d72251d7bdaa8aaf54
Created April 25, 2018 09:07
phone number country code add (UK)
<?php
$number ="0232432434";
if(substr( $number, 0, 2 ) === "44") {
$number = '+'.$number;
}elseif(substr( $number, 0, 1 ) === "+") {
}elseif(substr( $number, 0, 1 ) === "0") {
$number = substr_replace($number, '+44', 0, 1);
}else{
$number = "+44". $number;