Skip to content

Instantly share code, notes, and snippets.

View shihabmi7's full-sized avatar
🎯
Focusing

Muhammad Shihab Uddin shihabmi7

🎯
Focusing
  • Dhaka, Bangladesh
View GitHub Profile
package com.example.location_maps;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.content.IntentSender;
import android.content.pm.PackageManager;
import android.location.Location;
import android.net.Uri;
{
"Barisal": ["Barguna", "Barisal", "Bhola", "Jhalokati", "Patuakhali", "Pirojpur"],
"Chittagong":["Bandarban","Brahmanbaria", "Chandpur", "Chittagong", "Comilla", "Cox's Bazar","Feni", "Khagrachhari","Lakshmipur", "Noakhali", "Rangamati"],
"Dhaka": ["Dhaka", "Faridpur", "Gazipur", "Gopalganj", "Kishoreganj","Madaripur", "Manikganj","Munshiganj", "Narayanganj","Narsingdi","Rajbari","Shariatpur","Tangail"],
"Khulna": ["Bagerhat", "Chuadanga", "Jessore", "Jhenaidah", "Khulna", "Kushtia", "Magura", "Meherpur", "Narail", "Satkhira"],
"Mymensingh":["Jamalpur", "Mymensingh", "Netrakona","Sherpur"],
"Rajshahi" :["Bogra", "Chapainawabganj","Joypurhat","Naogaon", "Natore", "Pabna", "Rajshahi", "Sirajganj"],
"Rangpur" :["Dinajpur", "Gaibandha", "Kurigram", "Lalmonirhat","Nilphamari", "Panchagarh", "Rangpur", "Thakurgaon"],
"Sylhet" :["Habiganj", "Moulvibazar", "Sunamganj","Sylhet"]
}
@WSAyan
WSAyan / bd_location_arrays.xml
Last active August 2, 2021 18:34
BD divisions and districts string array list for android array values.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="bd_divisions">
<item>Dhaka</item>
<item>Chattogram</item>
<item>Barishal</item>
<item>Khulna</item>
<item>Rajshahi</item>
<item>Rangpur</item>
<item>Sylhet</item>
package com.pratikbutani.pdf;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
@shihabmi7
shihabmi7 / Multipart
Last active December 4, 2017 08:24
Volley Singletone Class : Multipart
private void submitNLPInfo(final String nlpInfo) {
VolleyMultipartRequest multipartRequest = new VolleyMultipartRequest(Request.Method.POST, "URL HERE", new Response.Listener<NetworkResponse>() {
@Override
public void onResponse(NetworkResponse response) {
}
}, new Response.ErrorListener() {
@Override
@JChudasama
JChudasama / ImageNotificationSample.java
Last active May 24, 2023 09:04
Android Image Notification Sample from URL (using Picasso) - Big Picture Style
final NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context)
.setContentTitle(context.getString(R.string.app_name))
.setSmallIcon(R.mipmap.ic_launcher)
.setContentText("notification with image")
.setContentIntent(resultPendingIntent)
.setPriority(Notification.PRIORITY_DEFAULT)
.setAutoCancel(true)
.setGroup(context.getString(R.string.app_name))
.setDefaults(defaults);
@muhammad-naderi
muhammad-naderi / LocaleHelper.java
Last active November 7, 2020 09:36
a quick Context wraper to change locale of android app in runtime, supporting changes in direction (RTL <-> LTR)
package com.mu.tools;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.res.Configuration;
import android.os.Build;
import java.util.Locale;
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active January 31, 2024 14:45
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.design.widget.TextInputLayout
android:layout_width="match_parent"
@ccjeng
ccjeng / CustomInfoWindowAdapter.java
Last active February 27, 2024 12:40
Custom InfoWindow Layout for Google Map in Android
public class CustomInfoWindowAdapter implements GoogleMap.InfoWindowAdapter {
private Activity context;
public CustomInfoWindowAdapter(Activity context){
this.context = context;
}
@Override