Skip to content

Instantly share code, notes, and snippets.

View Haneen-Abdulgllil's full-sized avatar
💭
Forever we are young.

Haneen Abdulglil Haneen-Abdulgllil

💭
Forever we are young.
View GitHub Profile
@Haneen-Abdulgllil
Haneen-Abdulgllil / walkthrough.md
Created March 5, 2024 06:19 — forked from mazenmelouk/walkthrough.md
Adding a repository

Spring Boot + Database integration

Before you start, download and set up the base project and make sure it builds and runs successfully.

1. Add required maven dependencies

Add the following as a maven dependency (under dependencies tag)

i. spring-boot-starter-data-jpa reduces the code required for querying the database.

@Haneen-Abdulgllil
Haneen-Abdulgllil / Adapter.java
Created February 28, 2024 09:09 — forked from mazenmelouk/Adapter.java
Simple Design Patterns Examples
import java.util.Map;
class Adapter {
private static final Map<String, MillimeterProductDimensions> PRODUCT_DIMENSIONS_IN_MILLIMETERS_STORE = Map.of(
"product1", new MillimeterProductDimensions(20, 10, 50)
);
static abstract class ProductDimensions {
private final double length;
@Haneen-Abdulgllil
Haneen-Abdulgllil / discussions2.md
Created January 16, 2023 08:52 — forked from tech-chieftain/discussions2.md
Objects Discussion

Object Discussion Questions

There is some coding in this discussion. Feel free to write them in a REPL or in the comments below.

  1. How is an object different from an array?
  2. How does const work with objects?
  3. Explain the difference between bracket syntax and dot syntax. Give an example of something that works with bracket syntax but not dot syntax. Give an example of something that works with dot syntax but not bracket syntax.
  4. What are computed properties? Write an example code.
  5. What is the difference between Object.keys and Object.entries? Write example code using both of them.
  6. How do we get only the values of an object?