teleren/devto huggingface dataset:
HTTP status codes - What happened to dev.to ?
Tags: beginners, webdev, http, devto
Published: 2018-12-18 23:09:39

---
title: HTTP status codes - What happened to dev.to ?
published: true
description: 
tags: beginners, webdev, http, devto
cover_image: https://media.giphy.com/media/xT9IgH6tFP7dNVrQAw/giphy.gif
canonical_url: https://blog.yafkari.dev/blog/http-status-codes---what-happened-to-devto--1jn8
---

Hello everyone,
Today, I will speak about HTTP status codes.


Yesterday at 7:30 pm, I was giving a look to [Github](https://github.com/) and, I don't know why, I needed to visit [dev.to](dev.to).
But when I tried to load the page, I received a beautiful 'Error 503' with a dog looking at me! 😝

And that's how I found myself writing this little post to you.

_"Always look on the bright side of life." 🌔_, _**My mom**_.


## So...here we go!

First of all, why do we need a status code?

A status code is a little message from the server that tells you how things went with your request (if everything went well, etc...).
So you can imagine how necessary it is to get feedback on the status of a request.

There are several status codes and each one is dedicated to a specific situation.

## Categories

The HTTP status codes are divided into 5 different classes defined by the first number they are composed of.

Here is a list of the classes described in the **[RFC 7231](https://tools.ietf.org/html/rfc2616), page 47**:
- **1xx**: Informational - Request received, continuing process
- **2xx**: Success - The action was successfully received, understood, and accepted
- **3xx**: Redirection - Further action must be taken in order to complete the request
- **4xx**: Client Error - The request contains bad syntax or cannot be fulfilled
- **5xx**: Server Error - The server failed to fulfill an apparently valid request


## A quick look at the most frequent status codes

The number one is, of course, the famous:

* **Error 404 Not Found**
![ERr0r4O4](https://media.giphy.com/media/zBEQkZ5CR6WFa/giphy.gif)
This error occurs when the resources you ask doesn't exist, try to check the orthography and stay calm 🙏😄.

* **503 Service Unavailable**
![ERr0r5O3](https://thepracticaldev.s3.amazonaws.com/i/jazci8094gkjigr3rwgf.gif)
The error I had the good fortune to see yesterday appears mainly when the server is busy (overloaded by too many requests ?) or when the server is in maintenance.
It is usually temporary, so be patient!

* **200 OK**
![are you sure everything is fine ??](https://media.giphy.com/media/l3q2LH45XElELRzRm/giphy.gif)
A normal user doesn't even know about its existence, this status code means that everything goes well.
You asked for X, I found it, and I've shown it to you.

* **Etc...**
![an image](https://media.giphy.com/media/Tt9jctxaVjRny/giphy.gif)
There is a lot of HTTP status code, so I let you see by yourself [here](https://tools.ietf.org/html/rfc2616).



_As you can see the most frequent status codes are errors 😭😂._


So that's it for this article, like every time, feel free to remind me if I forgot something 😜

I know, I know, you're sad.
But I will come back as soon as possible with other better posts than the previous one. (I hope so)
Save Outlook Emails
Tags: outlookemailbackup
Published: 2018-12-18 21:36:17

---
title: Save Outlook Emails
published: true
description: Save and backup Outlook accounts and items (emails, appointments, attachments etc.) onto local drive.
tags: Outlook Email Backup
---

On GitHub: [SaveOutlookEmails](https://github.com/licyp/SaveOutlookEmails)

# SaveOutlookEmails
Save and backup Outlook accounts and items (emails, appointments, attachments etc.) onto local drive.

## Purpose
In my Outlook only the last three months of emails are available offline, the rest are archived and moved into my [Online Archive - Name@Company.com](https://support.microsoft.com/en-gb/help/291626/how-to-manage-multiple-exchange-mailbox-accounts-in-outlook) account. Even when connected to the network the archived account only shows the first 200 odd characters of an email body and no attachments are available. This means that Outlook search won’t find anything from archived account.

My solution to this problem is to save all emails from all accounts onto my desktop where I can perform search in Windows Explorer: search within emails body and in attachments.

## Solution
__SaveOutlookEmails__ saves accounts from Outlook onto a desktop folder.
![ProgressBar](https://thepracticaldev.s3.amazonaws.com/i/7fzhds7hoo90tk1pcafo.jpg)

- Keep offline emails up-to-date date: autorun __SaveOutlookEmails__ when Outlook starts (at start of Outlook _Enable Macros_ when prompted with _'Microsoft Office has identified potential security concerns.'_)
- Save archived accounts: run __SaveOutlookEmails__ on selected folder (will take a while, run it at lunch time or at night, see more under _Warnings_)

Outlook's folder structure is kept the same and files are named with date-time prefix and shortened subject.
![Folder](https://thepracticaldev.s3.amazonaws.com/i/9rj261gpl99xvzzvo6zm.jpg)
Merge PDF files in C#
Tags: csharp, pdf
Published: 2018-12-18 18:37:29

---
title: Merge PDF files in C#
published: true
description: How to merge PDF in C#. Code snippet to use with the explanation.
tags: csharp, pdf,
---

In this article, I am going to show you how to merge multiple PDF files programmatically using Merge_File method and <a href="http://pdfonline.com/pdf-sdk/">easy PDF SDK</a>. This C# sample program demonstrates how to merge PDF pages using the PDFProcessor API.
 
The file names are assumed to be in the array files[]. The merged file is saved under “outFileName”

<pre>
private void Merge_File(string[] files, string outFileName)
{
	try
	{
		PDFProcessor oPDFProcessor = new PDFProcessor();
			// loop over all the files, which are concatenated one by one
			string inFileName = files[0];
	
		for(int i = 1; i < files.Length; i++)
		{
			oPDFProcessor.Merge(inFileName, files[i], outFileName);			
			inFileName = outFileName;
		}				
			
		MessageBox.Show(files.Length.ToString() + " files merged!");
	}
	catch(System.Runtime.InteropServices.COMException err)
	{
		MessageBox.Show(err.Message + " (" + err.ErrorCode.ToString() + ")");
	}
}
</pre>
Which small companies are incredible examples of diversity?
Tags: discuss, diversity, recruiting, a11y
Published: 2018-12-18 17:32:11

---
title: Which small companies are incredible examples of diversity?
published: true
description: Which small companies are incredible examples of diversity?
tags: discuss, diversity, recruiting, a11y
cover_image: https://thepracticaldev.s3.amazonaws.com/i/pve8kek1wh4tww6wmxzg.jpg
---

Photo by me on [Unsplash](https://unsplash.com/@ashwinv11)
Production vs Synthetic Data for Testing
Tags: discuss, testdata, softwaretesting
Published: 2018-12-18 16:35:02

---
title: Production vs Synthetic Data for Testing
published: true
tags: discuss, testdata, softwaretesting
---
- When should we use one over the other? 
- Which is the best approach? 
- What is the criteria used to guide the decision? 
![](http://servicevirtualization.com/wp-content/uploads/2016/10/TestDataManagement_CATechnolgies_Cartoon_Sized.jpg)
Top 5 DEV Comments from the Past Week
Tags: bestofdev
Published: 2018-12-18 15:53:20

---
title: Top 5 DEV Comments from the Past Week
published: true
description: Highlighting some of the best DEV comments from the past week.
tags: bestofdev
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--7VrAA2ln--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/qmb5wkoeywj06pd7p8ku.png
---

This is a weekly roundup of awesome DEV comments that you may have missed.  You are welcome and encouraged to boost posts and comments yourself using the **[#bestofdev](/t/bestofdev)** tag.

The **[Describe Your Job With a GIF!](https://dev.to/molly_struve/describe-your-job-with-a-gif-5dhk)** thread was a ton of fun, and we could have selected multiple "top comments" from that discussion.  @itsasine selected a GIF which was much-loved and captured a hilariously common theme:
{% devcomment 7g5c %}

The **[You Can Do it in SQL, Stop Writing Extra Code for it](https://dev.to/geshan/you-can-do-it-in-sql-stop-writing-extra-code-for-it-lok)** article raised a lot of interesting points about the way that many programmers consider and use SQL.  @melezhik offered an important caveat and consideration:
{% devcomment 7hdh %}

**[Will Java Trend Towards Obscurity?](https://dev.to/ben/will-java-trend-towards-obscurity-kke)**  Well, that depends on how you think about it.  @cjbrooks12 weighs in with an insightful framework for considering the question:
{% devcomment 7g2o %}

So many of us have side projects that lie in some form of in-progress and/or abandoned.  In **[How do you get back into a side project after months?](https://dev.to/chrisvasqm/how-do-you-get-back-into-a-side-project-after-months-4pkl)**, @andywer provides a way to stay organized and motivated:
{% devcomment 7g4l %}

Finally, in the **[How Unix programmers at restaurants search menus for their favorite plate](https://dev.to/miguelmota/how-unix-programmers-at-restaurants-search-menus--46ad)** article, @moopet provides a meta comment in response to some of the _other_ comments both on-site and on-Reddit (where it was gaining some popularity):
{% devcomment 7gmj %}

See you next week for more great comments ✌
Social network CMS framework for business - Any recommendation?
Tags: socialnetwork, framework, cms, platform
Published: 2018-12-18 15:48:41

---
title: Social network CMS framework for business - Any recommendation?
published: True
description: Helping for social network 
tags: social network, framework, cms, platform
---

Hi,I want to create a Social Net platform for companies with a niche market. In the profile section should have a kind of roadmap, team and advisors.

In the middle, posting updates from the company progress or relevant news.

And a section where only people can comment and read, but not publish (only companies will publish, is only invitation).

I did some research, as I never buld any social net (only few websites with framework of Wordpress and themeforests).

Any advice? TIA

Elgg 3.0:

http://learn.elgg.org/en/master/appendix/upgrade-notes/2.x-to-3.0.html

https://github.com/Elgg/Elgg/tree/3.0

Old community, no more news themes, and difficult to change the core from the platform (look the resources).

Minds:

Simmilar than Elgg, they changed the core from Elgg, but it took 2 years and a lot of devs to do that! We don't have enough resources, and we don't need a blockchain neither crypto to start the platform (at least at the beggining, then we can integrate some tokens or coins via API from 0x or other sources that already exists).

Wordpress:

https://buddypress.org/

Paying about 200€ and is a beauty and nice framework behind wordpress. It is something but can't change a lot of things.

Framework example: http://crypterio.stylemixthemes.com/landing/

Joomla:

There is Jomsocial, a framework to build a social net integrated in the framework of Joomla.

http://www.jomsocial.com/demo

Showcase: https://www.elogos.ro/

I like the community, price and the platform, but is like an upgrade from elgg.

Showcases of Easy social: https://stackideas.com/easysocial/showcase

Drupal:

There is Open Social: https://www.getopensocial.com/

It is partly open source, then you have to pay per month for more users. very good content but expensive, we don't need that now.

Showcases: https://www.getopensocial.com/showcases & https://www.connectingbusiness.org/index.php/about

Open Social Network:

https://www.opensource-socialnetwork.org/

very similar than facebook, but free and with a big community and developers. there is a premium for 210$

Una.io:

New Dolphin framework: https://una.io (this one is my fav.)
Documentation is my gateway to coding
Tags: documentation
Published: 2018-12-18 15:37:58

---
title: Documentation is my gateway to coding
published: true
description: 
tags: documentation
cover_image: https://cl.ly/211eff80f00d/download/Image%202018-12-18%20at%2010.35.09%20AM.png
---

Being a founder is one of those roles where you're giving feedback on basically _everything_, while also trying to get a couple of things done each day on your own. Two weeks ago, I was working on a really hairy problem with @maestromac. We were making slow but steady progress, and learning a lot together. It was one of those problems where it'd take you 30 minutes each time to re-orient yourself to what you were dealing with, and what new solution you were trying out. It was, and is, a real doozy. 

But then! A few days into it, a totally administrative/business/non-technical problem came flying my way. It was something that needed my full attention, so I dropped everything else I was working on. That took away several days and now it's been over a week since I coded. Each time I take a break from coding, I feel like I've taken many steps backwards and it's hard to get back into the headspace. This time in particular, I dreaded facing this relentless problem. 

I really didn't want another coding-dry-spell week to fly by, so to get back in the groove, I've decided to update some documentation instead. I find that the magic of pushing something straightforward and seeing it pass all the tests and make its way to production, is the small win that I need to feel inspired again. 

I'm only now realizing that documentation, or updating copy, or fixing a teeny tiny bug is almost always what I need to do for smoother context switching. I think this will help me drag my feet less 😅
Resolving VS Error CS0030 Cannot Convert Type 'Data[]' to 'Data'
Tags: beginners, debug, csharp, cs0030
Published: 2018-12-18 15:04:51

---
title: Resolving VS Error CS0030 Cannot Convert Type 'Data[]' to 'Data'
published: true
description: CS0030 is an obscure bug I came across yesterday and I wanted to share the resolution with others who may be coming across it for the first time.
tags: beginner, debug, c-sharp, CS0030
---

Most of the time Visual Studio is pretty good about telling us where syntax errors and other bugs are hiding. Occasionally though (even after our tech lead has warned us to be on the lookout for "that one bug" they mentioned) even the best of us get stumped. Some of the most challenging bugs can be run time errors - especially the ones that are hiding deep within the code base, don't cause any Intellisense warnings or errors, and aren't developer-caused. In the case of the CS0030 error, it happens in a generated file in which you're warned "Changes to this file may cause incorrect behavior".

When I ran across this issue, it dawned on me after perhaps a little too long that my tech lead's infamous "double bracket bug" was exactly what was I was ramming my head against when I added our Salesforce web reference to my project. It also dawned on me that others may have the same hangup as me and that I should write about it to share. I'm not going to get overly technical in this article; my main goal is to get problem and resolution across in a written format.


Now to the problem! For whatever reason, when some web references are added, Visual Studio decides to be extra doubly helpful when generating the reference class files and builds something like this:

https://thepracticaldev.s3.amazonaws.com/i/6v7l84azs423j9ec3ood.PNG

(Note the double pairs of brackets, one of which I highlighted. That highlighted one shouldn't be there.)

Once you've run across this a time or two, it's like second nature to fix it, but for those who are in their first CS0030 rodeo I wanted to share how I found and resolved the issue:
- First I checked StackOverflow and found a lot of good info here regarding why it happens to XmlElementAttribute, and that it's not really that uncommon: https://stackoverflow.com/questions/6678934/unable-to-generate-a-temporary-class-result-1-error-cs0030-cannot-convert-ty
- Second I went to my Salesforce web reference class file and searched for '[][]'. Lo and behold, about 255k lines in, there was a pair of a pair of brackets! Deleting one of the two pairs resolved the issue, allowing me to continue on my merry way to running and testing through my code.

In summary, if you have recently added one or several web references to your C# project and Visual Studio gives you an error code of CS0030 take a look at their reference classes and search for double brackets '[][]'. You may just have an extra pair or two hiding in there.
Regex…
Tags: javascript, regex, webdev, beginners
Published: 2018-12-18 14:26:15

---
title: Regex…
published: true
description: Regular expressions are difficult to even justify using sometimes. At least make sure you understand the basic, high level stuff.
tags: #javascript #regex #webdev #beginners
cover_image: https://thepracticaldev.s3.amazonaws.com/i/e1wnliuruaetxme1ja73.jpeg
---

Regular expressions are one of the most powerful, but complicated things you can use in web development. They are pretty cryptic by nature and it can take a while to figure out what they are really doing. That's why it's important you understand how they work before you end up with a file that you can't use.

To start, regular expressions are typically used for string manipulation, validations, and most importantly, searches. They help you go through your string values quickly and get the information you need from them with the accuracy of a sniper. Don't get me wrong, they aren't the answer to all of your problems. There's definitely a time and place to use regular expressions.

A common use of regular expressions is in email validation. Since you're dying to see what this would look like, here you go:

```javascript
/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
```

This regular expression meets all of those security requirements set by the internet people. Don't be intimidated by this. It would take an experienced web developer to read through that string with any kind of understanding. Keep in mind that this is just the regular expression for JavaScript. If you were doing it in another programming language like C#, you might need to format the regex differently.

One of the most powerful uses of regular expressions is their ability to make searches faster. You can comb through millions of strings and find the exact information you need if you can write a good regular expression.

It's one of the reasons Google can find what you're looking for so fast. Plus, there are different regular expressions that will return the same results. That means regular expressions can be written to search more efficiently.

You can use regex to find any combination of numbers and letters. If you need to handle dates, passwords, IP addresses, or URLs, regular expressions can handle those too. They can help you with web scraping or just plain old validation of form inputs. Here's a couple of simple regular expressions used for every day coding matters:

```javascript
Numbers: /^[0-9]+$/

Letters: /^[a-zA-Z]+$/

Numbers and letters: /^[a-zA-Z0-9]+$/
```

Honestly, regular expressions are kind of magic. The fact that you can put these seemingly random characters together and make something out of them is crazy. I'm still trying to wrap my head around how regular expressions really work. They do start to make sense in a weird way after you see them enough though.

<hr>

Hey! You should follow me on Twitter because reasons: https://twitter.com/FlippedCoding
What resources to learn Ruby On Rails?
Tags: discuss, beginners, learning, ruby
Published: 2018-12-18 14:22:05

---
title: What resources to learn Ruby On Rails?
published: true
description: Places you should go to learn Ruby on Rails
tags: discuss, beginners, learning, ruby
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6tgqq7lygd9fk23u94c8.gif
canonical_url: https://blog.yafkari.dev/blog/what-resources-to-learn-ruby-on-rails-2eg3
---
_yes, I like gifs 😂_

### Here you can put the best resources you would recommend to someone who wants to learn Ruby on Rails or improve his skills 😃

### I will add them below :

#### Start with Ruby on Rails:

##### Free :
* [**Codecademy**](https://www.codecademy.com/learn/learn-rails)
* [**Dev.to**](https://dev.to/ryanwhocodes/routes-in-ruby-on-rails---using-resources-and-records-to-define-urls-50j3)
* [**Rails Tutorial Book**](https://www.railstutorial.org/book)
* [**Ruby on Rails Guides**](https://guides.rubyonrails.org/index.html)
* [**Web-Crunch - Let's Build: With Ruby On Rails**](https://web-crunch.com/series/)
* [**Launchschool books**](launchschool.com/books)
* [**Edx - Agile Development Using Ruby on Rails - The Basics**](https://www.edx.org/course/agile-development-using-ruby-rails-uc-berkeleyx-cs169-1x-1)
* [**The Odin Project**](https://www.theodinproject.com/)

##### Paid :
* [**The Well Grounded Rubyist**](https://www.manning.com/books/the-well-grounded-rubyist)
* [**Practical Object Oriented Design**](https://www.poodr.com/)

#### To go further:

##### Free :
* [**GoRails**](https://gorails.com/)
* [**Upcase by thoughtbot**](https://thoughtbot.com/upcase)

##### Paid :
* [**Eloquent Ruby**](https://www.amazon.com/Eloquent-Ruby-Addison-Wesley-Professional/dp/0321584104)
* [**Ruby Under a Microscope**](http://patshaughnessy.net/ruby-under-a-microscope)
* [**The Complete Guide to Rails Performance**](https://www.railsspeed.com/)
* [**Learn Ruby the Hard Way**](https://learnrubythehardway.org/)


# Thanks to :
**@vinistock, @miah, @edisonywh, @rhymes, @maxtrelle, @redfred7, @ixeres, @mattheefor**
Help Santa with SQL and get gifts from Devart!
Tags: sqlserver, oracle, mysql, postgres
Published: 2018-12-18 13:07:03

---
title: Help Santa with SQL and get gifts from Devart!

published: true
description: We are happy to bring our sincere congratulations with upcoming Christmas and New Year holidays! 
tags: SQL Server, Oracle, MySQL, PostgreSQL
---

It’s time for miracles and gifts, so try yourself at Devart’s Christmas Quest to get winter holiday discounts.

Help  Santa to count a salary for his Elves so that they deliver other presents. With this purpose, Santa uses SQL query, but he is not so good in SQL. Please, help him to build the proper query! Santa Claus is about to pay generously to everyone who helps him!


Learn more about Devart’s Christmas Quest at https://www.devart.com/christmas-quest/
Debug Angular apps in production without revealing source maps
Tags: angular, development, debugging, indepth
Published: 2018-12-18 16:14:30

---
title: Debug Angular apps in production without revealing source maps
published: true
tags: angular,development,debugging,in-depth
canonical_url: https://blog.angularindepth.com/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85
---

#### Alternate approaches to handle source maps

![](https://cdn-images-1.medium.com/max/1024/1*_uv_vlGy0jc05noZ-MZTKA.jpeg)

When our app gets deployed to production we often encounter a different code than the one we edited during development. Our code get’s modified and optimized during the build process.

TypeScript gets transpiled, minified and uglifed. The resulting bundle is as small as possible and able to run in the Browser.

All those concepts are great because they improve the performance of our application. But we are looking at JavaScript that is hard to read and impedes debugging.

But there’s a solution. source maps!

[Find out how you can enable source maps without revealing them!](https://medium.com/@kevinkreuzer/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85)