teleren/devto huggingface dataset:
JavaScript ES6 Object & Array Destructuring.
Tags: javascript, codenewbie
Published: 2020-04-10 08:29:16

Arrays is a great way to store complex data in programming. But how do we access the stored data? This can be easily achieved using destructuring.
Let's say we have an array with two objects.
 ```const animals = [{ name: "cat", sound: "meow",
  { name: "dog", sound: "woof" }];```

We can access the two objects properties like so.

```const [cat, dog] = animals;```

 Then we use curly braces to get hold of the cat object.
```const { name, sound } = cat;```

```console.log(cat); // Object {name: "cat", sound: "meow"}
console.log(name); // "cat"
console.log(sound); // "meow"```

#### Change property name of an object
To change the property name, we assign the new name like so.
```const { name: catName, sound:catSound } = cat;
console.log(catSound); //"meow"```

#### Assign default values to an object
To change the default values, we assign the values like so.
```const { name="fluffy", sound="purr" } = cat;
console.log(name); //"fluffy"```

#### Destructure nested objects
Sometimes we have an object inside an object, which we call nested objects
```const animals = [{
    name: "cat",
    sound: "meow",
    feeding: {
      water: 1,
      food: 3
    }
  },
  { name: "dog", sound: "woof" }];```

To destructure nested objects, we use a set of curly braces like so.

```const { name, sound, feeding:{water,food}} = cat;
console.log(food); //3```

Thanks for checking it out. :)
"Easily" - Website Domain Names, Online Services and Hosting for LAMP Stack Developers
Tags: easily, website, host, lamp
Published: 2020-04-10 08:09:25

https://easily.uk/

Update on 24th Oct - don’t use this provider as they don’t give you a  free unending SSL.

This provider is useful for LAMP (Linux, Apache, MySQL, and PHP) stack developers. It's "website applications" allow you to manage the files, phpAdmin and MySQL database and more without the hassle of setting up your own server. It has great 24 hour phone support and from my experience are always very helpful. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/y1br2g56g9tz4w5qj9nt.PNG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/203gn7u7vyptlkobbeic.PNG)

This site has a few downsides:

It is limited to a LAMP stack as you have no shell access or admin control of the machine. 

It is setup for older website design methods. For example it does not support SPAs very well. By this I mean that if you navigate to a different route (e.g. /home) in your SPA in the internet browser you get the "cannot GET URL" error upon refresh of the page. This is because the browser cannot find /home - it does not remember your route. This is normally dealt with in MERN stacks by using ExpressJS to serve up the index.html to port 8080, and then setting up the ExpressJS server to redirect any non-found "routes" (like /home), back to the index.html. But you can get round this using this Hash History hack (although be warned that as a side effect it can give you an ugly url with # in it): 
https://tylermcginnis.com/react-router-cannot-get-url-refresh/ 
https://reacttraining.com/react-router/web/api/HashRouter
Masonry flexbox layout? (not responsive)
Tags: codepen, masonrylayout, flexbox, fitness
Published: 2020-04-10 08:09:00

---
title: Masonry flexbox layout? (not responsive)
published: true
tags: codepen, masonry layout, flexbox, fitness
---

<p>Reading a question in a Danish facebook group for front-end developers (<a href="https://www.facebook.com/groups/158668454225674" target="_blank">https://www.facebook.com/groups/158668454225674</a>) I was inspired to try to use flexbox to achieve a given design, just using flexbox.</p>

<p>Not sure if I like this solution, but hey had fun trying. Oh, and someone in the thread mentioned that this is also called "Masonry layout".. Is that right? </p>

{% codepen https://codepen.io/netsi1964/pen/pojoXoQ %}
Day-3 Move Zeroes
Tags: python, challenge, beginners
Published: 2020-04-10 08:03:14

---
title: Day-3 Move Zeroes
published: True
description: Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.
tags: #python #discuss #challenge #beginners
---
##### Problem Statement
Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.

##### Example:

```
Input: [0,1,0,3,12]
Output: [1,3,12,0,0]
```
##### Note:
You must do this in-place without making a copy of the array.
Minimize the total number of operations.

This question was published on Leetcode's ongoing 30 days challenge. The date the question was published was 4th April 2020.

##### Initial Approach
1. Iterate over the list.
2. If the element is 0. Find the index of the element. Use pop, give index as a parameter.
3. In a new list keep appending the popped out elements (zero's).
4. After iteration of the list is complete. Using extend add the zero's of the new list to the end of the original list.

##### Problem with this initial approach
1. While iterating over the list. If you keep popping the elements out. The index of the elements in the original list will keep changing. Resulting in unexpected outputs.
2. The solution wasn't using moving the zeroes in place. A new list was getting created.


##### Solution Approach 2
1. Count the total number of zero's in the given list.
2. Initialize a variable named as counter. Keep incrementing this after removing zeros from the original list.
3. Once the zero is removed from the original list. Append the zero again in the original list. (This way zeroes will be at the end of the list).
4. When the value of the counter is equal to the value of count. Break the loop.

```
class Solution:
    def moveZeroes(self, nums: List[int]) -> None:
        """
        Do not return anything, modify nums in-place instead.
        """
        L1 = []
        count = nums.count(0)
        counter = 0
        for x in nums:
            if x==0:
                nums.remove(x)
                nums.append(x)
                counter += 1
            if counter == count:
               break
```
Above solution is in-place solution. No new list is getting created.
In case you have a more optimized approach. You can comment and discuss it. 

Ps: Just please don't show the code directly.


##### Learnings
1. Don't pop the elements based on the index while iterating over the list.
2. Creating a new list means a new object is getting creating in memory which has a different memory reference id. As the solution is in-place. We are optimizing memory.
3. The time complexity of append is 0(1) while the time complexity of remove is 0(n).
Linux Komutları
Tags: pardus, linux, debian
Published: 2020-04-10 07:33:17

##Genel Linux Komutları
---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/07w113bj4y3htfiaa9pf.png)

---
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/3vnpou4h7cfwqy3tv4ve.png)
Top 5 NgRx Mistakes
Published: 2020-04-10 07:18:22

NgRx is a popular state management framework implementing the Redux standard for Angular. Nevertheless, it is often one of the hardest things to learn when you are learning Angular. Often the confusion is not in the Redux flow itself (it is quite simple actually) but more in how you actually put it into use.

As a consultant, I often work with new Angular developers that have a background in backend development. They are already experienced developers; they have learned the design patterns, clean code, and architecture but find it hard to apply in the context of Angular.

For big and complex applications, like an online bank, I recommend using NgRx for state management as that is a great way of orchestrating 50+ people working on the same repo.

Why?

- Easy traceability of state updates in the Dev Tools
- Supports a reactive architecture
- Is a well-known pattern in the whole frontend landscape

Nevertheless, there are certain mistakes that limit the usefulness of NgRx, that I tend to see over and over.

This post will show you the most common NgRx mistakes,  so you can avoid making them and enjoy the efficiency, maintenance and scalability benefits you get from NgRx to it's full.

You can read the post [here](https://christianlydemann.com/top-5-ngrx-mistakes/).
برنامه نویسی در همه‌گیری
Tags: productivity, sotwsurvey, help
Published: 2020-04-10 07:15:34

با سلام، من و گروهی از محققان بین المللی در حال جمع آوری داده برای یک تحقیق هستم. از برنامه نویسان ایرانی که با توجه به شرایط همه‌گیری کوید۱۹ دورکاری از منزل انجام می‌دهند، خواهشمندیم در تکمیل پرسشنامه ای که برای مطالعه نحوه مواجه با این شرایط جهت یک پروژه تحقیقاتی تهیه شده مشارکت کنند
https://tinyurl.com/wfclorr
ارسال سریعتر جواب‌ها به پیشرفت کار کمک زیادی خواهد کرد. متشکریم
Quick Tip – How to modify the name of your application ?
Tags: android, todayilearned, xml, howto
Published: 2020-04-10 07:19:19

---
title: Quick Tip – How to modify the name of your application ?
published: true
date: 2020-04-10 07:00:00 UTC
tags: Android,TodayIlearned,xml,howto
canonical_url: https://10xlearner.com/2020/04/10/quick-tip-how-to-modify-the-name-of-your-application/
---

Hello ! I’m Xavier Jouvenot and in this small post, I am going to explain how to modify the name of your application.

_Self promotion_: You can find other articles on Android development on my [website](www.10xlearner.com) 😉

## Finding your application title

To be able to change the title of an android application, we have to know where the application title is handled by default.

If you open the `AndroidManifest.xml` file of your application, you will find a line looking like `android:label="@string/app_name"` in the element `application`.This attribute is the one we are looking for, and, in that case, it sets the name of an application using a `string` stores in your resources named `app_name`.

If you typed your title directly in the `AndroidManifest.xml` file, like `android:label="My Wonderful Application Title"`, it would certainly work.But a best practice would be to modify it in your resources file, so that, if you need to use your application name, you would only have to change it once.Moreover, if you want to support several languages and adapt your application title depending on the country, it would be easier if it is stored in the resources file.

## Into the resources file !

By default, your application name can be found in the `strings.xml` file of your resource folder

![](https://github.com/Xav83/Xav83.github.io/raw/master/res/Android%20Studio/String%20Resouces%20file.png "String Resource File")

In this file, you will find a line looking like : `MyApplicationName`

By changing `MyApplicationName` by whatever you want, then you will modify the title of your application.

Moreover, you can also use this resource to use your application in other places.Indeed, you can either use `@string/app_name` to use your application name in the attribute of some field in your layouts, or in the Java code of your application, you can get the title by using the `R` object and the `getString` function, like so : `getString(R.string.app_name)`.

* * *

Thank you all for reading this article,And until my next article, have a splendid day 😉

## Interesting links

- [Application manifest documentation](https://developer.android.com/guide/topics/manifest/application-element)
- [getString documentation](https://developer.android.com/reference/android/content/res/Resources#getString(int,%2520java.lang.Object...))
- [10xlearner website](www.10xlearner.com)
Consistent UI's with CSS Resets and a shameless plug
Tags: webdev, css
Published: 2020-04-10 06:49:59

---
title: Consistent UI's with CSS Resets and a shameless plug
published: true
description: 
tags: webdev , css
---

Another post, another day. 
or was it supposed to be the other way.... 

Anyway, CSS Resets. 
Everyone's heard of [Normalize.css](https://necolas.github.io/normalize.css/)? No? Are you serious! 

Never-mind, so Normalize has this amazing set of css properties that someone decided to write so that the CSS we write is consistent across browsers and this makes it easier.

Now since this is possible some people figured that it'd be nice to have stylized resets, so you could just link them into the head element and voila! beautiful html without any additional overhead.

A few examples would be 
- [Milligram](https://milligram.io/)
- [Water.css](https://kognise.github.io/water.css/)

And these are actually really good, but then there are certain things that I wanted to restyle and also certain helpers that I keep adding into my css, I know tailwind provides them! I'm not going to add a full css library and then setup purifyCss when I can type it out in the same amount of time. So, I picked one up and modified it to have my own set of resets and here's where the shameless plug comes in. 

- [mnml.css](https://mnmlcss.js.org/)

Just like the above two, it uses it's own resets. Other projects where I managed to use this.
and since all are available on my github, you can check the code to see the implementations

- [Corona Tracker](https://corona.siddharthgelera.com/)
- [Markdown Editor](https://monotes.barelyhuman.dev/)
- [Hiring Network](https://hireme.barelyhuman.dev/)

Wiki page with documentation about the additional helpers that have been added to the resets, will be on the [git repo](https://github.com/barelyhuman/mnml.css) later today
New Programming Jargon
Tags: jargon, discuss
Published: 2020-04-10 06:43:57

---
title: New Programming Jargon
published: true
description: 
tags: jargon, discuss
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/6kqcw9bgnhdvcx08fg4s.jpg
---

Besides coming up with new solutions to old and new problems, we programmers sometimes also come up with new terms.

About ten years ago a question was posted on StackOverflow asking people about new terms they coined. The result was quite a good list of terms I am still using to date. Terms like _Yoda Conditions_, or _Stringly Typed_. Jeff Atwood [wrote an article](https://blog.codinghorror.com/new-programming-jargon/) about most of the good terms. Sadly the original StackOverflow question has been deleted.

Today while reading Ben Halpern's post [Have you rekindled your love of coding after losing the spark at any point in your career?](https://dev.to/ben/longtime-devs-have-you-rekindled-your-love-of-coding-after-losing-the-spark-at-any-point-in-your-career-4jn0) I saw [Jason C. McDonald's comment](https://dev.to/codemouse92/comment/nhhm)

> I only start losing my love of coding when I start getting burned out and **codeblind** on one project. The cure is usually to take a break and pick up something completely different!

Where de defined **codeblind** as _a term for that phenomenon when you've been working on the same code for so long, you can no longer see the obvious._

As it has been a while since the StackOverflow quest, I this it's due time to ask it again.

# What new programming jargon have you coined, or picked up somewhere?

Post your term and definition in the comments below. 👇👇👇
Subqueries and Correlated Subqueries
Tags: sql
Published: 2020-04-10 06:38:03

<b>Subqueries In SQL Server:</b>
Subqueries are enclosed in parenthesis. Subquery also called an inner query and the query which enclosed that inner query is called an outer query. Many times subqueries can be replaced with joins.

<code>
select * from Employee where DepartmentID not in (select distinct DepartmentID  from Department)
</code>

Another example 
<code>select Department_Name,(select count(*) from Employee where DepartmentID=d.DepartmentID) from Department as d;</code>

The above query is an example of use subquery in the select list. The above result can be achieved using join also see below query
select d.Department_Name,COUNT(e.empid) as empcount from Department d
join Employee e on e.DepartmentID=d.DepartmentID
group by d.Department_Name
order by empcount;


According to MSDN, you can nested up to 32 levels.
Columns present in subqueries can not be used in the outer select list of a query.
<hr>
<b>Correlated Subqueries:</b>

If our subquery depends on the outer query for its value then it is called Correlated subqueries. It means subquery depends on outer subquery/ Correlated subqueries are executed for every single row executed by outer subqueries.
A correlated subquery can be executed independently
<code>
select distinct Department_Name,(select count(*) from Employee where DepartmentID=d.DepartmentID group by DepartmentID) as empcount from Department as d  order by empcount;
</code>

<hr>
<b>What to choose for Performance Subquery or Join?</b>
According to MSDN, there is no big difference between queries that use sub-queries and joins.
But in some cases, we need to check the performance and Join produces better performance because the nested query is must be processed for each result of the outer query. In such cases, JOIN will perform better.
In general, JOIN works faster as compared to subqueries but in reality, it will depend on the execution plan generated by SQL Server. If the SQL server generates the same execution plan then you will get the same result.
9 Awesome VPNs for Netflix; Personally Tested
Tags: showdev, security, vpn
Published: 2020-04-10 06:24:42

Would you like to access Netflix seamlessly and enjoy your favorite movies/TV shows without interruptions?

Use given VPNs: https://topvpn.review/best-vpn-for-netflix/

Those are safe and tested VPNs.

BTW, which VPN are you using for Netflix?

Please let me know in the comment!
AG-Grid dynamic columns
Tags: aggrid, laravel72, angular9
Published: 2020-04-10 06:07:15

---
title: AG-Grid dynamic columns
published: true
description: ag-grid dynamic columns
tags: ag-grid, laravel 7.2, angular 9
---
Hello guys, here is the video for how can we make dynamic columns in ag-grid vai angular laravel.

{% youtube MJM7c4FxpBA %}

Thank you
Effects a Data Breach Can Have on Your Business in the Long Term
Tags: security, database, beginners, startup
Published: 2020-04-10 05:35:40

In today’s cybersecurity landscape, businesses are increasingly becoming victims of data breaches. Worldwide spending on cybersecurity is estimated to reach a whopping $133.7 billion by 2022 and it’s not a surprise that businesses are more focused on building a better security culture.

Data breaches don’t just expose sensitive information, the attackers can burrow into the entire organization’s network or hack into their database and perform malicious activities.

A data breach could lead to a loss of data including sensitive information such as financial records, credit card info, personal details, or confidential data like contracts and agreements between vendors and companies. That data, if compromised, could cause havoc for the victim organization.

In fact, in the first half of 2019, a data breach exposed about 4.1 billion records which caused long-term damaging effects for the victim organizations.

When a data breach occurs, it costs the organization more than just money - it can cause severe damage to your organization’s reputation leading to a decline in your brand reputation, value, and relationships with your customers.

With cybercriminals using more sophisticated methods to attack enterprises and leveraging the latest technologies such as automation and artificial intelligence, data protection has become more challenging.

It is imperative for businesses to understand the consequences of a data breach and how it could impact their entire organization. It will help them take the necessary steps to mitigate their potential vulnerabilities and risks that could otherwise put their company and its customers at risk of a data breach.

We have compiled a list of the most severe long-term effects of a data breach.

Hopefully, this will help you get a better idea of how potentially severe a data breach could be for your company as well as show you the need for cybersecurity.

Read the full post at cypressdatadefense.com.
Help me out, guys
Tags: help, discuss, beginners
Published: 2020-04-10 05:28:46

Hey guys, I'm a noob with a lot of questions trying to become a good developer. I've worked with Flask for a while now and really in love with it. I use Flask for most of my web projects because its the platform I'm most comfortable with.

But recently, I've seen some beautiful websites and web apps built using React. Now I'm confused, I want to build those kinds of projects but I'm not sure if Flask is really the best thing to use for that. So should I learn to React continue to build those projects in Flask?

Help me out guys, any suggestion is appreciated.
What are the Differences Between DevOps and Agile?
Tags: devops, agile, security, privacy
Published: 2020-04-10 05:05:17

People are often confused by DevOps and Agile in the software development industry.

You may have a lot of questions such as:

How are DevOps and Agile methodologies different?
Is one more secure?

Which one should I use?  (Just one or both)?
This infographic will break it down and simplify it for you.
Let’s start by understanding each one separately.

What is Agile?

This methodology takes an iterative and incremental approach to development.

Involves producing release cycles on a continuous basis.

Breaks the software down into small functional deliverables for customer approval
Addresses the gaps in communication between customer and developer.

Small and rapid releases, customer feedback, and collaboration are the focus of this model.

Aims to bring agility to development.

What is DevOps?

This approach to operations focuses on communication, collaboration,  integration, and deployment.

Promotes collaboration between operations and development to deploy releases to various environments.

Automation, continuous feedback, discipline, and process development are the highlights of this model.

Development teams make small but frequent updates to the production software which are often automatically deployed to environments

Aims to bring agility to operations and deployments.

Read the full article at cypressdatadefense.com.