This file contains 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
<?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"> |
This file contains 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 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) { |
This file contains 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
<!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 { |
This file contains 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
contract Ownable { | |
address public owner; | |
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | |
function Ownable() public { | |
owner = msg.sender; | |
} | |
modifier onlyOwner() { |
This file contains 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
// 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. |