(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| // macOS x86_64 syscall works as follows: | |
| // Syscall id is moved into rax | |
| // 1st argument is moved into rdi | |
| // 2nd argument is moved into rsi | |
| // 3rd argument is moved into rdx | |
| // ... plus some more | |
| // Return value is stored in rax (where we put syscall value) | |
| // Mac syscall enum that contains the value to correctly call it | |
| enum Syscall: Int { |
| import android.content.Context; | |
| import android.os.Debug; | |
| import java.io.File; | |
| public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String FILENAME = "out-of-memory.hprof"; | |
| public static void install(Context context) { | |
| Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| import android.content.Context; | |
| import android.os.Build; | |
| import android.support.v7.widget.RecyclerView; | |
| import android.util.AttributeSet; | |
| import android.view.Gravity; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.view.animation.TranslateAnimation; | |
| import android.widget.FrameLayout; |
| package at.markushi.reveal; | |
| import android.app.Activity; | |
| import android.graphics.Color; | |
| import android.graphics.Point; | |
| import android.os.Bundle; | |
| import android.view.View; | |
| import at.markushi.ui.RevealColorView; |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| /* | |
| * Copyright (C) 2014 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| Toolbar toolbar = (Toolbar)findViewById(R.id.toolbar); | |
| //Title and subtitle | |
| toolbar.setTitle("MY toolbar"); | |
| toolbar.setSubtitle("Subtitle"); | |
| //Menu | |
| toolbar.inflateMenu(R.menu.toolbar_menu); | |
| toolbar.setOnMenuItemClickListener(new Toolbar.OnMenuItemClickListener() { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| public class MainActivity extends | |
| private PopupWindow popWindow; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| } |