teleren/devto huggingface dataset:
Fix Camera 0xa00f4244 Nocamerasareattached Error in Windows 10
Tags: 0xa00f4244, nocamerasareattached
Published: 2021-03-15 09:55:35

Method 1: Make sure the camera app is turned on
Follow these steps: 

1. Press Win+I (Windows key and I key) at the same time to open Settings Window.
2. Click Privacy.
3. Click Camera in left pane. If it is off, turn it on. 

Method 2: Check for antivirus software
You can disable the antivirus software temporarily and see if the camera works. If it works, the problem is caused by the antivirus software. If you don’t want to disable it or turn it off, in the antivirus software, you can check if there are settings related to blocking the access or permission to use the camera. If yes, change the settings. For more details: Visit "https://malware-guide.com/blog/fix-camera-0xa00f4244-nocamerasareattached-error-in-windows-10"
Using React with Truffle
Tags: truffle, react, blockchain, cryptocurrency
Published: 2021-03-18 10:22:31

---
title: Using React with Truffle
published: true
date: 2021-03-15 09:47:11 UTC
tags: truffle,react,blockchain,cryptocurrency
canonical_url: https://medium.com/coinmonks/using-react-with-truffle-7b8cfc984735
---

[![](https://cdn-images-1.medium.com/max/612/0*M8dmL_XiEmiqN5qa)](https://medium.com/coinmonks/using-react-with-truffle-7b8cfc984735?source=rss----721b17443fd5---4)

How to use react with truffle

[Continue reading on Coinmonks »](https://medium.com/coinmonks/using-react-with-truffle-7b8cfc984735?source=rss----721b17443fd5---4)
Some small Css tips #010
Tags: webdev, css, html, beginners
Published: 2021-03-15 09:00:37

---
title: Some small Css tips #010
published: true
description: I try to tweet a small css tip every day. Here is a collection of some of them.
canonical_url: https://since1979.dev/some-small-css-tips-010/
cover_image: https://since1979.dev/wp-content/uploads/2021/03/css-tips-010.jpg
tags: webdev, css, html, beginners
---

To continue on my [previous post](https://dev.to/vanaf1979/some-small-css-tips-009-43mp) here are some more tweets with little Css tips that might help you in your projects. 

### Toggle classes with Javascript and change your styles.
{% twitter 1359831439416700931 %}
{% codepen https://codepen.io/Since1979/pen/mdOEGmb %}
Element.classList docs: https://developer.mozilla.org/en-US/docs/Web/API/Element/classList

--- 

### Alternative cursors.
{% twitter 1360196943234883586 %}
{% codepen https://codepen.io/Since1979/pen/yLVVZJP %}

--- 

### Css: Swap out text colors with css custom properties.
I didn't put out a new video this week, but you might have missed this one.
{% youtube Yl2j_b82zwo %}
Also check out my blog post: https://dev.to/vanaf1979/swap-out-text-colors-with-css-custom-properties-4gg

--- 

### Css mix-blend-mode.
{% twitter 1361304206871773186 %}
{% codepen https://codepen.io/Since1979/pen/NWbpRbJ %}  
Css mix-blend-mode docs: https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode

--- 

### Css border-image.
{% twitter 1361638164755062787 %}
{% codepen https://codepen.io/Since1979/pen/yLVMGXB %}
Brammus article: https://www.bram.us/2021/01/29/animating-a-css-gradient-border/

--- 

### Subscribe and Follow

**[Subscribe to my Youtube channel.](https://www.youtube.com/channel/UCeyqA3y26RlnfUSx3ufgFoA)**

**[Follow me on Twitter](https://twitter.com/Vanaf1979)**

**Thanks for reading/watching and stay safe**
React vs. Vue in 2021: Best JavaScript Framework
Tags: react, vue, javascript, programming
Published: 2021-03-15 09:45:53

While JavaScript frameworks are now vital for web app development, many companies struggle to choose between React and Vue for their projects. The short answer is that there is no clear winner in the general React.js vs. Vue.js debate. Each framework has its pros and cons and is useful for different applications. So, we’ve put together this convenient guide to popular frameworks, to help you better understand the use cases of Vue vs. React and determine which one will work best for your next project.

[Which framework to choose for your project?](https://evrone.com/react-vs-vue)
5 Useful Resources for Busy Students!
Tags: education, studying
Published: 2021-03-15 09:41:39

Some parents decide to educate their child themselves, choosing to homeschool, while others send children to boarding schools or gymnasiums. It doesn't matter which way you prefer, it matters that there are useful resources to ease up this journey. Here is a collection of 5 websites that will make the school curriculum feel like a holiday for both the child and the parents.

 

[MentalFloss] (https://www.mentalfloss.com) 

There are many different distractions out there, and MentalFloss is just one of them! However, what makes them different - is that they are good for learning interesting facts from around the world, including food, culture, and technology. So when your child just feels like procrastinating, why not use something... more useful?

 

[Budget Bytes] (https://www.budgetbytes.com)

Budget Bytes offers a great selection of recipes for any occasion or any budget. There are also vegetarian and vegan options and their 'Lunch Box' series are a gem for those, who feel like preparing their own lunch for school. Not only Budget Bytes is a great source for schoolchildren or students, but also for young people leaving on their own. There are always approximate costs included in each recipe to help you find something you can afford to make for dinner tonight.

 

[Khan Academy] (https://www.khanacademy.org) 

Khan Academy is a great place for free world-class learning for students of all ages. They tackle every subject you could possibly think of, such as maths, science, history, economics, as well as K-14 or SAT test preparation. This is a free tool for both teachers and parents, so why not put it to better use?

 

[DrWriting] (https://drwriting.com)

Have you seen your child overwhelmed with homework, assignments due, and numerous group projects? Why not take some of that weight off their shoulders and use DrWriting for one of the tasks? They offer a great selection of professionals to help your essay flourish or rock your term paper. You can also just choose to proofread your dissertation or simply edit coursework. Either way, it's a good service and alternative to procrastinating, isn't it?

 

[KeepMeOut] (http://keepmeout.com/en/)

I can't believe you haven't heard of KeepMeOut! They can help your struggle to stay away from social media and, let's say, study. What they do is block the websites you can't take your eyes off, like Reddit, Facebook, or Instagram. Their goal is to help with social media addiction and help you take control of it! Definitely a Must-try!
How to create a smart Etherum contract using Geth and Solidity
Tags: cryptocurrency, blockchaindevelopmen, solidity, ethereum
Published: 2021-03-18 10:21:52

---
title: How to create a smart Etherum contract using Geth and Solidity
published: true
date: 2021-03-15 09:39:16 UTC
tags: cryptocurrency,blockchaindevelopmen,solidity,ethereum
canonical_url: https://medium.com/coinmonks/how-to-create-a-smart-etherum-contract-using-geth-and-solidity-67906cac067b
---

[![](https://cdn-images-1.medium.com/max/1000/0*CFCEqA2THYDDJVx9)](https://medium.com/coinmonks/how-to-create-a-smart-etherum-contract-using-geth-and-solidity-67906cac067b?source=rss----721b17443fd5---4)

Creating a smart Etherum contract using Geth and Solidity

[Continue reading on Coinmonks »](https://medium.com/coinmonks/how-to-create-a-smart-etherum-contract-using-geth-and-solidity-67906cac067b?source=rss----721b17443fd5---4)
So, you want to create a git branch with your current code
Tags: git, branches, programming, coding
Published: 2021-03-15 09:31:09

Just for my reference: you have a set of changes that are getting bigger and bigger but you do not want to commit them to the `master` branch for ... reasons. So you decide to create a new branch and you are not sure about what to do. You can check [How To Create A GIT Branch With Your Current Changes](https://eekayonline.medium.com/how-to-create-a-git-branch-with-your-current-changes-a79b297c339e) or you can follow (more or less the following steps).

* Create the new branch in place:
     
     `git checkout -b newbranch`

* Commit the changes (add things if you need):
     
     `git commit -am"Some useful message"`

* Push the changes if you feel so inclined:
     
     `git push --set-upstream origin newbranch`

You can also reset the master branch, if you want:

`git branch -f master origin/master`
Blazor method firing twice
Tags: blazor, webassembly, onparametersset
Published: 2021-03-15 09:27:39

Hi
I'm fairly new to Blazor and encounter a strange problem.
I have a Blazor WASM project.
On a Razor page i've inserted a reference to another Razor page.
        <BSGroupDialog GroupIds="@BsGroupIds" />

In the code behind of the referenced page I added a method which should fire when BsGroupIds changes in the main page.
	private async Task GetBrightSpaceGroups()
	{
	   ......
	   BrightSpaceGroups.Clear();
	   foreach (var cat in GroupCategories)
	   {
	      BrightSpaceGroups.Add(...);
	   }
	   StateHasChanged();
	}

In order to fire this method I also added an override of the OnParametersSet method. 
	protected async override void OnParametersSet()
	{
	   await GetBrightSpaceGroups();
	}
Because GetBrightSpaceGroups uses a async call, the method itself must be async as well.
Therefor OnParametersSet has to be async as well.

So far, so good. This works the first time that BsGroupIds changes.
But when BsGroupIds changes several times a weird thing happens.
The BrightSpaceGroups list suddenly contains all values twice.
For some reason the foreach inside GetBrightSpaceGroups is triggered twice.

This probarbly has to do with the fact that the methods are async.
But I can't seem to find a solution for this problem. 
I don't understand why the OnParametersSet triggers twice.
Is this a Blazor issue and how can this be solved?

Thnx in advance 
Henk
Built a Slack clone with Tailwind & Alpine.js
Tags: javascript, css, showdev
Published: 2021-03-15 09:23:19

After the sidebar last week, I thought let's build something bigger. And so Slackish came into existence - a quick prototype build of Slack. Links to demo and source are included in this article.
#Intro
So, here's a quick preview of what it looks like.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a4gj1dnwip6y3ufy9kwc.png)
#Features
* Switch between conversations
* Channels and direct messages
* Indicate active conversation in sidebar.
* Display user online status indicator on title bar & sidebar for DMs.
* Auto scroll chat on new message.
* Custom scroll bars similar to Slack.

#Demo & Code
Take this project for a spin here: https://tailpine.netlify.app/slack/
And here's the source code: https://github.com/zaxwebs/tailwind-alpine/tree/main/slack

#Develop Further
Feel free to fork and add to it.
Here's a few ideas:
* Responsiveness
* Dropdown for channels & DMs.

#Conclusion
Tailwind and Alpine is a sweet combo to get up and running quick for setting up prototypes and more! The ecosystem is growing and there's so much more to come.

Thanks for reading.
What Namespace to choose for Open-Sourced .NET Frameworks?
Tags: dotnet, discuss, opensource, healthydebate
Published: 2021-03-15 09:18:13

Is there a preferred way of naming opensource libraries and frameworks in the .NET field? I've seen many different kind of things, but is there one to rule them all?

Which one (if any) is the preffered way?
* `GitHubUsername.Project` GitHub username and project name
* `Project` just the project name
* `Project.Component1` when managing many different libraries in one repository


So, what are the best practices?
HTML meter tag
Tags: html
Published: 2021-03-15 09:12:43

Ever needs to showcase a percentage visually? HTML provides us with a super cool meter tag that can be used for this exact purpose.

It looks like this:

![HTML Meter tag](https://cdn.hashnode.com/res/hashnode/image/upload/v1615360258702/0KJ8XXZUI.png)

## HTML Meter attributes

The meter tag in general, works by just typing it as `<meter>`. However, it comes with some attributes we can leverage.

- `high`: What is considered a high value
- `low`: What is considered a low value
- `min`: Starting point of the meter
- `max`: Ending point of the meter
- `value`: The current value

Considering this we can create a gauge that is on the `low` side:

```html
<meter value="1" min="0" max="10" high="8" low="2"></meter>
```

![HTML Low meter](https://cdn.hashnode.com/res/hashnode/image/upload/v1615359867768/y54LHiTe5.png)

Or we could create a reading that is considered `high`.

```html
<meter value="9" min="0" max="10" high="8" low="2"></meter>
```

![HTML High meter](https://cdn.hashnode.com/res/hashnode/image/upload/v1615359951437/LxDZFzh0_k.png)

Any other value could render in green.

```html
<meter value="5" min="0" max="10" high="8" low="2"></meter>
```

![HTML Meter tag](https://cdn.hashnode.com/res/hashnode/image/upload/v1615360072912/o9NqT19_f.png)

You can also have a play with the meters on Codepen.

{% codepen https://codepen.io/rebelchris/pen/NWbEMRR %}

## Browser support

The meter element is widely adopted. Just IE has some issues rendering it. You can place a fallback inside the meter element in the form of text or an image.

![HTML Meter element browser support](https://caniuse.bitsofco.de/image/meter.png)

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
HackerRank Big Sorting challenge
Tags: programming, challenge, sorting, javascript
Published: 2021-03-15 08:35:26

---
title: HackerRank Big Sorting challenge
published: true
description: 
tags: programming, challenge, sorting, javascript
//cover_image: https://direct_url_to_image.jpg
---
I love to take [HackerRank challenges](https://www.hackerrank.com/dashboard). Those are great to practice programming and improving your overall skills.
I do them quite often - just like today, on Monday, before actually starting my daily work...

It was easy challenge called [Big Sorting](https://www.hackerrank.com/challenges/big-sorting/problem). 
Difficulty: Easy
Max Score: 20

You have to implement the function that receives array of strings where each element in an array can have length between 1 and 10<sup>6</sup>.

Consider an array of numeric strings where each string is a positive number with anywhere from 1 to 10<sup>6</sup> digits. Sort the array's elements in non-decreasing, or ascending order of their integer values and return the sorted array.

I immediately though I have to use JS' BigInt to sort those arrays because standard number (Integer type) will "corrupt" values. 
This is because:
> In JavaScript, the Number type cannot safely represent integer values larger than 2<sup>53</sup>
>
> -- <cite>[Smashing magazine](https://www.smashingmagazine.com/2019/07/essential-guide-javascript-newest-data-type-bigint/)</cite>

Alright, my first idea was to go with:
```javascript
function bigSorting(unsorted) {
    return unsorted
        .sort((a, b) => BigInt(a) - BigInt(b));
}
```

Well it was working. Kind of. Just for example cases. 
It didn't pass all the Test cases of submission because it hit `Time limit exceeded`.

I've realized BigInt has to be slow. This is because it uses [lot more memory](https://v8.dev/blog/bigint#representing-bigints-in-memory) to store values and that's why it's slower than e.g. Number or String while comparing.

So I sit back and had to make new solution for this problem.
Almost immediately I realized that when we sort string values that have different number of digits we don't have to convert those values to `BigInt` - it's enough to compare them by _string length_.

My final solution was:
```javascript
function bigSorting(unsorted) {
    return unsorted
        .sort((a, b) => {
            if (a.length === b.length) {
                return BigInt(a) - BigInt(b);
            }
            return a.length - b.length;
        });
}
```
And it worked like a harm 🎉

Of course it can be further improved by checking if string length is longer than Number actually can accept and only then convert string to BigInt otherwise convert to Number.

That's right that was _easy challenge_ but even though required some thinking 🤔. 

Great to start new week 👨‍💻
Is GitHub Safe to Use?
Tags: github, devops, security, podcast
Published: 2021-03-15 08:31:51

I saw a lot of messages and questions like "__Is GitHub Safe?__", "__Would my code be safe on GitHub?__", and many others along this line. It seems there are only vague answers to that on the internet so with the below video I want to __give you clear answers__ to the following questions and topics:

- Is GitHub safe to use? Platform safety
- Tracking cookies on GitHub
- GitHub's transparency report
- Security Incident Response Team
- Is my code on GitHub safe?
- What can we do to be safer?
- What about Authentication on GitHub?
- Tools for a safer GitHub
- Are GitHub Actions safe?

And I've teamed up with [Anthony Borton](https://twitter.com/anthonyborton) (_DevOps Architect @ GitHub_) to bring you all the information you need.

Watch the full video here 🤓
{% youtube vAfBW1_AZkU %}

The content starts at [minute 5:07](https://www.youtube.com/watch?v=vAfBW1_AZkU&t=307s)

__Like, share and follow me__ 🚀 for more content:

📽 [YouTube](https://www.youtube.com/CoderDave)
☕ [Buy me a coffee](https://buymeacoffee.com/CoderDave)
💖 [Patreon](https://patreon.com/CoderDave)
👕 [Merch](https://geni.us/cdmerch)
👦🏻 [Facebook page](https://www.facebook.com/CoderDaveYT)
🐱‍💻 [GitHub](https://github.com/n3wt0n)
👲🏻 [Twitter](https://www.twitter.com/davide.benvegnu)
👴🏻 [LinkedIn](https://www.linkedin.com/in/davidebenvegnu/)
🔉 [Podcast](https://geni.us/cdpodcast)
Monitor Competitor Prices with Python and BeautifulSoup
Published: 2021-03-15 08:22:36

One of the most significant applications of Web Scraping in retail and e-commerce is in monitoring competitor price movements. This, when done well, can mean extra revenue and also will allow the retailer to ensure that they are always in the game and are not taken by surprise by anything the competition is doing.

Here is a simple script that does that. We will use BeautifulSoup to help us extract information, and we will track the prices on Amazon.

To start with, this is the boilerplate code we need to get a page on Amazon and set up BeautifulSoup to help us use CSS selectors to query the page for meaningful data.
We are also p[assing the user agent headers to simulate a browser call, so we dont get blocked.

Now let's analyze the Amazon site for players in the Shampoo market. This is how it looks.
And when we inspect the page, we find that each of the items HTML is encapsulated in a tag with the class a-carousel-card.
We could just use this to break the HTML document into these cards, which contain individual item information like this.
And when you run it.
You can tell that the code is isolating the cards HTML.
On further inspection, you can see that the Title of the product is always in the tag. So the code below will get us the text in the

tag.
Further, we can find similar clues to get the price, which seems to be inside a tag with class a-price and a span inside it with a class name a-offscreen. We query it like this.


I was putting the whole thing together.
And when we run this with
The name, price, the 'original price,' quantity info.

You can now save this to a DB and run this script every day or every hour as needed.

In more advanced implementations, you will need to even rotate the User-Agent string, so Amazon cant tell it the same browser!

If we get a little bit more advanced, you will realize that Amazon can simply block your IP, ignoring all your other tricks. This is a bummer, and this is where most web crawling projects fail.

Overcoming IP Blocks

Investing in a private rotating proxy service like Proxies API can most of the time make the difference between a successful and headache-free web scraping project, which gets the job done consistently and one that never really works.

Plus, with the 1000 free API calls running an offer, you have almost nothing to lose by using our rotating proxy and comparing notes. It only takes one line of integration to its hardly disruptive.

Our rotating proxy server Proxies API provides a simple API that can solve all IP Blocking problems instantly.

With millions of high speed rotating proxies located all over the world
With our automatic IP rotation
With our automatic User-Agent-String rotation (which simulates requests from different, valid web browsers and web browser versions)
With our automatic CAPTCHA solving technology
Hundreds of our customers have successfully solved the headache of IP blocks with a simple API.

A simple API can access the whole thing like below in any programming language.
Electronic Contract Manufacturing

Published: 2021-03-15 08:19:24

Companies that design, produce, assemble, and test electric materials as well as assemblies for original equipment companies are called electronic manufacturing services.

The first equipment manufacturers, generally termed as OEMs, keep the ownership of the stated merchandise designs and also brand names. Electronic Manufacturing services often branch out into contract electrical manufacturers, and also are experts in fast prototyping and also product testing.

Electronic manufacturing services offer big, medium or small production runs. The materials could be built from consignment, vendor owned or maybe customer supplied materials.

A number of electronic production <a href ="https://en.wikipedia.org/wiki/Service">services</a> provide design products like conceptual product development guidance, software program, and electrical and mechanical design assistance.

Some other electrical manufacturing services have testing skills allowing it to complete in circuit, functional, environmental, analytical laboratory plus agency compliance testing.

They utilize various processes and manufacturing solutions. Several of them offer printed circuit boards, linked populated boards or maybe assembly services into larger assemblies. Various other items that could be produced are accommodating printed circuit boards, rigid flexible circuit boards plus rigid boards.

Several vendors specialize in optoelectronics. They will be able to create products which will work as electric to optical or even optical to electric transducers. Light emitting diodes, injection laser diodes, and also photodiodes may additionally be created.

Electronic manufacturing services include component mounting. The electronic production services use 2 standard technologies, through hole engineering (THT) as well as surface mount know-how (SMT).

In the THT, elements are installed on a PCB by inserting portion prospects through gaps in the board. They're then soldering the leads instead on the exact opposite aspect of the board.

In the SMT, components are put into a PCB by soldering portion prospects or maybe terminals to the top surface area of the board.

Electronic production services can be found all around the planet and in the United States. The EMS varies regarding manufacturing capabilities, various regulatory requirements and quality standards.

<b>Find More Information</b>: <a href ="https://www.aasapartners.com">Vietnam Sourcing</a>