This file contains 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
# change commit meassage | |
git commit --amend -m "...." | |
#change file | |
git add <modefied file> | |
git commit --amend --no-edit |
This file contains 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 class MyDatabase extends SQLiteOpenHelper { | |
private static final String DB_NAME="mohosyny"; | |
private static final int DB_VERSION=1; | |
private static final String TBL_NAME="news"; | |
private static final String COL_ID="id"; | |
private static final String COL_TITLE="title"; | |
private static final String COL_DESC="description"; | |
private static final String COL_IMG="image"; | |
private static final String COL_DATE="date"; |
This file contains 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 class MyDatabase extends SQLiteOpenHelper { | |
private static final String DB_NAME="mohosyny"; | |
private static final int DB_VERSION=1; | |
private static final String TBL_NAME="news"; | |
private static final String COL_ID="id"; | |
private static final String COL_TITLE="title"; | |
private static final String COL_DESC="description"; | |
private static final String COL_IMG="image"; | |
private static final String COL_DATE="date"; |
This file contains 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 double distanceBetweenPoints(float x, float y, float a, float b) { | |
return Math.sqrt((x - a) * (x - a) + (y - b) * (y - b)); | |
} | |
public float deltaX(float x1, float x2) { | |
return x2 - x1; | |
} | |
public float deltaY(float y1, float y2) { | |
return y2 - y1; |
This file contains 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
lateinit var notification: NotificationCompat.Builder | |
lateinit var manager: NotificationManager | |
val channel = "NotificationTest" | |
lateinit var notificationChannel: NotificationChannel | |
manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager | |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | |
notificationChannel = NotificationChannel(channel, "notification", NotificationManager.IMPORTANCE_DEFAULT) |
This file contains 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
first : implementation files('libs/opencsv-2.4.jar') | |
public class ExportDatabaseCSVTask extends AsyncTask<String, String, String> { | |
private File file; | |
private WeakReference<Context> context; | |
private ProgressDialog dialog; | |
private boolean isSuccess = true; | |
private final String[] arrStr1 = {"Name", "column 1", "column 2", "column 3", "column 4", "column 5"}; | |
private String fileName; |
This file contains 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 class ThreeDigitDecimalFormatWatcher implements TextWatcher { | |
private DecimalFormat df; | |
private DecimalFormat dfnd; | |
private boolean hasFractionalPart; | |
private EditText et; | |
public ThreeDigitDecimalFormatWatcher(EditText et) { | |
DecimalFormatSymbols decimalFormatSymbols = DecimalFormatSymbols.getInstance(Locale.US); |