Skip to content

Instantly share code, notes, and snippets.

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end
import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.AsyncListDiffer
import androidx.recyclerview.widget.DiffUtil
#parse("File Header.java")
@mitchtabian
mitchtabian / MyThread.java
Last active April 29, 2020 14:36
Executing Tasks on a Background Thread
private long[] saveNewWord(Word word){
long[] returnValue = mDb.wordDataDao().insertWords(word);
if(returnValue.length > 0){
Log.d(TAG, "saveNewWord: return value: " + returnValue.toString());
}
return returnValue;
}
private List<Word> retrieveWords(String title){
return mDb.wordDataDao().getWords(title);
@mandiwise
mandiwise / Update remote repo
Last active May 2, 2024 08:59
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket