This file has been truncated, but you can view the full file.
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
diff --git a/index.d.ts b/index.d.ts | |
deleted file mode 100644 | |
index 542a20dfcad..00000000000 | |
--- a/index.d.ts | |
+++ /dev/null | |
@@ -1,3126 +0,0 @@ | |
-declare module 'mongoose' { | |
- import events = require('events'); | |
- import mongodb = require('mongodb'); | |
- import mongoose = require('mongoose'); |
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
@Override | |
protected void onVisibilityChanged(@NonNull View changedView, int visibility) { | |
super.onVisibilityChanged(changedView, visibility); | |
switch (visibility){ | |
case VISIBLE://onResume called | |
case INVISIBLE:// onPause() called | |
} | |
} | |
@Override |
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
# ... 以下はpython sdkの場所が/usr/local/google_appengineのケース | |
/usr/local/google_appengine | |
import sys, types, os;has_mfs = sys.version_info > (3, 5);p = os.path.join('/usr/local/google_appengine', *('google',));importlib = has_mfs and __import__('importlib.util');has_mfs and __import__('importlib.machinery');m = has_mfs and sys.modules.setdefault('google', importlib.util.module_from_spec(importlib.machinery.PathFinder.find_spec('google', [os.path.dirname(p)])));m = m or not has_mfs and sys.modules.setdefault('google', types.ModuleType('google'));mp = (m or []) and m.__dict__.setdefault('__path__',[]);(p not in mp) and mp.append(p) | |
# ... |
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
from bottle import Bottle | |
app = Bottle() | |
@app.route(['/hello', '/']) | |
def hello(): | |
return "Hello World!" | |
@app.route("/_ah/health") | |
def _ah_health(): | |
return "ok" |
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
import webapp2 | |
from models.user import User | |
webapp2_config = { | |
'webapp2_extras.auth': { | |
'cookie_name': 'sid', | |
'user_model': User, | |
}, | |
'webapp2_extras.sessions': { | |
'secret_key': 'your secret session key', |
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
// Realm | |
RealmResults<User> results = realm.where(User.class).findAll(); | |
// SQLite | |
sqliteDatabase.query(TABLE, null, null, null, null, null, null); |
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
<activity-alias | |
android:name=".LaunchActivity" | |
android:targetActivity=".MainActivity" | |
> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity-alias> |
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
* Add a ViewPager.OnPageChangeListener that will forward events to this TabLayout. | |
* Populate the TabLayout's tabs from the ViewPager's PagerAdapter. | |
* Set our TabLayout.OnTabSelectedListener which will forward selected events to the ViewPager |
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
/** | |
* Opaque value, changes when persisted zen mode configuration changes. | |
* | |
* @hide | |
*/ | |
public static final String ZEN_MODE_CONFIG_ETAG = "zen_mode_config_etag"; |
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 static class PrefsFragment extends PreferenceFragment { | |
// リファレンスにはこう書いてありますが、 | |
/* | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
// Load the preferences from an XML resource | |
addPreferencesFromResource(R.xml.preferences); |
NewerOlder