This file contains hidden or 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
| <ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:color="?attr/colorControlHighlight"> | |
| <item android:id="@android:id/mask"> | |
| <color android:color="#ffffff"/> <!-- any color will do --> | |
| </item> | |
| <item> | |
| <selector android:exitFadeDuration="@android:integer/config_mediumAnimTime"> | |
| <item android:state_pressed="true"> | |
| <color android:color="#10ffffff"/> | |
| </item> |
This file contains hidden or 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 class SignInFragment | |
| @Override | |
| public View onCreateView... | |
| ... | |
| enhanceViewAnimatorWithForgotPasswordIfPossible(inflater, container); | |
| enhanceViewAnimatorWithResetPasswordIfPossible(inflater, container); | |
| this.viewAnimator.setDisplayedChild(2); | |
| return v; |
This file contains hidden or 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
| // Current code | |
| public static ErrorResponse getErrorResponse (Response<?> response) { | |
| final Gson gson = new Gson(); | |
| try { | |
| String json = response.errorBody().string(); | |
| return gson.fromJson(json, ErrorResponse.class); | |
| } catch (Exception e) { | |
| android.util.Log.e(TAG, "", e); | |
| } |
This file contains hidden or 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
| package com.theartofdev.cropcameraimage; | |
| import android.Manifest; | |
| import android.app.Activity; | |
| import android.content.ComponentName; | |
| import android.content.ContentResolver; | |
| import android.content.ContentUris; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.pm.PackageManager; |
This file contains hidden or 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 void startAlarmBroadcastReceiver(Context context, long delay) { | |
| Intent _intent = new Intent(context, AlarmBroadcastReceiver.class); | |
| PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, _intent, 0); | |
| AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE); | |
| // Remove any previous pending intent. | |
| alarmManager.cancel(pendingIntent); | |
| alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + delay, pendingIntent); | |
| } | |
This file contains hidden or 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
| package org.yccheok.jstock.engine.websocket; | |
| import android.util.Log; | |
| import com.google.gson.Gson; | |
| import org.yccheok.jstock.engine.Code; | |
| import org.yccheok.jstock.engine.Subject; | |
| import org.yccheok.jstock.network.Utils; |
This file contains hidden or 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 void hideKeyboard(Fragment fragment) { | |
| InputMethodManager imm = (InputMethodManager) fragment.getContext().getSystemService(Activity.INPUT_METHOD_SERVICE); | |
| imm.hideSoftInputFromWindow(fragment.getView().getRootView().getWindowToken(), 0); | |
| } |
This file contains hidden or 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
| PS C:\Users\yccheok> docker volume create --name postgres_data --driver local | |
| postgres_data | |
| PS C:\Users\yccheok> dir $env:ALLUSERSPROFILE\docker\volumes | |
| dir : Cannot find path 'C:\ProgramData\docker\volumes' because it does not exist. | |
| At line:1 char:1 | |
| + dir $env:ALLUSERSPROFILE\docker\volumes | |
| + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| + CategoryInfo : ObjectNotFound: (C:\ProgramData\docker\volumes:String) [Get-ChildItem], ItemNotFoundException | |
| + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand |
This file contains hidden or 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 | |
| public void onTextChanged(CharSequence s, int start, int before, int count) { | |
| // this happens in android as well | |
| if (JStockAutoCompleteTextView.this.isPerformingCompletion()) { | |
| // We need to differentiate, whether "string" is from user | |
| // typing, or drop down list selection. This is because when | |
| // user perform selection, document change event will be triggered | |
| // too. When string is from drop down list selection, user | |
| // are not expecting any auto complete suggestion. Return early. | |
| return; |
This file contains hidden or 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
| {"earnings":["XOM","TWX","RDS-B","PG","RDS-A","MCO","FB","ISRG","WMT","SAN","BA","MDLZ","BABA","JNJ","GOOGL","EXPE","DPZ","BP","PCLN","WFC","IBM","SBUX","MSFT","SPGI","CMG","GOOG","GSK","NVDA","AMZN","KO","AAPL","BRK-B","DIS","MCD","MMM"],"insider_transactions":["XOM","TWX","RDS-B","PG","RDS-A","MCO","FB","ISRG","WMT","SAN","BA","MDLZ","BABA","JNJ","GOOGL","EXPE","DPZ","BP","PCLN","WFC","IBM","SBUX","MSFT","SPGI","CMG","GOOG","GSK","NVDA","AMZN","KO","AAPL","BRK-B","DIS","MCD","MMM"],"stock_prices":[{"code":"SBUX","fall_below":52.58},{"code":"NVDA","fall_below":165.32},{"code":"BRK-B","fall_below":160.0},{"code":"GOOGL","fall_below":950.0},{"code":"SAN","rise_above":7.0}],"token":"ewz3vlSwg1s:APA91bF-9YWWRDXhiyeFa6Vk7BzKyPuP4hZRSRkD_NS92CIoS0ccIWVkXYbnX-vDhAPbGQQ_nNYCv14ON0oIarkBpow4_MBZV5SXtktN1_gOHTQjbdxE2KleqCTGmJixCwo5LQ5fclnX"} |