This file contains hidden or 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: GPL-3.0 | |
pragma solidity >=0.7.0 <0.8.0; | |
/** | |
* @title Storage | |
* @dev Store & retrieve value in a variable | |
*/ | |
contract Storage { |
This file contains hidden or 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
ms = int(input("Input number of millisecons: ")) | |
remainHour = ms % (1000 * 60 * 60 * 24) | |
remainMinute = remainHour % (1000 * 60 * 60) | |
remainSecond = remainMinute % (1000 * 60) | |
remainMillesec = remainSecond % 1000 | |
print("Result = %d day(s), %d hour(s), %d minute(s), %d second(s), and %d millisec(s)" % (ms /(1000 * 60 * 60 * 24), remainHour / (1000 * 60 * 60), remainMinute / (1000 * 60) , remainSecond / 1000, remainMillesec )) |
This file contains hidden or 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
print("First Equation") | |
m1 = int(input("Input m1: ")) | |
b1 = int(input("Input b1: ")) | |
print("Second Equation") | |
m2 = int(input("Input m2: ")) | |
b2 = int(input("Input b2: ")) |
This file contains hidden or 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
weight = float(input("Input weight in kg: ")) | |
height = float(input("Input height in cm: ")) | |
print("Weight = %.2f kg., Height = %.2f, BMI = %.2f" % (weight, height, (weight / pow(height / 100, 2)))) |
This file contains hidden or 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
c_temp = float(input("Input temperature in Celcius: ")) | |
print("%.2f Celcius = %.2f Farenheit" % (c_temp, ((c_temp * 9 / 5) + 32))) |
This file contains hidden or 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
f_temp = float(input("Input temperature in Fahrenheit: ")) | |
print("%.2f Farenheit = %.2f Celcius" % (f_temp, (f_temp - 32) * 5 / 9)) |
This file contains hidden or 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
export default async (obj) => { | |
const promiseArray = await Promise.all(Object.values(obj)) | |
return Object.keys(obj).map((key, index) => ({ key, index })).reduce((total, { key, index }) => ({ ...total, [key]: promiseArray[index] }), {}) | |
} |
This file contains hidden or 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
const Verifier = idText => { | |
return (11 - (idText.slice(0, 12).split('').map((val, key) => parseInt(val) * (13 - key)).reduce((current, total) => total + current) % 11)).toString().slice(-1) === idText[12] | |
} |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
lengther := 0 | |
couter := 0 | |
data := [] string{} |
This file contains hidden or 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
[ | |
{ | |
"imgUrl":"https://instagram.fbkk1-1.fna.fbcdn.net/t51.2885-19/s1080x1080/23967678_2450308458528369_2368630126796603392_n.jpg", | |
"name":"Laksika", | |
"birthday":"1 August 2003", | |
"lastUsed": "1 August 2003", | |
"product": [ | |
{ | |
"text": "น้องอ้อน" | |
}, |
NewerOlder