teleren/devto huggingface dataset:
What is generics in java?
Published: 2022-06-22 05:32:58

Generics is used to make java type safe at compile time. 
Generics to used to reduce boxing and autoboxing in java.
Generics is used where a class can take all the datatype in the java and store them. it is most commonly used in collections class. 

class Example<T>{
private T t1
public Example(T t1){
this.t1=t1
}
}
Nhà Thuốc Vivita - Hàng Luôn Luôn Mới
Tags: nhathuocvivita, vivita, hangluonluonmoi
Published: 2022-06-22 05:30:29

Nhà thuốc Vivita là hệ thống bán lẻ sản phẩm sức khoẻ chính hãng với ngày sản xuất được đảm bảo còn mới khi đến tay khách hàng từ đó đảm bảo chất lượng góp phần hỗ trợ điều trị bệnh và bảo vệ sức khoẻ cho người Việt Nam.
Địa Chỉ: 58 Trần Quý Cáp, Phường 11, Bình Thạnh, Thành phố Hồ Chí Minh
Sđt: 0906 999 452
Website: [https://vivita.vn/]
Map: [https://goo.gl/maps/efW6xa6RNBbfVEi87]
Fanpage: [https://www.facebook.com/Vivitahangluonluonmoi/]
Youtube: [https://www.youtube.com/c/Nh%C3%A0Thu%E1%BB%91cVivita]
Titkok: [https://www.tiktok.com/@nhathuocvivita]
Zalo: [https://zalo.me/1011130656165947460]
Soundcloud: [https://soundcloud.com/nhathuocvivita]
Flickr: [https://www.flickr.com/people/nhathuocvivita/]
Twitch: [https://www.twitch.tv/nhathuocvivita]
Linkedin: [https://www.linkedin.com/in/nhathuocvivita/]
Pinterest: [https://www.pinterest.com/nhathuocvivita/]
Twitter: [https://twitter.com/nhathuocvivita]
Tumblr: [https://nhathuocvivita.tumblr.com/]
Continue using GitHub Copilot?
Tags: github, githubcopilot, discuss
Published: 2022-06-22 05:25:32

GitHub's AI pair programmer tool **Copilot**, has moved from Insider Preview status to prime-time Production for all. With this move, Copilot is now yet another subscription service at  **$10/month** to use its admittedly powerful features.

So my question is this; to anyone who has any experience using Github's Copilot, have you found it useful enough to justify spending $10 a month on it? And if so, how do feel about adding *another* monthly subscription to the ever-growing list?

**Edit:** I personally will continue using Copilot.
Implement Error Handling in Golang
Tags: beginners, go, programming, productivity
Published: 2022-06-22 05:06:15

When you write a program and it won't behave as the way you expected it may cased by some external factors and that you can't control like other processes blocking a file, or an attempt to access a memory address that not available anymore.

It's better if you anticipate those failures so you can troubleshoot problems when they happen.

Go's approach for exception handling is different, and so is its process for error handling. In Go, a function that could fail should always return an additional value so that you can anticipate and manage a failure successfully. For example, you could run a default behavior and log as much information as possible to reproduce the problem and fix it.

Before starting this make sure you have Go environment ready, you should have installed and configured Go locally and installed Visual Studio Code with the Go extension.


## Handle errors in Go

You need to manage your program failures your users don't want to see a long and confusing stack of error record, it's better if they see meaningful information about what went wrong. 

Go has built-in functions like **panic** and **recover** to manage exceptions, or unexpected behavior, in your programs. But errors are known failures that your programs should be built to handle.

Go's approach to error handling is simply a control-flow mechanism where only an **if** and a **return ** statement are needed.


```
employee, err := getInformation(1000)
if err != nil {
    // Something is wrong. Do something.
}
```

when you're calling a function to get information from an employee object, you might want to know if the employee exists. Go's opinionated way for handling such an expected error.

Notice how the function returns the employee struct and also an error as a second value. The error could be nil. If the error is nil, that means success. If it's not nil, that means failure. A non-nil error comes with an error message that you can either print or, preferably, log. This is how you handle errors in Go.
How to create a voice to read movie reviews
Tags: webdev, productivity
Published: 2022-06-22 05:03:40

Her voice reading movie reviews, movie synopsis "Gu Go" has been storming on social networks since a few years ago. Movie review videos from this voice reader have received many positive signals from the community. The number of interactions, comments and views of these videos increased rapidly. Catching up with the movie review trend, Vbee has created many new free movie review voices with high applicability and naturalness. Suitable for short video producers to review movies, summarize movies on social networking sites. For example, video platforms Youtube, Tiktok, Facebook, etc.
See more: https://blogs.vbee.vn/
AI solutions to improve image quality in one click.
Tags: webdev, tutorial, productivity, github
Published: 2022-06-22 04:59:39

Just launched the new feature: [VanceAI Image Enhancer](https://vanceai.com/image-enhancer/), which allows users to get rid of noises and blurs and increase the resolution in one click!
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rgmyfh3t5pbf91h6zm2s.png)
Getting Started with the Vue Polar and Radar Chart Components
Tags: vue, webdev
Published: 2022-06-22 04:36:48

Learn how easily you can create and configure the Vue [polar and radar charts](https://www.syncfusion.com/vue-ui-components/vue-charts) of Syncfusion in a Vue app using Visual Studio Code. You will see how to render the Vue radar and polar charts with basic features like data markers, series plotting types, and tooltips. 

**Product overview**: https://www.syncfusion.com/vue-ui-components/vue-charts

**Explore our tutorial videos**: https://www.syncfusion.com/tutorial-videos

**Download the example from this GitHub link**: https://github.com/SyncfusionExamples/getting-started-with-the-polar-and-radar-chart-in-vue

{% youtube cWkM_9kWqzM %}
Build Cloud Native Web Application and Deploy Using Only Browser
Tags: cloudnative, kubernetes, webdev, techtalks
Published: 2022-06-22 04:30:57

No need to have local setup with Visual Studio Code, Docker Runtime and few other things which you may need to develop a simple cloud native web application, containerize it then deploy to Kubernetes. In this demo all I am using is the set of browsers and no local installation. Enjoy this 21 min demo how you can make your life simple and still can learn all the latest and greatest ones. 
https://youtu.be/1Z8s_SBpgvI
{% youtube 1Z8s_SBpgvI %}
Lonely Integer - Hackerrank Challenge in Javascript
Tags: algorithms, javascript, tutorial, programming
Published: 2022-06-22 03:55:50

```js
function lonelyinteger(a) {
    
    // destructure the first (and only) element, sort then reduce
    const [lonely] = a.sort((a, b) => a - b).reduce((acc, curr) => {      
        // here we'll start the reduce with an empty array and check
        // if the current integer is already on the array
        if(!acc.includes(curr)) {
            // if not, we'll add it
            acc.push(curr)
        } else {
            // if so, we'll remove the last element.
            // This way we'll be removing all duplicates
            acc.pop()
        }
        
        // return the array to the next iteration
        return acc
    }, [])
    
    return lonely
}
```
An easy way to keep iframe with 16:9 aspect ratio without outer div (Pure CSS)
Tags: css, html
Published: 2022-06-22 03:31:40

Youtube video provides a embedded code to let us embed iframe in our web page. However, we need the youtube video on the page to keep aspect ratio 16:9.

There is an easy way to do this, a pure css code aspect-ratio property as below code:

```
iframe {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}
```

We keep the width 100% and height auto, and also keep the aspect ratio with 16:9. 

There is an example:

https://codepen.io/timhuang/pen/BaYdMmN

And also check the aspect-ratio property browser compatibility: 

https://caniuse.com/mdn-css_properties_aspect-ratio

Most browsers support this property, but some old browsers don't support, we can use old way with an outer div, also check this post:

https://dev.to/jh3y/css-aspect-ratio-2k6o (Thanks Tompkins https://dev.to/jh3y)

Happy coding!!
Datatable Server Side Custom Search/Filter In Laravel
Tags: laravel, php, jquery, filter
Published: 2022-06-22 03:21:47

In this article, we will see datatable server-side custom search in laravel 8. Datatable provides default searching functionality but there you can search on only visible values searching. like in your data table you show only "user_name" and "email" then you are only able to search on those two fields values.

So, let's laravel 8 datatable custom filter, how to custom search in datatable in laravel 8, custom search in datatable laravel 8, server side datatable search in laravel 8.

Here we will see how to custom search in datatable in laravel, if you want to filter hidden data from the database then you need to add datatable custom search or laravel datatable custom filter.

```
Step 1 : Create Route for Server Side Custom Search in Datatable

Step 2 : Add Code In Controller

Step 3 : Make Changes in Blade File
```

---

**_[Read More: Datatable Server Side Custom Search/Filter In Laravel](https://techsolutionstuff.com/post/datatable-server-side-custom-search-filter-in-laravel)_**
Apache setup for C++ .cgi (Ubuntu)
Tags: cpp, ubuntu
Published: 2022-06-22 03:14:43

Enable CGI module
```bash
$ sudo ln -s /etc/apache2/mods-available/cgi.load /etc/apache2/mods-enabled/
```
Add this configuration inside `<Directory /var/www/>` on `/etc/apache2/apache2.conf`
```conf
<Directory /var/www/>
  Options +ExecCGI
  AddHandler cgi-script .cgi
</Directory>
```
Restart Apache2
```bash
$ systemctl restart apache2
```
Compile your cpp file and put to `/var/www/html/`
```bash
$ sudo g++ FILENAME.cpp -o /var/www/html/FILENAME.cgi
```
tig blame online
Tags: git, github, tig, productivity
Published: 2022-06-22 02:38:07

## tig
`tig blame` looks like having been loved for a while in CLI environments when looking into Git history.

But where can we find `tig blame` online?

## Candidates I can imagine
- vscode.dev extension (VSCode for Web)
   - for GitLens https://gitlens.amod.io/

### Resource

- tig: https://github.com/jonas/tig
- https://dev.to/sobolevn/using-better-clis-6o8
Keeping your code DRY
Published: 2022-06-22 02:24:40

## Hello World!
### Welcome to my first ever blog post!

I thought I would start with something that took me some time to get used to: 

* Keeping your code **DRY**.

DRY stands for Don't Repeat Yourself, which I have a hard time with in my day-to-day interactions, so you can imagine how writing DRY code could be quite foreign to me!

How do you write DRY code?

Well, let's first look at some WET (Write Everything Twice) code.

Let's say you're iterating over an array:
 `let array = [1, 3, 6, 9]`
We want to increase each number in the array by 1, so our result would be:
`[2, 4, 7, 10]`
Here's what that would look like:

```
function increaseByOne(array) {
  for(let i = 0; i < array.length; i ++) {
    array[i] += 1
    }
  return array;
}
```

This looks like a nice snippet of code, right?

And it definitely gives us the output we're looking for!

Well, if you *really* look at it, a few things could be improved!
First of all, we can only use this to add 1 to each number in the array.
What if we wanted to subtract 1? Or multiply by 2?
We would have to write an entirely new function and it would definitely be WET:

Let's take a look at how we would write a function to multiply by 2 in the same way:

```
function multiplyByTwo(array) {
  for(let i = 0; i < array.length; i ++) {
    array[i] *= 2
    }
  return array;
}
```

That's almost identical and yet we're still repeating ourselves!

How can we make this more straightforward and easier to read as well as making the code itself a little more diverse?

One of my favorite built in JavaScript methods is .map()

.map() tells your code to iterate over an array, then it takes a callback function to do whatever it is you need to do with that array! 

And the best part is, it's non-destructive so we can avoid any bugs.


Let's rewrite that first function and use .map() instead:

```
function increaseByOne(x) {
return x + 1;
}
array.map(plusOne)
```

Wow! It's that easy?

It definitely is, and doesn't that look a whole lot cleaner too?

Now let's replicate the second function:

```
function multiplyByTwo(x) {
return x * 2;
}
array.map(multiplyByTwo)
```
That looks great!

.map() has to be one of my favorite built in JavaScript methods, and now you know why!
Handle Errors With Solidity - Require vs Revert - What you should know in 2022 on Solidity Error
Published: 2022-06-22 02:24:02

Solidity `assert` and `require` are convenience functions that check for conditions. In cases when conditions are not met, they throw exceptions.

---

## REQUIRE
Require is reserved for error-conditions of incorrect input data to functions (when compared to expected/valid input data) that can not be detected until execution time. This correspond to function preconditions in programming language argot. The compiler is unable to help due to the infinite possibilities of input data.



**What the REQUIRE Function will do**
- Validate user inputs
- Validate the response from an external contract
- Validate state conditions prior to executing state changing operations, for example in an owned contract situation
- Require is used more often
- Use at the beginning of the function
- Allow you to return an error message.
- Refund any remaining gas to the caller.

---

CODE EXAMPLE

```
contract Error {
    function errorRequire(uint _i) public pure {
      require(_i <=10, "i must be greater than 10");
      // code
    }
}
```

Require should be used to validate conditions such as:
 - inputs
 - conditions before execution
 - return values from calls to other functions

---

## REVERT
Revert is reserved for error-conditions that affect business-logic. For example someone sends a vote when the voting is already close.

**What the REVERT Function will do**
- Handle the same type of situations as require(), but with more complex logic like `Nested If Statement`.
- Handle the same type of situations as require(), but with more complex logic.
- Used abort execution and revert state changes
- Allow you to return an error message.
- Refund any remaining gas to the caller.

CODE EXAMPLE

```
contract Error {
    function errorRevert(uint _i) public pure {
        if (_i > 10)
            revert("Input must be greater than 10");
        );
    }
}
```

Revert is useful when the condition to check is complex. - inputs

---


**SUMMARY**

- Use the **`require()`** is used to validate inputs and conditions before execution.
- Use the **`revert()`** is used abort execution and revert state changes
Day 577 : Be Better
Tags: hiphop, code, coding, lifelongdev
Published: 2022-06-22 02:17:52

_liner notes_:
- Saturday : Had the radio show. I was feeling going into the station because I finished the prep work for the radio show the day before. I should have known it wasn't that simple. haha Right as we started the show, the device I use to record snippets froze up on me. And the device I use to record the audio would have some static noise because one of the inputs are messed up. We figured out how to work around it and continued on with the show. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of an illustration of members of the Roots as cartoon figures speaking with a child with the words June 18th 2022 Scramble](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xymb1ieuab2yobugj0uq.jpg)

- Sunday : Did my https://untilit.works cyphers and got some work done.

- Monday : It was a holiday so I just worked on some things. I'm looking at putting together a better option for my shower in the van. Also, did a little stuff for work so I could get a head start on my work week. I ended the night watching the latest episode of "The Boys".

- Professional : Had a couple of messages from some folks in the community channel. Helped out with that. Submitted a workshop and a talk to a conference. I did some work for the recording of tutorials I'll be doing this week.

- Personal : So I've been working on the UI for my latest project. It's looking and working pretty good.

![Overhead view of the coast of Langkawi, Malaysia with a thick forest and some broken rocks in the water](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qrziy3fwwrxxhy1scga.jpg)

Going to keep working on my side project. I want to get the keyboard navigation the way I want. I've also bought a stronger antenna for my Helium miner. Going to the office tomorrow to record some audio and I'll install it then. Hoping it will make some more money. It's not too bad, but could be better because of the area. We'll see.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube f1cLQFo8gtA %}
Vue Argon Design System | Free Vue JS template
Published: 2022-06-22 02:15:45

![Vue Argon Design System | Made with Javascript | Vue JS](https://res.cloudinary.com/madewithjavascript/image/upload/v1655863383/large_vue_argon_design_system_vue_js_template_free_b30550c7a3.jpg "Vue Argon Design System | Made with Javascript | Vue JS")


### An user-friendly, open source and beautiful design system based on Bootstrap 4.

> ### Developer First
> Argon Design System is a "Developer First" product, with a lot of variables for colors, fonts, sizes and other elements.
> 
> ### High quality before everything
> We are following the latest code standards provided by the guys from Bootstrap, so you will love working with this design system.
> 
> ### Community helpers
> Since all our products are built on top of Open Source also Argon Design System is released under MIT License.

## Check out more such amazing projects on our website

[Made with Javascript](https://madewithjavascript.club)

## Want us to feature your project

[Submit your Project to Made with Javascript](https://madewithjavascript.club/submit-project)


You can also write to us for any of your queries at:

[Email Made with Javascript](mailto:madewithjavascript@gmail.com)

## Project already shared on our social media handles.

| SocialMedia | SharedLink |
| ----------- | ---------- |
| Twitter | [Vue Argon Design System on Twitter](https://twitter.com/withjavascript/status/1539430448295821313?s=20&t=MHC65y5q6T3uwp9wlVk9QQ)
 |
| Medium | [Vue Argon Design System on Medium](https://medium.com/@madewithjavascript/vue-argon-design-system-free-vue-js-template-dc80169c7e5c)
 |
| Facebook | [Vue Argon Design System on Facebook](https://www.facebook.com/madewithjavascript/posts/pfbid0264rHqSiPHowTtTnya8wjy8Xmm8HjcjyCePBgxjhWhV8ugdy79aYeH43CyQiZqbkhl)
 |
| Tumblr | [Vue Argon Design System on Tumblr](https://www.tumblr.com/blog/view/madewithjavascript/687723144958590976?source=share)
 |
| LinkedIn | [Vue Argon Design System on LinkedIn](https://www.linkedin.com/feed/update/urn:li:activity:6945196353199255552)
 |
| Pinterest | [Vue Argon Design System on Pinterest](https://pin.it/6mZHaX5)
 |


Filled Under:

 - [Made with Javascript](https://madewithjavascript.club)
 - [Made with Vue JS](https://madewithjavascript.club/categories/vue-js)

Make sure to give this post ❤ 50 ❤ hearts, click the 🦄 unicorns 🦄 and follow 👉 @madewithjavascript 👈 for more such awesome showcases. Show you love for the people who have worked so hard!
Postgres Vs MySQL syntax comparison with cheatsheet
Tags: webdev, postgres, mysql, tutorial
Published: 2022-06-22 01:38:37

When migrating from PostgreSQL to MySQL we often get stuck with syntax between databases. Here are the top commands that we often use during real world projects. 

1. Show a list of all databases in PostgreSQL vs MySQL
2. Use or Change database in PostgreSQL vs MySQL
3. Show schemas in PostgreSQL vs MySQL
4. Show a list of all tables in PostgreSQL vs MySQL
5. Describe table in PostgreSQL vs MySQL
6. Show create table in PostgreSQL vs MySQL
7. Show list of users or roles in PostgreSQL vs MySQL
8. Show process list in PostgreSQL vs MySQL
9. Comments, Quotes, Case sensitivity in PostgreSQL VS MySQL

To have a detailed comparison I have created a blog post with examples. You can check it out here: 


[https://tipseason.com/postgres-vs-mysql-syntax-comparision/](https://tipseason.com/postgres-vs-mysql-syntax-comparision/?utm_source=devto&utm_medium=devto_medium&utm_campaign=devto_campaign)

Note: This page has link to one page cheatsheet too. 

Would you like to learn about other queries ? Comment below.
Disk based commands for Windows 10
Tags: tutorial, windows, tooling, notes
Published: 2022-06-22 00:45:53

> NOTE: RUN THE CMD PROGRAM AS ADMINISTRATOR

The first command we have on our list is `sfc` standing for `System File Checker`, is a command that will look into the system protect files and make sure they aren't corrupted or out-of-date,  if `sfc` does find corrupted files, or files with incorrect versions, it will then replace the files with the current Microsoft up-to date versions. The most basic usage of this command would be `sfc /scannow`
![sfc loading](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e1ea30egfpduiqth99tl.PNG)
![sfc broken files](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fde54nfmrfls2ql0sc6y.PNG)
Oops! sfc found corrupt files, but if you notice sfc was able to repair them. 

The second command we have on our list would be `dism`, also known as `Deployment Image Servicing`, dism does the same thing as sfc but in a more in depth way, by installing, uninstalling, configuring, packing and updating features in a windows **_image_**. It will find the version of windows that's on the current computer and compare it to the Microsoft official website version. `dism /online /cleanup-image /restorehealth`![dism](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xtpwm7rmiw1q9qx29dz.PNG)NOTE: This program takes forever to run, around 30-mins, once this program is finished running it's always a good idea to re-run sfc, to make sure everything is intact.

The last command we have on our list is the `chkdsk`, which stands for `check disk` is used to check a disk and repair or recover data on a drive. If any sectors are found to be bad, chkdsk will mark it down as "bad".
![chkdsk1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udbcusve26ts9yuenrgn.PNG)![chkdsk2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nyk4fxcp800onqcrkmvu.PNG)
Now chkdsk ran by itself won't fix any bad sectors, but if we add a flag such as `chkdsk /f`, /f meaning `/f = Fixes errors on the disk` it will then go into the drive and fix the bad sectors.

Thanks fore reading
Kenji
Claim your $100 RockX credit!
Published: 2022-06-22 00:15:27

If you haven't claimed your $100 RockX credits yet, remember to complete ALL the steps listed below to do so. 

For a limited time, we are giving away $100 to anyone who wants to build on any major PoS #blockchain! All you need to do is complete three simple steps:

1. Follow us on LinkedIn to stay up to date with our new products
2. Create an account on our portal https://bit.ly/3M0fPS8
3. Fill in the form to claim your credits: https://lnkd.in/duxWziyk

Make sure to complete all the above steps so that we can properly credit the $100 to your RockX account. Happy #BUIDLing!

Source: https://www.linkedin.com/posts/rockx-official_blockchain-buidling-activity-6944831753215692800-viN-