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 { 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'. |
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
| /** | |
| * 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` | |
| * |
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 { 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, |
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
| // 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", |
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 { | |
| Directive, | |
| Renderer2, | |
| ElementRef, | |
| HostListener, | |
| AfterViewInit, | |
| } from '@angular/core'; | |
| @Directive({ | |
| selector: '[DisableAutofillInput]', |
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 makeApiRequest($url, $params = [], $method = 'GET') { | |
| $options = [ | |
| 'http' => [ | |
| 'method' => $method, | |
| 'header' => 'Content-Type: application/x-www-form-urlencoded', | |
| 'content' => http_build_query($params), | |
| ], | |
| ]; |
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 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') { |
NewerOlder