I hereby claim:
- I am riggaroo on github.
- I am riggaroo (https://keybase.io/riggaroo) on keybase.
- I have a public key ASBwdwxxd9GeCz_wXXJYp-hWBxALsHCP9wZLUxYZpcx2cAo
To claim this, I am signing this object:
canvas.save() | |
canvas.translate(200f, 300f) | |
canvas.drawCircle(...) // drawn on the translated canvas | |
canvas.restore() |
<!--- Provide a general summary of your changes in the Title above --> | |
<!--- If there is no changelog entry, label this PR as trivial to bypass the Danger warning --> | |
## Description | |
<!--- Describe your changes in detail --> | |
## Motivation and Context | |
<!--- Why is this change required? What problem does it solve? --> |
class ProjectEditorViewModel : ViewModel() { | |
private val _state = MutableLiveData<EditorState>() | |
val state: LiveData<EditorState> | |
get() = _state | |
} |
class ProjectEditorFragment : Fragment { | |
@Inject | |
lateinit var viewModelFactory: ViewModelProvider.Factory | |
private lateinit var viewModel: ProjectEditorViewModel | |
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
val view = inflater.inflate(R.layout.fragment_editor_initial, container, false) |
package za.co.riggaroo.motionsense | |
import android.app.Activity | |
import android.graphics.Bitmap | |
import android.os.Bundle | |
import android.os.Handler | |
import android.util.Log | |
import android.widget.ImageView | |
import com.google.android.things.pio.Gpio | |
import com.google.android.things.pio.GpioCallback |
import android.content.Context | |
import android.graphics.Bitmap | |
import android.graphics.BitmapFactory | |
import android.graphics.ImageFormat | |
import android.graphics.Matrix | |
import android.hardware.camera2.* | |
import android.hardware.camera2.CameraAccessException.CAMERA_ERROR | |
import android.media.ImageReader | |
import android.os.Handler | |
import android.util.Log |
#/usr/local/bin/bash | |
# Prerequistes: You need to install imagemagick and pdfimages for this script to work | |
# Usage - ./convert_book.sh pdf_name.pdf | |
# output - zip file with images and bookdetails.json file | |
# This script assumes the normal structure of a book dash book and wont work for bigger books or books with different formatting to the standard book dash book | |
# it is always advised to check the output zipped file to ensure its correct | |
folderName=$(basename "$1") | |
folderName="${folderName%.*}" |
public class FriendsActivity extends AppCompatActivity { | |
private static final String TAG = "MainActivity"; | |
public static final String FEATURE_FLAG_ADD_FRIENDS = "feature_add_friends"; | |
private FirebaseRemoteConfig remoteConfig; | |
private Button buttonAddFriend; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
private void initialiseOnlinePresence() { | |
final DatabaseReference onlineRef = databaseReference.child(".info/connected"); | |
final DatabaseReference currentUserRef = databaseReference.child("/presence/" + userId); | |
onlineRef.addValueEventListener(new ValueEventListener() { | |
@Override | |
public void onDataChange(final DataSnapshot dataSnapshot) { | |
Log.d(TAG, "DataSnapshot:" + dataSnapshot); | |
if (dataSnapshot.getValue(Boolean.class)){ | |
currentUserRef.onDisconnect().removeValue(); | |
currentUserRef.setValue(true); |
I hereby claim:
To claim this, I am signing this object: