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
| class SetClass { | |
| int size = 0; | |
| private final Object[] mapping = new Object[4]; | |
| void add(Object value) { | |
| if (value == null) { | |
| mapping[size] = "null"; | |
| } else { |
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
| <?php | |
| $list = [ | |
| 'SMP 01 Malang' => | |
| [ | |
| 'alamat' => 'Jl Mawar No 01', | |
| 'tlp' => '0341998822', | |
| ], | |
| 'SMA 01 Malang' => | |
| [ | |
| 'alamat' => 'Jl SMA 01 No 41', |
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
| imageView.setOnTouchListener(new OnSwipeTouchListener(MyActivity.this) { | |
| public void onSwipeTop() { | |
| Toast.makeText(MyActivity.this, "top", Toast.LENGTH_SHORT).show(); | |
| } | |
| public void onSwipeRight() { | |
| Toast.makeText(MyActivity.this, "right", Toast.LENGTH_SHORT).show(); | |
| } | |
| public void onSwipeLeft() { | |
| Toast.makeText(MyActivity.this, "left", Toast.LENGTH_SHORT).show(); | |
| } |
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 your.awesome.package | |
| import android.arch.lifecycle.LiveData | |
| import android.arch.lifecycle.MutableLiveData | |
| import io.reactivex.Observable | |
| import io.reactivex.disposables.Disposable | |
| fun <T> Observable<T>.toLiveData() : LiveData<T> { | |
| return object : MutableLiveData<T>() { |
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
| class FullScreenDialogFragment extends DialogFragment { | |
| public FullScreenDialogFragment() { | |
| } | |
| @Override | |
| public void onCreate(@Nullable Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setStyle(DialogFragment.STYLE_NORMAL, R.style.AppTheme); |
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
| import android.app.DatePickerDialog; | |
| import android.content.Context; | |
| import android.util.Log; | |
| import java.text.ParseException; | |
| import java.text.SimpleDateFormat; | |
| import java.util.Calendar; | |
| import java.util.Date; | |
| import java.util.Locale; | |
| import java.util.TimeZone; |
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
| newsList = new ArrayList<>(); | |
| NetworkService networkService = GlobalApplication.getGlobalApplicationContext().getNetworkService(); | |
| List<Flowable<?>> newsRequests = new ArrayList<>(); | |
| List<String> selectedCategory = newsCard.getConfigNews().getCategory(); | |
| for (String cat : selectedCategory) { | |
| newsRequests.add(networkService.getNews(cat)); |
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 FullScreenDialogFragment extends DialogFragment { | |
| public static final String TAG = FullScreenDialogFragment.class.getSimpleName(); | |
| public FullScreenDialogFragment() { | |
| // Required empty public constructor | |
| } | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { |
NewerOlder