This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
private static long back_pressed; | |
@Override | |
public void onBackPressed(){ | |
if (back_pressed + 2000 > System.currentTimeMillis()) super.onBackPressed(); | |
else Toast.makeText(getBaseContext(), "Press once again to exit!", Toast.LENGTH_SHORT).show(); | |
back_pressed = System.currentTimeMillis(); | |
} |
public class WifiTester extends Activity { | |
TextView mainText; | |
WifiManager mainWifi; | |
WifiReceiver receiverWifi; | |
List<ScanResult> wifiList; | |
StringBuilder sb = new StringBuilder(); | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.main); |
This test rule is now in the 'test-rules' support repository. Use that one!
https://developer.android.com/reference/android/support/test/rule/ActivityTestRule.html
^(?!(NotificationManager|Timeline|SensorManager|Configs|libc-netbsd|art|stetho|Choreographer|CliptrayUtils|BubblePopupHelper|ViewRootImpl|libEGL|System.out|PhoneWindow)) |
[user] | |
name = Your Name | |
email = you@youremail.com | |
[alias] | |
A = add -A | |
a = add | |
aa = add --all | |
ae = add --edit | |
ai = add --interactive | |
amend = commit --amend -C HEAD |
I hereby claim:
To claim this, I am signing this object:
/* Media Queries */ | |
/* ----------- iPhone 4 and 4S ----------- */ | |
/* Portrait and Landscape */ | |
@media only screen | |
and (min-device-width: 320px) | |
and (max-device-width: 480px) | |
and (-webkit-min-device-pixel-ratio: 2) { |
import MySQLdb | |
import pandas as pd | |
from sqlalchemy import create_engine | |
# read the csv into pandas and then export to MySQL | |
template_lines = 1000 | |
df = pd.read_csv( | |
'example.csv', nrows=template_lines, low_memory=False) | |
# 2nd argument replaces where conditions is False | |
df = df.where(pd.notnull(df), None) |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would