Skip to content

Instantly share code, notes, and snippets.

View nixoncode's full-sized avatar

Nixon Kosgei nixoncode

View GitHub Profile
@kevinvanmierlo
kevinvanmierlo / BaseActivity.java
Last active September 1, 2020 15:22
Same Navigation Drawer on different Activities
public class BaseActivity extends AppCompatActivity
{
public DrawerLayout drawerLayout;
public ListView drawerList;
private ActionBarDrawerToggle drawerToggle;
protected void onCreate(Bundle savedInstanceState)
{
// R.id.drawer_layout should be in every activity with exactly the same id.
drawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
@ravibharathii
ravibharathii / Strong Password RegEx
Created October 29, 2012 18:03
A Regular Expression for a Strong Password
Description of this regular expression is as below:
Passwords will contain at least 1 upper case letter
Passwords will contain at least 1 lower case letter
Passwords will contain at least 1 number or special character
Passwords will contain at least 8 characters in length
Password maximum length should not be arbitrarily limited
(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$