This file contains 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 React, { Component } from 'react' | |
import { Slider, Rail, Handles, Tracks, Ticks } from 'react-compound-slider' | |
const sliderStyle = { | |
position: 'relative', | |
width: '100%', | |
} | |
const railStyle = { | |
position: 'absolute', |
This file contains 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
let searchWord=(searchQuery, array, objectKey=null)=>{ | |
return array.filter(d =>{ | |
let data =objectKey? d[objectKey] : d //Incase If It's Array Of Objects. | |
let dataWords= typeof data=="string" && data?.split(" ")?.map(b=>b&&b.toLowerCase().trim()).filter(b=>b) | |
let searchWords = typeof searchQuery=="string"&&searchQuery?.split(" ").map(b=>b&&b.toLowerCase().trim()).filter(b=>b) | |
//let matchingWords = searchWords.filter(word=>dataWords.includes(word)) | |
let matchingWords = searchWords.filter((word)=> dataWords.find(a =>a.includes(word))) |
This file contains 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 | |
if($this->request->is('post')){ | |
$user_id = $this->Auth->user('id'); | |
$data = $this->request->getData(); | |
$location = WWW_ROOT."prescription/"; | |
$allowed_ext = ['png' ,'jpg', 'jpeg']; | |
$filename = $data['image_file']['name']; | |
$temp = $data['image_file']['tmp_name']; | |
$size = $data['file']['size']; |
This file contains 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
<script> | |
var isMobile = false; | |
if (navigator.userAgent !== undefined) { | |
var userAgent = navigator.userAgent.toLowerCase(); | |
var iPhoneIndex = userAgent.indexOf("iphone"); | |
var iPadIndex = userAgent.indexOf("ipad"); | |
var isIPhone = (iPhoneIndex !== -1 && iPadIndex === -1) || (iPhoneIndex !== -1 && iPhoneIndex < iPadIndex); | |
var isAndroid = userAgent.indexOf("android") !== -1 && userAgent.indexOf("mobile") !== -1; | |
var isOtherMobile = userAgent.match(/^.*?(ipod|blackberry|mini|windows\\sce|palm|phone|mobile|smartphone|iemobile).*?$/) != null; | |
isMobile = isIPhone || isAndroid || isOtherMobile; |
This file contains 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
<div id="chatbun10"></div> | |
<script type="text/javascript"> | |
(function(d) { | |
var params = | |
{ | |
id: "1", | |
wid: "10", | |
cb: (new Date()).getTime() | |
}; | |
var qs = Object.keys(params).reduce(function(a, k){ a.push(k + '=' + encodeURIComponent(params[k])); return a},[]).join(String.fromCharCode(38)); |
This file contains 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 sendMessage($data, $target, $serverKey){ | |
//FCM api URL | |
$rsp = []; | |
$url = 'https://fcm.googleapis.com/fcm/send'; | |
//api_key available in Firebase Console -> Project Settings -> CLOUD MESSAGING -> Server key | |
$server_key = $serverKey; | |
$fields = array(); | |
$fields['data'] = $data; |
This file contains 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
SafetyNet.getClient(MainActivity.this).verifyWithRecaptcha(SITE_KEY) | |
.addOnSuccessListener(MainActivity.this, | |
new OnSuccessListener<SafetyNetApi.RecaptchaTokenResponse>() { | |
@Override | |
public void onSuccess(SafetyNetApi.RecaptchaTokenResponse response) { | |
// Indicates communication with reCAPTCHA service was | |
// successful. | |
String userResponseToken = response.getTokenResult(); | |
Log.e("response", userResponseToken); | |
if (!userResponseToken.isEmpty()) { |
This file contains 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 getIndianCurrency(float $number) | |
{ | |
$decimal = round($number - ($no = floor($number)), 2) * 100; | |
$hundred = null; | |
$digits_length = strlen($no); | |
$i = 0; | |
$str = array(); | |
$words = array(0 => '', 1 => 'one', 2 => 'two', | |
3 => 'three', 4 => 'four', 5 => 'five', 6 => 'six', | |
7 => 'seven', 8 => 'eight', 9 => 'nine', |
This file contains 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
// getTimeSlot(IntervalInMinutes, $startTime, $endTime) | |
function getTimeSlot($interval, $start, $end) | |
{ | |
$start = new DateTime($start); | |
$end = new DateTime($end); | |
$start_time = $start->format('H:i'); | |
$end_time = $end->format('H:i'); | |
$i=0; | |
while(strtotime($start_time) <= strtotime($end_time)){ | |
$start = $start_time; |
This file contains 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
[ | |
{ | |
"name": "Afghanistan", | |
"dial_code": "+93", | |
"code": "AF" | |
}, | |
{ | |
"name": "Aland Islands", | |
"dial_code": "+358", | |
"code": "AX" |
NewerOlder