Skip to content

Instantly share code, notes, and snippets.

View Nahiduzzaman's full-sized avatar
🏠
Working from home

Md. Nahiduzzaman Rose Nahiduzzaman

🏠
Working from home
View GitHub Profile
@Nahiduzzaman
Nahiduzzaman / README.txt
Created March 20, 2021 14:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.7.4+commit.3f05b770.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads 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
https://www.programiz.com/c-programming/c-structures
Fact 1:
Struct Example without typedef:
struct person
{
int age;
Fact 1
int x, y, *z; // we declare 3 interger variables and z is a pointer variable
x = 40;
y = 44;
z = &x; // here "z" is holding address of x , so " *z " has the value of "x"
printf("value of x = %d", x); // 40
printf("value of *z = %d", *z); // 40
interface Obj {
x: number;
y: number;
name: string;
}
//let a = {} as Obj;
let a = <Obj> {} ;
a.x = 232;
console.log(a);
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
class App extends Component {
constructor(props) {
super(props);
this.state = {

#1. How to take user input in python?

Ans:

If you want to take simple input not worring about data type! use raw_input

number_of_books = raw_input(); #user press number 4 on keyboard
print number_of_books #'4' a string

raw_input takes everything as string, so after getting the string you have to typecast to his desire format.

number_of_books = int(raw_input()); #user press number 4 on keyboard
[1]
date: June 7, 2017
------------------
forEach loop doesn't have built in "break" like typical for loop.
-----------x------------
[2]
date: June 17, 2017
------------------
Python Variable Types:
counter = 100 # An integer assignment
miles = 1000.0 # A floating point
name = "John" # A string
print counter
print miles
print name
-------------------------------output------------------------------
let myFirstPromise = new Promise((resolve, reject) => {
// We call resolve(...) when what we were doing async succeeded, and reject(...) when it failed.
// In this example, we use setTimeout(...) to simulate async code.
// In reality, you will probably be using something like XHR or an HTML5 API.
setTimeout(function(){
resolve("Good To go"); // Yay! Everything went well!
}, 1000);
});
myFirstPromise.then((response) => {