Posts

Showing posts from March, 2020

Android Studio Fix Issues

Image
Unsupported Modules Detected in Android Studio File -> Invalidate Caches / Restart. Close the project and Android Studio. Remove the .idea directory and all .iml files. Reopen Android Studio and import your project. If it doesn't help could you please try to reproduce this issue on the empty project and let me know about results.

PHP array magic trick and manipulations

manipulating multidimensional array using array_map /** * Ilterate multidimensional array simplicity * @desc modify and manipulate or populate multidimensional array with simple tricks * @param array $arr * @param function $callback * @return Array **/ function Map($arr, $callback) { if (!is_callable($callback)) { throw new Exception("Callback must be function", 1); } return array_map(function ($key, $val) use ($callback) { return call_user_func($callback, $key, $val); }, array_keys($arr), $arr); }

VSCode

Install jQuery Auto Complete and Hinting on VSCode - Required  npm - Syntax Terminal npm i -- save @types / jquery

Project lists for beginner

Movies App (Flutter Project)

Android Studio Set Weight Layout Programatically

Image
LinearLayout.LayoutParams param = new LinearLayout.LayoutParams( LayoutParams.MATCH_PARENT, //OR WRAP_CONTENT -> layout_width LayoutParams.MATCH_PARENT, //OR WRAP_CONTENT -> layout_height 1.0f // layout_weight 1 ); YOUR_VIEW.setLayoutParams(param);

Git CLI Delete History Commit

Image
Checkout git checkout --orphan latest_branch Add all the files git add -A Commit the changes git commit -am "commit message" Delete the branch git branch -D master Rename the current branch to master git branch -m master Finally, force update your repository git push -f origin master

Build Gradle Component Definitions

Image
Common Gradle Command Prompt Command Description ./gradlew build build project, runs both the assemble and check task ./gradlew clean build build project complete from scratch ./gradlew clean build build project complete from scratch ./gradlew test