ফেরা

সব পাখি দিন শেষে নীড়ে আসে ফিরে ঘরময় ভালোবাসা রয়েছে যে ঘিরে । কিছু পাখি দল ছেড়ে দূরে চলে যায় জানেনি কেউ অবেলায় কেন এ বিদায় ।

Binary Search Algorithm – Deep thinking with Java

import java.util.Scanner;   class BinarySearch { public static void main(String args[]) { int c, first, last, middle, n, search, array[];   Scanner in = new Scanner(System.in); System.out.println(“Enter number of elements”); n = in.nextInt(); array = new int[n];   System.out.println(“Enter ” + n + ” integers”);     for (c = 0; c < n; c++) […]

IOS – Main Thread Checker: UI API called on a background thread: -[UIApplication delegate] PID: 902, TID: 13120, Thread name: (none), Queue name: NSOperationQueue 0x604000037a20 (QOS: UNSPECIFIED), QoS: 0 Backtrace:

Solution : use DispatchQueue.main.async { // Correct }     Updating UI from a Completion Handler Long-running tasks such as networking are often executed in the background, and provide a completion handler to signal completion. Attempting to read or update the UI from a completion handler may cause problems. let task = URLSession.shared.dataTask(with: url) { […]

Firebase for android : Read list of data from database and show on recyclerview

Part -1 : Take that we have some data field on child node named “user” . We will first retrieve all data and then we will show it on recyclerview. , public class UserListActivity extends AppCompatActivity { private DatabaseReference mDatabase; ArrayList<User> userArrayList; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user_list); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); […]

Trick : How to upgrade android gradle version from lower to higher or vice-versa

1 . It’s easy just create an new dummy app as like test_app . 2. Go the build.gradle and copy and replace the following code   apply plugin: ‘com.android.application’ android { compileSdkVersion 26 defaultConfig { applicationId “com.adndigitalbd.test” minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName “1.0” testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner” } buildTypes { release { minifyEnabled false proguardFiles […]

Git commands

1 . Know remote repository name git config –get remote.origin.url 2 . Remote Branch current git branch 3 . Remote branch all git branch –all 4 . Git initialization git init (you need to do it first to run any git command) 5 . Add all code or changes git add –all 6 . Git […]

!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `master-1`. You can try adding it manually in `~/.cocoapods/repos` or via `pod repo add`.

Open Terminal and run this command that will add the source on master branch on cocoapod repos .   $ cd ~/.cocoapods/repos $ git clone https://github.com/CocoaPods/Specs.git master     if again issuing already has master branch and it’s not empty and completely remove cocoapod and install from new . How to uninstall cocoapod completely and install new