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
| public static String asciiStringToHexString(String strAscii) { | |
| char[] chars = strAscii.toCharArray(); | |
| StringBuilder stringBuilder = new StringBuilder(); | |
| for (char aChar : chars) { | |
| String aHex = String.format("%H", aChar); | |
| stringBuilder.append(aHex); | |
| } | |
| String strHex = stringBuilder.toString(); | |
| return strHex; | |
| } |
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
| { | |
| "telemetry.enableCrashReporter": false, | |
| "telemetry.enableTelemetry": false, | |
| "update.channel": "none", | |
| "update.enableWindowsBackgroundUpdates": false, | |
| "extensions.autoUpdate": false, | |
| "terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe", | |
| "php.validate.executablePath": "X:\\xampp\\php\\php.exe", | |
| "npm.packageManager": "yarn", | |
| "php.executablePath": "X:\\xampp\\php\\php.exe", |
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
| ./configure --prefix=/opt/php-7.1 --with-pdo-pgsql --with-zlib-dir --with-freetype-dir --enable-mbstring --with-libxml-dir=/usr --enable-soap --enable-calendar --with-curl --with-mcrypt --with-zlib --with-gd --with-pgsql --disable-rpath --enable-inline-optimization --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-pcre-regex --with-pdo-mysql --with-mysqli --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-openssl --with-fpm-user=www-data --with-fpm-group=www-data --with-libdir=/lib/x86_64-linux-gnu --enable-ftp --with-kerberos --with-gettext --with-xmlrpc --with-xsl --enable-opcache --enable-fpm |
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
| $strLocalTimezone = 'Asia/Makassar'; | |
| $carbonNow = Carbon::now($strLocalTimezone); | |
| $strFrom = $carbonNow->format('Y-m-d 00:00:00'); | |
| $strUntil = $carbonNow->format('Y-m-d 23:59:59'); | |
| $carbonFrom = Carbon::parse($strFrom, $strLocalTimezone); | |
| $carbonUntil = Carbon::parse($strUntil, $strLocalTimezone); | |
| echo $strLocalTimezone; |
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
| #note view states: | |
| - when offline | |
| - when online | |
| - when loading | |
| - when loaded | |
| - when no records | |
| - when error |
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
| public class PriceHelper { | |
| public static final int ROUND_VALUE = 100; | |
| public static String format(int price) { | |
| Locale locale = new Locale("in", "ID"); | |
| NumberFormat currencyInstance = NumberFormat.getCurrencyInstance(locale); | |
| return currencyInstance.format(price); | |
| } |
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 | |
| $input = 12550; | |
| $output = ceil($input / 100) * 100; | |
| echo $output; // 12600 |
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
| /* package whatever; // don't place package name! */ | |
| import java.util.*; | |
| import java.lang.*; | |
| import java.io.*; | |
| /* Name of the class has to be "Main" only if the class is public. */ | |
| class Ideone | |
| { | |
| public static void main (String[] args) throws java.lang.Exception |
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
| # https://stackoverflow.com/questions/29565278/apt-get-upgrade-always-fails-on-mariadb-server-due-to-timezone/33779694#33779694 | |
| sudo apt-get remove --purge mysql-server mysql-client mysql-common | |
| sudo apt-get autoremove | |
| sudo apt-get autoclean | |
| sudo rm -rf /var/lib/mysql | |
| sudo apt-get install mariadb-server |