Сообщения

Сообщения за март, 2023

How to create second stack memory

  package org.example ; public class Main { public static void main ( String [] args ) { System . out .println( "main started" ) ; Runnable runnable = () -> test1 () ; Thread thread = new Thread( runnable ) ; thread .start() ; System . out .println( "main ended" ) ; } public static void test1 () { throw new RuntimeException( "Something went wrong" ) ; } }

SE_21_Lesson_2: VCS, Git

Изображение
-> Installation of Git and setting SSH key 1. https://git-scm.com/downloads 2. open gitlab account 3. generate SSH key: ssh-keygen -o -t rsa -C "emailaddress"  4. gitlab -> preferences -> SSH Keys  -> git add . veya git add * command This command adds files from working directory to staging area -> git commit -m "reasonable message" This command adds files from staging area to local repository -> git push  This command adds files from local repository to remote repository -> git pull This command brings metadata, history and files -> git fetch  This command brings only metadata -> vi file name - creates and opens file; cat file name - show content of file -> Conflicts in git <<<<<<< HEAD // our branch Number one ======= Git is cool >>>>>>> master -> git log This command shows all commits with its commit hash -> .gitignore file This file ignores specific files to be tracked by git -> git

Relationships and Cascade types. @OneToOne, @OneToMany, @ManyToMany relationships

@OneToOne  Method1. package com.example.lesson_8_parvin.entity ; import lombok. Data ; import javax.persistence.CascadeType ; import javax.persistence. Entity ; import javax.persistence.FetchType ; import javax.persistence. GeneratedValue ; import javax.persistence. Id ; import javax.persistence. JoinColumn ; import javax.persistence. OneToMany ; import javax.persistence. OneToOne ; import javax.persistence. Table ; import java.util.ArrayList ; import java.util.List ; @Data @Entity @Table (name = "post" ) public class Post { @Id @GeneratedValue private Long id ; private String title ; @OneToMany (mappedBy = "post" , cascade = CascadeType . ALL , orphanRemoval = true ) private List < Comment > comments = new ArrayList<>() ; @OneToOne (mappedBy = "post" , cascade = CascadeType . ALL , fetch = FetchType . LAZY , optional = false ) private Detail detail ; } package com.example.lesson_8_parvin.entity ;

EPAM

Изображение
 Lesson1. Computer Hardware Basics Desktop Computer Components A  motherboard  is a microlite printed circuit board, on which various microcircuits and expansion slots are soldered. It consists of: a CPU socket into which a processor is inserted like a plug DIMM Memory slots for installing RAM a SATA connector for connecting a hard disk drive (HDD) and a solid state drive (SSD) a northbridge, PCI slots, a CMOS battery, BIOS a built-in sound card, a network card, a graphic card, USB ports RAM  stores the information about the commands that are executed, about programs, and about everything that is being worked with. It is not suitable for long-term storage, because the information disappears after a computer is turned off. Types: DIMM (dual in-line memory module), SO-DIMM (small outline DIMM), DDR SDRAM (versions 2, 3, 4). A hard disk drive  and  a solid state drive  ensure long-term storage of information. We can convert number to hex or binary and count the number of bytes needed, but