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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.7; | |
contract SmartBank { | |
mapping (address => uint) public balances; | |
function deposit() public payable { | |
balances[msg.sender] = msg.value; | |
} | |
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 SmartBank { | |
... | |
function transfer(uint amount, address destAddr) public { | |
require(amount <= balances[msg.sender], "Your balance is not enough!"); | |
balances[msg.sender] -= amount; | |
balances[destAddr] += amount; | |
} | |
} |
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 SmartBank { | |
... | |
function withdraw(uint amount) public { | |
require(amount <= balances[msg.sender], "Your balance is not enough!"); | |
payable(msg.sender).transfer(amount); | |
balances[msg.sender] -= amount; | |
} |
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 SmartBank { | |
... | |
function deposit() public payable { | |
balances[msg.sender] = msg.value; | |
} | |
} |
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 SmartBank { | |
mapping (address => uint) public balances; | |
} |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.7; | |
contract SmartBank { | |
} |
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
<template> | |
<div class="mt-16 p-6 mx-auto max-w-3xl"> | |
<h1 class="text-3xl text-center text-red-400 font-semibold">{{ title }}</h1> | |
<div class="mt-4 bg-white rounded-lg shadow-md p-6"> | |
<table id="topten" class="table-auto border-collapse w-full"> | |
<thead> | |
<tr class="text-sm font-medium text-gray-700 text-center"> | |
<th class="px-2 py-2 bg-red-300">Rank</th> | |
<th class="px-2 py-2 bg-red-300">Country Name</th> | |
<th class="px-2 py-2 bg-red-300">Total Cases</th> |
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
<template> | |
<div class="mt-20 p-6 rounded-lg bg-white mx-auto max-w-sm text-center shadow-md"> | |
<h1 class="mt-4 text-4xl font-bold">{{ country_rank }}</h1> | |
<h2 class="mt-4 text-3xl font-bold">{{ country_name }}</h2> | |
<h3 class="mt-4 text-xl text-red-400 font-bold tracking-wide">Total Cases : {{ total_cases }}</h3> | |
<table class="mt-4 table w-64 mx-auto" id="cases"> | |
<tr> | |
<td class="text-left font-semibold">New Cases</td> | |
<td class="text-right tracking-wide">{{ new_cases }}</td> | |
</tr> |
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
<template> | |
<div> | |
<nav | |
class="bg-white shadow fixed max-w-screen-md z-10 mx-auto inset-x-0 top-0 flex justify-between items-center" | |
> | |
<a | |
href="#" | |
class="font-extrabold m-3 uppercase inline-flex hover:text-pink-700 transition-all duration-500" | |
> | |
COVID-19 UPDATE |
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
FROM andrewklau/centos-lamp | |
COPY ./sql-scripts/ /docker-entrypoint-initdb.d/ | |
COPY ./sql-scripts/query.sql . | |
RUN yum -y install epel-release | |
COPY eprints.repo /etc/yum.repos.d/eprints.repo |
NewerOlder