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
import { useCallback, useReducer } from 'react'; | |
const initialState = { | |
error: null, | |
extra: null, | |
data: null, | |
identifier: null, | |
loading: false, | |
}; |
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
A complex number is a number that can be expressed in the form of a + bi, where a and b are real numbers, and i is solution of the equation x2 = -1. Because no real number satisfies this equation, i is called an imaginary number. For the complex number a + bi, a is called the real part, and b is called the imaginary part. To add or subtract two complex numbers, just add or subtract the corresponding real and imaginary parts. For instance, the sum of 5 +3i and 4+2i is 9 + 5i. For another, the sum of 3 + i and -1 + 2i is 2 + 3i. | |
Write a class with name ComplexNumber. The class needs two fields with name real and imaginary of type double. It represents the Complex Number. | |
The class needs to have one constructor. The constructor has parameters real and imaginary of type double and it needs to initialize the fields. | |
Write the following methods | |
Methods named getReal without any parameters, it needs to return the value of real field. | |
Method named getImaginary without any parameters, it needs to return the value |
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
version: '3' | |
services: | |
postgres: | |
image: postgres:12.1 | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_PASSWORD: mypassword | |
volumes: | |
- ./postgresql/data:/var/lib/postgresql/data |
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
$(document).ready(() => { | |
$('.menu').on('mouseenter', () => { | |
$('.nav-menu').show() | |
}).on('mouseleave', () =>{ | |
$('.nav-menu').hide(); | |
}); | |
$('.btn').on('mouseenter', (event) => { | |
$(event.currentTarget).addClass('btn-hover').on('mouseleave', event => { $(event.currentTarget).removeClass('btn-hover') | |
}) |
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
$(document).ready(() => { | |
$('.hide-button').on('click', () => { | |
$('.first-image').hide(); | |
}); | |
$('.show-button').on('click', () => { | |
$('.first-image').show(); | |
}); |
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
$(document).ready(() => { // func | |
$('#cart').on('click', () => { // callback func | |
$('#cartMenu').show(); // method show | |
}) | |
$('#account').on('click', () => { | |
$('#accountMenu').show(); | |
}) | |
$('#help').on('click', () => { | |
$('#helpMenu').show(); | |
}) |