Why words are shuffled when I insert English words in any Arabic/Urdu/Persian text on Notepad or MS Word?

For example: باللغة العربية “keyboard” انا أريد أن أعرف الكلمة Finish typing the Arabic word and add a space after it (this space separates the embedded text from the Arabic text to its right). Insert special character U+200F (to render the preceding space an Arabic character). The character name is “Right to Left Mark”. Insert … Read more

Android : Change entire app layout directions programmatically

You can use this piece of code while your application’s minSdk >= 17. I used fa for Farsi, you can use other rtl language. Configuration configuration = getResources().getConfiguration(); configuration.setLayoutDirection(new Locale(“fa”)); getResources().updateConfiguration(configuration, getResources().getDisplayMetrics());

How to detect scroll direction

I managed to figure it out in the end, so if anyone is looking for the answer: //Firefox $(‘#elem’).bind(‘DOMMouseScroll’, function(e){ if(e.originalEvent.detail > 0) { //scroll down console.log(‘Down’); }else { //scroll up console.log(‘Up’); } //prevent page fom scrolling return false; }); //IE, Opera, Safari $(‘#elem’).bind(‘mousewheel’, function(e){ if(e.originalEvent.wheelDelta < 0) { //scroll down console.log(‘Down’); }else { //scroll … Read more

right-to-left (RTL) in flutter

you have two choices : 1. force a locale ( and direction ) on all devices — method 1: with localization add flutter_localizations package to your pubspec.yml dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter then import ‘package:flutter/material.dart’; import ‘package:flutter_localizations/flutter_localizations.dart’; MaterialApp( localizationsDelegates: [ GlobalCupertinoLocalizations.delegate, GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, ], supportedLocales: [ Locale(“fa”, “IR”), // OR Locale(‘ar’, ‘AE’) OR … Read more

How to recognize swipe in all 4 directions

You need to have one UISwipeGestureRecognizer for each direction. It’s a little weird because the UISwipeGestureRecognizer.direction property is an options-style bit mask, but each recognizer can only handle one direction. You can send them all to the same handler if you want, and sort it out there, or send them to different handlers. Here’s one … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)