teleren/devto huggingface dataset:
Lianan Caijing：A fast-growing Crypto Media
Tags: blockchain, media, ads, crypto
Published: 2021-12-06 04:47:19

Lianan Caijing is a fast-growing Crypto Media launched in 2017 specially for Cryptocurrency & Blockchain & Metauniverse & GameFi. By advertising on Lianan Caijing, you can efficiently reach your target audience and get the desired result.Targeted ad is one of the best and most efficient ways to promote your company.
Website : http://www.lianancaijing.com
Memory Error - Out of sort memory, consider increasing sort buffer size
Tags: mysql, memory, buffer, ubuntu
Published: 2021-12-06 04:41:04

In this article, we will see how to fix a MySQL memory issue.

If you’re getting any error saying:


```
DatabaseError [SequelizeDatabaseError]: Out of sort memory, consider increasing server sort buffer size
```


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

It's because the internal buffer of the database is too small for the query.

Run the below query in MySQL command to increase the memory

```
SET GLOBAL sort_buffer_size = 512000000; // It'll reset after server restart
```
 

To set permanent, edit the below file and add:
```
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

sort_buffer_size = 512000000;

sudo service mysql restart
```

Note that 1073741824 is equal to bytes and will result to 1GB memory allocation.


Also, there is a possibility that something else causing the issue, you can check CPU, memory and slow query logs
```
SHOW ENGINE INNODB STATUS
```
you can then analyse the output base on current buffer pool size.
```
BUFFER POOL AND MEMORY
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 412090368
Dictionary memory allocated 380237
Buffer pool size   24576
Free buffers       23618
Database pages     954
Old database pages 372
Modified db pages  0
Pending reads      0
```

For more details, refer to MySQL docs: [MySQL Optimization](https://dev.mysql.com/doc/refman/8.0/en/select-optimization.html)
DaveWebOS : free, user-friendly
Tags: python, opensource
Published: 2021-12-06 04:30:00

Hey there Devs,
I have created an OS using python and its web-based
Features: -
File Explorer
IDE
Browser
Text Editor
Clock

New features added day by day

Live Link : https://app.codingrooms.com/w/BhkbtLcQ43kh
After you click the link you will have a button called "View Desktop", just hover over the button and click the second button which will redirect you to the server and don't forget to click the run button, source code is in the web IDE

About:
I am a 14 year old boy from Tamil Nadu, India, first I thought that programming is "ugly" but after I saw my friend creating apps, I was fascinated by the beauty in programming and from then on I started my journey as developer
Pls check out my other apps [here](https://david050708.github.io/appdevdownload.github.io/)

Feature Suggest : https://discord.gg/cZBdw7y8f3

Thank You

Contact: davidjeremiah050708@gmail.com
Attaching multiple EBS volumes to the same EC2 instance
Tags: aws, cloud, devops, devjournal
Published: 2021-12-06 04:22:07


Just a short note. I created three EBS volumes to be used for my storage labs in Linux. I was going to attach them all at the same time to a single instance but the **Attach volume** is greyed out in the **Actions** tab.

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

However, if you mark them one by one, the **Attach volume** can be selected.

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

----

#### Summary
- Multiple EBS volumes can be deleted at the same time
- Multiple EBS volumes can be attached to the same instance, but only one at a time
- Snapshots can be created for multiple volumes simultaneously

---

#### P.S.
- AWS frequently changes their UI and functionalities so they may allow attaching volumes simultaneously in the future.
- Also, this is just trivial matter since this probably won't matter if the volumes and instances are spun up in an automated way

---
Go producer-consumer problem
Tags: go, concurrency
Published: 2021-12-06 05:08:20

---
title: Go producer-consumer problem
published: true
date: 2021-12-06 04:11:15 UTC
tags: #go #concurrency
canonical_url: https://enzircle.com/go-producer-consumer-problem
series: "Go concurrency through problem solving"
---

![Carlos Aranda via unsplash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z79nbxpt2hwgajos8a7j.jpg)

In the producer-consumer problem, a producer repeatedly generates data and writes it into a buffer. The consumer repeatedly reads the data in the buffer, removing it from the buffer and using the data in some way.

In this particular problem, the producer reads in tweets from a stream, and a consumer is processing the data to find out whether someone has tweeted about Golang or not. The task is to implement a producer and consumer that run concurrently to increase the throughput.

## Solution

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1638764377990/Z8JBxsMp7.png)

## Key takeaway

### The use buffered channel

You can opt to implement this using an unbuffered channel. When no goroutine reads the channel, the execution will pause. So this will decrease throughput. The length of the buffer depends on your need. For this problem, I just use ten. The buffered channel is declared at line 34.

### Clean up your goroutines

When you launch a goroutine, make sure that it will eventually exit. Go runtime can not detect that a goroutine will never be used again. If a goroutine does not exit, the scheduler will still periodically give it time to do nothing, which slows down your program. This is called a goroutine leak.

In our solution, we clean up our goroutine on line 12. Once the stream is closed, we also close the `link` channel.

## Range and close

You can read from a channel using a for-loop construct. It will keep reading from the channel until the channel is closed.

So in our solution, line 20 will keep reading the channel link. Until that channel is closed (at line 12).

## Wait for the process to finish

In our solution, line 43, the execution will pause until a value is written to the `done` channel. And we write to this channel at the end of our consumer function (line 27) to indicate that we are done. If you don't wait, the program will exit immediately.

## Wrap up

So in this article, we again see Go concurrency's building block, namely goroutines and channels. The following article will examine a more traditional means of writing concurrent code through memory access synchronization and the primitives that follow that technique.
Build a News Aggregator App using Strapi and Nuxtjs
Tags: nuxt, vue, jamstack, javascript
Published: 2021-12-06 04:10:45

If you are an avid reader, you might have a News Aggregator app installed on your device. Wouldn't it be awesome to create your own News Aggregator app that you can control and customize according to your needs?

This tutorial aims to learn about Strapi and Nuxt.js by building a News Aggregator app with Strapi and Nuxt.js. In this app, you'll:

- Learn to set up Strapi Collection types
- Learn to set up Frontend app using Nuxt.js
- Use CRON jobs to fetch news items automatically
- Add Search capabilities
- Register subscribers

Read the full blog on [Strapi](https://strapi.io/blog/build-a-news-aggregator-app-using-strapi-and-nuxtjs).

Thanks for reading 💜

---

I publish a [monthly newsletter](https://www.ravsam.in/newsletter/) in which I share personal stories, things that I am working on, what is happening in the world of tech, and some interesting dev-related posts which I across while surfing on the web.

Connect with me through [Twitter](https://twitter.com/ravgeetdhillon) • [LinkedIn](https://linkedin.com/in/ravgeetdhillon) • [Github](https://github.com/ravgeetdhillon) or send me an [Email](mailto:ravgeetdhillon@gmail.com).

— [Ravgeet](https://www.ravgeet.in/), *Full Stack Developer and Technical Content Writer*
Self-Taught Developer Journal, Day 14: TOP Landing Page Cont. and CS50 Final
Tags: beginners, codenewbie, devjournal, webdev
Published: 2021-12-06 03:48:57

Today...

## CS50 Final Project
I finished setting up Flask on Visual Studio Code and started testing the API results for [Open Library](https://openlibrary.org/developers/api). My plan is to create a simple random book generator based on genre and return the book cover to the user. I spent some time reading the API documentation and fiddling with the results to get a feel for how the application would work.

## Thinking Through The Odin Project Landing Page cont.
![The Odin Project Project Landing Page Full Design Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qcwlb2cle80pmz7kpksx.png) 
Starting on the CSS for the first section, the hero section, I set the background color to navy based on the color hex the Odin Project provided. This way I can visually make sure the elements stay within the hero section.

I set the hero section to a flexbox and changed the flex direction to column so that the navbar and hero content would stack on top of each other. Then I changed the navbar container to flex to have the links and header logo be spaced side by side. I removed the hyperlinks underline by selecting the anchor element and setting "text-decoration:none;". I also set the color to white. Next, I selected the unordered list element and removed the bullet marker by setting "list-style-type:none". For the right links container, I made it a flexbox to have the header links also be horizontally set side by side.

Now, I am trying to figure out how to center the hero and navbar elements, but only having a small amount of space from the edge. I decided to go with padding on the left, right, and bottom at 30%. So far, it looks correct. I'm not sure if that is the best way to go about it, but that's the first solution that comes to mind.

## Resources
[CS50](https://cs50.harvard.edu/x/2021/)
[The Odin Project Landing Page Project](https://www.theodinproject.com/paths/foundations/courses/foundations/lessons/landing-page)
[Open Library](https://openlibrary.org/developers/api)

Day 13: https://dev.to/jennifer_tieu/self-taught-developer-journal-day-13-portfolio-building-top-landing-page-cont-cs50-final-set-up-28ec
Please refer to [Starting My Self-Taught Developer Journey]( https://dev.to/jennifer_tieu/starting-my-self-taught-developer-journey-2dga) for context.
First test
Published: 2021-12-06 03:25:02

Editor Basics
Use Markdown to write and format posts.
Commonly used syntax
You can use Liquid tags to add ric

---

1. 
2. fddg**sdfadsf**

dfasdf

1. _dfasdf_

1. 
- 

1. 
1. 
h content such as Tweets, YouTube videos, etc.
In addition to images for the post's content, you can also drag and drop a cover image
Laravel REST API CRUD Tutorial
Tags: laravel, rest, api, crud
Published: 2021-12-06 03:01:36

In this tutorial we will learn about laravel REST API CRUD opeation. REST means Representational State Transfer and API means Application Programming Interface while CRUD means Create, Read, Update and Delete. Also we are create REST API with passport authentication laravel. REST API is uses HTTP requests to GET, PUT, POST and DELETE data.

Laravel provide easy way to create REST API. if you have authentication in your mobile app than you can easily do it using passport. Laravel Passport provide way to create auth token for validating users. If you follow below example step by step then you will definitely get output.

So, let's start to implement Laravel REST API with Passport.

```
Step 1 : Install Laravel
Step 2 : Install Passport
Step 3 : Passport Configuration
Step 4 : Add Table and Model
Step 5 : Create API Routes
Step 6 : Create Controller
Step 7 : Create Eloquent API Resources
```

---

> **_[Read More : Laravel REST API CRUD Tutorial](https://techsolutionstuff.com/post/laravel-rest-api-crud-tutorial)_**
Higher Order Functions Explained in Plain English

Tags: javascript, webdev, beginners, functional
Published: 2021-12-06 02:03:41

In this video tutorial you will learn about higher order functions in JavaScript.

You can find the code examples used in this video in [this link](https://gist.github.com/Shadid12/42c838a0b493b7ab3858e822fccc2833)


YouTube: {% youtube ewoj4M9MW_M %}

Special thanks to [Jason] (https://www.linkedin.com/in/jason-bustamante/) for helping me out with the content.  

If have any feedback about the video please leave a comment or say hi on twitter [@HaqueShadid](https://twitter.com/HaqueShadid)
JavaScriptmas 2021
Tags: javascript
Published: 2021-12-06 01:53:59

The JavaScriptmas challenge is what started it all! In 2020, I took a chance with my elementary JS knowledge to tackle the Scrimba 202 JavaScriptmas challenges, even though I had not yet started that learning path in my Flatiron program. Although I had to do quite a lot of Google searches to complete those challenges, I remember learning a lot and feeling more capable than I had imaged I would.

I'm excited to participate in this year's challenges! With my Flatiron program complete, I am enjoying the ability to knock the initial challenges out quickly while expecting to be challenged along the way. I will continue to add daily to this blog until all 24 days are complete.

December 1: <https://scrimba.com/scrim/coa0745819274e27680de0c0d>  
I'm glad I clicked early because the submission time is midnight GMT! Even though I have gained a vast amount of experience since last year, I was still afraid to get started. Until I did - then it was like "Hey, great! A nice easy warm-up!" I was able to run through the _brute force-more elegant_ cycle really quickly and get the solution working. Day 1 done!

December 2: <https://scrimba.com/scrim/coad94b89bad0a3d7107383f9>  
I listened to the introduction before running upstairs to rescue my burning cast iron frying pan (Oops! Forgot I turned on the stove!). While running, I realized the solution to this challenge was adding an event listener, something I had to Google and struggled with last year, but this year could write up quickly without even thinking of any of the syntax too hard. I may sweep back to pick up the challenge portion but at this point, I have a quick working solution.

December 3: <https://scrimba.com/scrim/co2cc4e3a8c873d98ca22cdc1>  
I ran into some trouble starting this one - I needed to back out and logically think through where I was putting things into the code. I kept it really basic but I got it completed. It was similar to December 2, in that the challenge was to update an existing page with new information, so I grabbed a few emoji to jazz up my work.

December 4: <https://scrimba.com/scrim/co84f459c95515b0102050ae2>
The challenge today was to create a checklist from an array of items. I had my initial moment of "hey, how do I do this?" before I was able to knock out the basic challenge. I would normally try to complete the stretch goals on a weekend, but my rehearsal went long today and I have a commitment tonight. Perhaps tomorrow I can give them all a try!

December 5: <https://scrimba.com/scrim/coe4c492f82ca2bcd19f2e8ed>
I missed posting before midnight GMT because I didn't get the challenge done before church and I had an evening concert. I went ahead and completed it to ensure I get all days done! This was a nice little refreshed on how to perform getting a random number.
Release 0.4 Planning
Published: 2021-12-06 01:13:22

I plan to work on [Seneca-CDOT/telescope](https://github.com/Seneca-CDOT/telescope).Thare are some issues that inside my comfort zone and the difficulty also meets the requirements. In addition, I intend to continue to contribute to this project after this semester. I chose two issues, one the issue [2519](https://github.com/Seneca-CDOT/telescope/issues/2519), and another is [2542](https://github.com/Seneca-CDOT/telescope/issues/2542).

#### Issue 2519
The issue is about "Extend build terminal in dashboard to full height of viewport". The [build terminal] (https://dev.api.telescope.cdot.systems/v1/status/pages/build.html) is only occupying the top portion of the page and the owner wish it extend to fill the available space vertically.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jc40zz7ewro2tnhc9urb.png)
 
#### Issue 2542
The issue is about "Indicate a build is in progress in Dashboard build page". When go to a build in GitHub Actions, the user can see an animated indication that a build is happening, and how long its been going for:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q2izx9nbprpzza04b5wk.png)
When it's done, the yellow animated circle becomes a green check mark or a red "X".
 ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8z01lf7q979gwupaesw5.png)
Tipagem Forte
Tags: braziliandevs, ruby, rails
Published: 2021-12-06 01:09:02

Assim como Python, Clojure e Erlang, **Ruby** também é uma linguagem [dinâmica](https://dev.to/dnovais/tipagem-dinamica-288) e **forte**.

O que significa ser uma linguagem **forte?**

As Linguagens de programação implementadas com tipagem forte, exigem que um valor atribuído para uma variável seja do mesmo tipo em que a variável foi declarada. Deste modo ao executarmos operações entre dados de tipos diferentes será disparado um erro de tipagem.

Exemplo:
```ruby
age = 34

age.class
--> Integer

name = 'Diego Novais'
name.class
--> String

name + age
--> TypeError (no implicit conversion of Integer into String)
```

**Contato:**
Email: contato@diegonovais.com.br
LinkedIn: https://www.linkedin.com/in/diegonovais/
Github: https://github.com/dnovais
Tipagem Dinâmica
Tags: braziliandevs, ruby, rails
Published: 2021-12-06 00:39:18

Ruby dinâmica e [forte](https://dev.to/dnovais/tipagem-forte-27f8), ou seja, não é exigido que se declare o tipo dos dados. Pois, Ruby, assim como outras linguagens de programação dinâmica, conseguem escolher o tipo dinamicamente para cada variável em tempo de execução.

Exemplo:
```ruby
age = 'Trinta e quatro'
age.class
--> String

age = 34
age.class
--> Integer
```

Ao passo que linguagens estáticas como java, isso não seria possível, pois, uma vez declarada a variável, deve ser informado o sua tipagem, e ao atribuir um valor de outro tipo é disparado um erro de incompatibilidade de tipos.

**Contato:**
Email: contato@diegonovais.com.br
LinkedIn: https://www.linkedin.com/in/diegonovais/
Github: https://github.com/dnovais
Should you speak at meetups or conferences?
Tags: speaking, meetups, conferences, career
Published: 2021-12-09 20:48:08

---
title: Should you speak at meetups or conferences?
published: true
date: 2021-12-06 00:00:00 UTC
tags: speaking,meetups,conferences,career
canonical_url: https://jhall.io/archive/2021/12/06/should-you-speak-at-meetups-or-conferences/
---

I speak at conferences and meetups from time to time. Should you?

It’s common advice that aspiring or developing engineers should speak about technical topics, either to expand their knowledge, or to improve their career prospects. But is it good advice?

Maybe.

Let me share my thoughts on the topic.

Public speaking is a lot of work. A 30-minute conference presentation can easily take up to two or three days to prepare, depending on the topic and audience. Aside from that, simply learning to give an engaging talk is also a skill that requires years of development for most people. And of course, you also need to learn about the topic before you can present it. So all in all, the investment side of the equation is fairly high.

But what about the payoff?

For some people, public speaking is just plain fun. If that describes you, then the rest of the conversation may be irrelevant!

Public speaking will help you build and engage an audience. If you’re trying to sell or promote a book, a podcast, a YouTube channel, a personal brand, or some product or service, it can be an effective long-game strategy to speak at conferences and meetups.

Public speaking will also help you get better at public speaking. D’uh.

And of course, teaching in any format, public speaking or otherwise, can be a great way to learn a technical topic.

Intentionally absent from this list is the idea of “finding a better job.” Of course there are exceptions. If you want a job as a public speaker, or any role where speaking is relevant (such as developer relations) then public speaking is a great way to go about it. And of course occasionally, you _may_ stumble upon someone in your audience who is hiring someone with your skillset, and in your area, and at a company you want to work for. But generally speaking, public speaking won’t help you find a better job.

So where does that leave us?

My TL;DR; advice for engineers considering public speaking boils down to this:

- Do public speaking if you love it (or want to try it to see if you love it)
- Do public speaking if your goal is to learn to do public speaking
- Do public speaking if you’re trying to build or promote a product or service (including a personal brand)

Otherwise, consider skipping it.

And if your goal is to learn something through the process of teaching it, you don’t need to wait for a public speaking opportunity. You can easily blog about whatever topic you’re learning. Or create a YouTube video on the topic!

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
[Binary Search]Rotate List Left by K
Published: 2021-12-05 23:26:21

https://binarysearch.com/problems/Rotate-List-Left-by-K

Write a function that rotates a list of numbers to the left by k elements. Numbers should wrap around.

Note: The list is guaranteed to have at least one element, and k is guaranteed to be less than or equal to the length of the list.

Bonus: Do this without creating a copy of the list. How many swap or move operations do you need?

Constraints

`n ≤ 100,000` where n is the length of nums

## Example 1
### Input: 
```
nums = [1, 2, 3, 4, 5, 6]
k = 2
```
### Output: `[3, 4, 5, 6, 1, 2]`

## Example 2
### Input
```
nums = [1, 2, 3, 4, 5, 6]
k = 6
```
### Output: `[1, 2, 3, 4, 5, 6]`

## Example 3

### Input
```
nums = [1]
k = 0
```
### Output: `[1]`

---

```java

class Solution {
    public int[] solve(int[] nums, int k) {
        rotate(nums, 0, k - 1);
        rotate(nums, k, nums.length - 1);
        rotate(nums, 0, nums.length - 1);
        return nums;
    }

    private void rotate(int[] nums, int left, int right) {
        while (left < right) {
            int temp = nums[left];
            nums[left] = nums[right];
            nums[right] = temp;
            left++;
            right--;
        }
    }
}

```