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
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 |
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
https://www.programiz.com/c-programming/c-structures | |
Fact 1: | |
Struct Example without typedef: | |
struct person | |
{ | |
int age; |
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
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 |
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
interface Obj { | |
x: number; | |
y: number; | |
name: string; | |
} | |
//let a = {} as Obj; | |
let a = <Obj> {} ; | |
a.x = 232; | |
console.log(a); |
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
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
class App extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { |
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
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
[1] | |
date: June 7, 2017 | |
------------------ | |
forEach loop doesn't have built in "break" like typical for loop. | |
-----------x------------ | |
[2] | |
date: June 17, 2017 | |
------------------ |
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
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------------------------------ |
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
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) => { |
NewerOlder