teleren/devto huggingface dataset:
Enable Hot Reloading In React Native
Tags: react, reactnative
Published: 2018-07-15 15:47:12

---
title: Enable Hot Reloading In React Native
published: true
description: Enable Hot Reloading In React Native
tags: #react #reactnative
---

Post Link : https://www.skptricks.com/2018/07/enable-hot-reloading-in-react-native.html

This Post explains how to enable hot reloading in react native application. Hot Reloading feature in react native application helps to display the updated UI Content, whenever user saves anything in react native script or code.

Advantage of Hot Reloading :
 You can speed up your development times by having your app reload automatically any time your code changes. 
Enable Hot Reloading In React Native


Follow the below steps to enable Hot Reloading Feature :

1. First launch your app on the device or emulator.
Command To Run React Native App :
react-native run-android

2. Then click on emulator and press CTRL + M (CMD + M on MacOS) or shake the Android device which has the running app.

3. Then select the Enable Hot Reloading option from the popup.

Enable Hot Reloading In React Native


Video Demo :

https://www.youtube.com/watch?v=wLA7LM8xx6A


Let us know if you face any difficulties, while enabling Hot Reloading feature in react native application.
Base 1 arithmetic
Tags: explainlikeimfive
Published: 2018-07-15 14:35:22

---
title: Base 1 arithmetic
published: true
description: A partial summary of base 1 arithmetic
tags: #explainlikeimfive
---
I was getting my seven year old to do sums in his head. He counted and did several small sums in base 10, then base 5, 4, 3. He reached base 2. Zero, one, ten, eleven, a hundred. He had the hang of it.

And then he pushed down to base 1 despite there being no such thing.

Counting: Zero, zero zero, zero zero zero. Then he remembered taking off leading zeros so he tried zero, zero, zero, zero, zero.

He did all the adds, take aways and timeses the base could muster.

Zero plus zero is zero.

Zero less zero is zero.

Zero zeroes are zero.

I wasn't convinced by his zero divided by zero is zero but couldn't think of an alternative. And at that point he decided there were no other sums anywhere in the base 1 system so he's not heard of exponentiation.

Base 1 according to Wikipedia is unary but that's not the same. I failed to find it discussed by searching. Has he fully covered the topic?
Testing React with Jest and Enzyme
Tags: react, discuss, tdd
Published: 2018-07-15 13:44:07

---
title: Testing React with Jest and Enzyme
published: true
description: A list of patterns and anti-patterns widely used when testing react applications.
tags: #react, #discuss, #tdd
---

There are some common themes around what is tested in frontend applications (despite the framework). And there are different approaches used for testing the same behaviour. 

After having repeated conversations about different testing strategies, I have started putting together some commonly used patterns when testing React applications with Jest and enzyme. 

Github: https://github.com/enthudrives/testing_with_jest_enzyme

Please take a look at the following repository. Lets discuss over comments :)
List of criteria to follow while selecting your CI/CD tool
Tags: devops, ci, cd
Published: 2018-07-15 12:19:59

---
title: List of criteria to follow while selecting your CI/CD tool
published: true
description: Continuous integration is one of the first steps in DevOps adoption. When choosing a CI platform, keep these ten factors in mind.
tags: devops, ci, cd
---

Here is a list of CI/CD tools. It is so confusing and frustrating at the same time to think which one to choose and what criteria to follow to select the best CI/CD tool.

CI is one of the first steps towards adopting #DevOps, so choosing the right CI platform will get you started on the right foot. And as we know, well begun is half done!

Here's a list of the top ten things you should evaluate while choosing a CI/CD platform https://dzone.com/articles/10-things-to-consider-while-choosing-a-ci-platform

![list of cicd tools](https://thepracticaldev.s3.amazonaws.com/i/vww4kkpyz31mzw4xyjbo.png)
Note taking as a developer
Tags: discuss, notes
Published: 2018-07-15 11:19:15

---
title: Note taking as a developer
published: true
description: What do you do as a developer to take notes?
tags: discuss, notes
---

Four questions:

When you are in a meeting, how do you take your notes?

When you are at a conference, do you take notes of a talk?

When you are brainstorming, how are you taking notes?

What is your way of taking notes of these situations?
Tutorial – After Installing MySQL on Ubutnu 18.04, Fix “Access denied for user ‘root’@’localhost'” Error
Tags: tutorials
Published: 2018-07-15 10:45:24

---
title: Tutorial – After Installing MySQL on Ubutnu 18.04, Fix “Access denied for user ‘root’@’localhost'” Error
published: true
tags: Tutorials
canonical_url: https://ua1.us/news/tutorials/tutorial-fix-mysql-access-denied-for-user-rootlocalhost-error/
---

Recently, I came across an issue when installing `mysql-server` on Ubuntu 18.04. What I found is that after I installed `mysql-server` using my standard approach of `sudo apt install mysql-server`, and after running `mysql_secure_installation`, my root user was denied access to MySql when trying to access with `mysql -u root -p`. I would always get the following error:

```
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
```

## Fixing Access denied for user ‘root’@’localhost’ Ubuntu

After hours of trying to come up with the right solution, this is what I did to fix:

Stop MySQL Server from running:

```
sudo service mysql stop
```

We need to create a directory for MySQL to store access socket files so that we may use the `mysqld` command. Without this directory, the command will fail.

```
sudo mkdir -p /var/run/mysqldsudo chown mysql:mysql /var/run/mysqld
```

Manually start MySQL using the following command:

```
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking &
```

The command we just ran will allow us to now access MySQL without having a password. For what ever reason, when MySQL was installed, the password we installed it with did not get applied to to the root user. Now you can manually change your password using the following `mysql` commands

Log in to MySql without a password:

```
mysql -u root
```

Flush Privileges to apply the pending privileges to the root user created during the installation process:

```
mysql> FLUSH PRIVILEGES;
```

Update the password of the root user using the three following commands:

```
mysql> USE mysql;

mysql> UPDATE user SET authentication\_string=PASSWORD("{PASSWORD\_HERE}") WHERE User='root';

mysql> UPDATE user SET plugin="mysql\_native\_password" WHERE User='root';
```

End you MySQL session:

```
mysql> quit
```

Now that you’ve successfully reset your password, you will want to terminate `mysqld`:

```
sudo pkill mysqld
```

Restart your MySQL Server:

```
sudo service mysql start
```

## Conclusion

I’m not sure the exact reason why MySQL isn’t properly setting the root password and privileges when prompted for it while installing `mysql-server`. But I do know this was a pain for me to fix. If you run into this issue and found this tutorial helpful, please come back frequently to check for new [tutorials](https://ua1.us/news/topic/tutorials/).

The post [Tutorial – After Installing MySQL on Ubutnu 18.04, Fix “Access denied for user ‘root’@’localhost'” Error](https://ua1.us/news/tutorials/tutorial-fix-mysql-access-denied-for-user-rootlocalhost-error/) appeared first on [UA1 Labs](https://ua1.us).
Write With Me (Day 1)
Tags: discuss, writewithme, dev
Published: 2018-07-01 20:54:25

---
title: Write With Me (Day 1)
published: true
description: 
tags: discuss, writewithme, dev
---

Starting today, July 1, I'm going to write every day for 5 min. I was inspired to try this by [Josh Adam's](https://twitter.com/knewter) tweet, which told me about this new app he discovered called writingstreak.io. 

![https://twitter.com/knewter/status/1002002417150562305](https://thepracticaldev.s3.amazonaws.com/i/cpb4qqf59vaqmdk59lbg.png)

Thanks Josh!

My main goal is to write more technical content. The main thing I'm excited about with this tool is getting myself inspired to write daily. With other things going on, it is easy to ignore writing down my thoughts daily or following up on technical blog posts.

Though I may not use this tool exclusively for dev/tech content it will be a great reminder for me to write daily. I'm going to add it to my 'daily' bookmarks bar, so I will see it every day.

I used winingstreak.io for the first time today. I actually ended up using it to write this post. I'm committing to writing a short post every day for next 7 days. This being day 1. I hope you will join me in getting your write on! 

Here's a preview of writingstreak.io in action! 

![Inside the writingstreak.io app](https://thepracticaldev.s3.amazonaws.com/i/eq89zfd46qv7peulycml.png)

I hope this web app can give you a little bit of inspiration to write daily as well. Is it hard for you to write daily? If you have managed a long-term blog before, I'd love to hear how you stayed committed or inspired!


Day 2: [Write With Me (Day 2)](https://dev.to/matt24ray/write-with-me-day-2-2k2g)
How Customize Button In React Native
Published: 2018-07-15 09:22:02

---
title: How Customize Button In React Native
published: true
description: How Customize Button In React Native
tags: 
---
# How Customize Button In React Native

Post Link : https://www.skptricks.com/2018/07/how-customize-button-in-react-native.html

This tutorial explains how to customize button in react native application. Here we are going to provide complete information for react native button component. You may have been observed when you are trying to set button width and height of react native button, then it will not expand as per the mentioned width and height. So Here we are going to provide solution for the same issue.

<a href="https://www.skptricks.com/2018/07/how-customize-button-in-react-native.html" >How Customize Button In React Native </a>

<img src="https://3.bp.blogspot.com/-fxNExvfwL4Q/W0r20ff-qXI/AAAAAAAABso/VKEWf2U5zZcTlYbdQg0roBfha3J_8CyigCLcBGAs/s400/CB.jpg" />
Sending an email within a Java Application
Tags: java, email, smtp
Published: 2018-07-15 06:42:58

---
title: Sending an email within a Java Application
published: true
description: 
tags: Java, Email, SMTP
---

Hi all,

I decided to pick up the old textbook and start to learn more about Java (I know, I should understand most of it by this point :D).

I am focusing on the interaction between the application and sending of emails. As I eventually want to port this code to android studio and use it to create an email application for android.

Here is the code:
```Java
public static void main(String[] args) {
        // Recipient's email ID needs to be mentioned.
        String to = "example";
        
        // Sender's email ID needs to be mentioned
        String from = "example";
        
        // Setting the host and port
        String host = "smtp.gmail.com";
        String port = "465";
        
        // Get system properties
        Properties properties = System.getProperties();
        
        // Setup mail server
        properties.setProperty("mail.smtp.host", host);
        properties.setProperty("mail.smtp.port", port);
        
        properties.setProperty("mail.user", "example");
        properties.setProperty("mail.password", "example");
        
        // Get the default Session object.
        Session session = Session.getDefaultInstance(properties);
        
        try {
            // Create a default MimeMessage object.
            MimeMessage message = new MimeMessage(session);
            
            // Set From: header field of the header.
            message.setFrom(new InternetAddress(from));
            
            // Set To: header field of the header.
            message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));
            
            // Set Subject: header field
            message.setSubject("This is the Subject Line!");
            
            // Now set the actual message
            message.setText("This is actual message");
            
            // Send message
            Transport.send(message);
            System.out.println("Sent message successfully....");
        } catch (MessagingException mex) {
            mex.printStackTrace();
        }
    }
```

My code no longer fails to connect or times out, it just continues to run (likely until my system crashes). After stepping through the code - it seems to hang right at

```Java
Transport.send(message);
```

Since it never throws an error, I cannot get an exception code or any details.

If you guys could take a look at my code and point out any mistakes, that'd be awesome.

Thanks!!!
The value of technical leadership
Tags: leadership
Published: 2018-07-14 18:21:55

---
title: The value of technical leadership
published: true
description: Technical leadership can help teams get unstuck 
tags: leadership
---

I've been in technical leadership roles for over a decade and I have to say, in large measure it is quite unglamorous. What I mean, of course, is that you don't get to re-design or architect large-scale systems every week.

**Technical leadership typically involves a daily influence over small decisions** -- those tiny course corrections that keep things moving in the right direction. 

Perhaps you suggest a more flexible  architectural model for a subsystem or you work to prevent data-coupling between services. Maybe you write a bit of glue code to stitch together parts of your software pipeline or you weigh in on how using a specific Java library can make code cleaner, easier to understand and maintain. 

Of course, your hope is that these small, consistent adjustments, when aggregated over months and years, will promote software excellence on a broad scale. Occasionally though, you do run into situations that are a bit more daunting. 

Here's one scenario to think about:

<img src="http://aisaac.io/content/images/2018/07/ViciousCycle.png" alt="" width="400" style="float:right; padding:5px;">

**A team has gotten stuck -- they are consistently producing poor results.** 

When you take a more in-depth look, it's obvious these are due to the adoption of bad software practices. The problem is that these poor results have, over time, caused a lot of pain to all stakeholders involved (Dev, Ops, QA, Product etc and most importantly, your customers). This causes everyone to fear and therefore resist any sort of change. 

**So what does technical leadership offer to this situation?**

I believe that **courageous, persuasive technical leadership** is the only way to get a team unstuck. 

Courage is needed because where fear and suspicion dominate, speaking out could be dangerous to your career.  And you will need all your persuasive skills  to navigate these types of situations and to start, in a reasoned and methodical fashion, to guide the adoption of good software engineering practices.

The good news is that **the adoption of good software practices has it's own positive feedback loop.**

<img src="http://aisaac.io/content/images/2018/07/VirtuousCycle.png" alt="" width="400" style="float:right; padding:5px;">

Adopting best practices should result in improved results, and you can start to track and measure these small wins. This in turn will produce gains for stakeholders (or at the very least, reduce pain points) which produces an openness to hearing and adopting more of your suggestions. And so a positive feedback loop starts to kick in.

So, when you face those daunting and seemingly intractable situations -- stay steady, speak up and get that positive momentum going!
Finding duplicates algorithm series- A string as an input.
Tags: string, array, duplicates
Published: 2018-07-14 22:45:59

---
title: Finding duplicates algorithm series- A string as an input.
published: true
description: Finding duplicates inside string.
tags: string, array, duplicates 
---

In my last post {% link https://dev.to/s_awdesh/finding-duplicates-inside-an-array---easy-version-37la %} I wrote about finding duplicates inside an array of integers. What if input is a string instead of integers? Could we solve the problem in same way we did before?

String is essentially an array of characters so we still could use HashTable/ Set like before to store chars instead this time.

![Example](https://thepracticaldev.s3.amazonaws.com/i/46j6zj93q0g6wpzy40ta.jpeg)

Although algorithm wise we didn’t learn new anything but now we know that strings are essentially an array of chars and we could utilize that fact going forward in string related problems.
BxJS Weekly Episode 19 - javascript news podcast
Tags: javascript, node, podcast, news
Published: 2018-07-14 21:09:10

---
title: BxJS Weekly Episode 19 - javascript news podcast
published: true
description: Listen to the best javascript news of the week in a podcast form
tags: javascript, node, podcast, news
---


Hey dev.to community!

BxJS Weekly Episode 19 is now out! 🚀
Listen to the best javascript news of the week in a podcast form right here.
You can find all the mentioned links [here on github](https://github.com/BuildingXwithJS/bxjs-weekly/blob/master/episodes/Episode-19-2018-07-14.md).

You can also watch [this episode on youtube](https://www.youtube.com/watch?v=iSE9Pwbf7kE).

Any feedback is appreciated 😁

Additional stuff:
- [Twitch channel](https://www.twitch.tv/yamalight)
- [Discord server](https://discord.gg/hnKCXqQ)
- [BxJS Weekly github repo](https://github.com/BuildingXwithJS/bxjs-weekly)
Why Whiteboarding Needs A Makeover
Tags: recruitment, webdev
Published: 2018-07-14 20:12:16

---
title: Why Whiteboarding Needs A Makeover
published: true
description: 
tags: recruitment, webdev
---

![image](https://thepracticaldev.s3.amazonaws.com/i/lfnww7zugc8mz6dbndr1.jpg)

*Visit [Codesmith Staffing](http://codesmithstaffing.com/blog/) for more tech articles*

Everywhere you look, the pen and the paper is being replaced by the stylus and the touch screen. In the early 2000s, the first few smartboards rolled out into classrooms, abrogating the chalks and markers and erasers and grime-stained boards. These new boards promised an interactive approach to learning that catered to different types of learning. Now fast forward to the ipad and surface pro era. Touch interfaces have now found homes on monitors. 

So the big question is, why do tech companies still pull out the good ol’ dry erase board during technical interviews? Do the technical interviewers inwardly cackle with glee when they see their candidates’ eyes widen at all the battle scars on their boards? Most likely not. Is the whiteboarding phenomenon a time-worn tradition that needs to be kicked into the 21st century? 

Yes. 

The problem with the dreaded whiteboard is that it is completely antithetical to a programmer’s normal work environment.Gone are the hotkeys. Gone is that nice editor that makes code reading a  somewhat pleasing experience. In place of all the convenience a computer provides is a marker and your insecurities. Of course, with constant practise, whiteboarding may just become a mild annoyance rather than a massive migraine. But if tech companies continue to demand whiteboarding and recruits continue to despise it, there has to be a happy medium. 

That’s  where the smartboard comes in, whether it’s a touch monitor or the interactive whiteboards found in many high schools. There are many whiteboarding software out there. Microsoft recently just released one of their own. The technical interviewer simply needs to have the software up and running before the interview begins. Why does this bridge the divide? 

1) Inclusivity: The interactive whiteboard caters to different styles. Some people may be visual learners and may find it hard to read their own code. A lit, pure white background will make it easier for the candidate to read his or her own code. 

2) Flexibility: Would it hurt to have documentation available? A programmer who is willing to refactor his code by looking up some useful methods is someone you’d want to have on the team. In one go, you can check the knows how to read docs and actually refactors code boxes. 

3) Interactivity: There is no question that we’ve been spoiled by touch technology. When you’re left with a pen and a board with no fluid dimensions, you’d feel like you just  time traveled. Now you actually have to worry about make sure you can contain your code. With a smartboard, all the candidate needs to do is scroll to create more blank space. 


Smartboards won’t solve all of the pain points experienced by developers, but they at least alleviate the anxiety some candidates face when approaching “The Whiteboard.”
Changelog: add more links to your profile
Tags: changelog, meta
Published: 2018-07-14 18:23:43

---
title: Changelog: add more links to your profile
published: true
description: Share your Behance, Dribbble, Stack Overflow, LinkedIn, and Facebook profile on dev.to!
tags: changelog, meta
---

We know that many DEV members are also members of other platforms. Because your DEV profile is meant to encompass all elements of your developer identity, we've made it easier to share your profile from other communitites.  

To start, we've added: Behance, Dribbble, Stack Overflow, LinkedIn, and Facebook. You can expect more options soon. To update your profile, [visit your settings](https://dev.to/settings/profile).

I don't have all these accounts so this is a screenshot from development 😋

![social-icons-dev-profile](https://thepracticaldev.s3.amazonaws.com/i/t914ij8kgf6no6b5irfc.png)
Code camp or self-learning
Tags: discuss, productivity
Published: 2018-07-14 17:32:24

---
title: Code camp or self-learning
published: true
description: I need your help to decide what's the best way to learn about programming
tags: discuss, productivity
---

I recently started learning programming, HTML, CSS, JS, using websites and online courses, it's okay, but I feel that I need more consistency, as I can watch only one class per month and nothing happen. 

A friend suggest me a code camp, but without a scholarship it's expensive, and there's a lot of startups and companies with different programs, so I need your advice, how did you learn to code? have you ever went to a code camp? was it really useful? what sites did you use for your online learning? what code camps? 

Thanks guys!
Hughs & Husky love 🐶