- Sign-up for IBM Cloud account: https://ibm.biz/ibm-tcs-workshop
- Hands-on Lab: https://github.com/IBM/AppConnectWorkshop
- Link to the slides: https://tinyurl.com/app-integration-slides
- Replay of the talk: https://www.crowdcast.io/e/appintegration
<header> | |
<h1>JSON and AJAX</h1> | |
<button id="btn">Fetch Info for 3 New Animals</button> | |
</header> | |
<div id="animal-info"></div> |
REMIX EXAMPLE PROJECT | |
Remix example project is present when Remix loads for the very first time or there are no files existing in the File Explorer. | |
It contains 3 directories: | |
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name. | |
2. 'scripts': Holds two scripts to deploy a contract. It is explained below. | |
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity. | |
SCRIPTS |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC20.sol"; | |
import "./extensions/IERC20Metadata.sol"; | |
import "../../utils/Context.sol"; | |
/** |
// SPDX-License-Identifier: MIT | |
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC20.sol"; | |
import "./extensions/IERC20Metadata.sol"; | |
import "../../utils/Context.sol"; | |
/** |
Asynchrony and synchrony are two different ways in which a computer program can execute its instructions.
Synchronous programming is the traditional way of writing code, where each instruction is executed one at a time, in the order in which it appears in the program. This means that if a blocking operation, such as a network request, is encountered, the program will block and wait for the operation to complete before moving on. This can lead to the program being unresponsive or slow if there are many blocking operations.
On the other hand, asynchronous programming allows a program to execute multiple instructions at the same time, without blocking the execution of other instructions. This means that if a blocking operation is encountered, the program can continue to execute other instructions while waiting for the operation to complete. This can lead to a more responsive and efficient program.
Asynchronous programming is often implemented using callbacks, promises, or async/await mechanisms, where a funct
void main() { | |
for (int i = 0; i < 5; i++) { | |
print('hello ${i + 1}'); | |
} | |
} |