teleren/devto huggingface dataset:
saga fetch || Invalid boundary in multipart during uploading files
Tags: react
Published: 2021-01-26 18:46:35

I am trying to **upload a file and send it to the backend API** in saga worker but for some reason, the file is not getting fetched at the API side. 

```
Invalid boundary in multipart: None
```
is the error (https://i.stack.imgur.com/dwkPR.png)

Through POSTMAN, able to get the files and it's working fine. all the uploaded files are captured in `fileList` and I am capturing only the first file by doing `action.data.uploading.fileList[0]`

Please suggest where I am doing wrong.

**React component**

```
const Ticket = () => {
        
        const [isModalVisible, setIsModalVisible] = useState(false);
        const dispatch = useDispatch();
         
        const onFinish = (values) => {
          console.log(values)
          console.log(values['uploading']['fileList'])
          dispatch(getUser(values));
         };
        return (
            <React.Fragment>
            <div className="top-section">
             asd
             <Button type="primary" style={{ float: 'right' }} onClick={()=>setIsModalVisible(true)}>Create Test Suite</Button>
             <Modal title="Create" visible={isModalVisible} footer={null} onCancel={()=>setIsModalVisible(false)}>
                    <Form layout="vertical" onFinish={onFinish}>
                        <Form.Item label="Upload" name="uploading">
                          <Upload>
                              <Button icon={<UploadOutlined />}>Click to Upload</Button>
                          </Upload>
                        </Form.Item>
                        <Form.Item>
                            <Button type="primary" htmlType="submit">
                              Submit
                            </Button>
                          </Form.Item>
                    </Form>
              </Modal>
            </div>
          </React.Fragment>
          )
    }
```

**Saga Code**
```
function* handleGetUser(action) {
        try {
            debugger
            var formdata = new FormData();
            formdata.append("file_name", action.data.uploading.fileList[0]);
            const customer_fetch = yield call(fetch,
                'http://localhost:8000/api',
                {
                    method: "POST",
                    headers: {'Content-Type' : 'multipart/form-data',},
                    body : formdata
                });
        } catch (error) {
            console.log(error);
        }
    }
```
How to enable Tailwind Intellisense on TSX Files 
Published: 2021-01-26 18:44:51

---
title: How to enable Tailwind Intellisense on TSX Files 
published: true
description: A step by step guide to activating Tailwind Intellisense on TSX files.
tags: 
//cover_image: https://direct_url_to_image.jpg
---

## Intro
I've started to experiment with Tailwind, so while setting up my environment when I had this issue, so here is how to setup intellisense on TSX files in nutshell.

## Step 1.
Before getting setting up Intellisense, you will need to [install Tailwind in your project](https://tailwindcss.com/docs/installation). 

## Step 2. 
Install the [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) extension for Visual Studio Code.

## Step 3.

If you don't have it already, setup a `tailwind.config.js` file in your root folder by running:
```shell
npx tailwindcss init
```

## Step 4.
Go to VS Code settings, and add the following configuration:
```JS
// settings.js
// ...
"tailwindCSS.includeLanguages": { 
  "plaintext": "javascript" 
}
```

## Step 5.
Reload VS Code. My favorite way to do it is to press `CMD` + `P` and select `Reload Window`.

That's all folks.
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2021-01-26 18:44:24

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round-up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Tuesday, we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️

### Watch and MERN

In this first installment in @shubham1710’s new series on the MERN stack (MongoDB, Express, React and Node), you’ll get a tutorial worth saving if you want more full-stack experience!


{% link https://dev.to/shubham1710/build-an-e-commerce-website-with-mern-stack-part-1-setting-up-the-project-1l2d %} 


### Accessibility should be at the heart of everything we do

“Building accessible websites shows that you care about disabled people. It's a small change that makes a difference.” - @alenanik 


{% link https://dev.to/alenanik/inclusive-components-making-modals-accessible-1hn9 %} 

### A worthwhile walk in the (Jurrasic) park

@misslorsx shares an incredibly honest and motivating look at the first few weeks and months of their new web development job.

{% link https://dev.to/misslorsx/my-top-tips-for-your-first-3-months-in-a-new-tech-role-an-honest-article-1l7e %}

### A fulfilling, manageable 2021

@patferraggi is setting some realistic, yet ambitious goals for 2021. If you’ve been trying to think about what _you_ want to accomplish this year, Patricio’s framework is a great place to get inspiration.

{% link https://dev.to/patferraggi/planning-my-career-development-for-2021-52oo %}

### Building a more accessible whitehouse.gov

@ritaxcorreia wrote an awesome case study on Whitehouse.gov’s new web accessibility stance under the new administration in the United States. Check it out! _P.S. This post is not intended to be political._

{% link https://dev.to/ritaxcorreia/web-accessibility-improvements-on-the-white-house-website-5bgk %}

### Your guide to the Document Object Model

“DOM is there so we can play with elements within JavaScript directly; we don't need any intermediate in between HTML and JS.” 

Just one of the many pearls of wisdom in this DOM-focused post by @whoadarshpandya.

{% link https://dev.to/whoadarshpandya/enough-javascript-to-get-you-started-14-understanding-dom-1m6c %}

### Recreating the style of Cyberpunk 2077

… Well, the parts of Cyberpunk 2077 you’d _want_ to recreate! @jh3y takes a look at the striking visual style of this explosive game.

{% link https://dev.to/jh3y/css-cyberpunk-2077-buttons-taking-your-css-to-night-city-43l0 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Tuesday!_
Tabnine Adds Native Support for Apple Silicon (M1)

Tags: machinelearning, ai, m1, apple
Published: 2021-01-26 18:38:15

Last week we released native support for Apple Silicon (M1), bringing our efficient inference engine to the latest Apple architecture. You can read Apple’s M1 announcement here.

The Tabnine Neural Engine running locally (a.k.a deep-local) is our own implementation of an efficient neural inference using low-level intrinsics. Our original version of the engine was based on x86 vector instructions (FMA, SSE/AVX).

With the release of Apple Silicon, we extended the engine to support the vector instructions of the M1 processor.

The M1 processor is based on ARM 128-bit Neon technology. While Neon registers are not as wide as x86 registers, the overall throughput for (our kind of) vector operations for Neon is superior to that of Intel.

While earlier versions of Tabnine can run via Rosetta and use Tabnine cloud, running the engine locally on M1 requires the latest version of Tabnine.

Most official Tabnine plugins have been already updated to support M1.

Note that you need to run the native M1 version of the editor for the engine to correctly detect the M1 processor. See instructions for your IDE below.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rg7t5y3vdbpa7fkpk6s0.png)
How to generate a random number in Shopify?
Tags: shopify, liquid
Published: 2021-01-26 18:08:41

---
title: How to generate a random number in Shopify?
published: true
description: There is no native function to generate a random number on Shopify. I'll show you how to do it.
tags: shopify, liquid
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/s1ytrtzrbiubzvxnz0p8.jpg
---

Hello there, this is my first post in DEV. 🙋🏻‍♂️

__

Random is always useful, even on e-commerce environments. Showing random products or pictures for example, could be nice. 

# What's the problem?

[Liquid](https://shopify.github.io/liquid/) is a template language created by Shopify and written in Ruby. It is the backbone of Shopify themes and is used to load dynamic content on storefronts.

There's an awesome [Shopify cheat sheet](https://www.shopify.com/partners/shopify-cheat-sheet) with basics, tags, filters and objects available on Liquid. But the are **no tags to pick a random number from a range** or just generate one.

Let me explain you how to do it with a simple trick.

# How?

First, define `min` and `max` numbers. They will be use as range to generate a random number.

```liquid
{%- assign min = O -%}
{%- assign max = 9 -%}
```

Then, get the current date with `"now"` and apply the "%N" date filter to get fractional seconds digits (precise to nanoseconds).

```liquid
{%- assign date_fract = "now" | date: "%N" -%}
```

Next, use the modulo filter to get a random value between your min & max values.
```liquid
{%- assign diff = max | minus: min -%}
{%- assign random_number = "now" | date: "%N" | modulo: diff -%}
```

Finally, add your `min` value to the result.
```liquid
{%- assign random_number = random_number | plus: min -%}
```

In short: 

```liquid
{%- assign min = 0 -%}
{%- assign max = 9 -%}
{%- assign diff = max | minus: min -%}
{%- assign random_number = "now" | date: "%N" | modulo: diff | plus: min -%}
```

You can use it as snippets as well: 

```liquid
{% render 'random-number' %} # snippets with random number code 
{{ random_number }} # here's your random number
```

&nbsp;
**With a random number, you can now pick a random value in an array of products, pictures or whatever.** 💯

# Limitations

On Shopify, store pages are aggressively cached. Using it on production theme may not work as intended and random numbers could be stuck for *minutes or hours*.

Adding a product to card or editing a product on Shopify back-end will flush cache, so use is wisely.

# Wanna more?

This code comes from a repository [Shopify snippets](https://github.com/pgrimaud/shopify-snippets) with "ready to use" parts of code which can be reusable when developing Shopify themes. 

Put a 🌟 if this post helped you. :)


&nbsp;
Pierre 🤖
&nbsp;
__
*[Follow me on GitHub](https://github.com/pgrimaud)*
*[Follow me on Twitter](https://twitter.com/pgrimaud_)*
&nbsp;
*[Cover image via Pixabay](https://pixabay.com/photos/dice-games-game-random-probability-5432439/)*
What are some of the most challenging work scenarios you’ve encountered? Let us know for the chance to appear on DevDiscuss!
Tags: discuss, podcast
Published: 2021-01-26 18:37:15

---
title: What are some of the most challenging work scenarios you’ve encountered? Let us know for the chance to appear on DevDiscuss!
published: true
tags: discuss, podcast
---

The [DevDiscuss Podcast](https://dev.to/devdiscuss) begins with an interview and ends with commentary from listeners — and we like to feature the actual _voices_ from our community!

DevDiscuss returns for a brand new season soon and to inform an upcoming episode on **soft skills**, we'd like to know your thoughts on the following...

> ### **“What are some of the most challenging work scenarios you’ve ever encountered?”** 
  
For your chance to appear on an upcoming episode, answer the question above by:

- Calling our Google Voice at +1 (929)500-1513 and leave a message 📞

- Sending a voice memo to pod@dev.to 🎙

- OR, leaving a comment here (we'll read your response aloud for you) 🗣

_Please send in your recordings by TOMORROW Wednesday, January 27th at Midnight, ET (9 PM PT, 5 AM UTC)_

_**Voice recordings will be given priority placement**_ 😉 

---

Don't forget to check out the last season of DevDiscuss [here](https://dev.to/devdiscuss)
How to localize Material UI DatePicker to your preferred locale in React
Tags: javascript, typescript, react
Published: 2021-01-26 18:21:28

Material UI DatePickers are usually in English language i.e `en` locale but sometimes you wish they were in your first language for instance mine is Swahili, `sw` locale.

Here is how, after you have created a `React app` and added `Material UI` to it you need more libraries: `@material-ui/pickers`, `@date-io/core`, `@date-io/date-fns`, `@date-io/moment`, `date-fns` and `moment`.

When installing them there might be some compatibility issues so make sure you use compatible libs for the `@material-ui/pickers` you are using, for my case, I use `@material-ui/pickers version 3` so here are its compatibe libs versions.

```javascript
yarn add @material-ui/pickers@^3.0.0

yarn add @date-io/date-fns@^2.0.0
yarn add @date-io/moment@^1.0.0
yarn add @date-io/core@^1.0.
yarn add date-fns@^2.0.0
yarn add moment@^2.0.0
```

## DatePickerComponent.js

```javascript
import React from 'react';
import { DatePicker, MuiPickersUtilsProvider } from "@material-ui/pickers";
import { createMuiTheme, ThemeProvider} from '@material-ui/core/styles';
import MomentUtils from "@date-io/moment";
import moment from "moment";
import "moment/locale/sw";

const DatePickerComponent = ({ date, setDate}) => {

  const theme = createMuiTheme({
    palette: {
      primary: {
        main: '#2EC4B6'
      },
      secondary: {
        main: '#2EC4B6'
      },
    },
  });

  return (
    <ThemeProvider theme={theme}>
      <MuiPickersUtilsProvider libInstance={moment} utils={MomentUtils} locale={"sw"} >
        <DatePicker
          required
          format="L"
          clearable
          okLabel="Sawa"
          clearLabel="Futa"
          cancelLabel="Hairisha"
          value={date}
          variant="dialog"
          maxDateMessage=""
          mask="__/__/____"
          placeholder="dd/MM/yyyy"
          onChange={(dateChanged) => setDate(dateChanged)}
          views={["year", "month", "date"]}
          InputProps={{ disableUnderline: true }}
        />
      </MuiPickersUtilsProvider>
    </ThemeProvider>
  );

};

export default DatePickerComponent;
```
Replace `sw` in the DatePickerComponent with the locale you prefer you will have it in your locale, here is how mine looks.

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


### Happy Hacking!
Third-week Javascript
Tags: webdev, javascript, beginners, programming
Published: 2021-01-26 18:03:29

Hi Everyone!! It has been 3 weeks since started doing Javascript. the topics which I covered during this week are the following.

1)Modules in javascript
2)how to create a server
3)fs module and its function
4)path module and its function
4)HTTP module

for now, I have started Expressjs and I am writing an article on javascript based on my understanding and believe me, this is helping me a lot. for me, it is helping me review what I have learned. during this, I have learned more. I have already decided I am going to write about every topic during this whole journey.

Thanks for reading!!
How I set up my environment before I start every project
Tags: git, vscode
Published: 2021-01-26 17:53:48

## Config

### Editor

- [.editorconfig](https://editorconfig.org/)

> EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles.

[🐙 GitHub snippet](https://github.com/giuliachiola/super-blog-content/blob/main/tutorials/project-setup/.editorconfig)


### Visual Studio Code workspace

Adding Visual Studio Code specific colors for every project, helps to recognize them more easlily during the development.

To set up workspace colors

- open VSC settings `cmd` + `,`
- search for `workbench.colorCustomizations`
- edit the .json file using vsc-workspace-colors.json content below

[🐙 GitHub snippet](https://github.com/giuliachiola/super-blog-content/blob/main/tutorials/project-setup/vsc-workspace-colors.json)

## Git

### Gitignore

- [.gitignore](https://git-scm.com/docs/gitignore)

> A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected; Each line in a gitignore file specifies a pattern.

[🐙 GitHub snippet](https://github.com/giuliachiola/super-blog-content/blob/main/tutorials/project-setup/.gitignore)

### Issue template

The issue is more clear if we set up an _issue template_. Compile it every time you open an issue, and remove the unnecessary parts.

[🐙 GitHub snippet](https://github.com/giuliachiola/super-blog-content/blob/main/til/git/issue-and-pr-templates/_snippet-template-issue.md)

### PR template

[🐙 GitHub snippet](https://github.com/giuliachiola/super-blog-content/blob/main/til/git/issue-and-pr-templates/_snippet-template-mr.md)
#Day 35-43: 100 days of Code
Tags: 100daysofcode, hacktoberfest
Published: 2021-01-26 17:24:54


I finally received my Hacktoberfest 2020 swags on 18th Jan.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/2qbf8l8qs53tdoau2u04.jpeg)

Also, I was thinking of making an android app which uses ML and Database to elevate my knowledge in android developement field. After days of work, I have come up with an idea but I am a bit insecure about the ML part. Hence, I am working on it these days.
My progress in DSA isn't much great but I make sure to solve atleast 1 question a day. Grokking Algorithm book is really really helpful in strenthening my basics.
Why you should apply behavior-driven development (BDD) in your business
Tags: webdev, productivity, technology, development
Published: 2021-01-26 17:23:01

Hey community,

Grab the insights on why & how to apply behavior-driven development (BDD) in your business. Inside the article:
- BDD scenario structure
- How BDD aligns with an agile mindset
- How BDD improves test automation, and more.

[Check it out 🧐](https://uibakery.io/post/behavior-driven-development-in-plain-english?utm_campaign=ui_bakery%20-%20article%20-%20blog%20-%20cacq%20-%20BDD%20-%20views&utm_source=%20DevTo&utm_medium=general&utm_content=article_announce)
How to get grafana password kube-stack-prometheus
Tags: monitoring, grafana, todayilearned, todayisearched
Published: 2021-01-26 17:07:56

#Intro

The helm repo kube-stack-prometheus (formerly prometheus-operator) comes with a grafana deployment embedded. In order to log in Grafana first you need to get the credentials (admin/admin didn't work for me).

#Discovering the password :mag:

The user is `admin` and the password can be found with the following command `kubectl get secret grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo`

I found the command looking into some github issues and I took me some time, so I hope this is useful to someone else.

#Reference 
[GitHub Thread](https://github.com/prometheus-operator/prometheus-operator/issues/956)
Planet Xamarin
Tags: xamarinforms, french
Published: 2021-01-27 17:09:20

---
title: Planet Xamarin
published: true
date: 2021-01-26 16:53:14 UTC
tags: xamarinforms, french
canonical_url: https://www.sylvainmoingeon.fr/planet-xamarin/
---

Chercher des ressources concernant Xamarin.Forms est parfois un parcours du combattant. C'est tout éparpillé, il y a du bon, du moins bon, des choses pas franchement à jour.

Et s'il existait un pays merveilleux dans lequel les meilleurs blogs étaient réunis ?

Ce pays, ou plutôt cette planète, existe et s'appelle [Planet Xamarin](https://www.planetxamarin.com/) !

Il s'agit d'un agrégateur de blog, s'y abonner, c'est [s'abonner au gratin international des blogs Xamarin](https://www.planetxamarin.com/feed) !

Bon, c'est vrai, j'en fais des caisses, mais c'est aussi parce que depuis peu je fais partie de cette joyeuse communauté. Mon blog est désormais "Featured by Planet Xamarin".
[![Logo de Planet Xamarin](https://www.sylvainmoingeon.fr/media/posts/40/planetxamarin-featured-badge-2.png)](https://www.planetxamarin.com/)
Tukang taman surabaya | jasa pembuatan taman surabaya
Tags: tukangtamansurabaya
Published: 2021-01-26 16:04:42

Jasa pertamanan di surabaya jawa timur. Melayani jasa  pembuatan taman baru atau renovasi taman lama. Harga yang kami tawarkan berdasar jumlah item tanaman yang digunakan. Jangan khawatir dengan harga mahal sebab kami menggunakan tanaman dari hasil budidaya sendiri yang artinya bisa anda pilih dan tawar. Jenis jenis tanaman yang produksi terbilang cukup lengkap mulai dari tanaman outdoor dan indoor.

www.tukangtamansurabaya.co.id / www.jasataman.art merupakan situs terpercaya bersertifikat yang sudah mengantongi surat izin usaha perdagangan resmi negara dan dikelola bersama dalam satu menejemen tukang taman surabaya.

Detail informasi layanan kami lebih lengkapnya bisa anda kunjungi website berikut:

● www.tukangtamansuraya.co.id
● www.jasataman.art
Tukang taman surabaya | jasa pembuatan taman surabaya
Tags: tukangtamansurabaya
Published: 2021-01-26 16:02:18

Jasa pertamanan di surabaya jawa timur. Melayani jasa  pembuatan taman baru atau renovasi taman lama. Harga yang kami tawarkan berdasar jumlah item tanaman yang digunakan. Jangan khawatir dengan harga mahal sebab kami menggunakan tanaman dari hasil budidaya sendiri yang artinya bisa anda pilih dan tawar. Jenis jenis tanaman yang produksi terbilang cukup lengkap mulai dari tanaman outdoor dan indoor.

www.tukangtamansurabaya.co.id / www.jasataman.art merupakan situs terpercaya bersertifikat yang sudah mengantongi surat izin usaha perdagangan resmi negara dan dikelola bersama dalam satu menejemen tukang taman surabaya.

Detail informasi layanan kami lebih lengkapnya bisa anda kunjungi website berikut:

www.tukangtamansuraya.co.id
www.jasataman.art
Matt's Tidbits #88 - Using patches
Tags: mattstidbits, android, androidstudio, tidbittuesday
Published: 2021-01-26 15:57:19

[Last time I wrote about how to download missing Android source files.](https://matthew-b-groves.medium.com/matts-tidbits-87-finding-missing-android-sources-25b387e02130) This week, I have an interesting tidbit to share about Patch files.

I've been doing some highly collaborative programming this past week, and one of my teammates suggested I send a "patch" containing my changes, instead of creating a branch and pushing my changes up that way.

What is a patch? It's a different way of sharing code changes which don't require you to commit anything. Instead, you make any changes you want, and then Android Studio can create a specially-formatted diff that other people can import into their code.

If you're doing highly experimental work and don't want to pollute your VCS history, patch files might be just what you're looking for! (It certainly is better than manually sending over which files have changed).

JetBrains has made them easy to use too - here are instructions for how to create a patch (and, importantly, how the other person imports it): https://www.jetbrains.com/help/idea/using-patches.html

Do you have a different way that you like to share changes with your colleagues? Let me know in the comments! And, please follow me on Medium if you're interested in being notified of future tidbits.

*This tidbit was discovered on January 22, 2021.*