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
sudo mysql -u root -p | |
-> password: your_pc_password | |
-> password (again): (this_time_your_mysql_password) |
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
# Built application files | |
/*/build/ | |
# Crashlytics configuations | |
com_crashlytics_export_strings.xml | |
# Local configuration file (sdk path, etc) | |
local.properties | |
# Gradle generated files |
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 com.sebpo.nearme.utility; | |
import android.graphics.Paint; | |
import android.view.Gravity; | |
import android.widget.TextView; | |
/*! | |
* | |
* TextJustifyUtils.java | |
* @author Nikhil Lohia |
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
<android.support.design.widget.FloatingActionButton | |
android:id="@+id/fab_fav" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_gravity="end|bottom" | |
android:tint="@color/app_white" | |
android:layout_margin="16dp" | |
android:src="@drawable/baseline_favorite_white_dp" | |
app:backgroundTint="@color/colorPrimaryDark" /> |
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
#include <stdio.h> | |
#include <stdlib.h> | |
void arraySizeDetect() | |
{ | |
int numbers[5] = {10,20,30,40,50}; | |
int value = sizeof(numbers)/sizeof(int); |
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
String CHANNEL_ID = "0"; | |
int importance = NotificationManager.IMPORTANCE_HIGH; | |
public static final int NOTIFICATION_ID = 100; | |
private NotificationManager notifManager; | |
private NotificationChannel mChannel; | |
private void startStickyNotification() { | |
Intent resultIntent = new Intent(this, LoadingActivity.class); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// == SAVE IMAGE IN EXTERNAL DIRECTORY ==== // | |
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.drawable.icon); | |
// path to internal Card | |
File path = getFilesDir(); | |
// create a folder | |
File dir = new File(path + "/save/"); | |
dir.mkdirs(); | |
File file = new File(dir, "shihab.png"); | |
OutputStream outputStream = null; |
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
/** | |
* Don't forget to change activity name, icon resource & permission. | |
*/ | |
private void ShortcutIcon() { | |
Intent shortcutIntent = new Intent(getApplicationContext(), ShortCutAppIcon.class); | |
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); | |
shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); | |
Intent addIntent = new Intent(); |
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 List<String> getListOfFakeLocationApps(Context context) { | |
List<String> runningApps = getRunningApps(context, false); | |
for (int i = runningApps.size() - 1; i >= 0; i--) { | |
String app = runningApps.get(i); | |
if(!hasAppPermission(context, app, "android.permission.ACCESS_MOCK_LOCATION")){ | |
runningApps.remove(i); | |
} | |
} | |
return runningApps; | |
} |