teleren/devto huggingface dataset:
Nevertheless, javier Coded
Tags: wecoded
Published: 2020-03-07 01:05:47

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title & narrative! ✨ -->

## Equality in tech looks like… 

## I’m an expert at…

## My advice for allies to support self-identifying women and non-binary folks who code is...

<!-- Once your post is published, it will not appear on the /t/shecoded page until an admin approves it. This is an extra step to ensure there is no abuse on this important tag. -->
Handling File Uploads in Laravel
Tags: laravel
Published: 2020-03-07 17:34:15

In this Article James Shows How to Handle File Uploads in Laravel, At the end of this tutorial, you should be able to handle file uploads, handle file upload validation, and know what to do when the file doesn’t get uploaded successfully.

Read The Complete Tutorial on [CodeSource.io](https://codesource.io/handling-file-uploads-in-laravel/)
Egg Dropping Puzzle
Published: 2020-03-07 21:11:20

f -> no. of floors.
e -> no. of eggs.

n (e, f) => Minimum no. of trails needed to figure out from which floor the egg will break.

Consider 6 floor building.
If egg will be dropped from 4th floor, egg will break. If drop egg from higher ie above 4th floor egg will break.
If it will not break 3rd floor, it is not breaking (lower) any below floors.


We need to find minimum trails of this.

If we drop from Kth floor, two things will happen.
i.	If egg break
ii.	If egg does not break


Kth floor
Egg break 		(e-1, k-1)
Egg does not break         (e, f-k)

Kth …. like 1,2,3,4…6th floor.

Note:
+1 is already completed trail one. So, we added 1 in the break / does not break list will add.

Step : 1
This is for k =1,
(e-1,k-1)  -> (1,0)
(e, f-k)	   ->(2,1)  …..like that. Calculate for k=2,
			 K=1				K=2
e,f => 2,2		(1,0)				(1,1)
			(2,1)				(2,0)
 Max 	=		1				1

Among these we need to find minimum and add 1.
 Minimum is 1.
1+1 =2.

n eggs, k floors

getDrops (n, k) – given n eggs and k floor building, minimum of drops to determine the floor from which egg does not break if dropped.

getDrops (n, k) = 1 + Min(x = 1,2,….k) [(drops(n-1, k-1), drops(n, k-x)]




public class FindWhichFloorEggWillBreak {

	public static void main(String[] args) {

		int eggs = 3;
		int floors = 6;
		int whichFloorEggWillBreak = whichFloorEggWillBreak(eggs, floors);
		System.out.println(
				"Minimum no.of drops required with " + eggs + " floors " + floors + " is : " + whichFloorEggWillBreak);
	}

	public static int whichFloorEggWillBreak(int e, int f) {

		if (f == 0 || f == 1) {
			return f;
		}

		if (e == 1) {
			return f;
		}

		int minDrops = Integer.MAX_VALUE, tempResult;

		for (int i = 1; i <= f; i++) {
			tempResult = Math.max(whichFloorEggWillBreak(e-1, i-1), whichFloorEggWillBreak(e, f-i));
			minDrops = Math.min(tempResult, minDrops);
		}
		return minDrops + 1;
	}
}

Result: Minimum no.of drops required with 3 floors 6 is : 3
Solving the Maze
Published: 2020-03-08 05:13:51

One of the more intriguing challenges I've come across is finding your way out of a maze.  Recently I played around with this in a Ruby class.

Firstly, how do we even simulate a maze?  Without being too existential a maze can be thought of as a collection of steps, & with each step decisions have to be made.  For this an array seems the right choice.  In each value of the array we have a different location in the maze.  Each location can have unique characters as to what is possible for that space. 

"." - valid space
"G" - goal, end of maze
"#" - impassable barrier

For a 6x6 maze then we'd need an array with 36 spaces.  This could be done with a simple function.

```
def reset
	@maze = []
	36.times { @maze << '#' }
	path = [0,6,7,8,9,10,13,15,19,24,25,26,32,33,34,28]
	path.each { |x| @maze[x] = '.' }
	@maze[29] = 'G'
end
```
Here we declare the array and fill it with impassable barriers.  Next we take a number of locations and assign them as valid spaces, carving out a number of paths.  Finally we mark one space as the end of the maze.

Another simple function could be used to draw a map of the maze.
```
def draw
	i = 0
	6.times {
	    6.times {
		    print @maze[i]
		    i += 1
	    }
	    print "\n"
	}
end
```
Which now gives us this:
```
.#####
.....#
#.#.##
#.####
...#.G
##...#
```

So we have our maze!  Now to find a path from the array's first location to the goal.

From the start, we have to ask ourselves a few questions.  Firstly, am I even in the maze?  Checking to see if the array's location isn't nil should be good for us for now.  Next, are we at the goal?  If not then it's best to keep going.  But CAN we go?  Checking to see if we're in a valid space can solve this.  Ok, we can go but HOW do we move about?  Adding one value to the array's index can move us to the left, subtracting one value moves us right.  Subtracting six will us up one space (as we're in a six by six maze) & adding the same will move us down.

With this we can now construct another method.

```
def find_path(path)
	return false if @maze[path] == nil
	return true if @maze[path] == 'G'
	return false if @maze[path] != '.'
	@maze[path] = '+'
	return true if find_path(path - 6) == true
	return true if find_path(path + 1) == true
	return true if find_path(path + 6) == true
	return true if find_path(path - 1) == true
	@maze[path] = 'x'
	return false
end
```
After our initial checks we mark the space with a "+" to denote having come to that space.  Then we try to move, each time repeating the same checks.  If up doesn't go try right.  If that doesn't work try down.  If we come to a dead end mark the space with an "x" and return to the last call with additional choices.  If the final call comes to another dead end the method returns false.

If not?
```
+#####
++xxx#
#+#x##
#+####
.++#+G
##+++#
```
Here we can see the method tried going one way and failed twice, reaching two dead ends.  From there it returned to the previous call which allowed down as a viable direction & subsequently reached the goal!
Let's talk messaging 
Tags: discuss
Published: 2020-03-08 07:42:40

Okay, lately I've been growing frustrated with the way my phone displays videos sent via messaging app. They come pixelated, small, gross. Because we'll, I admit, I have an Android. 

So really I want to talk about what you use to help solve this if you're on an Android as well? 

One thing I thought was to use Google Voice/Hangouts. But you have to get a new number and set it up that way. So it makes it a bit confusing for others on the other line. I also see GV can't send videos nor can they receive them! 

I thought of WhatsApp but not everyone I know uses it. 

Then comes out friend Facebook messenger. They allow you to use it as a SMS app, however what they don't tell you is it's just another app that does the texting at that point. It's not really any better. 

So, I'm kind of at a loss here. Please don't tell me to get an iphone, that ship has sailed. 

I currently use a OnePlus 7t Pro McLaren. It's a great phone except for the sms/mms messaging.
Introducing, Be Thrifty Today: A Simple & Secure Money Manager (Open Source, Flutter + Firebase)
Tags: flutter, firebase, opensource, android
Published: 2020-03-08 09:32:48

Hey there everyone at dev.to! :)

I have something exciting to announce, and I'm proud to say, it wouldn't have been possible if not for the amazing community that's ever-growing here at DEV. I developed and released my very first app on the Google Play Store today, called Be Thrifty Today.

It's a simple app that helps you manage your everyday expenses and incomes, born out of necessity as I usually use Spreadsheets or Google Keep to note down what I spend and where.

Please check out the app on the Google Play Store here:
[https://play.google.com/store/apps/details?id=today.bethrifty.app](https://pillai.xyz/thrifty)


The app was built in a secure way, so even I would not be able to read through your transactions. It has no ads and it will forever remain free. That's how it was meant to be.

For those who are fellow Flutter + Firebase developers, if you find this app really interesting, please check out the source code which I have made public here on GitHub: https://github.com/AmruthPillai/BeThriftyToday

I would be happy to share my experiences and answer any questions if anyone has about developing apps on Flutter or related to the type of encryption I've used, or anything at all. Just so happy to share this news and the knowledge with all of you!

Please download, please rate, please spread the love and happiness <3
Thank you so so much!
Implementing Feature Flags in Angular
Tags: angular, angular9, featureflag
Published: 2020-03-08 11:42:26

---
title: Implementing Feature Flags in Angular
published: True
description: Implementing Feature Flags in Angular
tags: angular, angular 9, feature flag
---

## Implementing Feature Flags in Angular
This is a quick demo of how to implementing feature flags based on a user login.  The idea is that on login, a user would be issued a token with all the feature flags s/he is assigned to and the UI would render the correct component based on that token. Here is the [github](https://github.com/paulmojicatech/runtime-feature-flags) where I posted the code.

## Why is it useful?
This is good for testing a new feature that is not yet completely feature ready.  Users of the application can be assigned several flags enabled and test those features in a staging or testing environment without causing the original tests to fail.  This can also be useful in A / B testing where earlier adopters can have the flags turned on.

## What this demo does NOT address
This demo does not implement the preload strategy that comes out of the box with Angular via APP_INITIALIZER.  I will try to provide a demo for that when time permits me to do more research on it.  I believe the thought around that is that Angular's runtime engine (Ivy in version 9) can execute a preload strategy when the app initializes.

## What this demo does
The login has a picklist of 4 users.

 - Old: This user has no feature flags enabled.  On login, s/he will see the native input element.
 - featureA: This user has the feature flag that will show the input styled using Angular Material's matInput component.
 - featureB: This user has the feature flag that will show the input as Angular Material's autocomplete component, where the options are all the different users
 - allFeatures: This user has both feature flags (A and B) and on login, will see both features.
How to identify the best WordPress developer from India Blazingcoders
Tags: hiring, wordpress
Published: 2020-03-08 15:18:41

Choosing the Best WordPress developer or web design company for building your WordPress Website for your startup or an established business. In this article, we are going to discuss the key factors to consider when choosing a WordPress developer based on our experience.

 

Look for a Real Person Or an Organization
Find and deal with a real person. Instead of handing your project to an unknown freelancer. make sure you get to interact WordPress Developer by either having a phone call, skype chat or an email introduction with him.

 

Get Contact Details
Be sure to get a valid email address, Skype ID, What’s App Number and Phone Number of a WordPress developer you want to hire.

 

Ask for References
Check Customer Reviews and Reference

 

Check the Portfolio
A WordPress developer should have real examples of work that has been successfully completed.

 

Transparency In Invoicing / Hourly Price
WordPress developer should outline the work and line items with their associated rates in order to provide timesheet of what you are paying for.

 

Quick Response Time
When it comes to hiring a reliable WordPress developer, make sure you get a timely response to your emails.

 

Trusted Sources to Find and Hire WordPress Developers

Read More
What is a Post Loop in WordPress Development? – Free Infographic!
Tags: latestposts, php, wordpress, learnwordpress
Published: 2020-03-08 17:36:37

---
title: What is a Post Loop in WordPress Development? – Free Infographic!
published: true
date: 2020-03-08 17:33:38 UTC
tags: Latest Posts,PHP,WordPress,learn wordpress
canonical_url: https://robdoylecreative.com/what-is-a-post-loop-in-wordpress/
---

If you are just getting started and wondering what is a Post Loop in WordPress development, then this post will be a help. The loop can be a little confusing at first so we have decided to convert it into a visual model infographic to help explain what goes on, line per line. Please feel […]

The post [What is a Post Loop in WordPress Development? – Free Infographic!](https://robdoylecreative.com/what-is-a-post-loop-in-wordpress/) appeared first on [Rob Doyle Creative](https://robdoylecreative.com).
Weekly Roundup 24
Tags: weekly, links
Published: 2020-03-08 20:54:56

---
title: Weekly Roundup 24
published: true
date: 2020-03-08 00:00:00 UTC
tags: weekly, links
canonical_url: https://www.ankursheel.com/blog/weekly-roundup-24
---

Every week I come across some great articles. Here are some of the posts I feel you will enjoy reading as much as I did.

What’s the worst that can happen when you stop paying your credit card. **Lars Lofgren** shares [what happens at the 30 days, 60 day, 90 day and 180-day intervals](https://www.iwillteachyoutoberich.com/blog/stop-paying-credit-cards/). He also gives some tips to deal with collection agencies and other options to consider if you can’t pay your debts.

Writing a technical blog post? You should consider all these points that **Chris Coyier** shares in this [thought exercise for writing a blog post about dark mode](https://css-tricks.com/lets-say-you-were-going-to-write-a-blog-post-about-dark-mode/).

Think your life has not improved over the years and its much worse than before? **Gwern Branwen** has a personal list of how her [life has improved since the ’90s](https://www.gwern.net/Improvements) because of the progress we have made since then. Going through the list it so easy to see how we forget about the irritations that plagued our life just a few years ago.

Do you think that if you want to get things done, you need to create a sense of urgency? **Elisabeth Hendrickson** explains why [a sense of momentum is much more effective than a sense of urgency](http://testobsessed.com/2020/02/momentum-urgency/).

How do you make the switch from a consumer to a creator? A lot of good tips by **Nathan Barry** to [help you become a creator](https://nathanbarry.com/consumer-to-creator/).

Hope you enjoy reading these articles as much as I did.
Javascript Array Methods: Re-implementing Slice 🍕
Tags: algorithms, beginners, javascript, tutorial
Published: 2020-03-08 19:02:20

The `slice` method in JavaScript is a useful utility method, when it is called on an
array, it will return a shallow copy of a part of that array. It expects two
arguments that represent indexes of the array, the first one is used to indicate
where to begin shaving off portions of the array, and the second one is used
to indicate where to stop (non inclusive). Slice does not modify the original
array.

With that all out of the way, let’s get started!

## (Re)Implementing Slice

In order to implement slice, we need to create an empty array, iterate over the values in the original array and copy the values that are within the begin and end indexes to our initially empty array. That’s all there is to it really.

Here’s our slice reimplementation in all its’ glory:

```js
const slice = (
  arr,
  start,
  stop = arr.length /* Default value for stop if not present */
) => {
  let res = [];

  /* 
    Oh yes, the slice method accepts negative indexes as well and we have to
    take care of that in our reimplementation function.

    The ternary condition in the following expressions is to take care of
    converting negative indexes to positive indexes. When the full length of the
    array is added to the negative index, it sums up to the equivalent positive
    index.
  */

  let currentIndex = start < 0 ? arr.length + start : start;
  let stopIndex = stop < 0 ? arr.length + stop : stop;

  /* A humble while loop that iterates from the start index to the stop index */
  while (currentIndex < stopIndex) {
    res.push(arr[currentIndex]);
    currentIndex += 1;
  }

  return res;
};
```

The function starts iterating from the given start index all the way to the stop
index and simply populates the empty array with values from the original array
that fall within the start and stop range.

## Conclusion

Sometimes, the best way to learn how something works is to build your own version;
this gives you a clearer perspective and better understanding of how to piece
things together from scratch and greater clarity into how things work.


_Originally published on [My personal site](https://www.chinedudaniel.com/posts/2020/03/08/javascript-array-methods-reimplementing-slice)_
Rails: Conserve your database by “audit”ing its space in right way !!!
Published: 2020-03-15 16:30:46

Link: https://blog.joshsoftware.com/2018/07/19/rails-conserve-your-database-by-auditing-its-space-in-right-way/

In most of the Rails applications, we track the important data for auditing. Most of the time, database table in which these audit records are stored, is under same database of our application.
🥰 Helping your neighbors and community through this crisis 🥰
Tags: community, covid, help
Published: 2020-03-15 19:37:47

Hi Everyone hope everything is going good with everyone. 

This week has been one crazy week.
A group from my church is starting to do meal prep and pre cooking meals for those in our church that sick.
We have a few people with various stages of cancer, two with Lupus, and 3 people people who already had respiratory issues and are on constant oxygen.

I am pretty sure in the days and weeks to come, the demand will get bigger.
If you find yourself at the grocery store, pick up a little something extra and drop it off to your local church or community center.

If you know someone like me that is helping out in this capacity, ask if there is anything you can do to help or get. 

If you know that your neighbor is elderly or sick, while you are cooking 
Cook a little extra and take a plate over to them. 

Good nutrition right now is just as important as limiting contact and washing hands. 

Some of the things that we are doing with our group. 

We have one lady that has made various types of soups that can be frozen
Another person made a batch of chicken, and ground beef 

I made some spiraled zucchini, rice, black beans, 10 jars of salsa, and smothered beef with peppers/onions to put over the rice. 
This is all stuff that can be premade and put into freezer bags.
To be passed out when the need arises.

Thanks so much, stay safe, 🥰
Custom Tslint rule on Array.findIndex()
Tags: tslint
Published: 2020-03-16 10:18:58


I'm trying to implement a rule on array.findIndex() so that developer is enforced to check the findIndex value every time he uses it to splice the array.

I'm able to create the rule and it is showing the popup and also showing as error when i give ng lint.

But how can provide a fix to this issue?

if the fix is not provided then every time developer use the findIndex (even though check value is > 0 or not) he will get the error/warning in ng lint.

Kindly suggest if is any other work around to create or extent a lint rule on extentions.

Thanks
DevSecOps – Incorporating The 10 Best Security Practices Of The Industry
Tags: devops, discuss, security, productivity
Published: 2020-03-16 13:35:03

In recent years, many software firms are turning towards the use of <a href="https://addwebsolution.com/devops-consulting">DevOps Services </a>to build their applications. DevOps has been providing a much faster time for the marketing of the software. It provides a platform for deploying applications in the cloud environment i.e., Cloud DevOps. There are many companies that provide Cloud DevOps Security consultation. So the vulnerabilities that lie within the software are exposed, which initiates the necessity of a security strategy to be implemented for the application development right from its early stages, and not just at the end to prevent & overcome any of the unanticipated problems. Now, with the use of DevOps for software development, novel strategies need to be in place to embed security aspects in the development to ensure that the software is not vulnerable to the various attacks by hackers or malicious users. So, the answer that software developers are looking for is DevSecOps.

<h2>DevSecOps – For the Filling of the Gaps between IT & the Security!</h2>

DevSecOps is about including security from the early stages of the application development life cycle rather than the last stages, minimizing the vulnerabilities and bringing security closer to IT and business objectives. Basically, DevSecOps means parallel activities of development, security, and operations, making everyone accountable for the implementation of security strategies. DevSecOps is about collaboration mainly. This is an objective to fill the gaps between security teams & developers and the DevOps teams for ensuring a smooth as well as secured deployment & development procedure. The integration of security into the DevOps framework can be completed smoothly using the proper DevSecOps tools and processes.

<h2>The 6 Important Components of a DevSecOps Approach</h2>
Analyse the code in small chunks for any possible vulnerabilities and errors so that they can be fixed quickly.

Ask for changes from all the people working on the project, allowing efficiency, and later find out whether the change is good or not.

Another aspect is of compliance monitoring, wherein, one has to be ready for the audits at any given point of time.

One more important component of a DevSecOps approach is to identify the potential threats emerging with the code updates, and to be capable of responding to them quickly.

Identify and assess new vulnerabilities by analysing the new part of the code and fix them.

Train the team to deal with the situations that lead to vulnerabilities and the security measures that have to be used to overcome the crisis.

Read <a href="https://addwebsolution.com/blog/devsecops-incorporating-ten-best-security-practices-industry">How to implement DevSecOps</a>
Introduction to Blogging
Tags: webdev, intro, junior
Published: 2020-03-16 18:29:11

---
title: Introduction to Blogging
published: true
description: my first public blog post!
tags: webdev, intro, junior
---

Hello everyone! I wanted to get into tech blogging, and I figured a good way to do that would be to start posting on dev.to. I've been around this site for awhile and I've always loved to read the informative posts that are on the site. Anyways, a quick introduction about myself: 

My name is Nate Magera and I'm newly graduated from Lambda School, so I'm currently looking for a job! I can build full stack applications in JavaScript, React and Node.js. I've learned a little bit of Python and I've used some services in AWS. 

Currently I'm pursuing the AWS Cloud Practitioner Certification. So I was thinking of writing a few posts about my learning experiences while attaining that certification. 

Anyways, that's about all for now. Thanks for reading!