teleren/devto huggingface dataset:
ValueError Occurring During Saving the Form
Tags: django, python
Published: 2020-04-03 16:40:54

After click on Submit button Value error is occur.
I got this error:
Field 'id' expected a number but got 'Shailesh'.
Request Method:	POST
Request URL:	http://127.0.0.1:8000/contact/
Django Version:	3.0.5
Exception Type:	ValueError
Exception Value:	
Field 'id' expected a number but got 'shailesh'.
Exception Location:	C:\Users\Shailesh\AppData\Local\Programs\Python\Python38-32\lib\site-packages\django\db\models\fields\__init__.py in get_prep_value, line 1774
Python Executable:	C:\Users\Shailesh\AppData\Local\Programs\Python\Python38-32\python.exe
Python Version:	3.8.2
Python Path:	
['C:\\Users\\Shailesh\\Desktop\\Django_In_One_Video\\Hello',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\python38.zip',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\DLLs',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\lib',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32',
 'C:\\Users\\Shailesh\\AppData\\Roaming\\Python\\Python38\\site-packages',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages\\win32',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages\\win32\\lib',
 'C:\\Users\\Shailesh\\AppData\\Local\\Programs\\Python\\Python38-32\\lib\\site-packages\\Pythonwin']
Server time:	Fri, 3 Apr 2020 16:23:17 +0000

I delete all migrations and migrate again the same problem is occurring.
Read Apache Impala - Apache KUDU Tables and Send To Apache Kafka In Bulk Easily with Apache NiFi
Tags: apachekafka, apachekudu, apachenifi
Published: 2020-04-03 16:37:57

---
title: Read Apache Impala - Apache KUDU Tables and Send To Apache Kafka In Bulk Easily with Apache NiFi
published: true
date: 2020-04-03 16:35:00 UTC
tags: apache-kafka,apache-kudu,apache-nifi
canonical_url: 
---

[![](https://1.bp.blogspot.com/-uG-S5d7MJtM/Xodkuz_W8wI/AAAAAAAAZnA/O3VtTaiXOeI5zYtPwnAfy5ZqWFHpGDIwwCLcBGAsYHQ/s640/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25284%2529.jpg)](https://1.bp.blogspot.com/-uG-S5d7MJtM/Xodkuz_W8wI/AAAAAAAAZnA/O3VtTaiXOeI5zYtPwnAfy5ZqWFHpGDIwwCLcBGAsYHQ/s1600/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25284%2529.jpg)
  
  

[![](https://1.bp.blogspot.com/-v91HhAvdkCE/XodkuSQBjMI/AAAAAAAAZm0/_hQmQw_c0JIHd5l0wDidhmkukPm35qmqgCLcBGAsYHQ/s640/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25283%2529.jpg)](https://1.bp.blogspot.com/-v91HhAvdkCE/XodkuSQBjMI/AAAAAAAAZm0/_hQmQw_c0JIHd5l0wDidhmkukPm35qmqgCLcBGAsYHQ/s1600/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25283%2529.jpg)[![](https://1.bp.blogspot.com/-APmkLY0DDJ4/XodkudWPBxI/AAAAAAAAZm8/jWYyuJo5WmECuvticYLIbwerBjbqk4whACLcBGAsYHQ/s640/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25282%2529.jpg)](https://1.bp.blogspot.com/-APmkLY0DDJ4/XodkudWPBxI/AAAAAAAAZm8/jWYyuJo5WmECuvticYLIbwerBjbqk4whACLcBGAsYHQ/s1600/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25282%2529.jpg)
  
  

[![](https://1.bp.blogspot.com/-alZlsZgxTU0/XodkubvtjAI/AAAAAAAAZm4/DZ5PH2kxECcp9We_AWzJoGYegq-xJVCCgCLcBGAsYHQ/s640/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25281%2529.jpg)](https://1.bp.blogspot.com/-alZlsZgxTU0/XodkubvtjAI/AAAAAAAAZm4/DZ5PH2kxECcp9We_AWzJoGYegq-xJVCCgCLcBGAsYHQ/s1600/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4%2B%25281%2529.jpg)
  
  
  
  

[![](https://1.bp.blogspot.com/-ACKhUQi2q7g/XodkvF1ScfI/AAAAAAAAZnE/5HBiDIvQG2w7GT_Pdu59jjn7Tng_IpVDwCLcBGAsYHQ/s640/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4.jpg)](https://1.bp.blogspot.com/-ACKhUQi2q7g/XodkvF1ScfI/AAAAAAAAZnE/5HBiDIvQG2w7GT_Pdu59jjn7Tng_IpVDwCLcBGAsYHQ/s1600/Introduction%2Bto%2BApache%2BNiFi%2B1.11.4.jpg)

  

**See:  **

**[![](https://1.bp.blogspot.com/-tHbgbLoQW0c/Xodlmm9DgcI/AAAAAAAAZnc/61sOm7XEvB8acKYlvPymPDNP_EFgJysIgCKgBGAsYHg/s320/flankstacksticker.png)](https://www.flankstack.dev/)**

**[https://www.flankstack.dev/](https://www.flankstack.dev/)**
Maximum Subarray, Kadane's algorithm
Tags: javascript, algorithms, interview, coding
Published: 2020-04-03 16:07:17

Question: Given an array, find the maximum subarray sum.

Eg: For given array : [-2,1,-3,4,-1,2,1,-5,4]
             output : 6 for subarray [4,-1,2,1]

Brute force: O(n^2)

Brute force solution would be to go generate all possible subarray and find the maximum subarray.

```javascript
var maxSubArray = function(nums) {
    if(nums.length == 0) return 0;
    let max = nums[0];
    for(let i=0;i<nums.length;i++){
        let sum = 0;
        for(let j=i;j<nums.length;j++){
            sum+=nums[j];
            if(max<sum) max = sum;
        }
    }
    return max;
};
```

Now let's observe and find patterns that might help us optimize our solution. 

For an Array A let's consider the following observations
If for subarray Sum(A[i,....,j-1]) < A[j], then we know that there's no need to calculate Sum(A[i+1....,j-1]) again since it will definitely be less than A[i].

So based on this, if we come across a situation where current element is greater than sum of previous elements, then we shall start a new subarray from the current subarray.

Let's understand this : 

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

So as you can see here, 
1 > we maintain two containers, sum and maxSum, we keep on adding elements to sum and compare it with maxSum, and change maxSum only if sum>maxSum.
2 > we change sum when the current element is greater than sum.

this approach improve our time from O(n^2) to O(n).

code: 
```javascript
var maxSubArray = function(A) {
    let sum = A[0];
    let maxSum = A[0];
    for(let i=1;i<A.length;i++){
        sum = Math.max(sum+A[i],A[i]);
        maxSum = Math.max(maxSum,sum);
    }
    return maxSum;
};
```

github : https://github.com/AKHILP96/Data-Structures-and-Algorithms/tree/master/problems
If you've been laid off recently, I'd like to offer free portfolio/resume reviews/mock interviews
Tags: webdev, javascript, career
Published: 2020-04-03 16:16:44

I've been seeing a lot of people going through tough times with the current pandemic. I'd like to try to help in someway. 

If you'd find it helpful for any kind of portfolio/resume review, I'd be more than happy to offer my help. I focus mostly in JavaScript and front-end tools/technologies. I used to do these kinds of reviews fairly regularly and want to start back up given the current circumstances.

Please DM me for more info if you or someone you know may be interested!
Wizar devlog 11 - Live demo of Ravioli
Tags: gamedev, typescript, sam
Published: 2020-04-03 15:33:54

I just published a [live demo of Ravioli](https://codesandbox.io/s/admiring-turing-tkbwr)!
It is a simple example which will serve for a base on future tutorials I am currently writing. The first will be on the readme of the [package](https://github.com/dagatsoin/ravioli/tree/docs/packages/ravioli), and I will make some videos too. Never done that before, will see.

I am very happy for the result, I hope to produce quickly some learning materials to see if people are interested in SAM development approach.
Image In Text Using CSS
Tags: css, html, webdev, beginners
Published: 2020-04-03 15:23:38

Image is an important part of any website, like how you organize images on the website, etc. So here we used the image in a text format using a single line of the property.

In this element, we used the H1 heading tag and for a used image we used to color transparent. For use over the image, we used background-clip and also used background cover. Also, we used media queries to make responsive to this element.

Make it yours now by using it, downloading it and please share it. we will design more elements for you.

[Download source code](https://w3hubs.com/image-in-text-using-css/)
I made a website which helps you find interesting open source projects
Tags: showdev, webdev, react, javascript
Published: 2020-04-03 15:01:02

**Project page**: https://opensourceappfinder.coders.party

**Source code**: https://github.com/dhst1211/opensourceappfinder

This is a project that helps you find open source projects you want to use and contribute to next time.
I made this website because I found that there are lots of open source apps that can be used in everyday life. Also, I heard that the best way to start contributing to open source is by choosing the projects you actually use, so by discovering apps you want to use, you can increase the chance to contribute to open source.

You can filter projects by language and category, which means you can search the project that uses your favorite language and sparks your interests(perfect match!).
This website only includes apps and excludes libraries because I thought it is easier to use and read codebase. And you can explore the libraries the project uses later on.

There are apparent bugs but I decided to make this public now because my focus has shifted to different things.
I have always felt that it is difficult to find an open source that is right for you to contribute, so I hope this helps your first open source contribution!

**Tech stack**
* React
* Redux
* node 
* Express
* Material-ui
* postgres

**Update(April 4)**
Thanks for your feedback! At first, I was wondering if I should make this project public or throw it away. So I didn’t expect that many people visit this post and project.
I want to see your half-done/abandoned project next time😀
The WebAIM Million 2020
Tags: a11y, webdev
Published: 2020-04-03 14:26:22

---
title: The WebAIM Million 2020
published: true
description: Quick review of the WebAIM Million report released on March 30th, 2020.
tags: a11y,webdev
---

WebAIM published its annual [accessibility analysis of the top 1,000,000 home pages](https://webaim.org/projects/million/) a couple of days ago. This is an automated analysis of the home pages for the one million most visited pages on the Internet. 

Last year's report drove me to write my first article on DEV:

{% link https://dev.to/alvaromontoro/fix-85-of-your-web-accessibility-issues-in-5-easy-steps-pnf %}

And the results this year are... pretty similar to last year's. Actually, the numbers are even getting worse:

- The percentage of pages with errors is up
- The average number of errors per page is up
- The number of errors on pages using JS frameworks and libraries is up
- The top 5 errors are still the same (and in similar percentages)
- Sites are still using `<marquee>` and `<blink>` :O

But not all of it is negative, there are some silver linings and positive things:

- The size and complexity of home pages went up (+10%) but the number of errors didn't grow proportionally (+2%)
- ...which means: error density is down (1 in every 14 elements)
- CMS's are averaging fewer errors (in general)
- The number of sites still using `<marquee>` and `<blink>` is down :)

I will write a more in-depth post in the following days, but I highly recommend everyone to [check the report](https://webaim.org/projects/million/) and analyze your websites!
Daily Challenge #218 - Possible Sides of a Non-Right Triangle
Tags: challenge
Published: 2020-04-03 14:09:18

---
title: Daily Challenge #218 - Possible Sides of a Non-Right Triangle
published: true
series: Daily Challenge
description: Use the Pythagorean theorem without right triangles. 
tags: challenge
---
Your strict math teacher is teaching you about right triangles and the Pythagorean Theorem --> `a^2 + b^2 = c^2` whereas a and b are the legs of the right triangle and c is the hypotenuse of the right triangle. 

On the test, however, the question asks: `What are the possible integer lengths for the other side of the triangle?`. Since you never learned anything about that in class, you realize she meant `What are the possible integer lengths for the other side of the right triangle?`. 

Because you want to address the fact that she asked the wrong question and the fact that you're smart at math, you've decided to answer all the possible values for the third side EXCLUDING the possibilities for a right triangle in increasing order.

Return your answer as a list of all the possible third side lengths of the triangle without right triangles in increasing order.

###Examples
```
side_len(1, 1) --> [1]
side_len(3, 4) --> [2, 3, 4, 6]
side_len(4, 6) -->[3, 4, 5, 6, 7, 8, 9]
```

###Tests
`side_len(5, 12)`
`side_len(8, 10)`
`side_len(3, 4)`

Good luck!
***
_This [challenge](https://www.codewars.com/kata/5e81303e7bf0410025e01031) comes from tonylicoding on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
What's something you did this week that you're proud of?
Tags: discuss, productivity, codenewbie
Published: 2020-04-03 13:58:04

Hey DEV Community 👋🏽

Another week has come to an end. In these trying times, we're all trying our best with what we have available. We many not feel as "productive" as we otherwise would. Still, there are things—big or small—that made us happy or made us feel accomplished.

So let's discuss and let's celebrate each other: **What's something you did this week that you're proud of?** I'll go first!

This week I published a new post on my personal blog and I added significantly to my upcoming book's word count. I hadn't written much in three weeks so it was a welcome change.

Share your wins (no matter how small they may seem to you) with us!
What Did You Learn This Week --April 3?
Tags: todayilearned, discuss
Published: 2020-04-03 13:49:30

---
title: What Did You Learn This Week --April 3?
tags: todayilearned, discuss
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--TpOOUw4B--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/67bb72156h4y13zl5cio.png
series: this-week-i-learned
---
Yarn + NodeJS LTS with Homebrew
Tags: tutorial, node, yarn, homebrew
Published: 2020-04-03 13:34:40

The last **Yarn** version in **Homebrew** uses a non-LTS version (`15`) of **NodeJS** as its dependency. If this is an issue for you as it is for me, I just managed to accomplish use **Yarn** with the latest LTS version of **NodeJS**.

I created a [gist for it](https://gist.github.com/caian-gums/b9ddd042772649bca8d55ff6ed94b2be) and here are the following steps

* Uninstall Yarn and Node
```sh
$ brew uninstall yarn
$ brew uninstall node
```
* Install the latest LTS version of Node
```sh
$ brew install node@12
```
* Create the Symlink for it
```sh
$ ln -s /usr/local/opt/node@12 /usr/local/opt/node
```
* Install Yarn without its dependencies
```sh
$ brew install yarn --ignore-dependencies
```

And that's it!

If you want to check the versions of each package, just run
```sh
echo "Yarn Version: $(yarn --version)"
echo "Node Version: $(node --version)"
```

_Cover Photo by [Sereja Ris](https://unsplash.com/@kimtheris?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/cat?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_
Top Game Info
Published: 2020-04-03 13:24:28

Every one of those game aficionados simply prepares for the best accessible data that you won't find anyplace else, so simply view this article and discover what you have to think about a portion of the top arcade cupboards today. With regards to game arcade cupboards then there are a ton of choices out there in the market that you could benefit from.
Visit [http://jeuxarcades.com/](http://jeuxarcades.com/)
React Native Firebase Tutorial
Tags: reactnative, ios, android, tutorial
Published: 2020-04-03 13:21:19

<strong>React Native Firebase</strong> is a very useful tool that can be used for any mobile application for iOS and Android. This will be the first video in a series where we take a look at getting and using react-native-firebase on our react-native project.
{% youtube LYi1gwPWDto %}<center>https://youtu.be/LYi1gwPWDto</center>
Topics we cover in this video include:
* <strong>Installing </strong> react native firebase 6
* Setting up <strong>New Project</strong>
* Linking an <strong>Existing Project</strong>
* <strong>Setting up dependencies</strong> for iOS and Android
* <strong>Firebase console</strong> configuration for iOS & Android
* <strong>Test & Build</strong> project to ensure it works and connects to firebase

In the next lot of videos, we will take a look at setting up things like firebase analytics, ads, database and authentication.

Be aware that the project itself has undergone a major upgrade. The new version can be found here:
https://rnfirebase.io/

## Follow and support me: 
Special thanks if you subscribe to my channel :)
* [🎞️ Youtube](https://www.youtube.com/channel/UCvM5YYWwfLwpcQgbRr68JLQ?sub_confirmation=1)
* [🐦 Twitter](https://twitter.com/adrian_twarog)

## Want to see more:
I will try to post new great content every day. Here are the latest items:
* [Adobe XD to Fully Responsive WordPress Site](https://dev.to/adriantwarog/adobe-xd-to-fully-responsive-wordpress-site-16e0)
* [Adobe XD to HTML Full Process](https://dev.to/adriantwarog/adobe-xd-to-html-full-process-ao6)
* [Full Tutorial on how to use SASS to improve your CSS](https://dev.to/adriantwarog/full-tutorial-on-how-to-use-sass-to-improve-your-css-57on)
* [Creating a Mobile Design and Developing it](https://dev.to/adriantwarog/creating-a-mobile-design-and-developing-it-5c4o)
HackerRank’s 10 Days of JS
Tags: javascript, hackerrank, github
Published: 2020-04-03 13:06:00

---
title: HackerRank’s 10 Days of JS
published: true
description: 
tags: JavaScript, HackerRank, GitHub
cover_image: https://cdn.hashnode.com/res/hashnode/image/upload/v1707916328704/e12d7075-0397-41c0-a6de-59e04679eb79.png
canonical_url: https://fobabs.tech/hackerranks-10-days-of-js
---

Many programmers out there may likely have difficulties in solving some of the HackerRank’s 10 Days of JS practice, some may even abandon it for something else.

This reason prompted me to make my solutions open-source on GitHub for everyone taking up the practice to learn from. All you have to do is click on the link below:

https://github.com/fobabs/10_Days_of_JS
Alpine.js: responsive x-cloak
Tags: alpinejs, css
Published: 2020-04-03 12:59:30

---
title: Alpine.js: responsive x-cloak
published: true
description: Responsive CSS rules for Alpine.js's x-cloak
tags: alpinejs,css
---

When using [Alpine.js](https://github.com/alpinejs/alpine) the `x-cloak` attribute is removed from DOM elements when Alpine is initialised. As noted in the docs, this makes it useful for hiding elements until Alpine is initialised:

> `x-cloak` attributes are removed from elements when Alpine initializes. This is useful for hiding pre-initialized DOM. It's typical to add the following global style for this to work: 
> ```css
<style>
  [x-cloak] { display: none; }
</style>
 ```


You may want to hide pre-initialised DOM on some screen sizes, but not others. A good example for this is the links in a site's navigation bar, which are typically hidden by default on smaller screen sizes, but are always visible on wider screens. 

So instead of hiding all elements with the `x-cloak` attribute, we can hide only the ones whose `x-cloak` attribute has no value:

```css
[x-cloak=""] { display: none; }
```

This allows us to target elements whose `x-cloak` attribute has a value:

```css
[x-cloak="some-value"] { }
```

So now we can write CSS rules targeting elements whose `x-cloak` value is `mobile`, `tablet`, `desktop`:

```css
/* always hidden */
[x-cloak=""] { display: none; }

/* hidden on mobile/smaller screens */
@media screen and (max-width: 768px) {
    [x-cloak="mobile"] { display: none; }
}
```
Twilio Hackathon - Artemis
Tags: twiliohackathon
Published: 2020-04-03 12:33:31

[Comment]: # (All of this is placeholder text. Use this format or any other format of your choosing to best describe your project.)

[Reminder]: # (Make sure you've submitted the Twilio CodeExchange agreement: https://ahoy.twilio.com/code-exchange-community)

[Important]: # (By making a submission, you agree to the competition's terms: https://www.twilio.com/legal/twilio-dev-hackathon-terms)


## What I built

One thing that the open source initiative does right is to tell people _how_ they can help with repositories, you go onto a repository and there is an "issues" tab right there! One thing I've always struggled with is the fact that I _want_ to help causes but never know _how_ to do it, what active drives have they got on? How can I help specifically.

That's why I want to build a website that will allow organisers to a page dedicated to them! They will be able to list all of the information about upcoming events, timed events or persistent things that they need help with. 

One good example I have in mind is: 
> I am a homeless shelter
>We need donations be it food, clothes or blankets and I would like people in an area to be aware of the fact that we are running low

Here's my plan
Minmum viable product: 

- Companies/charities can sign up and have a goal i.e. x amount of money to fix a roof.

- Volunteers will be able to sign up and help with the causes by donating time/money/effort towards the cause.

- We can "ping" people about events in their area via text.

## Demo Link

https://artemiswebserver.azurewebsites.net/

## Link to Code

{% github joro550/Artemis %}

## How I built it (what's the stack? did I run into issues or discover something new along the way?)

C# back end and c# front end with blazor/webassembly. 

Things I have learned: for the past couple of years I've been watching the blazor framework very closely so when the oppertunity came to use it in a hackathon? I thought I'd give it a good go at creating a website with it, and I fell in love immediately. I have learned a lot about the framework and how to interact with the framework.


## Additional Resources/Info

COVID-19 is obivously on everyones mind right now and it is affecting us all, we need to help those most in need by shipping resources and donations to them, but we need to think bigger than COVID, bigger than any one major disaster. We need to think about how we respond as a people, and how we can support local and not so local charities that are on the front lines of dealing with unfair situations every day. 

People that are willing to help will have actionable, tangable things that they can do - with (hopefully) a simple web interface they will be able to sign up and help within a matter of minutes.

Quick video explaination and demonstration:

{% youtube tnEI76no7rk %}

Resources: 

- [Learn Blazor](https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor)
- [Web Assembly](https://webassembly.org/)
- [Try dot-net](https://dotnet.microsoft.com/platform/try-dotnet)
Find The Best UX Design Services Provider - UIUX Studio
Tags: ux, uxdesign, uxservices, userexperience
Published: 2020-04-03 12:10:57

With the constant support of professional technicians and designers that we have in our team, we provide custom and best web outsourcing services. Our extensive range of services is not just for regular clients but also for various companies and startups who are looking for a perfect platform to join hands with! For an excellent working experience with the best UX Design Services ( https://bit.ly/3av8oRc )together, do not hesitate to reach out to us as we are here eagerly waiting for your response!