You need Utils
, isAndroid
, isIOS
from @nativescript/core
. This util does not require contact permissions, because the way this util works is only sending data to the default contact app.
import { saveToPhoneBook } from "~/util_phonebook";
import { ApplicationSettings, Device, Frame } from "@nativescript/core"; | |
import i18next from "i18next"; | |
// Import your translation files | |
import en from "../i18n/en.json"; | |
import id from "../i18n/id.json"; | |
/** | |
* Main translation function. We export it so it can be accessed from anywhere. | |
* 'L' is a common abbreviation for 'Localize' or 'Language'. |
/** | |
* Angular Directive for masking input on HTML input elements. | |
* | |
* Supports several mask types: | |
* - 'time' : Time format (HH:MM) | |
* - 'date' : Date format (DD/MM/YYYY) | |
* - 'phone' : Indonesian phone number format (08XX-XXXX-XXXX) | |
* - 'credit-card' : Credit card format (XXXX-XXXX-XXXX-XXXX) | |
* - 'general' : General/custom masking according to the pattern provided in `maskPattern` | |
* |
import { Directive, ElementRef, HostListener, forwardRef } from '@angular/core'; | |
import { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms'; | |
@Directive({ | |
selector: '[timeMask]', | |
providers: [ | |
{ | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => timeMaskDirective), | |
multi: true, |
// Pemetaan zona waktu ke nama negara | |
const timezoneCountryMap = { | |
"Asia/Jakarta": "Indonesia", | |
"Asia/Kolkata": "India", | |
"Europe/London": "United Kingdom", | |
"America/New_York": "United States", | |
"Europe/Paris": "France", | |
"Asia/Tokyo": "Japan", | |
"Europe/Berlin": "Germany", | |
"Asia/Sydney": "Australia", |
import { | |
Directive, | |
Renderer2, | |
ElementRef, | |
HostListener, | |
AfterViewInit, | |
} from '@angular/core'; | |
@Directive({ | |
selector: '[DisableAutofillInput]', |
<?php | |
function makeApiRequest($url, $params = [], $method = 'GET') { | |
$options = [ | |
'http' => [ | |
'method' => $method, | |
'header' => 'Content-Type: application/x-www-form-urlencoded', | |
'content' => http_build_query($params), | |
], | |
]; |
<?php | |
function makeApiRequest($url, $params = [], $method = 'GET') { | |
// Initialize cURL session | |
$ch = curl_init($url); | |
// Set common cURL options | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // Return the response as a string instead of outputting it | |
// Set method-specific cURL options | |
if ($method === 'POST') { |