Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
public class SplashActivity extends BaseActivity { | |
private final int SPLASH_DISPLAY_LENGHT = 1000; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
new Handler().postDelayed(new Runnable() { | |
@Override |
var operations = $(".operation"); | |
var div = $("<div>"); | |
div.css({ | |
background: "whitesmoke", | |
/*position: "fixed", | |
top: 0, | |
//margin: "5%", | |
"overflow-y": "scroll",*/ | |
width : "100%", | |
height : "100%", |
CALL fetchTables('from-this-database'); |
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
public void unzip() { | |
try { | |
FileInputStream inputStream = new FileInputStream(filePath); | |
ZipInputStream zipStream = new ZipInputStream(inputStream); | |
ZipEntry zEntry = null; | |
while ((zEntry = zipStream.getNextEntry()) != null) { | |
Log.d("Unzip", "Unzipping " + zEntry.getName() + " at " | |
+ destination); |
<!-- You can change the parent around to whatever you normally use --> | |
<style name="DebugColors" parent="Theme.AppCompat"> | |
<!-- System colors --> | |
<item name="android:windowBackground">@color/__debugWindowBackground</item> | |
<item name="android:colorPressedHighlight">#FF4400</item> | |
<item name="android:colorLongPressedHighlight">#FF0044</item> | |
<item name="android:colorFocusedHighlight">#44FF00</item> | |
<item name="android:colorActivatedHighlight">#00FF44</item> |
[ ]+?android:(.*)="(.+)" | |
<item name="android:$1">$2</item> |
abstract public class BaseActivity extends AppCompatActivity { | |
// Storage Permissions variables | |
private static final int REQUEST_CODE_EXTERNAL_STORAGE = 1; | |
private static String[] PERMISSIONS_STORAGE = { | |
Manifest.permission.READ_EXTERNAL_STORAGE, | |
Manifest.permission.WRITE_EXTERNAL_STORAGE | |
}; | |
private Runnable mOnWritePermissionGranted; |
javascript:(function(){ | |
var id = location.href.match(/^.*(?:(?:youtu\.be\/|v\/|vi\/|u\/\w\/|embed\/)|(?:(?:watch)?\?v(?:i)?=|\&v(?:i)?=))([^#\&\?]*).*/); | |
if(id != null && typeof id == "object" && id.length > 1){ | |
id = id[1]; | |
var time = 0; | |
try { | |
time = parseInt(yt.player.utils.VideoTagPool.instance.A[0].getCurrentTime()); | |
yt.player.utils.VideoTagPool.instance.A[0].pause(); | |
} | |
catch(ex){console.log(ex);} |