teleren/devto huggingface dataset:
Mapping with SCHEMA
Tags: oracle, micronaut, jdbc
Published: 2022-10-15 23:58:43

Una mala práctica en la configuración de aplicaciones, es usar el _owner_ del esquema para acceder a la base de datos.
Es recomendable crear una cuenta de usuario y otorgar los permisos necesarios y específicos.

Pongamos como ejemplo:
- **ESQUEMA**: REGIONALIZACION
- **USUARIO**: MSPRODUCTOSWOW
- **PERMISOS**: 
```sql
-- Oracle
GRANT SELECT, INSERT, UPDATE 
ON REGIONALIZACION.LGT_PROD_LOCAL_OFERTA_AUX 
TO MSPRODUCTOSWOW
```

---

Empleando las anotaciones de Jakarta Persistence, definimos el mapping de nuestra Entity: name/schema. 
 
```java
import jakarta.persistence.*;

@Table(name = "LGT_PROD_LOCAL_OFERTA_AUX", schema = "REGIONALIZACION")
public record WOWProduct(@EmbeddedId WOWProductId id,
                         float porcDctoOferta,
                         LocalDateTime fecIniVigOferta,
                         LocalDateTime fecFinVigOferta,
                         String usuCreaProdLocOfe,
                         LocalDateTime fecCreaProdLocOfe) {
}
```
Nótese que podemos usar _record_, incluso para definir una llave compuesta.
```java
@Embeddable
record WOWProductId(
        @Column(name = "COD_GRUPO_CIA") String codGrupoCia,
        @Column(name = "COD_LOCAL") String codLocal,
        @Column(name = "COD_OFERTA") String codOferta,
        @Column(name = "COD_PROD") String codProd) {
}
```

Ejecutamos nuestro proyecto basado en #Micronaut:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dduj691vh960zfb1et5x.png)

Y al listar los productos:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xeby3jyiva7vakg9v8em.png)


---
## Documentación
https://micronaut-projects.github.io/micronaut-data/latest/guide/#sqlAnnotations
https://github.com/edgargs/mn-jdbc-schema
is there a CMS that produces social networks or communities?
Tags: programming, codenewbie, wordpress, help
Published: 2022-10-15 23:31:17

I started programming a few months ago, and I realised that creating a facebook on a particular topic (theme) is hard work for a beginner, I want to do it, but more in the long term. Do you know if there is any specialised CMS that could help me to create a social network and community? members could send chat messages to each other, have a wall, a forum?

Thanks and best regards
Understanding "git rebase" and "git commit amend"
Published: 2022-10-15 23:15:41

This week in OSD600, we learned about how to clean up our git history.

We were first tasked with making a few improvement to our code base. 

I chose to improve my program by:

1. Separate text file handling
2. Separte markdown file handling
3. Utilizing fs.rmSync() for deleting the /dist folder instead of my previous method (using readderSync to find contents of /dist folder, and then calling unlinkSync). 

Using git rebase to "squash" all my commits into a single commit was definitely interesting. I didn't know this was a possibility, and in one of my Hacktoberfest PRs I actually have 10 commits for one feature upgrade - I plan on using git rebase to "squash" this down to 1 commit for cleanliness. 

Then using git commit ammend to modify the commit message was also a neat feature, and the ability to quickly add something to the previous commit (as I have multiple times found things I've missed right when I've commited something). 

These two are definitely features that I'll be using more often in the feature!
My Second Hacktoberfest PR
Tags: beginners, opensource, nextjs, webdev
Published: 2022-10-15 21:19:55

## What I Worked On
I finished my second Hacktoberfest PR on [reddit-image-viewer](https://github.com/gregrickaby/reddit-image-viewer) which allows users to brows reddit anonymously and purely viewing the post contents. I tried to tackle something a little more difficult this time, since my first PR was quite simple. The [issue](https://github.com/gregrickaby/reddit-image-viewer/issues/391) I decided to work on was to use [hls.js](https://github.com/video-dev/hls.js/) for the video posts retrieved from reddit. Without using hls, the videos that were being retrieved did not have sound.

## The Learning Curve
The project was created using NextJs, which I had not used before. While I do have experience creating projects in React, there were small differences with NextJs that were not familiar to me. After wrestling with getting my component to work properly, I had to then play around with the props being sent to it in order to get my video player functioning properly. I also needed to refresh myself on how video elements worked in HTML, since I had only learned how to use them and never used them in practice. 

## My Contribution
For my [PR](https://github.com/gregrickaby/reddit-image-viewer/pull/407), I added a new module, created a new HlsPlayer component and integrated it into the existing Card component. The HlsPlayer component simply made use of the hls.js methods and created an hls video player with the incoming props. If the client's browser did not support hls, then a fallback video player and url are used instead. 

![The videos now have sound](https://user-images.githubusercontent.com/61764259/196004977-df3e4520-55d1-4254-b7f0-2e97437d9f31.png)

## Difficulties
It took me a few days to actually get my component to work, since it had been a while since I worked with React. I also had issues importing and installing the hls.js modules, since it was not entirely clear to me how it was supposed to be installed. At first I used a script tag, but that had issues with NextJs. Then I used the npm package for hls.js instead which got me closer to what was intended. It was also a problem getting the props to work properly with the video element, since different types of videos used different props.
help on deploying angular app on netlify
Tags: question, angular, netlify
Published: 2022-10-15 21:17:35

hello guys, i'm trying to deploy my anagular app to netlify but when i deploy i get the following error, can anyone help me out, how do i fix this  

```
9:41:28 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
9:41:29 PM: npm ERR! code ERESOLVE
9:41:29 PM: npm ERR! ERESOLVE could not resolve
9:41:29 PM: npm ERR!
9:41:29 PM: npm ERR! While resolving: @angular/compiler-cli@14.2.6
9:41:29 PM: npm ERR! Found: @angular/compiler@14.0.3
9:41:29 PM: npm ERR! node_modules/@angular/compiler
9:41:29 PM: npm ERR!   @angular/compiler@"^14.0.2" from the root project
9:41:29 PM: npm ERR!   peer @angular/compiler@"14.0.3" from @angular/platform-browser-dynamic@14.0.3
9:41:29 PM: npm ERR!   node_modules/@angular/platform-browser-dynamic
9:41:29 PM: npm ERR!     @angular/platform-browser-dynamic@"^14.0.2" from the root project
9:41:29 PM: npm ERR!
9:41:29 PM: npm ERR! Could not resolve dependency:
9:41:29 PM: npm ERR! peer @angular/compiler@"14.2.6" from @angular/compiler-cli@14.2.6
9:41:29 PM: npm ERR! node_modules/@angular/compiler-cli
9:41:29 PM: npm ERR!   @angular/compiler-cli@"^14.0.2" from the root project
9:41:29 PM: npm ERR!   peer @angular/compiler-cli@"^14.0.0" from @angular-devkit/build-angular@14.0.3
9:41:29 PM: npm ERR!   node_modules/@angular-devkit/build-angular
9:41:29 PM: npm ERR!     dev @angular-devkit/build-angular@"~14.0.3" from the root project
9:41:29 PM: npm ERR!   2 more (@angular/localize, @ngtools/webpack)
9:41:29 PM: npm ERR!
9:41:29 PM: npm ERR! Conflicting peer dependency: @angular/compiler@14.2.6
9:41:29 PM: npm ERR! node_modules/@angular/compiler
9:41:29 PM: npm ERR!   peer @angular/compiler@"14.2.6" from @angular/compiler-cli@14.2.6
9:41:29 PM: npm ERR!   node_modules/@angular/compiler-cli
9:41:29 PM: npm ERR!     @angular/compiler-cli@"^14.0.2" from the root project
9:41:29 PM: npm ERR!     peer @angular/compiler-cli@"^14.0.0" from @angular-devkit/build-angular@14.0.3
9:41:29 PM: npm ERR!     node_modules/@angular-devkit/build-angular
9:41:29 PM: npm ERR!       dev @angular-devkit/build-angular@"~14.0.3" from the root project
9:41:29 PM: npm ERR!     2 more (@angular/localize, @ngtools/webpack)
9:41:29 PM: npm ERR!
9:41:29 PM: npm ERR! Fix the upstream dependency conflict, or retry
9:41:29 PM: npm ERR! this command with --force, or --legacy-peer-deps
9:41:29 PM: npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
9:41:29 PM: npm ERR!
9:41:29 PM: npm ERR! See /opt/buildhome/.npm/eresolve-report.txt for a full report.
9:41:29 PM: npm ERR! A complete log of this run can be found in:
9:41:29 PM: npm ERR!     /opt/buildhome/.npm/_logs/2022-10-15T20_41_28_030Z-debug-0.log
9:41:29 PM: Error during NPM install
9:41:29 PM: Build was terminated: Build script returned non-zero exit code: 1
9:41:29 PM: Creating deploy upload records
9:41:29 PM: Failing build: Failed to build site
```
My First Post here
Published: 2022-10-15 22:20:41

Disclaimer: These posts are my personal opinions and derive from my own experience or research, but may not necessarily be the best approach to solve the given problems.
I am a programmer and English is not my first language so please bare with my bad language and writing skills.
I write these posts mainly to help myself remember some of the issues I have faced and how I have solved it. Either way, I hope they can also help others facing similar issues.
Week #2&3: Still learning
Tags: firestarters, global, sideprojects
Published: 2022-10-15 22:09:35

## Should we begin?

Yes, we should. The [Firestarters](https://transparentworld.pl/firestarters/) Global Quest started like 3 weeks ago, and it was a thing. A lot of plans, hopes and expectations. But the life happened…

## Summary

All the few hours I managed to get out of my work&family calendar I devoted for studies on [eduworlds](https://eduworlds.com/en/). The hardest thing right now is catching the wind in the sails and getting on with the job. Do you know how to find the missing “in the meantime”?

Calculations stay the same for previous weeks.

Expenses: 0 PLN
Incomes: 0 PLN

*If I had six hours to chop down a tree, I’d spend the first four hours sharpening the axe.* - Abraham Lincoln
Learn how to build a netcat clone in Rust
Tags: rust, networking, tutorial, programming
Published: 2022-10-15 21:16:16

Check out the first part of a series I'm working on over on [YouTube](https://youtu.be/LvG4qOvowjk). My plan is to build a netcat clone in Rust and make videos explaining the interesting parts of the programming.

Feedback welcome and if you're intested in seeing the code it's all available on [GitHub](https://github.com/dionysus-oss/netrusting).


Photo by <a href="https://unsplash.com/@moritz_photography?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Moritz Kindler</a> on <a href="https://unsplash.com/s/photos/network?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
WebDEv setup in VS code
Published: 2022-10-15 20:54:24

``Ensure `node` and `npm` are installed to enable automatically reporting issues in source files pertaining to accessibility, compatibility, security, and more.

```
HI DEV's, 
i need guidance on how to ensure everything works well with my Web Development setup in VS code. I bet the way to solve this should be pretty easy but I just want to hear how to properly set it up, from an expert if can. 
```
My First Hacktoberfest PR
Tags: beginners, opensource, go
Published: 2022-10-15 20:52:50

## What I Worked On
It was a struggle finding a good issue to work on, but finally I finished my first Hacktoberfest PR on [Golly Bot](https://github.com/ACM-VIT/golly-bot). This is a Discord bot that is written using Go. The [issue](https://github.com/ACM-VIT/golly-bot/issues/59) was adding a feature to a Discord bot that sent a message every time a user leaves a channel. I had learned the syntax for Go very briefly through working on another repo that used Go, but I was not familiar with how to make a Discord bot. 

## The Learning Curve
I had no idea how Discord bots worked, so had to follow some instructions in order to get it set up. I had to access the Discord developer portal to set up the bot and obtain a few keys. Then I needed to create a Discord server to test the bot in. After that, the process of testing the bot was straightforward. The initial setup of the bot had somewhat of a learning curve, since I was not familiar with Discord bots. Then, since I was not very experienced in Go, reading the source code for the bot took a little more effort. 

## My Contribution
My [PR](https://github.com/ACM-VIT/golly-bot/pull/60) was heavily built off the structure of an earlier PR which sent a welcome message when a user joined a channel. It heavily uses the discordgo module that was designed for creating Discord bots using Go. It sends a message that tags the leaving user as well as embeds a stock image to the message. Then it sends that message to the general chat if it is available, or any other channel if a general chat does not exist. 

![The bot in action](https://user-images.githubusercontent.com/61764259/195677312-59f8be33-92ce-40f6-8b7b-724b1c47f08f.png)
How to switch multiple accounts for GCP gcloud command
Tags: gcp
Published: 2022-10-15 20:49:05

If you have two accounts below:

- Sample account 1
 - config name: account1
 - project ID: hoge-fuga-123
 - account: sample@account1.sample
- Sample account 2
 - config name: account2
 - project ID: hoge-fuga-456
 - account: sample@account2.sample

-----

STEP 1. create configuration set for account1

```
% gcloud config configurations create account1
Created [account1].
Activated [account1].
```
```
% gcloud config set project hoge-fuga-123
Updated property [core/project].
```
```
% gcloud config set account sample@account1.sample
Updated property [core/account].
```

STEP 2. create configuration set for account2
```
% gcloud config configurations create account2
Created [account2].
Activated [account2].
```
```
% gcloud config set project hoge-fuga-456
Updated property [core/project].
```
```
% gcloud config set account sample@account2.sample
Updated property [core/account].
```

STEP 3. switch to account1 and check config
```
% gcloud config configurations activate account1
Activated [account1].
```
```
% gcloud config list
[core]
account = sample@account1.sample
disable_usage_reporting = False
project = hoge-fuga-123

Your active configuration is: [account1]
```

STEP 4. switch to account2 and check config
```
% gcloud config configurations activate account2
Activated [account2].
```
```
% gcloud config list
[core]
account = sample@account2.sample
disable_usage_reporting = False
project = hoge-fuga-456

Your active configuration is: [account2]
```

-----

GCP original reference page: [https://cloud.google.com/sdk/gcloud/reference/config/configurations/](https://cloud.google.com/sdk/gcloud/reference/config/configurations/)
JavaScript: Test with mocha
Tags: javascript, beginners
Published: 2022-10-15 20:36:53

1. *test suite* is a collection of tests for a web application. To run a test suite, do `npm test`
2. the test file for `index.js` should be named as `index-test.js`
3. testing types:
 * unit test: test the smallest unit of the code
 * integration test: test the interaction between **internal services** inside the web application
 * End to End test: real user experience
4. test with mocha:
 * `npm init -y` to create a package.json file for managing packages.
 * install mocha by `npm install mocha -D` so it's saved under `devDependencies` in package.json, which means it's only included during development mode not in the production bundle.
 * change the value of "test" in "script" object to `mocha` 
 * run `npm test` to start the test
5. `describe` and `it` funcitons accept two parameters, one is the descriptive message, the second one is the call back funciton.
6. The callback function should has *setup*, *execise*, *verify* and *teardown* sections.
 * variables are declared in setup section
 * execute functions in execise section
 * and verify the result with the expectedValue 
 * teardown makes the tests isolated so it's not affected or affecting other tests.
7. Hooks can make setup and teardown easier. (**Note**: The example below works for mocha, it may vary in other test package)
 * `beforeEach(callback)` callback is run before each test
 * `afterEach(callback)` callback is run after each test
 * `before(callback)` callback is run before the first test
 * `after(callback)` callback is run after the last test
8. TDD stand for test driven development, it is guided by red-green-refactor cycle. The test is first written, then write the minimum amound of implement code to pass the test and then refactor the code.
9. *code coverage* can depend on:
 * function coverage: all the funcitons are called
 * statement coverage: all the statements are run?
 * path coverage: every edge?
 * condition coverage: both the boolean value tested?


[reference from codecademy](https://www.codecademy.com)
Hello from Steem
Tags: welcome, firstpost, hello
Published: 2022-10-15 19:29:23

Hello, World!

I am a top witness on [steem blockchain](https://steemyy.com).

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jrora2pbzetwtq7hmahu.jpg)

I am also blogging on [Algorithms, Blockchain and Cloud](https://helloacm.com)

I teach my sons programming for more than 500 days. Here is my [Youtube Channel](https://youtube.com/c/DoctorLai) also the list of talks can be found [here](https://zhihua-lai.com/teaching/)
Hello World!
Tags: beginners
Published: 2022-10-15 19:26:17

[![profile](https://img.shields.io/badge/GitHub_-Profile-2ea44f?style=for-the-badge)](https://github.com/kurtissfrost)

---

Hello and welcome to the blog. This place will most be for my rants, talks, discussions about what I've learned, things I want to learn. and just a general catch all for the thoughts that run through my mind on the daily.

Though there is nothing on it yet, feel free to hop over to my GitHub page to keep up to date on when I start uploading things.

I am also currently in the process of creating a website portfolio. Not only is it a fun way for me to learn some html but, it is also an excuse for me to work on graphics (which I love doing).

Thanks for dropping by and checking out the blog. Have a wonderful day/night, and I'll see you around!


![signature](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6mdhn9nedjfu8m6nocw.png)
Hacktoberfest
Tags: hacktoberfest, javascript, webdev, programming
Published: 2022-10-15 19:13:36

Do you want to become a project maintainer during hacktoberfest ? Here is  a simple guide for you.

### Topic

You should add the topic `hacktoberfest-2022` and `hacktoberfest` to your github repository.


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

### Issue

Create an issue on your project and add the following labels `hacktoberfest` and `hacktoberfest-2022` to your issue. This will notify GitHub users that your project is open for contribution.

### Contributing

If you want to find a project you can contribute to on GitHub, you can use this query on GitHub to find projects.

`label:hacktoberfest is:issue is:open`

With this query, you will find projects that have the label **hacktoberfest** and has an **open issue**

## Reference

[What is Hactoberfest and How One Can Take Participate in it?](https://www.geeksforgeeks.org/what-is-hactoberfest-and-how-one-can-take-participate-in-it/)


<a href="https://www.buymeacoffee.com/ifeanyichima" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/default-orange.png" alt="Buy Me A Coffee" height="41" width="174"></a>


**Thank you, please follow me**

[![HTML](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/ifeanyi-thankgod-chima)&nbsp;[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/masterifeanyi)
React Design Pattern -- Container Pattern
Tags: react, designpatter, cleancode, javascript
Published: 2022-10-15 18:55:57

Hi Guys. 
I'm very happy to share with you my first post in this great website.
So, in this post, I will talk about container pattern.
The Container Design pattern(or simply Component pattern) ensures to separate the data fetching logic, managing state from the presentational part. The presentational part has got a dumb name, dumb component. It is because the responsibility of the presentational part is just to render the information passed to it. The smart work of data fetching, working on it, and state management occurs elsewhere.
When you come to meet for a job as a React developer, or any programming language
The most important thing they focus on is the way you write the code in your projects. So that they can see if you can make a component that is usable, maintainable, upgradable or not…
Many programmers, especially beginners, overlook this thing. The purpose is not that you are making a code and it will be executed, and salvation. The purpose is that you make a code that can be tested, maintained, and used in the future. The company that will hire you will work with it. Its projects go through many stages and sometimes they change back to the previous job based on the feedback, the right of the customer, or sometimes it is in development, and this thing needs code to be implemented in an architecture which is Good, clean, bug-free, and code ramifications.
Today I will talk about a pattern for writing code in React, this pattern is called container design pattern. 
In short, this pattern is very, very important, especially when you have to fetch data from the server. The idea is of this type, we can summarize it as
The component doesn't know where the data comes from..
In the sense that the component belongs to you, you leave it in a container, and the container is the one who performs the process of fetching the data and based on the data, the component will be displayed for you..
For example, if you have a component that displays the details of the video inside the card, and a second component that displays the details of a movie inside the card as well.
We want to make a container that we can use with the two components, so that the component does not have any relationship from where the data will come or how it will come. Or how many cards will be displayed or how long the data will come. The code will be like this
<Container resourceUrl='userLink' resourceName='user'>
<User/>
<Container/>
<Container resourcrUrl='moviesLink' resourceName='movie'>
<Movie/>
<Container/>
Here, if we have, for example, a thousand users, and a thousand movies, they will be shown very naturally, without having anything to do with the data coming from where. Of course, we can use the container to put any other ingredient in it.
The entire code is available on my GitHub account, so you can view it and take it and modify it as well. It will help you a lot..

[https://github.com/MhdGmal1998/react-design-patter-container/](Project Repo in GitHub)
#react
#reactdesignpatter
#cleancode
#designpattern