teleren/devto huggingface dataset:
In decal PP giá rẻ tại HCM
Published: 2020-12-02 04:31:06

Bạn đang muốn in decal PP giá rẻ tại Hồ Chí Minh để bạn tạo nên những con tem, những nhãn dán sản phẩm nhằm quảng bá thương hiệu cho công ty, doanh nghiệp, cửa hàng của mình? Hãy đến với Xưởng In Decal tại Hồ Chí Minh, chuyên in decal các loại, chất lượng tốt, giá rẻ.

Nếu bạn muốn sử dụng với quy mô nhỏ, sử dụng 1 lần và chi phí tiết kiệm thì nên chọn chất liệu decal PP này. In decal PP giá rẻ được thực hiện tại Xưởng In Decal có hơn 10 năm kinh nghiệm trong lĩnh vực in ấn.

PP Là tên 1 loại giấy được sử dụng trong nghành in kỹ thuật số. Loại giấy PP này chỉ dùng để in một mặt trước của giấy. Mặt sau PP có 2 loại có keo và không có keo. Sau khi In PP sẽ được phủ lên một lớp màng bảo vệ theo nhu cầu sử dụng của khách là cán bóng hay cán mờ.

Tác dụng và mục đích việc sử dụng của In PP: Người ta thường sử dụng PP để quảng cáo như in Poster quảng cáo, cán Fomat, in tranh ảnh dán tường, lịch trang trí trong nhà, treo standee, đóng khung, lịch treo tường... Bởi vậy việc sử dụng ngày càng được nhiều người lựa chọn, không những đẹp mà còn rẽ, phù hợp với mọi đối tượng muốn sử dụng.

>>> Xem chi tiết: https://inpp.com.vn/in-decal-pp-gia-re-tai-hcm-753.html

Tem nhãn decal PP đáp ứng yêu cầu in tem nhãn giá rẻ, in tem nhãn nhanh bởi:

+ Khổ in decal PP rộng, in một lần được nhiều tem
+ Chất liệu mỏng, dễ dàng gia công bế trên máy bế Mimaki của Nhật từ In PP
+ Mặt sau decal PP được phủ keo, dán lên bề mặt chai lọ, hộp nhựa, giấy các loại dễ dàng
+ Chất liệu decal PP không thấm nước, dễ dàng dùng cho nhãn chai lọ nhựa, thủy tinh bảo quản trong tủ lạnh, thùng đá...

Hiện nay trên thị trường có rất nhiều cơ sở in ấn, tuy nhiên để đảm bảo được sản phẩm hoàn thành đúng chất lượng mà khách hàng đặt ra không phải bất cứ cơ sở nào cũng làm được. Vì vậy bạn hãy là người tiêu dùng lựa chọn thông thái.

Công ty In PP chúng tôi với trên 10 năm kinh nghiệm, đặt niềm vui và lợi ích khách hàng lên trên hết, đảm bảo uy tín-chất lượng. Khi bạn cần hãy liên hệ với chúng tôi để được tư vấn và hỗ trợ về tất cả mọi mặt.

In PP nhanh chóng tại Xưởng In PP với mức giá ưu đãi nhất

Xưởng In PP là đơn vị in ấn chuyên nghiệp tại khu vực thành phố Hồ Chí Minh. Chúng tôi đã thực hiện in ấn cho rất nhiều công ty và đơn vị sản xuất. Với tiêu chí:

+ Đáp ứng tiến độ, thời gian yêu cầu
+ Giá thành cạnh tranh, tốt nhất
+ Giao hàng đúng hẹn

Điều đặc biệt là Xưởng In PP HCM cam kết có những chính sách hậu mãi đặc biệt dành cho khách hàng thường xuyên, khách hàng thực hiện in đơn hàng lớn với giá rẻ nhất. Với đội ngũ nhân viên giàu kinh nghiệm chăm sóc khách hàng sẽ tư vấn cho quý khách hàng những sản phẩm chất lượng và tiết kiệm nhất.

Liên hệ ngay với chúng tôi qua hệ thống số điện thoại (028) 2237 6666 – (028) 2238 6666 hoặc qua địa chỉ hộp thư in ấn nhanh: innhanh@inkythuatso.com.
How to check if a record exists with Laravel Eloquent?

Published: 2020-12-02 04:27:48

Check out this post on the [devdojo.com](https://devdojo.com/) website!

It is a post on [How to check if a record exists with Laravel Eloquent](https://devdojo.com/bobbyiliev/how-to-check-if-a-record-exists-with-laravel-eloquent) 🔥!

To make things even better you can use this referral link to get a free $100 credit that you could use to deploy your virtual machines and test the guide yourself on a few DigitalOcean servers:

[Digital Ocean $100 Free Credit](https://m.do.co/c/2a9bba940f39)

Link to the post:

https://devdojo.com/bobbyiliev/how-to-check-if-a-record-exists-with-laravel-eloquent

I strongly encourage everyone to go ahead and check out the [devdojo.com](https://devdojo.com/) website, there's a lot of valuable content there.
Asynchronous code: Promises
Tags: javascript, beginners, node, programming
Published: 2020-12-02 04:22:34

A promise is an object representing the eventual completion or failure of an asynchronous operation.

Basically, a promise is an object where you can attach a numberless callback function which can be pass as arguments to the chainable methods **then**, **catch** and **finally**.

The Promise constructor receives the executor function which waits for two functions, in the first position the `resolve` function which will be executed if everything is done, and in the second position the `reject` function that will be executed in case of an error, for example.

```
new Promise(function(resolve, reject) {
    const name = "Freddy"
    resolve(name)
}).then(name => {
    console.log("It's a pleasure, Mr. " + name);
    throw new Error("Something wrong happened!")
    console.log("This will not be displayed");
}).catch(error => {
    console.error("What happened? " + error.message)
}).finally(() => {
    console.log("There is no coffee to drink");
})

// It's a pleasure, Mr. Freddy
// What happened? Something wrong happened!
// There is no coffee to drink

```

Definitely, Promises give our code more readability, consistency and come to resolve some problems suffered from the callback functions such as the famous "Callback hell". Thus, if you are not using promises in your normal day, this is the moment.
Using React Context for state management in Next.js
Tags: nextjs, blogvent, react, context
Published: 2020-12-02 03:58:09

---
title: Using React Context for state management in Next.js
published: true
description: Ever wondered how you should manage state information across your Next.js applications without installing anything extra? Look no further!
tags: nextjs, blogvent, react, context
canonical_url: https://www.netlify.com/blog/2020/12/01/using-react-context-for-state-management-in-next.js/
---

Happy Blogvent season, devs!

If you'd like to manage state across your Next.js applications, the easiest way to do it (without installing anything extra!) is using [React Context](https://reactjs.org/docs/context.html)!

If you'd like to use Context across every page in your application, you'll want to go to `pages/_app.js` and make it look a little something like this:

```jsx
// src/pages/_app.js

function Application({ Component, pageProps }) {
  return <Component {...pageProps} />
}

export default Application
```

Then, make a file somewhere in your application that builds a Context object:

```jsx
// src/context/state.js
import { createContext, useContext } from 'react';

const AppContext = createContext();

export function AppWrapper({ children }) {
  let sharedState = {/* whatever you want */}

  return (
    <AppContext.Provider value={sharedState}>
      {children}
    </AppContext.Provider>
  );
}

export function useAppContext() {
  return useContext(AppContext);
}

```

Once this is done, go back to `pages/_app.js` and wrap your component with the `AppWrapper`:

```jsx
// src/pages/_app.js
import { AppWrapper } from '../context/AppContext'; // import based on where you put it

export default function Application({ Component, pageProps }) {
  return (
    <AppWrapper>
      <Component {...pageProps} />
    </AppWrapper>
  )
}

export default Application
```

Now, in every component and page in your application, if you'd like to access the values inside of that `sharedState` object, you can import and call the React `useAppContext` hook!

Now, be discerning about how much you put into Context. You wouldn't want unnecessary re-renders across pages when you can just share them across certain components.

## Woo hoo!
If you want to see this in action in a real application, you can check out the open sourced repo for [Jamstack Explorers](https://explorers.netlify.com/?utm_source=devto&utm_medium=reactcontextexplorers-cs&utm_campaign=devex)!

[Here is the code](https://github.com/netlify/explorers/blob/main/src/pages/_app.js#L10) for `_app.js`, and [here is the folder](https://github.com/netlify/explorers/tree/main/src/context) for the different providers created!
Direct Messages for VSCode
Tags: typescript, vscode
Published: 2020-12-02 04:09:46

Recently, my friends and I developed an extension for Visual Studio Code that lets you message your developer friends through the editor itself. It's in the beta stage. You can check it out here: https://marketplace.visualstudio.com/items?itemName=techsyndicate.vscode-dms

Here's the Github repository if you want to report something: https://github.com/techsyndicate/vscode-dms.
Thank you.
How to deal with inherited code!
Published: 2020-12-02 03:43:46


I just inherited a codebase for the first time as a student at Hack Reactor and it can be very overwhelming to get started with working with code that was written by someone else. Familiarizing myself with the code was a challenge but it is a necessary skill for surviving in the software development world. Maybe the code is poorly written or maybe its seemingly written way over your head but regardless you have to work with it!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/34mgo0z6ywj4ybwhfwo4.jpg)

First things first, talk to the previous owner if you can! They clearly know the code better than anyone and if they are still around take advantage of it. First take a look around e very file and understand it as much as you can, and then make a list of specific concise questions. You don't want to bother them too much so try to get all of your possible questions in one session. If the original owner isn't around then it may be best to try to find someone else who worked on the project to lend you a hand. 

Regardless of whether you found the original owner or not, spend more time perusing the code and don't move on until you have checked out every file.

Once you have your bearings and think you know the gist of what's going on it is time to install the dependencies, libraries, seed if applicable, and start the server! This is a lot easier said than done but if you can get these steps completed it will make it much easier to see what the code is doing. 

Now once you have your environment properly set up it's time to really get to work! Maybe you're just fixing old bugs, maybe you're just adding a new feature, maybe you're completely taking over and refactoring the entire project, or maybe like me you're expanding the back-end to handle millions of requests! Regardless it is time to get to work and improve this project. Inheriting code is a huge part of being a software developer and it just takes practice to become a pro at it.
3 reasons why Tensorflow is the most popular ML framework
Tags: tensorflow, machinelearning, ai
Published: 2020-12-02 03:37:20

TensorFlow has become the most popular tool and framework for machine learning in a short span of time. It enjoys tremendous popularity among ML engineers and developers. 

Here are three reasons behind TensorFlow’s popularity:

**1. The most ubiquitous AI platform available for developers**

TensorFlow is the only framework available for running machine learning models from the cloud to the tiniest microcontroller device. 

**2. TensorFlow is a part of mainstream public cloud managed ML PaaS** 

TensorFlow is an integral part of public cloud platforms. It is powering the APIs for computer vision, natural language processing, personalization and recommendation services. 

**3. Extensive support for tooling and integration**
 
TensorFlow is more than just a machine learning framework or a toolkit. It is essentially a platform to manage the entire life cycle of AI applications.
Code Smell 40 - DTOs
Tags: oop, programming, tutorial, codenewbie
Published: 2020-12-02 03:23:21

*DTOs are widely used and they 'solve' real problems, do they?*

# Problems

- Anemic Object

- Inconsistent Data

- Duplicated logic

- Duplicated structure

- Class Polluting

- Information Hiding Violation

- Code repeated among [mutators](https://en.wikipedia.org/wiki/Mutator_method), accessors, [serializers](https://en.wikipedia.org/wiki/Serialization), [parsers](https://en.wikipedia.org/wiki/Parsing)

- Ripple Effect

- Data integrity

# Solutions

1. Transfer anemic data on arrays.

2. Use real business objects.

3. If we want to transfer partial objects: use proxies or null objects to break the reference graph.

# Sample Code

## Wrong

{% gist https://gist.github.com/mcsee/91a2d630101ba6137f64195e76c1b266 %}

## Right

{% gist https://gist.github.com/mcsee/e1ecfdec6bd0fbe72f2d9ee7664af1c4 %}

# Detection

We can use the same anemic object detectors. 

We can check for *anemic* classes with no business object behavior (removing serializes, constructors, mutators etc).
 
 # Tags

-  Anemic

# Conclusion

DTOs are a tool and an established practice in some languages. We should use them with care and responsibility.

If we need to disassemble our objects in order to send them away from our realms, we need to be extremely cautioned. Since dismembered objects have no integrity considerations.

His author warns us about its actual abuse.
 
# Relations

{% post https://dev.to/mcsee/code-smell-01-anemic-models-4dg2 %}

{% post https://dev.to/mcsee/code-smell-13-empty-constructors-4i4o %}

{% post https://dev.to/mcsee/code-smell-20-premature-optimization-4moe %}

{% post https://dev.to/mcsee/code-smell-28-setters-2hih %}

# More info

[Martin Fowler's](https://martinfowler.com/bliki/LocalDTO.html)

[Refactoring.Guru](https://refactoring.guru/es/smells/data-class)

[Stack Exchange](https://softwareengineering.stackexchange.com/questions/171457/what-is-the-point-of-using-dto-data-transfer-objects)

* * *

> The best smells are something that's easy to spot and most of time lead you to really interesting problems. Data classes (classes with all data and no behavior) are good examples of this. You look at them and ask yourself what behavior should be in this class. 

_Martin Fowler_
100 Days of Code: Day 0
Tags: swift, ios, codenewbie, beginners
Published: 2020-12-02 03:22:48

I've been learning for a while, but thought that I should take a leap into committing myself to the 100 Days challenge. 

My background is in Sales and Management. I have a decent knowledge of HTML, CSS & JS, although I have struggled with JS. I'm currently on Section 11 of Angela Yu's Complete iOS Bootcamp. And I do believe it is sticking and am not condemning myself to tutorial purgatory.

My goal here is both to document my progress and also re-enforce the concepts that I have already learned and will learn by attempting to explain them in my own vernacular. If you find that I have incorrectly stated something or would like a further explanation, please comment and I'll do my best to make the corrections or provide additional clarity.
Install rtl88x2bu WiFi adapter drivers on Ubuntu 20.10
Tags: linux, ubuntu
Published: 2020-12-02 00:16:46

Ubuntu 20.10 based distros do not support the **rtl88x2bu** Wifi USB adapter out of the box.

## Internet connection via Bluetooth

There's a catch 22 when installing a **rtl88x2bu** WiFi adapter driver. First you need to download it from the Internet but your Linux is not ready to connect to a WiFi.

Instead of using another PC to download a driver and copy to a USB flash drive simply use Bluetooth tethering on your mobile:

- buy a Bluetooth dongle for your desktop PC
- enable Bluetooth tethering and turn on a hotspot on your mobile
- pair and connect to your mobile phone from your PC

## Installing rtl88x2bu drivers

If you are looking for **rtl88x2bu** drivers for Linux you have probably already seen the [github.com/cilynx/rtl88x2bu](https://github.com/cilynx/rtl88x2bu) repo. Unfortunately its build process did not work for me on my Ubuntu 20.10-based system. The source files simply did not compile (both 5.3.1 and 5.8.1).

```
Error! Bad return status for module build on kernel
Consult /var/lib/dkms/rtl88x2bu/5.3.1/build/make.log for more information.

./rtl88x2bu-5.3.1/include/rtw_security.h:252:8: error: redefinition of ‘struct sha256_state’
  252 | struct sha256_state {
```

I have found another solution in the following repo instead: [github.com/morrownr/88x2bu](https://github.com/morrownr/88x2bu).

Below are instructions for Ubuntu taken from that repo's README:
```
sudo apt-get update
git clone https://github.com/morrownr/88x2bu.git
cd 88x2bu
sudo ./install-driver.sh
sudo reboot
```
S3E3 Learn JMeter Series - Constant Throughput Timer
Tags: performance, webperf, testing, tutorial
Published: 2020-12-02 03:11:40

Welcome to Learn JMeter Series!

In this Season 3, Episode 3, you will learn following:

🔹 Constant Throughput Timer

{% youtube 8Wb8KtylY5M %}

☑ Buy me a tea 🍵 : https://www.buymeacoffee.com/qainsights
☑ [My Blog](https://qainsights.com)
☑ [My Udemy Course](https://www.udemy.com/course/performance-testing-using-truweb)

{% github QAInsights/Learn-JMeter-Series%}
Trust in Agile
Tags: trust, agile
Published: 2020-12-02 02:12:04

Joining the fray in opining on Agile...

I have come to understand that trust is a necessary component to executing an Agile project successfully. Digging deeper - Agile absolutely demands several key dimensions to this trust:
- Trust that the self-organizing team will accomplish complexity (e.g. no bad actors, everyone contributes)
- Trust that the known complexity is accurate
- Trust that the natural refinement and individual/team discipline adhering to Agile principles demands will provide course correction
- Trust that the unknowns will become known, even if just in time

Without these key concepts a team is susceptible to bad habits like:
- Really actually doing waterfall
- Producing reactionary process changes designed to 'catch' errors instead of preventing them
- Sadness

Part of healthy Agile hygiene regimen is to work together to solve problems, communicate/collaborate over dictation, and to reflect openly and honestly with your peers at each delivery with a strong dedication towards self and team improvement.

Musings really.
Higher-Order Components
Tags: react, javascript
Published: 2020-12-01 18:27:38

In this blog post, we are going to talk about Higher-Order Components from React. Also, known as HOC. If you are familiar with Redux, you have probably used “connect” which is one of the examples of Higher-Order Components. 

**What is HOC?**

HOC is a function that takes a component as an argument and returns a new component. Which looks something like this:

const EnhancedComponent = higherOrderComponent(WrappedComponent) 
	
**When to use it?**

Let's say you have two components. One is called “IncreaseCountOnDoubelClick” that is incrementing a number each time that a double click of a button occurs and the other is called “IncreaseCount” that also increments a number each time a different button is clicked. They both contain similar code as seen below:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/n8yay26xy9dmedq382vu.png)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/nasajhs7gf58qynanzd8.png)

In the above two code snippets from lines 4 through 13 we have some code duplication and as a developer we always try to follow DRY(do not repeat) principle. Here is where we can utilize HOC’s to allow us to put duplicated code in a single place and then share that code among components as necessary. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/i26x4xd77nu9vdljdf6y.png)

Below, we create a “withCounter(higherOrderFunction)” function and pass “WrappedComponent(OriginalComponent)” as an argument. Then we return an “EnhancedComponent” component that is named “WithCounter” from the function. This is our simple HigherOrderComponent. Let's extract the duplicate code in this function. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ktf0lqw9dt4wc2aoemx6.png)

After moving the duplicate code, there are few things we have to add in WrappedComponent. In WrappedComponent, we are passing counter and increaseCount as props. One very important thing we are adding here is `{...this.props}`.  By doing so it will give access to any other props beside the counter and increaseCount props.

Now, we can remove duplicate code from both components and instead of exporting IncreaseOnDoubleClick or IncreaseCount, let's export our HOC. Like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/t8zvkmyq4iivt80rw5ep.png) 

Note: Make sure you update `this.state.counter` to `this.props.counter` and `this.increaseCount` to `this.props.increaseCount`. In Addition, make sure to add both components to App.js. 
If you want to dig deeper into Higher-Order Components you can explore this react-document [link](https://reactjs.org/docs/higher-order-components.html).
What is ES6 Tree Shaking
Tags: javascript, webdev, webperf, es6
Published: 2020-12-02 02:01:56

# What is ES6 Tree Shaking

ES6 tree shaking is a way to optimize the bundle size of your bundle by removing everything that is guaranteed to not be used ever in the app. Let's give an example.

Let's say you have this util file:
```js
function adder(a, b) {
	return a + b;
}
function subber(a, b) {
	return a - b;
}
export { adder, subber };
```
But, you only imported `adder`:
```js
import { adder } from "./utils";

adder(1, 2);
```
Then it wouldn't make sense to include `subber` in the bundle too. So instead, through static analysis, it will kill subber because it is never used. Final bundle:
```js
function adder(a, b) {
	return a + b;
}
adder(1, 2);
```
But there are some problems. Let's say you have this:
```js
function adder(a, b) {
	return a + b;
}
function subber(a, b) {
	return a - b;
}
window.subadd = (a, b) => (b, c) => adder(a, b) + subber(b, c);
export { adder, subber };
```
This would be the final bundle:
```js
function adder(a, b) {
	return a + b;
}
function subber(a, b) {
	return a - b;
}
window.subadd = (a, b) => (b, c) => adder(a, b) + subber(b, c);
adder(1, 2);
```
Wow, that's including a lot of unnecessary code! The problem is, because of how Javascript works, you can dump side effects into a global namespace, and it will get included along with it's dependencies because it isn't **guaranteed** to never be used.

## Supporting Full Tree Shaking (For Library Authors)

Of course, there is a way to support full tree shaking, without any risk of side effects. You first, need to kill all side effects in your package. Then, in your `package.json`, you set `sideEffects: false`. That will signify to the bundler that there are no side effects meaning you can fully tree shake it.
Lets Share GitHub Page.
Tags: portfolio, github, webdev
Published: 2020-12-02 01:37:08

Mine is [q-viper.github.io](https::/q-viper.github.io).

I switched to blogging with GitHub Page because my AWS's free tier was ending and I really like to stay with GitHub page. Until now I have written more than 30 blogs. Lets share our work.
I launched my side project on Reddit. Now what?
Tags: showdev, help, codenewbie
Published: 2020-12-02 01:21:41

This is a follow-up post to
{% link https://dev.to/mathewthe2/tips-on-releasing-a-new-app-12i3 %}

# Overcoming My Fear of Reddit
Thanks to the feedback from my previous post, I posted my side project to Reddit only after a week and a half of postponing it. Immediately I got a few comments so replied to them but it was late and I went to bed. 10 hours later I woke up to this:  

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/jbyk1kcvu7drl20ipb3c.png)
[Link to the post](https://www.reddit.com/r/LearnJapanese/comments/k4k5n5/i_built_an_app_to_learn_and_retain_japanese_words/)

# The Good
Many people in the sub seem interested. There are even people asking if the project is open source (it isn't) so they can contribute.

# The Bad
- There are two major issues with the current release and a lot of people are unsatisfied with the same issue. I would need to address these issues asap.
- I shot my toe somewhat when I released this for free. I may have **attracted primarily an audience that expects free stuff**. These people may also be more tolerant if the app has some bugs right now which might be bad if I'm not pressed to fix key issues once people have to pay for it.

# Questions
1. **How do I follow up?** If I fixed the bugs in the app and update the release, do I update my original post and reply to the comments or do I make a new post?
2. I don't know if or how to monetize it right now. Should I ignore the comments of people asking if this is open source? 
3. **Do I need to build an audience off Reddit?** I have an obscure discord link on [my website](https://www.game2text.com) for people with questions, but I'm concerned with how I can communicate to people about future updates of the app.