teleren/devto huggingface dataset:
counters != countersWorking; SOLVED
Tags: java
Published: 2020-03-19 17:00:08

Hey everyone as for the title I am having trouble with my counters not working. They are itemCounts and discountCounts. They are arrays that hold the value of  ITEM\_NAMES.length and DISCOUNT\_NAME.length. This is a school practice project and those are the values I was given but I am not sure on how to use them to count the number of time the item or discount has been selected. Usually I would just use........... **BARRROOOOOO!!!**

I literally just figured out what my problem was. I just realized I am using arrays and because I am also using an if statement to check if it is the correct item I could just used that array point like so:

itemCounts\[0\]++;

I guess I was overthinking it the whole time because I was scared of failing and looking stupid.

Well thanks for your help?

The project is a gist [here](https://gist.github.com/sonAndrew/e6d917ba68ace540ae8dbd71ded340f9);
CSS training
Tags: css, codepen
Published: 2020-03-19 16:51:03

CSS is a very, very important part of APP development, but if you only write CSS for the APPs you build (like you probably do), it may happen you end it up forgetting some CSS "useful" tricks and combinations. So how can you become better at writing CSS? There's a lot of ways but I for example decided to dare my self to develop an object design entirely on CSS, without images or SVGs. So now you have to stay at home, try to build some cool illustration entirely on CSS, no matter if took you 1h or 1 day, the point is training. Here is mine https://codepen.io/alexandprivate/pen/RwPoyme

Leave a comment with yours.

*Photo by [Pixelbay, at Pexels](https://www.pexels.com/@pixabay)*
React Components
Tags: javascript, react
Published: 2020-03-19 16:49:42

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

Before we begin, it's important to know that the parent components are able to send down properties to it's children component(s).

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


The simplest way to create a component of React is to use ***functional components***. Functional components are just regular functions in JavaScript.

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

Above are examples of writing a functional component. One is a regular function and the other is an arrow function. When using a functional component, you have to pass in an argument in order to get access to the properties you want to receive from the parent. In my examples, I used ***props*** as the argument.

Now lets move onto a slightly more complex way of creating a React component via the ***class component***.

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

The example shown above will return the same results as the functional component examples. Some of the differences between the two is that class components are more complex under the hood and you don't need to pass in an argument to gain access to the parents properties. You can just call <code>this.props.name</code> to get the return value.

* In functional components, the argument can be anything. But in class components, you have to use *props*.

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

One very important difference between functional and class components is the ability to use ***state***. Functional components are just basic functions of JavaScript and doesn't have it's own state. Class components on the other hand does. State will be very important when you want to update something in your React app.

Props are read-only. If you want to be able to update information on your component, I suggest you use a class component. Of course, there are ways around it by lifting the state up to the parent component and then pass it down to the functional component via props. The parent component will most likely be a class component to gain access to state.

The React docs are a great resource if you want to learn more about state, lifting state, and inverse data flow.

[React Documentation](https://reactjs.org/docs/components-and-props.html)
Do you want contributors for your Open Source Project?
Tags: opensource
Published: 2020-03-19 16:45:14

---
title: Do you want contributors for your Open Source Project?
published: true
description: Let's share some of your projects and try to find out a perfect match (Yes, like **nder)
tags: open source
---

There are many benefits when a developer contributes to open source, but when he has nothing or is not very experienced, it is difficult to make his first pull request.

So I want you to share your open source project in the comments section and anyone who comes to you interested in contributing has to help (as a mentor) until he/she can successfully make their first attempt.

Let's get started.
[ESP] Cómo agregar SASS a tu proyecto de React
Tags: spanish, react, sass
Published: 2020-03-19 16:34:32

Cuando empecé a experimentar con SASS, lo primero que hice fue buscarme un plugin de VSCode para que agregase la herramienta automáticamente a mi sistema; sin embargo, cuando comencé a trabajar en proyectos conjuntos con personas que utilizaban otros editores de código, la utilización del plugin se convirtió en un problema.

A principios de año me tomé el tiempo de revisar varios videos de YouTube y encontré una manera bastante rápida y fácil de agregar SASS a un proyecto de React que recién comienza (¡para los que van avanzados también se puede adaptar!)

Seguro hay mil maneras más de hacerlo, pero esta es la que yo encontré y me ha funcionado muy bien.

## AQUÍ VAMOS:

* Crea tu proyecto de React en el editor de código que quieras.

* Abre la terminal que usas siempre y escribe

   `npm install --save-dev node-sass`

* Crea una carpeta llamada *Styles* dentro de tu carpeta `src`.

* Dentro de la carpeta *Styles* crea un archivo *variables.scss*.

* Cambia *App.css* a *App.scss* sobre-escribiéndolo y mueve el archivo dentro de la carpeta *Styles*

* Ve a *App.js* y cambia *App.css* a *App.scss*. Esto debería aparecerte en la parte superior, donde están los archivos importados (imports).

* Dentro de *App.scss* importa tu archivo de variables (*variables.scss*)

* ¡LISTO!

---

Si te da flojera seguir estos pasos o estás muy apurado, cree un repo descargable que ya tiene todo esto implementado. ¡Lo puedes usar sin problema!

#[¡Aquí está!](http://bit.ly/2QpFdHJ)

¿Se rompió todo? ¿Le ves algo raro? Avísame y lo arreglamos 😉
JavaScript String toLowerCase and toUpperCase
Tags: javascript, react, node, codenewbie
Published: 2020-03-19 16:30:21

---
canonical_url: https://bonsaiilabs.com/javascript-string-lowercase-uppercase/
---

In this short video, you will learn how to change the JavaScript String to lower and upper cases using methods available on String constructors. We will use `.toLowerCase()` and `.toUpperCase()` methods.


The code sample is available at https://bonsaiilabs.com/javascript-string-lowercase-uppercase/

{% youtube s_9wf2L3Fn0 %}

Subscribe for more videos on JavaScript with Visualization: https://www.youtube.com/channel/UC0yZBnRsD9JRqLXBkfGym0Q?sub_confirmation=1
Anyone for Waffles? An open-source file upload library for Elixir
Tags: elixir
Published: 2020-03-19 16:16:17

Anyone for Waffles? 

An open-source file upload library for Elixir
Do you work on Elixir projects that need to handle file uploads from users?

Waffle is a flexible library, developed by one of our engineers — Boris Kuznetsov — which does the hard work of handling file uploads for you, whilst providing easy integration with storage services such as Amazon S3, Google Cloud Storage, Azure, RackSpace Cloud, as well as image manipulation tools such as ImageMagick, so that uploaded files can be optimised on-the-fly!

Waffle grew out of a fork of a now-unsupported library, to which we've added complete documentation, fixed outstanding issues, merged open pull requests, added integrations with other parts of the Elixir ecosystem (in particular Phoenix and Ecto). We've also working on new features, such as file validation based upon content rather than the type supplied by the browser.

This release of Waffle is v1.0.0. If you've previously used Arc, you'll find the transition to Waffle very straightforward, although note that the dependencies have been upgraded, and Poison has been removed in favour of Jason.

https://evrone.com/waffle-elixir-library
How to know how much your application is consuming on Azure
Tags: azure, cloud, startup, development
Published: 2020-03-19 19:28:06

---
title: How to know how much your application is consuming on Azure
published: true
date: 2020-03-19 15:51:00 UTC
tags: azure,cloud,startup, development
canonical_url: http://www.frankysnotes.com/2020/03/how-to-know-how-much-your-application.html
---

[Available in French](http://www.cloudenfrancais.com/posts/Comment-savoir-combien-votre-application-consomme-sur-Azure.html)

Are you worried when deploying a new application about our billing? Or afraid that you will receive an invoice from your cloud provider at the and of the month that put you in a bad situation? You are not alone, and this is why you should definitely look at the Azure Cost Manager.  
  
In the video below, I explain how to use the Azure Cost Manager to see the actual cost and forecast for a specific application in the cloud and build a dashboard with your favorites information. Note that I said "cloud" because Azure Cost Manager can monitor both Azure and AWS resources. That's perfect for when we are "in" the portal, and that's why I will also show how you can make budgets, and set alerts, so you can track your resources automatically.  
 
{% youtube uIXF83SpMDM %}
 
### Useful Links

- [Learn Cost Management](https://aka.ms/LearnCostManagement)
- [Cost Management Labs](http://bit.ly/azCostLabs)
- [Azure Cost Management](https://www.youtube.com/c/AzureCostManagement)
- [Azure Resource Manager (ARM) Tools](http://bit.ly/ARMTool)
- [Get Started with Azure with a Free Subscription](http://bit.ly/AzFree)
Why delete my comment?
Tags: comment
Published: 2020-03-19 15:40:01

Once I wrote something and it worked well in Chrome and Firefox, but Internet Explorer had some behavior that made it not work well, so I tweaked it, and add the comment there, saying it is done this way or else it won't work well in IE.

So my coworker saw the code, and out right removed every single word of the comment.

If I ask her why she removed it, she'd answer something like, "it is no use". And if I say, "it needs to say why we do it this way but not the more obvious way." And she'd say something like "we write code, not comment". Together, she would throw in some tone, some attitude, and some temper.

I really don't understand why useful comments would be removed.  So another programmer can see my code, spend 20 minutes refactoring my code, and then commit it, and now it is 20 minutes wasted, to introduce a bug back into IE.
New tech start-ups
Tags: startup, javascript
Published: 2020-03-19 15:36:48

I read an article from [@foundsiders](https://dev.to/ilonacodes). And my response to their post https://dev.to/foundsiders/are-early-stage-startups-dead-by-default-when-coronavirus-is-causing-significant-harm-to-the-world-s-economy-345f is below.

---

I think that start-ups that are disruptive in any industry or economy get noticed by the right people.

With the current world crisis, funding is bleak. But a lean start-up has more chance in surviving the storm which is yet to come. Adapting a business model is also key at this moment in time. And I don't personally condone companies which make a profit from the suffering or loss of people.

I recently created a start-up, lean, agile and with very limited capital. Just one team member. Well two, Googles search AI. I intend to shift the focus of consumer interest, raise awareness and promote, action and help attain UN sustainability goals.

My reason for this is that I knew I wanted to create the start-up, I revised the product offering once in the very early days of attendance to a business boot camp. And I knew deep inside me that I had a purpose which in time, became clearer and clearer as I found it difficult to decide on the course of a business operational goal. I knew I wanted to make a change in the world. For the better. But how I would do this. That was a challenge in its self.

The world we live in has changed dramatically in the past months. I want to make a change in the world. And make it a better place.

---

What I didn't mention, which I thought about just now, is that many of the seeded start-ups are going to have a considerable difficult time generating revenue in sales of products/services, etc with the current global crisis which has just started.

But what I want you all to know is that you can do it. You can create a lean, agile, start-up and prepare for the recovery of the world crisis. We just don't know yet. When that will be. I think it will be a couple of years. But maybe 8 months before people are back to work.

---

Credits:
- Ilona Codes [@foundsiders](https://dev.to/ilonacodes) - article author
- Aubrey Rose [Unsplash](https://unsplash.com/@octoberroses) - cover image
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-03-19 15:33:57

day 10/100 of #100daysofcode #Flutter 
Belajar Flutter , dari kursus Udemy from 
@maxedapps


Implement about Const and make build metode,
https://github.com/triyono777/100-days-of-code/blob/master/log.md
Code with me Series tonight
Tags: phalcon, phalcon4, wuhanvirus, codewithme
Published: 2020-03-19 16:00:55

---
title: Code with me Series tonight
published: true
date: 2020-03-19 15:33:09 UTC
tags: phalcon,phalcon4,wuhanvirus,codewithme
canonical_url: https://blog.phalcon.io/post/code-with-me-series-tonight
---

Code with me hangout! Join us tonight at 17:30 EST (21:30 UTC)

In our previous blog post we encouraged everyone to contribute to open source projects (and of course Phalcon) now that we are all stuck inside due to the WuHan virus.

In an effort to help everyone with this potential transition, we announced that we will start **Code with me** hangouts to help developers that are interested in contributing to open source projects, but also to show how we code in Phalcon.

The hangout will be held on YouTube here:

[https://youtu.be/eks-XXhymuw](https://youtu.be/eks-XXhymuw)

In this first hangout we will just pick a bug report and try to fix it. The format will not be a strict one so we will be able to deviate based on questions or feedback by those that attend.

We will also hold additional hangouts, where we will try and create new applications that mostly match to what the community requests.

Stay safe and keep coding!

* * *

Chat - Q&A

- [Discord Chat](https://phalcon.io/discord)
- [Forum](https://phalcon.link/forum)

Support

- [OpenCollective - Support Us](https://phalcon.io/fund)
- [Store - Merchandise](https://phalcon.io/store)

Social Media

- [Telegram](https://phalcon.io/telegram)
- [Gab](https://phalcon.io/gab)
- [MeWe](https://phalcon.io/mewe)
- [Parler](https://phalcon.io/parler)
- [Reddit](https://phalcon.io/reddit)
- [Facebook](https://phalcon.io/fb)
- [Twitter](https://phalcon.io/t)

Videos

- [BitChute](https://phalcon.io/bitchute)
- [Brighteon](https://phalcon.io/brighteon)
- [LBRY](https://phalcon.io/lbry)
- [YouTube](https://phalcon.io/youtube)

<3 Phalcon Team
Remote Jobs Sites [updated 2022]
Tags: backend, frontend, hiring, beginners
Published: 2020-03-19 15:29:50


In times of great adversity and chaos, we need to stay optimistic, adapt to the circumstances, and help others as much as possible.
The economy may have been globally affected and the way we have to work has been compromised, therefore, some of us might need to find new jobs and working remotely has practically shifted to be the only choice. 
In the following list, it can be found several sites with Remote Jobs offers:

- [We Work Remotely](https://weworkremotely.com/)
- [Remotive.io](https://remotive.io/)
- [Teletreballa.com](https://teletreballa.com/)
- [Full-Stack Developers](https://fullstackjob.com/)
- [Flex Jobs](https://www.flexjobs.com/)
- [Working Nomads](https://www.workingnomads.co/jobs)
- [Remote.co](https://remote.co/)
- [Jobspresso](https://jobspresso.co/)
- [Remote ok](https://remoteok.io/)
- [Just Remote](https://justremote.co/)
- [AngelList](https://angel.co/)
- [GitHub Jobs](https://github.com/about/careers#positions)
- [Stack Overflow](https://stackoverflow.com/jobs?r=true)
- [Freelancer](https://www.freelancer.com/)
- [Upwork](https://www.upwork.com/)
- [Adeva](https://adevait.com/)
- [WeRemote Europe](https://weremote.eu/)
- [DailyRemote](https://dailyremote.com/)
- [Remote Tech Jobs](https://www.remotetechjobs.com/)
- [Up2staff](https://up2staff.com/)
- [FreshRemote](https://freshremote.work/)
- [Remote in Europe](https://remoteineurope.com/)



Volunteering:
- [Do-it](https://do-it.org/opportunities/search?working_from_home)

And of course:

- [Linkedin](https://www.linkedin.com/jobs/)
- [Glassdoor](https://www.glassdoor.co.uk/index.htm)
- [Indeed](https://www.indeed.co.uk/)
- [Monster](https://www.monster.co.uk/internationalJobs/)

Don't forget to bookmark the post if it's useful.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/qhukd68mdf1x0dko6xxf.png)


Thank you for reading! **Some feedback would be awesome!**
Leave a comment to share your thoughts, ask questions or just say hello!
Powerlevel10k zsh theme
Tags: linux, zsh, webdev, beginners
Published: 2020-03-19 14:08:12

Hi, everyone

Today I want to write about Powerlevel10k zsh theme that can help you get more information regarding certain operations and commands you run in the terminal(Konsole).

#Section 1

What is powerlevel10k and how does it look?

Powerlevel10k is a zsh theme that uses power fonts and a guided configuration wizard to help you customize it in an easy way.

The configuration wizard can be rerun(used again) anytime by using the following command:

```shell
p10k configure
```

When we type this command the configuration wizard will ask a lot of question regarding the look and feel that we want for our terminal theme.

That is all well and good Wolfiton, but can I see some screenshots?

Opening a new terminal look and feel(state)

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

Typing an unknown(unrecognized) command

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

> The background in the terminal doesn't come from powerlevel10k, it is a customization added to the kubuntu terminal.

Also to see all the style available visit this link and scroll to te Readme section [styles link](https://github.com/romkatv/powerlevel10k)

#Section 2

Install powerlevel10k zsh theme on antigen

> Note: **Dear Reader** if you use another zsh manager(special tool to install zsh plugins) feel free to use that and also check this page for complete instruction on how to do that, [instructions link](https://github.com/romkatv/powerlevel10k)

For antigen we only need to add this line to .zshrc and replace our current theme.

```shell
antigen theme romkatv/powerlevel10k
```

The config should look like this:

```shell
other lines

# Load the theme.
antigen theme romkatv/powerlevel10k

# Tell Antigen that you're done.
antigen apply
```

If all goes well the config wizard should appear asking you questions **Dear Reader** of what style, you would like to choose.

I also recommend to install the Meslo font, it is an amazing font for readability.

You can find more info regarding the font here [font link](https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k)

I hope you enjoyed the article **Dear Reader**.

What do you think about the powerlevel10k theme, will you use it, **Dear Reader**?

Also, if you find the article useful share it on social.

Credits:

Powerlevel10k [link](https://github.com/romkatv/powerlevel10k)

Nerd Fonts [link](https://github.com/ryanoasis/nerd-fonts)
Pandas tools you didn’t know you needed, part 2: Groupby
Published: 2020-03-19 14:59:47

Very often, you need to do something to groups of rows of a dataframe that match some condition, for instance a certain mouse or brain region. The most intuitive solution is to use a for loop.

For instance, let's start with this dataframe:

|    | experiment                | brain_region   |   neuron |   Mean ISI |
|---:|:--------------------------|:---------------|---------:|-----------:|
|  0 | bucket_1_m026_1568757659_ | pfc            |        0 |    3.08281 |
|  1 | bucket_1_m026_1568757659_ | pfc            |        1 |    8.37044 |
|  2 | bucket_1_m026_1568757659_ | pfc            |        2 |   38.5265  |
|  3 | bucket_1_m026_1568757659_ | pfc            |        3 |   31.795   |
|  4 | bucket_1_m026_1568757659_ | pfc            |        4 |    3.43186 | 

We can loop over experiments, brain regions, and neuron like so:
```python
log_mean_isi = []
for neuron in df['neuron'].unique():
    for brain_region in df['brain_region'].unique():
        for experiment in df['experiment'].unique():
            sub_df=df[
                (df['experiment']==experiment) & 
                (df['brain_region']==brain_region) & 
                (df['neuron']==neuron) 
            ]
            log_mean_isi.append(np.log(sub_df['Mean ISI']).values)
print(np.hstack(log_mean_isi))
```
```python 
[ 1.12584188  2.19215951 -1.98074317 -0.25722232  2.1247061   0.0063244 0.92415014 -1.93038317  3.6513468   2.28266164  1.39365976 -3.23681353  3.459308    1.48402753 -0.65003803  1.4140086   1.23310109 -0.8740564  1.29957486 -0.60594385 -0.61921541  4.51176028  0.5622578   3.48668087 -1.57394565 -1.15482997  3.62078013 -0.64878302 -2.08398518  0.28354575 -0.92326873 -2.23523802 -1.15944804 -1.16315081  1.29454247 -0.89566237  0.72300259 -1.38527266  1.3694298   2.95919545  3.07555102 -1.38317331  2.3510588  -1.68488011  2.15864159  2.92067342  0.20249933  1.76685816 -1.14606501 -2.54545905  2.17651238  2.49333615 -1.08762839 -1.10690211  1.79675315  1.08438564 -1.61687289  3.64009558  2.50376142  3.53577889 -2.31447026 -0.9560716  ...]
```

 However, nested for loops are evil for many reasons. Let's use the `groupby` command:

```python
log_mean_isi=[]
for index, sub_df in df.groupby(['neuron', 'brain_region', 'experiment']):
    log_mean_isi.append(np.log(sub_df['Mean ISI']).values)
print(np.hstack(log_mean_isi))
```
or even in one line:
```python
mean_isi_list=[np.log(sub_df['Mean ISI']).values for index, sub_df in df.groupby(['neuron', 'brain_region', 'experiment'])]
print(np.hstack(mean_isi_list))
```
Much more readable and efficient! Furthermore, the `index` part can be used for reconstructing the modified dataframe. I might make a post on that in the future.
NPM join GitHub
Tags: javascript, npm, github, news
Published: 2020-03-19 14:58:02

NPM is joining GitHub. NPM is an open-source repository for JS libraries which are used all over the world.

And they are joining GitHub which is a repository for projects all over the world. GitHub has an interest in JavaScript, amongst other languages.

Can't be a bad thing - right?

---

Message from NPM

This is great news for all npm users: Our commitment to keeping the npm Registry free for open source development will continue with no change. We are looking forward to being part of GitHub, a company as committed to open source and the long-term success of the JavaScript community as we are.

Whether you use the Registry for free, or with one of our premium products, today's announcement does not change anything in your day-to-day work.

For more details on the next chapter for npm, check out Isaac’s blog post. And if you have immediate questions, please reach out.