teleren/devto huggingface dataset:
Day 7: week 1 down baby!
Tags: productivity
Published: 2022-04-15 23:38:55

Hi!
first week down and still counting... technically we are on the next day but I haven't slept yet and who cares it's ma rules anyway 😎
so weekend is coming it will be tough with motivation
I basically didn't do anything today I can say that it's because it was the good Friday but I was just me being lazy
I was supposed to write an article about setting up react app without CRA and I haven't started writing anything yet but I will maybe tomorrow or Sunday
I also think it will be cool if I did like a Trello board for the whole project management and I plan to look into that too.
I don't have a plan for tomorrow but the paper I'm working on need some attention I'll try to write a few pages we will see what I come up with 

“Take care of your body. It’s the only place you have to live.”
the quote on the cover Image makes sense 

Signing off...
Day 560 : Rain Delays
Tags: hiphop, code, coding, lifelongdev
Published: 2022-04-15 23:16:04

_liner notes_:
- Professional : Got up early to prepare for a workshop for a conference in Miami. Did the workshop. Had a good time with a really great audience. Ended right on time. 2 hours. Then it started raining. I was already tired from doing the workshop and the rain put me right to sleep. I get up and check in the Slack channels to see what folks are talking about. It's a long holiday for the folks in Europe so it was like a ghost town, haha. I recorded a promo video to submit to a conference. I had to do it between the rain delays, but got it done. Got it uploaded, just need to submit the form.

- Personal : Last night, I watched some episodes of "Killing Eve" and went through tracks for the radio show. That was pretty much it.


![A valley full of pine trees between grey rock formations in Yosemite, CA, United States](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ybjh05lrotcb3qe5ae78.jpg)

Really need to do my taxes so that will be high up on the list of things to get completed. I also need to fill out the form for that talk before I forget. Then put together the radio show for tomorrow. Going to get to work. Oh and I'll be in Miami and London next week, so there may be no blog posts, but I'll be adding to https://doingstuff.in while travelling.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube yH9rUXuIW98 %}
Installing Echinda-test on MacOS
Published: 2022-04-15 23:13:13

---
title: Installing Echinda-test on MacOS
published: true
---

**TL;DR** : Install Echidna binaries. We are avoiding building it from scratch. Some other day for that.

Add your Python modules to your path to allow you to use echidna dependencies. Add this to your `~/.zshrc` or `~/.bashrc` - or something similar.
```
export PATH=$PATH:/Users/abhinavmir/Library/Python/3.9/bin
```
Add this via `source ~/.zshrc`.

Now download the binaries from here: [github.com/crytic/echidna/releases](https://github.com/crytic/echidna/releases)

Now move it into `/usr/local/bin` using `mv echidna-test /usr/local/bin`.

Once done, add `export PATH=$PATH:/usr/local/bin/echidna-test` to `~/.zshrc` - now `source ~/.zshrc`.

Now, `pip3 install crytic-compile`.

Add `export PATH=$PATH:/Users/<you>/Library/Python/<your version>/bin` - but if you're on Linux, change that to wherever Python binaries are. Restart your shell.

Now, `echidna-test` should run with no issues.
Scrape any links from websites
Tags: beginners, programming, html, tutorial
Published: 2022-04-15 21:58:24

First of all you need to download html dom parser file from sourceforge. Then this code will work for you best.
Here is the code you can find all links and text in the [Yacine TV](https://yacinetv.co).

PHP Code
<?php
include('simplehtmldom/simple_html_dom.php');

// Create DOM from URL or file
$html = file_get_html('https://yacinetv.co');

// Find all links, and their text
foreach($html->find('a') as $elm) {
echo $elm->href .' ('.$elm->plaintext. ')
';
}
?>
My favorite VS Code extensions
Tags: programming, vscode, productivity
Published: 2022-04-15 21:02:56

## Horizon Theme
Let's kick this off with a beautiful theme, shall we? The Horizon Theme is the most beautiful theme I've come across in all my time using Vs Code. It's not only easy on the eyes but it also features a very pretty light mode (for the ones out there who prefer it to be light).

## Project Manager
Project Manager is great for anyone who has a ton of projects going on at the same time. It let's you save any folder as a project in a seperate sidebar (you'll find it under the folder looking icon). This extension has helped me save a lot of time because I don't have to open my project folders seperately anymore.

## SSH FS
This one's great for anyone who works with remote machines or virtual machines. You connect to your device/ VM with SSH and it show's the entire filesystem (or that what your account is allowed to see).

These were my top three VS Code extensions and my introductory post to this platform.
~Luca
"Why only my friend's PC doesn't change CSS 😱" ~Real story on my project~
Tags: css, network, aws, cdn
Published: 2022-04-15 20:47:49

## There was like this conversation 

👩‍💻 🇻🇳 - my friend who lives in Vietnam
👨‍🏭 🇵🇱 - me, lives in Poland

---
```
👩‍💻 🇻🇳 I fixed CSS and it was good in my local environment, 
but in test environment(AWS) doesn't change anything

👨‍🏭 🇵🇱 aha

👩‍💻 🇻🇳 could you check it on your PC?

👨‍🏭 🇵🇱 sure .... tadaaam css is changed on my PC

👩‍💻 🇻🇳 what?? yeah exactly...

👨‍🏭 🇵🇱 Have you tried deleting cache?

👩‍💻 🇻🇳 Yeah, I've tried it at first

👨‍🏭 🇵🇱 hmm... could you try to use incognito chrome?

👩‍💻 🇻🇳 Just moment ... it turns out same result...

👨‍🏭 🇵🇱 on incognito chrome as well ??? Maybe CDN cache??
 
👩‍💻 🇻🇳 How can I check it ?

👨‍🏭 🇵🇱 chrome devtool > Network > Headers > X-cache
I see I get css file from CDN(AWS cloudfront)
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kafomm10gjndfa6nq7o5.png)
 
```
👨‍🏭 🇵🇱 and age means the time when this file was created.
so I get file which is created 118 seconds ago on CDN
```

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cz4p39wu0lz176qnn4w0.png)
 
``` 
👨‍🏭 🇵🇱 How is it on your PC?

👩‍💻 🇻🇳 age is 279313, so almost 3days ago ! this is the reason !!
```

---

**2 days later...**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1u2ueanjuf4b16dmfph.png)
file name was like ``main%5BchunkHash%%5D.css``, but it should have be like ``7530r9w4j0fef0we.css`` (without "chunckHash")
it means version of css file.

the reason why css file name was not property was [mini-css-extrace-plugin](https://www.npmjs.com/package/mini-css-extract-plugin) version.

after my friend updated version, everything was ok 👍


> according to [AWS doc](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/UpdatingExistingObjects.html), if css name is not included version identifier, cache doesn't update.
How to automatically generate Joi schemas from your Prisma schema
Published: 2022-04-15 20:43:18

I'm sure you have built an API before, where you had to manually create a Joi schema for every endpoint. It was repetitive and time-consuming. But not anymore with the help of the Prisma generator I have recently built.

Here's what you need to do:

1- Install the generator 

- Using npm 

```bash
 npm install prisma-joi-generator
```

- Using yarn:

```bash
 yarn add prisma-joi-generator
```

2-  Add the generator to your Prisma schema

```prisma
generator joi {
  provider = "prisma-joi-generator"
}
```

3- Run `npx prisma generate` for your schema(or the example below)

```prisma
model User {
  id    Int     @id @default(autoincrement())
  email String  @unique
  name  String?
  posts Post[]
}

model Post {
  id        Int      @id @default(autoincrement())
  createdAt DateTime @default(now())
  updatedAt DateTime @updatedAt
  title     String
  content   String?
  published Boolean  @default(false)
  viewCount Int      @default(0)
  author    User?    @relation(fields: [authorId], references: [id])
  authorId  Int?
}
```

Now you will have all possible Joi schemas generated for you!

![Joi schemas](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a2731wccu5ppxrg7pmzy.png)
How to create your first app with anchor ?
Tags: javascript, web3, blockchain, rust
Published: 2022-04-15 20:11:33

Many people are adopting web3 these days but there is a problem to onboard even more people.
Most of the tutorials are done in English, which can discourage most French speakers who have to overcome two barriers: the one of learning programming and the one of the language. Of course, English is a prerequisite for anyone wishing to get into IT, but starting in their mother tongue makes learning easier. This tutorial is therefore aimed at the French-speaking community. It allows them to learn how to create their first application on the solana blockchain using the anchor framework. If you like my work, do not hesitate to subscribe to my youtube channel.
{% embed https://www.youtube.com/watch?v=fvV4W6AdrPA&t=451s %}
Hibernate - LazyInitializationException
Tags: hibernate, spring, database, sql
Published: 2022-04-15 20:10:15

@Transactional annotation is used when you want the certain method/class to be executed in a transaction.

Let's assume **buyer** wants to transfer 10$ to **seller**. What happens is:

**1**-> We decrease **buyer's** account by 10$ 
**2**-> We add 10$ to **seller's** account 

Then the exception is thrown after succeeding 1) and before executing 2). Now we would have some kind of inconsistency because Buyer lost 10$ while seller got nothing. Transactions means all or nothing. If there is an exception thrown somewhere in the method, changes are not persisted in the database. Something called rollback happens.

If you don't specify @Transactional, each DB call will be in a different transaction.

## Tell us the relation between LAZY and Transactional

From the previous [post](https://dev.to/yigi/hibernate-lazy-fetching-aeh), JPA specification says that in case you are trying to fetch a relationship, which is lazily loaded, you must have declared transaction. Otherwise, **LazyInitializationException** will be the one of the most common exceptions you will face when working with Hibernate.

## How to NOT fix the LazyInitializationException ❌

-  People recommend updating the association's FetchType to EAGER. Of course, this resolves the LazyInitializationException, but it also adds performance issues that will emerge in practice. Hibernate will always fetch the association if the FetchType is set to EAGER, even if you don't utilize it in your scenario. This certainly adds overhead to your program, slowing it down.

and

- Another suggestion you should avoid is to set the hibernate.enable_lazy_load_no_trans configuration parameter in the application.properties file to true. This parameter tells Hibernate to open a temporary Session when no active Session is available to initialize the lazily fetched association. This increases the number of used database connections, database transactions and the overall load on your database.

## How to fix the LazyInitializationException ✅

- Executing a Criteria Query with one or more LEFT JOIN FETCH clauses is the simplest way to load an entity with all required relationships. This enables Hibernate to collect all connected entities referenced in the LEFT JOIN FETCH clause, in addition to the entity referenced in the projection. See the related [post](https://dev.to/yigi/hibernate-n1-problem-580)

or

- Use a DTO projection instead of entities. DTOs don’t support lazy loading, and you need to fetch all required information within your service layer.
Hibernate - N+1 Problem
Tags: hibernate, sql, database, spring
Published: 2022-04-15 20:09:38

Let’s imagine we have two entities with a one-to-many relationship: Product and ProductEntry. For some use-cases, we may want to load only Product-related attributes, but for other cases, we may need to load product together with their entries.

**EAGER** and **LAZY** are the two fetch types provided by Hibernate. LAZY retrieves only the desired entity and nested attributes when they are accessed, whereas EAGER fetches everything. Setting the EAGER fetch type for a connection is a common option for novices, but it degrades efficiency because it requires the loading of all relationships, even if they aren't needed. Additionally, employing the EAGER fetch type forces you to utilize it all of the time. On a method level, it can't be overridden.

The next scenario is when you notice that while EAGER fetch type works OK, it does not fulfill performance needs, so fetch type is reverted to LAZY. After that, you may loop through a list of parent entities (for example, Products) and retrieve their hierarchical relationships. From the standpoint of the code, it appears to be correct, however this is where the "N+1 select" problem emerges. The following queries are sent by Hibernate:
To retrieve a list of Products, run the first SQL query.
Additional queries to retrieve Product Entries in a particular product (query per product).

## As a result... 🔵🔴
N+1 select queries are generated, where N is the number of Products. Consider N=1000 or 10.000 to see how the performance will be affected. While a single query can do your job, 10000 queries also can do. Select your side. 

## Here comes the solution

A custom query with JOIN FETCH is one of the Hibernate solutions for the "N+1 select" problem: instead of querying nested product records for each product with a separate query, we may build a single query to select products and join relevant entries. Hibernate is told to populate nested entities when "JOIN FETCH" is used.

Consider entities and a Spring Repository with a custom method that is annotated with a custom JOIN FETCH query.

```java
@Repository
public interface ProductRepository extends JpaRepository<Product, Long> {
    @Query("SELECT DISTINCT s FROM Products p LEFT JOIN FETCH p.entries pe")
    List<Product> findAllWithEntries();
}
```

The resulting list will have nested product entries populated without executing additional queries.
INDIAN MATKA WEBSITE
Tags: webdev, javascript, html, php
Published: 2022-04-15 20:05:32

## IMAGE NOT LOADING ON WEBPAGE - NEED HELP

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78ip24cex0ht6mtx2eng.png)

ON TOP IMAGE IS NOT LOADING AND SHOWING ALT TAG CAN ANYONE JUST HELP ME OUT OF THIS....?

I am the founder of **[indian matka ](http://indianmatka.today)** and this is the original website of indian satta matka. here we provide peoples the fastest indian satta matka result and we provides peoples the fix fix fix ank through which they earn huge money so they follow us. my old website  got deleted by hackers so i created a new one but got some issues so your help needed.

## FOR INDIAN MATKA FIX JODI
[CLICK HERE FOR GETTING IN TOUCH WITH US FOR HELP](tel:+917389296790)

CALL ME IF NEEDED

IT WILL BE GOOD THAT YOU HELP ME IN INDIAN MATKA
I am #Hiring Android Engineers
Tags: career, android, java, kotlin
Published: 2022-04-15 19:49:41

Im hiring an SWE with android experience, 2 years minimum (school/internships count!) USA + Canada only. 

As an Android engineer, your work would be leveraged by the entire Uber ecosystem (Rider, Driver, Eats, Freight, Elevate, U4B etc.) as well as third party applications (e.g. Alipay, McDonalds etc).

Message me here, or [linkedin](https://www.linkedin.com/in/gabriella-meneses-b22b18208/), or [apply](uber.com/global/en/careers/list/101183/)
Keep code short and tidy
Tags: beginners, productivity, codenewbie, discuss
Published: 2022-04-15 19:21:26

So I've been working on Swift for a while now.
I started off with the basics, but then started writing lots of lines of code

By the time I was one week into my EduCity project, I ended up writing tons of lines of code in one `struct` and that created a major problem for me.

My code took about 3 minutes to run altogether and my laptop literally started overheating. On top of that, it showed the error: `The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions`.

After that, I started splitting my code into different `structs`, so it would hopefully take less time to run the code and the error wouldn't show up.

By doing that, I did reduce the speed by a minute (now it's on 2 minutes), but it did create a few errors like: `Type '()' cannot conform to 'View'`. 

But the code still shows up with the error it previously showed, and is still not working :(

**MORAL OF THE STORY: DON'T REWRITE ANY CODE AND PUT THEM INTO FUNCTIONS INSTEAD, AND KEEP YOUR CODE READABLE SO IF YOU NEED TO COME BACK TO IT IN THE FUTURE YOU CAN UNDERSTAND WHAT IT'S DOING**
What was your win this week?
Tags: discuss, weeklyretro
Published: 2022-04-15 19:16:21

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there! 


Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Getting an awesome new piece of equipment... or whatever else might spark joy ❤️ 

---

Happy Friday

![Big Bird and Snuffy Disco Dancing](https://media.giphy.com/media/2xEzDMDtYHLQT7ZQgR/giphy.gif)
How does @import works in CSS? What is the pros and cons. 🤔
Tags: webdev, css, html, javascript
Published: 2022-04-15 18:14:06

We all must have used `@import` in our css files for importing one stylesheet to another. While working on large projects we often make use of imports to make use of same styles in different views.

The `@import` statement has some pros and cons related to it. Let's first discuss how the import works over using the `<link>` element in HTML file. 

I personally prefer to use media over text to understand any concepts and like using them in my articles as well 😅

So let's try to understand the difference between using `@import` and `<link>` element to load CSS files followed by the pros and cons of `@import` statement.

### Working of @import statement.

![css @import working](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ecw667ptng673ge85iye.png)

In the above example we can see that importing stylesheet into one another builds dependency graph. Due to this dependency tree the base css file which is `homeview.css` is downloaded first and then the dependent css files are downloaded which are `button.css` and `form.css`.

### Working of `<link>` element.


![link element working](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uvd82uzh2nk9r92oct7b.png)

When the stylesheets are loaded using link elements they are downloaded at the same time which can be used to combine them into single file.

We have covered the major difference between the two approaches now let's focus on the pros and cons of `@import` statement.

### Pros of using CSS @import

1. Saves time in copy pasting the same code in every file or adding links approach.

2. Good for building medium to large organisational projects.

3. Create primary CSS file and then import other files like typography or images. This way of managing CSS files is simple yet effective and helps in maintaining good project structure.

### Cons of using CSS @import

The only negative that comes with `@import` statement is increasing the page load time if not used during build process. As it goes and reads the imports and then applies them. Although the time difference is very small but can impact your search ranking where the bots use page loading time to calculate ranking.


I tried to cover all the major points which defines the flow and working of  CSS `@import` statement in brief. 😊 
Do let me know if I missed something 😉 


Happy Learning! 👩‍💻
Java Enterprise in briefly detail
Tags: java, jakarta, javaee, development
Published: 2022-04-15 18:10:56

May you are a bit reserved to start with Java EE, because it looks so confusion. But don't worry it's not so difficult like it seems in the beginning.

As first is important to understand the game of the name. Since Java EE8 the eclipse foundation took the ownership from Oracle maintenance the Java Enterprise Platform. The eclipse foundation and Oracle was not able to find a common agreement for the usage of the Java Trademark. As solution Java EE was renamed to Jakarta EE.

Another fact we need to keep in mind is that Java EE is a collection of specifications. The reference implementation of those specifications is a bundle called application server. If you plan a small project just using the Servlet specification, you don't need to deal with a full application server. A simple Servlet container like Tomcat or Jetty contains everything you need.

Now comes the tricky part. to run a application server or a Servlet container you need a Java Virtual Machine (JVM). The version of the JVM must fit with the specification need of you application server. You need also to check which J EE version is supported by your application server. To stay a bit secure, without updating your environment every 6 months you can use the Java LTS release. Java 11 will have support until 2021 and Java 17 (LTS) released in September 2021 will have for 3 years support until 2024.

If you searching for an compact overview of the Jakarta EE Specification details you can check out my blog post: [Java Enterprise in briefly detail](https://elmar-dott.com/articles/java-enterprise/)


If you like my work, feel free to give a like and share with you friends and / or colleges.
Day-67 Training At Ryaz
Tags: javascript, webdev, beginners, programming
Published: 2022-04-15 17:36:44

Date:15/04/2022
Day:Friday

Today, I started at about 10:35 am as I was in progress to the ninth module so, I started with the left over modules so, I begin with the spread operator Spread syntax ... allows an iterable such as an array expression or string to be expanded in places where zero or more arguments can take example if we declare array as [1,2,3] and we call spread operator as with console.log so we get output as 6 and Spread syntax can be used when all elements from an object or array need to be included in a list of some kind after this I started with rest pattern and parameters The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent functions in java script after this I started with short circuiting && and || operator as the instructor started with if we pass two arguments with or and and operator so, what we would get the output and after this I started with  Nullish Coalescing Operator it is used to either print the result if it is null or it is undefined and after this I started with logical assignment operator as to get true or false output so, this way my day ended up and I got to learn many new things .