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
getUserlist(filter: any, colSortBy: string, tableFilter: any): Observable < any > { | |
let params = new HttpParams(); | |
for (var i = 0; i < tableFilter.length; i++) { | |
const obj = tableFilter[i]; | |
const key = Object.keys(obj)[0]; | |
params = params.append(key, obj[key]); | |
} | |
params = params.append('page-number', this.userData.pagination.pageNumber.toString()); | |
params = params.append('page-size', this.userData.pagination.pageSize.toString()); |
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 { Injectable } from '@angular/core'; | |
import { AngularFireDatabase } from 'angularfire2/database'; | |
import { AngularFireAuth } from 'angularfire2/auth'; | |
import * as firebase from 'firebase'; | |
// import 'rxjs/add/operator/take'; | |
import { BehaviorSubject } from 'rxjs' | |
@Injectable() | |
export class MessagingService { |
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 copyToClipboard(text){ | |
var dummy = document.createElement("input"); | |
document.body.appendChild(dummy); | |
dummy.setAttribute('value', text); | |
dummy.select(); | |
document.execCommand("copy"); | |
document.body.removeChild(dummy); | |
} | |
copyToClipboard('Hello, World!') |
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 | |
$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; |
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
{ | |
"index": "/index.html", | |
"assetGroups": [ | |
{ | |
"name": "app", | |
"installMode": "prefetch", | |
"resources": { | |
"files": [ | |
"/favicon.ico", | |
"/index.html", |
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 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 |
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 Employees { | |
private $fistname; | |
private $lastname; | |
/** | |
* public variable | |
**/ | |
public $organization ; |
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 Employees { | |
/** | |
* public variable | |
**/ | |
public $organization ; | |
function __construct() { | |
$this->organization = 'Nidhi Infotech'; | |
} |
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 MyClass { | |
public $prop; | |
public $variable = "Hello"; | |
function myfunc(){ | |
$this->variable = 'value'; | |
} | |
} | |
$obj = new MyClass; |
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 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: |
NewerOlder