Skip to content

Instantly share code, notes, and snippets.

// The module for the account resource that governs every Libra account
module LibraAccount {
import 0x0.LibraCoin;
import 0x00.Hash;
// Every Libra account has a LibraLibraAccount.T resource
resource T {
// The coins stored in this account
balance: R#LibraCoin.T,
// The current authentication key.
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
function Ownable() public {
owner = msg.sender;
}
modifier onlyOwner() {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>DApp Tutorial</title>
<style>
body {
class BitmapUtils {
public static int getRotationFromFileUri(Context context, Uri contentUri) {
String filepath = contentUri.getPath();
ExifInterface exifData = null;
try {
exifData = new ExifInterface(filepath);
int orientation = exifData.getAttributeInt(ExifInterface.TAG_ORIENTATION, 1);
return exifToDegrees(orientation);
} catch (IOException e) {
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/cardView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardElevation="4dp"
card_view:cardUseCompatPadding="true"
android:layout_marginBottom="10dp">