teleren/devto huggingface dataset:
Difference between CLI and GUI
Tags: git, productivity, tips
Published: 2019-12-09 06:38:00

---
title: Difference between CLI and GUI
published: true
description: 
tags: git, productivity, tips
---

One of the key thing I observed was that there are <b>NO</b> hidden actions performed when using CLI where as in GUI, there might be some extra hiden actions will be performed which we are not aware off.

When using CLI, "we know what exactly we are doing" whereas in GUI, "we dont know what extra things happening in the background". One of the best example of this was using <b>Sourcetree</b> tool to commit code changes <b>git</b> repository.

Using CLI, to commit changes in git, there are two CLI commands, one is `git add` to add files and second one is `git commit` to add commit message.

When using GUI with Sourcetree, We just need to provide the commit message after selecting files. 

GUI has the advantage of providing ease and simplicity to the customer. But as a developer or technical person, we should know what we are doing. My Suggestion is always prefer CLI and you never go to GUI until and unless you know what exactly what GUI tool is doing.

Happy Learning!!!
Monday motivational video
Tags: motivation
Published: 2019-12-09 06:27:40

This is the second week that I share a motivational video which I think will benefit somebody here.

If you have another motivational video that you want to share with me, please comment below and I will take a look.

This week I am sharing a video called: The 7 Habits of Highly Effective People

Have a nice week!

{% youtube rm-8CWIFkYc %}
Angular 8 Nested Route Example
Published: 2019-12-09 13:14:01

---
title: Angular 8 Nested Route Example
published: true
date: 2019-12-09 05:51:03 UTC
tags: 
canonical_url: https://www.itsolutionstuff.com/post/angular-8-routing-and-nested-routing-tutorial-with-exampleexample.html
---

Here i will give you brief explanation on angular 8 routing and sub routing example i will learn you how to create first route in your angular 8 app as well as you will also show how to create nested routes in angular 8I will give you two simple examples that will easily understand you to work
Looking for learners to learn with me....
Tags: discuss
Published: 2019-12-09 05:28:44

I have started practicing on Hackerrank.
Its been 4 days. 
I am doing really good with 30 days code challenge.
But, after that when I choose random challenges, I find them too complicated. I face plethora of challenges but still somehow for last 3 days I kept trying and I couldnot solve any three. 

I want to learn 
I want to develop this skill of programming immensely.
How do you overcome this situation ?
Who are on the same path as me ?
Day22:iter, map, for_each, filter & closure - 100DayOfRust
Tags: rust
Published: 2019-12-09 05:21:13

I posted an article about [Closure](https://dev.to/0xbf/day6-closure-100dayofrust-1pi5) before, but in that article I was still confused inside the closure function, when to use `|x|`, `|&x|` and `|&&x|`, and inside the closure when to use x, \*x and \**x.

After did some search and experiments, here is what I got:

### methods 

* iter: return reference to original value
* into_iter: return the original value (ownership)
* range: return an into_iter (i.e. the original value, not the reference)

* any: won't return reference
* map: won't return reference
* for_each: wont' return reference

* filter: return reference
* find: return reference


### Examples

For functions that don't use reference: `any`, `for_each`, `map`

```rust
let numbers = vec![1,2,3];
numbers.iter().for_each(|x| {
    // iter will return reference
    // for_each won't return reference
    // so x is one-layer reference, which is &integer
    // to get the origin value, we could use *x
    println!("number is {}", *x);
});
```

For functions that use reference: `filter` and `find`

```rust
let numbers = vec![1,2,3];
let even_numbers = numbers.iter().filter(|x| {
    // iter will return reference
    // filter will return reference
    // so x is two-layer reference, which is &&integer
    // to get the origin value, we could use **x
    **x % 2 == 0
}).collect();
```

For iterators that don't return reference: into_iter, range

```rust
let numbers = vec![1,2,3];
numbers.into_iter().for_each(|x| {
    // into_iter will return the original value
    // so here x is integer, not &integer
    println!("number is {}", x);
});
```

Another example:
```rust
let numbers = vec![1,2,3];
numbers.into_iter().filter(|x| {
    // into_iter will return the original value
    // filter will return reference
    // so here x is &integer, not &&integer
});
```

Range will return a into_iter, for example:

```rust
let even_numbers: Vec<i32> = (0..10).filter(|x| {
    // range will return the original value
    // filter will return reference
    // x is one-layer reference, which is &integer
    // to get the actual value, use *x
    *x % 2 == 0
});
```


### Reference

* https://doc.rust-lang.org/std/iter/trait.Iterator.html
How seller can register and login in opencart mobile app?
Tags: opencartandroidapp, opencartmobileapplication, multivendormobileapp, opencartmobileapp
Published: 2019-12-09 05:10:23

Purpletree opencart mobile app is a complete solution to build your own iOS & Android opencart mobile app. Your app will be completely synchronized with your website, including sellers, products, categories, Seller Login, and registration, etc. After your purchase, we will deliver an app within 24 hours.
Advantages of Purpletree Opencart mobile application:-
· Integrate your app with your opencart store (website).
· Configure your app's layout colors.
· Flexibility in your mobile app's features.
· Publish your app to app stores (Android play store or Apple app store).
How Seller can register in the Purpletree Opencart Mobile App?
· The very first step is to open the app in your opencart android app OR IOS device.
· Now, click to face icon in the header of the app.
· After clicking to the face icon, you will redirect to the login page. From there click to Sign Up button as like highlighted below in the screenshot.
· After clicking to the Signup button, then you will redirect to Signup Page from there you need to fill your details like First name, Last name, Email, Telephone, Type your password, Re-type password Select Yes from becoming seller checkbox. Then finally clicks to Signup Button to become a seller.
· Now, you become a seller in the store.
How to login as a seller on Purpletree opencart mobile App?
· Click to face icon in the header of the mobile app please look in the highlighted screenshot below.
· After clicking to the face icon you will redirect to the login page where you can login and password input filed. In this input, boxes enter your email and password. Then click to Sign In button. Finally, you are logged in as a seller in the mobile app.
Get this Extension at: https://www.purpletreesoftware.com/mobile-application-opencart.html
Fun with Clojure maps
Tags: clojure, maps, threadfirst, day8
Published: 2019-12-10 03:43:33

---
title: Fun with Clojure maps
published: true
date: 2019-12-09 05:00:00 UTC
tags: clojure,maps,thread-first,day 8
canonical_url: https://alexanderoloo.com/blog/2019/12/09/fun-with-clojure-maps.html
---

There was a time where I was working exclusively in clojure and using SSR for the frontend. It was a peaceful time. But alas peace doesn’t last for ever. And then I picked up a new full stack project. A project building a SPA.

And JSON said to me: _“Peace has cost you your strength. Victory has defeated you”_.

<iframe src="https://giphy.com/embed/ZwUT5MaDAmMcE" width="300" height="214" frameborder="0" allowfullscreen=""></iframe>

The hastle of parsing json Node was all too fresh in my memory. Would Clojure be different?

```clojure
(def json { :action "link-profiles", 
            :data { :user "alekcz", 
                    :social { :github "https://github.com/alekcz" 
                              :twitter "https://twitter.com/alekcz"}}})

```

The first time I had to parse a json request I hit a quick google. I was still quite new to Clojure so most problems involved a quick google. And voilà. ![Getting data from within a map"](https://alexanderoloo.com/images/blog/get.png "Getting data from within a map")

So I tried `get`. And it was ridiculous

```clojure
(get (get (get json :data) :social) :twitter)

```

And when something is unwieldy in Clojure there’s probably a more elegant way of doing it. You just need to be willing to look beyond the first google result.

```clojure
(get-in json [:data :social :twitter])

```

Oh isn’t that nice. You gotta love the elegance. To be honest I thought that was as good as it got, until I stumbled across this [gem](https://stackoverflow.com/a/7035984). Turns out you can access data in a map using key like so:

```clojure
(:data json)
; => {:user "alekcz", :social {:github "alekcz", :twitter "alekcz"}}

(:data nil) ; and doing this didn't crash anything.
; nil

```

It was like magic. Immediately it made me think of the [thread-first macro](https://alexanderoloo.com/blog/2019/12/08/clojures-thread-first-macro.html). Maybe? Just maybe we could? Was it too good to be true? Surely not?

```clojure
(-> json :data :social :twitter)
; => "https://twitter.com/alekcz"

```

Sublime.

<iframe src="https://giphy.com/embed/QRkhoTjSQqfV6" width="300" height="124" frameborder="0" allowfullscreen=""></iframe>

_May your build always pass._

_Alex_

This post is part of the [“Advent of Parens”](https://alexanderoloo.com/blog/2019/12/01/advent-of-parens.html).
♬♫♪COME TOGETHER♪♫♬
Published: 2019-12-09 04:13:46

---
description: NYC provides opportunity like few other places in the world. While technology connects us more and more without requiring we link up in person, that technology exists here along side one of the largest metropolises on the planet. 
---

NYC provides opportunity like few other places in the world. While technology connects us more and more without requiring we link up in person, that technology exists here along side one of the largest metropolises on the planet. 

As I began looking for IRL resources to continue development of my engineering skills, I quickly realized the intellectual and networking gold mine within the NYC tech events space. I've found many helpful resources navigating the opportunities, but you might imagine I gravitated to Meetup for help navigating all the opportunities in NYC.

When I began attending tech events in NYC I decided to cast a wide net before solidifying a selective strategy. I spent an hour every Monday morning looking at events in the city for the current and following weeks. I set a goal to attend an average of three events each week. I attended networking mixers, instructional classes, group projects, panel discussions, conferences, and a couple I can probably classify as miscellaneous. 

After a couple months of attending a variety of events I had a better idea of where I found and provided value. I want to share my resources and favorites here but hope to only share why I like them. TBH I feel conflicted in encouraging anyone to attend because some are already quite packed and I like a good seat! 

I'm currently thinking I'll refresh this single post often with my favorites, rather than turning it into a series. I would rather it evolve over time than expand.

*********************************************************
<h1><center> Let's get started! </center></h1>
*********************************************************

>Meetup Group => [Build with Code NYC](https://www.meetup.com/Build-with-Code-New-York/) => JavaScript the Hard Parts. 

This revolving lecture series is 6:30pm most Thursdays at [Codesmith](codesmith.io) in Tribeca. Codesmith hosts several other great event series and a learning platform called CSX. The JStHP series is generally led by the CEO or Senior Software Engineer and provided via webcast for anyone unable to attend in person. Like many other things in NYC, you know this is a good time from the size of the crowd that it can draw. I usually sign up the week before to avoid the waiting list. Each event starts out with an introduction around the room and a simple and relevant ice breaker. The instructors keep the room engaged by prompting participation from the room. As you answer questions in front of roughly 50-70 other attendees, the instructors coach you on your problem solving and technical communication. These events have really helped break down my discomfort talking about code under pressure, which as you can imagine is a great preparation for technical interviews. In addition to great subject matter, I have found great connections in attendance at JStHP. (as of Dec 2019)
Need idea to improve mysql's lock performance
Tags: help, mysql, lock
Published: 2019-12-09 03:58:43

---
title: Need idea to improve mysql's lock performance
published: true
description: 
tags: #help  #mysql #lock
---

We currently do goods management system like amazon
With each product, there are about 5000 orders every day, which means that there are 5000 transactions processed.
Currently, I am using the lock row mysql mechanism to ensure the correctness of the data.
Mysql does a great job but the execution time is too long because the transactions are waiting for each other.
So I want to ask if there is any way to increase the processing ability of mysql or is there any other approach to handle the problem of multiple transactions updating the same record (using a different database ...)
My first programming interview
Tags: career
Published: 2019-12-09 02:43:51

I've decided to write some posts about my experiences interviewing and doing cover letters and the journey and I'll post them when I want to.I was looking for a new job and came across this company that creates data management systems for large companies. The company also focuses on helping the community and bettering their employees. This sounded amazing to me so I applied for the job and put a lot of effort into my cover letter and application.

I heard back a couple days later to schedule a phone interview.I scheduled one and woke up an hour early each day to do CodeWars and LeetCode problems. After work all that week I did either that or looked into the company more.

The more I researched the company the more I wanted to work there. Seriously. This place is amazing. I also hung out with friends and still went to the gym so don't worry. I didn't burn out that much.The time for my interview came and I was nervous. They had sent me a link for a live coding exercise so I knew it was going to be a code-based interview. I was asked two questions:

Tell me about yourself.
What was your favorite project in your portfolio?

The super easy questions. Then came the programming part. The reason for these is to see how you think. It doesn't mean I like them, but I get why they do them.I had two different exercises and the first one took the majority of the time. I created for loops and if/else statements and then I walked him through my logic and made changes to make it work properly. Then we did the same thing with a second problem.

Overall I think it was good? They didn't run it through to see if it actually would work which really threw me off.I did send a thank you note later, but I ended up not getting the job. It was actually really cool to be able to talk about programming with someone who understands what I'm talking about. I don't really have that in my life.

<h3>Do you get nervous before interviews? How do you handle the nerves?</h3>

Original article here: https://jkimexploring.wordpress.com/2019/12/07/my-first-programming-interview/
How to update NPM Module for vulnerability
Tags: howto, node, npm, vulnerability
Published: 2019-12-09 02:37:55

---
title: How to update NPM Module for vulnerability
published: true
description: How to handle with vulnerabilities of NPM Module
tags: How-to, Node.js, NPM, vulnerability
---

# Github Shows security alert!?
After tiny push, I saw security alert on Github.


![security_alert image]
(https://thepracticaldev.s3.amazonaws.com/i/4tf2e252kwoanmnye91h.png)


WOW. I've never seen it before. What should I do?
# Step one-by-one.

This is what I did after googling.

### 1. Look at your security alert.
On my case, It said `clean-css` needed update.

![details of security alert](https://thepracticaldev.s3.amazonaws.com/i/6o7ewk77rwga3ewby0tm.png)

### 2. Check your module
On project directory, `npm audit` executed.
The result was 


![output of npm audit](https://thepracticaldev.s3.amazonaws.com/i/41niqud8t9luy8cet1qo.png)

### 3. npm audit fix
`npm audit fix` executed.

a part of result was


```bash:result
+ pug@2.0.4
removed 3 packages and updated 9 packages in 5.479s

```

### 4. Check your module again.
On project directory, `npm audit` executed.
The result was 

```bash:result
                                                                                
                       === npm audit security report ===                        
                                                                                
found 0 vulnerabilities

```


That's it. Pretty easy pattern.
Let's go back developing.
deploying laravel application on hostinger
Tags: laravel
Published: 2019-12-09 02:22:05

i am trying to deploy a laravel application on hostinger.in. everything is working fine except one thing.the image uploaded by the user is stored on my files but cannot be viewed.i have stored all the files in the public folder into public_html folder and rest of the files are on the root directory i tried symlink yet it was of no use,please help
Learning a bit about Python: A quicker way to slice 
Tags: python
Published: 2019-12-09 01:26:08

### Introduction
I recently started learning Python as an alternative to using Javascript for coding algorithms. What I noticed is Python had a different toolkit than I was used to in Ruby and JS, particularly for array/list methods. 

Here are a few tricks I've learned and hopefully they'll be helpful to you too!

### Descriptions 

Lists: Lists are akin to arrays, they follow the square bracket notation and are mutable.
``` list = [1,2,3,4,5]```
Tuples: 
- Tuples take the same structure as lists but are immutable, this means they cannot be changed to represent a new value after creation. 
- Tuples are represented by parentheses.
- They make debugging easier, since you know the information will remain unchanged through a tuple, you can mitigate tracking of past edits.
- Modification of tuples can work such as iterating and adding extra indices to the tuple, but this requires a longer run time than if you used a list since the tuple must be remade each iteration and the old ones destroyed.

``` tuple = (1,2,3,4,5)```

### Methods to use

Think about the times you had to do the following. 
- Reversing a list?
- Slicing a list?
- Grab only even or odd numbers from an array?

Python allows us a great tool to better grab such information from a list, tuple, or even a string! 

<b> object[start:stop:step]</b>

What you want to slice can be sliced with this simple format. Pick what index to start, which to stop (not including this index), and how many steps in between new indexes. If you leave the start empty, it will start at the beginning of the array, leave the stop empty, it'll end at the end of the array. Step is automatically 1 unless otherwise specified.

Imagine a string and a list
``` bob = "Bob loves bananas!" ```
``` numbers = [1,2,3,4,5,6,7,8,9,10]```

This would be how to use the above tool to gather what I need in each scenario: 
- I only want bob's name: ```bob[:3]``` 
- I want to reverse the numbers: ```numbers[::-1]```
- I also want to reverse what bob loves: 
```bobloves = bob[-8:-1] 
bobloves[::-1] ```
- I only want odd numbers: ```numbers[::2]```
- I want a slice of numbers from 1-9: ```numbers[:-1]```
- I want a slice of numbers from 5-10: ```numbers[4:]```
- I want a slice of numbers from 2-9: ```numbers[1:-1]```

This is much quicker for me than creating a new slice object in Python then applying that to the array I need to slice. (This can be great for other reasons of course.)

This was my first Dev.to post and I am excited to continue sharing with the community and learning more from everyone!
A LinkedIn Learning Playlist for Corporate Newcomers
Tags: beginners, career
Published: 2019-12-09 00:31:45

If you're over 30 and have just made your way up from some place like Target as a cashier to having a nice, cushy dev job in a corporation, it can seem really daunting at first. I was out of my element for a good portion of the past 5 months.

I am a bad communicator and that means I hit some snags. I also know there is a lot to being a corporate worker, such as being assertive, pitching an idea, or giving a presentation.

Being broke and working fast food or retail jobs then working corporate is *hard*. There is leeway there that you *just don't have* at your retail job.

I was really struggling so I went on LinkedIn Learning, formerly Lynda.com, and made a playlist to help me and anyone else of a certain age navigate their first corporate job.

[First Time In Corporate](https://www.linkedin.com/learning/collections/6597542880389185536?u=2181681)

LinkedIn is a necessary evil today. My company pays for us to use this to level up our skills but I still think it is worth the investment if you're struggling to adjust. It's helped me.

Have you used LinkedIn Learning? Are you a dev of a certain age just breaking into corporate? [Tell me your story](https://twitter.com/tiffanywhitedev). I'd love to hear it.
December 7th: Week in Review 🎉🎉
Tags: todayilearned
Published: 2019-12-08 23:15:21

The first week of December is over. We did it!! 👏👏

Some things that happened: 
- I got my Spotify end of year wrap up and found out I listened to 37,495 minutes of music and 20 full hours of that was [BROCKHAMPTON](https://www.youtube.com/user/ALlVESINCEFOREVER). Here's my [2019 Top Tracks Playlist](https://open.spotify.com/playlist/37i9dQZF1EtpV5lR5RC3pD?si=5adTl_VkQviBGeEfvYe99A) if you want to judge me.
- I turned 27 🎂
- I refactored a huge chunk of my [basic-music-player](https://github.com/Danondso/basic-music-player) app to use handlebars templates rendered from the backend and got the routing setup. I can more easily build out new features now 💻 💯

Some good written word: 

- I read a thought provoking Agile article by [Charles Lamdin](https://medium.com/@charles.lambdin), [Dear Agile, I’m Tired of Pretending](https://medium.com/columbus-egg/dear-agile-im-tired-of-pretending-d39ab6a12003)
- Not an article, but I got an audible subscription and started listening to [Extreme Ownership](https://echelonfront.com/extreme-ownership/) by Jocko Willink and Leif Babin. It's been real helpful in getting me thinking about how I can improve and develop as a leader.

If you had a sweet top tracks playlist or an audiobook recommendation, I'd love to hear it. Recommendations are always better with human backing 😄

Hope everyone is having an awesome last month of the year. You got this!