teleren/devto huggingface dataset:
How to resolve Hibernate OutOfMemoryError problem – Hibernate Batch processing
Tags: hibernate, outofmemoryerror, batch
Published: 2021-04-20 14:37:38

https://grokonez.com/hibernate/resolve-hibernate-outofmemoryerror-problem-hibernate-batch-processing

How to resolve Hibernate OutOfMemoryError problem – Hibernate Batch processing

When using <strong>Hibernate</strong> for saving a large number of entities to database, You can meet an <strong>OutOfMemoryException</strong>. The tutorial will show the case and resolve it with <strong>Hibernate Batch processing</strong>.

Related articles:
- <a href="https://grokonez.com/hibernate/start-development-hibernate-xml-mapping-file-hibernate">How to start development with Hibernate – XML Mapping File Hibernate</a>

<!--more-->
<div id="tuttoc" class="jsa-toc"></div>

<div id="tutcontents">
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Hibernate: 5.2.10.Final
– MySql database
<h2>II. Problem & Solution</h2>
<h3>1. Problem</h3>
Using Hibernate to save <strong>20000</strong> entities to database as below code:
<pre><code class="language-java">
Session session = factory.openSession();
Transaction tx = null;
try {
	tx = session.beginTransaction();

	for (int i = 0; i < 20000; i++) {
		String text = Utilities.generatedRandomString();
		Data data = new Data(text);
		session.save(data);
	}

	tx.commit();
} catch (Exception e) {
	if (null != tx) {
		tx.rollback();
	}
} finally {
	session.close();
}
</code></pre>

https://grokonez.com/hibernate/resolve-hibernate-outofmemoryerror-problem-hibernate-batch-processing
One of my React projects
Published: 2021-04-20 14:31:29

## So today i've done this poject, where you enter a keyword and list of images from Unsplash appear under input. 

I was thinking about projects for portfolio/practice and then saw this article: [click](https://dev.to/siva2910/my-first-react-project-24lo)

I've done almost the same, but with React Hook Forms, Typescript and ChakraUI. 

Here's links: 
[GitHub](https://github.com/a03z/search-image-by-word)
[Netlify](https://goofy-visvesvaraya-c1730a.netlify.app/)

TODO: infinity loading (when u scroll to the bottom of the app new list of images load)

**Thanks for attention**
_**Open for suggestions**_
Manage Amazon S3 Buckets with Python in 2 minutes
Tags: python, s3, boto3, amazonwebservices
Published: 2021-06-14 07:30:28

---
title: Manage Amazon S3 Buckets with Python in 2 minutes
published: true
date: 2021-04-20 14:28:37 UTC
tags: python,s3,boto3,amazonwebservices
canonical_url: https://medium.com/analytics-vidhya/manage-amazon-s3-buckets-with-python-in-2-minutes-25b0ce34edbf
---

[![](https://cdn-images-1.medium.com/max/2600/1*1X0-98EiQNkwBJj2vnTTqQ.jpeg)](https://medium.com/analytics-vidhya/manage-amazon-s3-buckets-with-python-in-2-minutes-25b0ce34edbf?source=rss-6a5fd2acfac------2)

How to use Python to access Amazon S3 services.

[Continue reading on Analytics Vidhya »](https://medium.com/analytics-vidhya/manage-amazon-s3-buckets-with-python-in-2-minutes-25b0ce34edbf?source=rss-6a5fd2acfac------2)
What if?
Tags: discuss, watercooler, sideprojects, career
Published: 2021-04-20 14:18:40


Photo by <a href="https://unsplash.com/@emilymorter?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Emily Morter</a> on <a href="https://unsplash.com/s/photos/question?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  
  

Most of the time, people ask: What would your dream job look like? Or, what is the ideal company you would like to work at?

<img width=900 src="https://media.tenor.com/images/7192e2c40e335695e4e615bc509a9eb9/tenor.gif">

One thing I rarely hear people asking is this: 

Imagine an ideal world that you didn't have to worry about money, thus didn't have to work. 
> **What would be the dream project you'd be working on?**

As a developer, maybe there is this one side project that you always wanted to work on, but never got that far. What is that project, and why is it important to you?
Custom Swatch for Material App Theme – primarySwatch 
Tags: flutter, dart
Published: 2021-04-20 14:17:20

![Error Code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u8s170ty1gq5rjyc4vfj.png)

`‘Color’ is not a subtype of type ‘MaterialColor?’, ever got this kind of error at runtime, most probably, defining the primarySwatch for your App.`

So let’s find out how to define a custom swatch that would work as expected.

{% gist https://gist.github.com/rohanjsh/24d8067cd0b87ad05ffd47e4977f6edb %}

[A color that has a small table of related colors called a “swatch”](https://api.flutter.dev/flutter/painting/ColorSwatch-class.html#:~:text=A%20color%20that%20has%20a,primary%20and%20accent%20color%20swatches.&text=Colors%2C%20which%20defines%20all%20of%20the%20standard%20material%20design%20colors.) — Dart Docs

To create our own small table we need some values to put it in, right. So where can we get them? People on the earth are just awesome, we have a tool [Make Tints and Shades](https://maketintsandshades.com/) to our rescue.

![Make Tints and Shades](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/njs9g45xnzuid98qoc49.png)

Get any color HEX code you want paste it in that box, and then click on ‘Make tints and Shade’ (Tip for future — Hover the shades to copy the code)
Create a new dart file for our new values' home. I have named it ‘palette.dart’. (You guys can post your creative names in comments 😜)

From Dart Documentation
```
const MaterialColor(
int primary,
Map<int, Color> swatch
)
//Creates a color swatch with a variety of shades.
//The primary argument should be the 32 bit ARGB value of one of the values in the swatch, as would be passed to the new Color constructor for that same color, and as is exposed by value. (This is distinct from the specific index of the color in the swatch.)
```
>To tap into the desired value, all you need to create is a Map. That is exactly what we have created below with defining a class Palette for better use and scalability in the future.

{% gist https://gist.github.com/rohanjsh/371687ea8dcac6f28f3cdfae08b89086 %}

Now we just need to import our newly created dart file in main.dart for implementation.

{% gist https://gist.github.com/rohanjsh/8050e0042f5364e927e3ed32aeeca898 %}

When we define a primarySwatch by ourselves, Theme itself takes some decision in defining colors for widgets like AppBar, FAB, etc. And that’s it, we have a very own customized primarySwatch defined.
Java Sort List of Objects with Comparable
Tags: java, comparable, list, object
Published: 2021-04-20 14:14:43

https://grokonez.com/java/java-sort-list-objects-comparable-example

Java Sort List of Objects with Comparable

This tutorial shows you way to Sort List of Objects using <code>Comparable</code> example.

Related Post: <a href="https://grokonez.com/java/sort-list-objects-comparator-example" rel="nofollow">Java Sort List of Objects with Comparator</a>

<div class="jsa-attract-box">
How to do this with <strong>Kotlin</strong>: <a rel="nofollow" target="_blank" href="http://kotlination.com/kotlin/kotlin-sort-list-objects-comparable-example">Sort List of Objects with Comparable</a>
</div>

<!--more-->
<h2>I. Overview</h2>
<h3>1. Goal</h3>
Sort list of three <code>MyDate(year,month,day)</code> objects.
<h3>2. Steps to do</h3>
- Implement <code>Comparable</code> interface for the class of objects you want to sort.
- Override <code>compareTo(T other)</code> method and:
+ return <em><strong>zero</strong></em> if this object is <em><strong>equal</strong></em> <code>other</code>
+ a <strong><em>negative</em></strong> number if it's <strong><em>less</em></strong> than <code>other</code>
+ a <em><strong>positive</strong></em> number if it's <em><strong>greater</strong></em> than <code>other</code>
- Use <code>Collections.sort()</code> method.
<h2>III. Practice</h2>
<h3>1. Create Class for objects to be sorted</h3>

https://grokonez.com/java/java-sort-list-objects-comparable-example

Java Sort List of Objects with Comparable
How to create shadows on your components for React Native with this open source project ?
Tags: reactnative, react, opensource, github
Published: 2021-04-20 14:10:05

Hi Guys, 

React Native Shadow Generator is a little tool we work on with the team, to quickly generate your shadow's components. 🚀

Link here 👇
🔗 𝗚𝗶𝘁𝗵𝘂𝗯: https://lnkd.in/djj58h7

Increase the intensity, change the color style, move shadow direction... do whatever you want!

Hope you will like it 😁
5 Tips on How to Earn Money with Discord
Published: 2021-04-20 14:08:39

Discord servers’ owners usually spend their time taking care of the server, setting it up, keeping it running, up-to-date and clean. All these actions lead to “hiring” people to moderate all the rooms and keep it tidy. While most of the moderators start doing it because they’re passionate about this and in their free time, it can be a good idea to start rewarding the people who are taking care of the server.

https://berney1.medium.com/5-tips-on-how-to-earn-money-with-discord-329f00f1814f
Simple User Selection Color HTML & CSS
Tags: html, css, webdev, beginners
Published: 2021-04-20 13:47:18

Hello,

Today I choose a very simple topic to how to change a user selection color. The ::selection is a CSS pseudo-element that applies styles to the part of a document or text highlighted by the user.

```
::selection {
  color: #fff;
  background:#ff8882;
}
```
As an above example, you can change different colors and it's very useful I hope you like this also comments about your thoughts. For more content follow me on Instagram  [@developer_nikhil27](https://www.instagram.com/developer_nikhil27/).

If you want to more support me then buy me a [coffee](https://www.buymeacoffee.com/nikhilbobade27).

Thank you!
 
{% codepen https://codepen.io/NikhilBobade/pen/KKaGWGK %}
Dynamic Stem Cell Therapy Announces The Launch of Its Advanced Stem Cell Treatment For Knee Injury
Published: 2021-04-20 13:47:01

Dynamic Stem Cell Therapy Announces The Launch of Its Advanced Stem Cell Treatment For Knee Injury
The team of experts at Dynamic Stem Cell Therapy has stated that they have what it takes to carry out a successful knee injury treatment, especially for athletes who want fast healing and recovery from injuries
Dynamic Stem Cell Therapy, one of the most reputable stem cell treatment clinics in Nevada announces its innovative stem cell treatment to help people achieve fast recovery from injuries. They offer a state-of-the-art procedure that utilizes modern biotechnology to replace, renew, and repair damaged human tissue with incredible results.
Stem cells are gaining popularity, especially among professional athletes. For example, Aaron Curry, the Las Vegas Raiders’ Linebacker injured both of his knees and then underwent stem cell treatment during his off season. Curry said the treatment was the only thing that helped him recover and without it, he may have been a lost cause.
Dynamic Stem Cell Therapy was founded by the late Simong Youmans, MD who recorded a huge success with patients. The success of the stem cell injections and treatment is what encouraged her son, Blake Youmans, to carry on the work of helping people heal and live a happier and more fulfilling life. They have a team of doctors and specialists, who have many years of experience in the exciting world of stem cell treatment. The clinic's conducive environment is clean and equipped with the best and latest medical equipment.  
In the past few years, Blake Youmans and his team have successfully treated musculoskeletal and sports injuries such as; degenerative arthritis, foot and ankle injuries, knee injuries, elbow injuries, torn ligaments, and so on. They also treat injuries in the hips, shoulder, and elbow. The success rate of these treatments is very high. They have many positive testimonials by patients whose lives had been transformed.
Stem cell treatment has many benefits including reducing pain, inflammation and minimizing post-procedural recovery. It also increases range of motion and flexibility, helps to avoid surgery, and prevents nerve damage.
To book a free consultation, please visit www.stemcellpowernow.com.  
Although the cost of stem cell therapy is not covered by insurance, Dynamic Stem Cell Therapy understands the current economic situation globally and they offer their services at a more affordable price than the competition.
About Dynamic Stem Cell Therapy
Dynamic Stem Cell Therapy is a Regenerative Medicine clinic based in Nevada. The company specializes in treating joint and sports injuries, orthopedic issues, neuropathy, and diseases using stem cell procedure. They have specialists with decades of experience who use advanced non-invasive cellular therapy treatments to help patients live a life free of pain.
###
Media Contact
Dynamic Stem Cell Therapy
Blake Youmans
702-547-6565
blake@stemcellpowernow.com
www.stemcellpowernow.com  

###
Making A Resume?
Tags: resume, figma, cv, template
Published: 2021-04-20 13:28:35

Searching for a nice resume template in Figma? If yes, then you are at a right place. If no, then also you must check it out once.😃

Resume is something that gives your first impression. While searching for templates I came across Figma and guess what? It had such pretty powerful resume templates. Below are the 10 templates I liked out of 90.

* https://www.figma.com/community/file/777098881940669714/CV-%2F-Resume
*  https://www.figma.com/community/file/777103298089367827/Resume_Muazzim
* https://www.figma.com/community/file/831204680749784047/Resume-with-auto-layout
* https://www.figma.com/community/file/852140739754968644/Resume-Templates---Free-to-Use!
* https://www.figma.com/community/file/925542319855897376/Student-Resume
* https://www.figma.com/community/file/917289290105413974/Figma-Resume-Templates-%5BCommunity%5D
* https://www.figma.com/community/file/886062368728147747/Resume-Template
*  https://www.figma.com/community/file/852514916030801509/Resume-Template
* https://www.figma.com/community/file/889120223696258064/Modern-Resume-Template
*  https://www.figma.com/community/file/830767196413695972/Resume-%26-Cover-Letter-Template 

**Pros:**
* These templates are very nice to give a first impression of yourself.
* You need to have a knowledge on how to use Figma. If you don't, then you can learn Figma and work on your resume as a project.😉

**Cons:**
* Figma does not give *hyperlink* feature. 😭
how to get a mentor with no dollar
Tags: mentor, mentee
Published: 2021-04-20 13:24:43

---
title: how to get a mentor with no dollar
published: true
description: 
tags: mentor, mentee
//cover_image: https://direct_url_to_image.jpg
---

coding coach seems to be a cheap solution but what if even that is and issue.
it is a likely that when you are beginning as a coder you might not have recourse to any extra money how to get a  mentor to guide studies and help with codereviews etc
discord seems to be the right place to investigate?
without much money and worse + with an introverted character i  found it very difficult to get one + worse as i have a mental illness one of the symptoms gives me a withdrawal from social engagements
well i think I have found someone but keeping up with regular questions or codereviews or pair programming.
 This is more of a journal post rather than an informative guide.
Day 4 - "dayofcovid" Sad and Crazy Covid situation :(
Tags: news, 100daysofcode, computerscience, webdev
Published: 2021-04-20 13:16:32

I am a resident of India, and the covid situation is crazy here, as it is around the world. Hospitals are out of bed, crematoriums are outmanned and running low on resources.

My family too was hit we had our first symptoms around 6th or 7th April, even though it was just my RT-PCR test that turned out to be positive, out of the four of us. I had to wait for ~5hours just to get my sample collected on 10th April. I knew then the situation is grim and the situation had just started to get worse.

Check out :- https://news.google.com/covid19/map

I was lucky to have endured through it without loss of taste or smell, which made it slightly bearable for us, and thankfully we didn't have to get anyone of us hospitalized. 
But other families around us, and across India were not as lucky.
Hospitals have run out of bed People are travelling hundreds of kilometres just to get their loved ones adequate medical attention. Worst hit are those who have had to helplessly watch their loved ones die in front of them.

As of writing this article, the death toll stands at 180,550 and covid cases 15,321,089. [Source](https://www.worldometers.info/coronavirus/country/india/)
![Covid stats](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/09jj1x2ocoxmgxljzmdo.PNG)

I personally know ~10+ families that are going through these difficult times. In the last 2 weeks, I have heard of 5 deaths, of family friends and relatives. These are not normal times, the second wave has had a serious impact. If you have not been monitoring the situation, I urge you to do so.

Yesterday, my 100daysofcode challenge was abrupted because I spent my whole day connecting with friends and family members worried it might be the last I hear of them or from them :worried:

As developers, most of us are blessed to have the ability to work in the safety of our homes and keep our families safe. I appeal to you all to make the best out of it. Whatever your stand on remote work might be understand that these are troubled times and that working from home is a necessity, and I mean work from "home" not work from "beach" etc.

I don't know how the future of remote work, crypto, pharma or travel industry might turn up to be, but I know one thing for sure none of us would enjoy a future without our closed ones, or would want to be part of the future where we were directly or indirectly responsible for the death/suffering of our loved ones. 

Consider yourself lucky to be reading this, thousands are dead, other thousand are in shock. You don't want to be +1. Covid is a shitty disease it screws up in unimaginable ways.

Stay indoors, be responsible. :pray:
Wear your mask as if they were the oxygen masks because there are none available at the hospitals. Wear it as if your life depends on it. :mask:

Please share your experiences of these horrid times, so that if my appeal fails to convince. Hopefully, some of your experiences or comments might make people realize the depth of the situation at hand. :pray:
Darkside Termux – Tool Information Gathering & Social Engineering
Tags: darkside, termux, informationgathering
Published: 2021-04-20 13:16:15

Social Engineering Trojan tools are installed on the victims’ computers and then use them to distribute other malicious payloads. After installation, the backdoor can listen on all network interfaces and is able to send out different indicators of compromise. KIS was first discovered on Friday and researchers note that their backdoor has already successfully been implemented in banking Trojans. This particular backdoor banking Trojan has a proof-of-concept available here. Rick Sanatorium attacks Anthem for Hacking .
https://cometolearnofficial.blogspot.com/2021/04/darkside-termux-tool-information.html
react context API empty in childs after build with rollup
Tags: react
Published: 2021-04-20 12:56:31

Hello, 
I have created a Server side table component which is quite complex and to manage the interactions with the filters I have used a context provider which encompasses the whole component. During the development on a test project I didn't have any problem, only after building it to make a library with rollup I had some problems, especially this one.

When importing the library in my main project, nothing works because the state of the context retrieved by the children is always empty (useContext).
Searching on internet I have the impression that it is a problem of context conflicts, but trying several solutions nothing works...

Here is the state of the context in the react dev tools :
https://ibb.co/ChYkHm9

and here is the state retrieved by the children:
https://ibb.co/ZcCtV8R

You can find repo of the component here (for the config and main code), the main component being ServerSideTable : https://github.com/iMinosGFX/react-server-side-table

Could you tell me after building the component and using it on another project, the children don't get the data?

Thanks a lot !
How to send youtube subscription link.
Tags: youtube, subscriptionlink
Published: 2021-04-20 12:54:40

### We can send our youtube channel subscription link to other's using the sub_confirmation = 1 paramter in the url.

##### Note: Unfortunately this works only on desktop and not on mobile.


##### For example my youtube url:
https://www.youtube.com/channel/UCajNSAb41SHFYAsCJxUKIMw?sub_confirmation=1

replace the UCajNSAb41SHFYAsCJxUKIMw with your channel id.

[If you like the above post please subscribe my channel](https://www.youtube.com/channel/UCajNSAb41SHFYAsCJxUKIMw?sub_confirmation=1) :-)
Change picture on hover with Vue
Tags: vue
Published: 2021-04-20 12:25:34

For example, you want to make a portfolio of your projects. It would be a cool feature on your website to have the picture of your project move on hover.

With this small tutorial, it will allow you to activate a .gif when hovered over a picture.

## 1. Set up vue project

Create your vue-project, follow the steps and `cd` into it.

```terminal
vue create vue-hover-picture
```

## 2. Clean up project

For this, we'll stick to the `HelloWorld.vue` component. Get rid of all the code in both `HelloWorld.vue` and the `App.vue` component.

Load the image in the `HelloWorld.vue` component, like below.

```js
<template>
  <div class="hello">
    <img :src="pictureStatic">
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      pictureStatic: require("../assets/todo.png")
    }
  }
}
</script>

<style scoped> 
img {
  height: 500px;
}
</style>
```

We now have a picture loaded in our component. We want this picture to become a `.gif` when we're hovering.


## 3. Hover function

In vue, we can use `@mouseover` and `@mouseleave` events. We can pass in the boolean `hover` where it will be `true` in the `@mouseover` event and, surprise, `false` with `@mouseleave`.

As we're using this in our code and using it further on in a function, add it to our data and set it to `false`. Let's also import our `.gif`.

```js
export default {
  name: 'HelloWorld',
  data () {
    return {
      pictureStatic: require("../assets/todo.png"),
      pictureGif: require("../assets/todo.gif"),
      hover: false
    }
  }
}
```

Next, we are going to use a function to determine the `src` of our image, whether it's hovered or not. 

Add the `computed` part and write a new function, let's call it `pictureHover`. So we can write out a simple function, using `hover` as our conditional statement.

```js
computed: {
    pictureHover () {
      if (this.hover == true) {
        return this.pictureGif
      } else {
        return this.pictureStatic
      }
    }
  }
```

Now we should change our html code of the image. We can pass in this function `pictureHover()` to our `src` attribute of our image:
```js
<img :src="pictureHover" @mouseover="hover = true" @mouseleave="hover = false">
```

And that's it! You can now put in a small live preview of your project when people hover over the picture.

![dev](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ud18lqugq1lqopre7nql.gif)