You want to write a simple web application from scratch. One of the things you’re going to really need is an URL Router. Why? Let's start from the begining.
An URL Router is the component responsible for receiving requests and dispatching to whatever handlers you have. Let’s take a few steps back.
In the past web application commonly used to use the Front Controller pattern which in this case, would be a handler evaluating URL parameters (requests). For instance, if receiving A would load Page A while when receiving B would load Page B and so on.
When transpiling TypeScript you could get the error:
error TS2585: Promise only refers to a type, but is being used as a var here. Do you need to change your target library? Try changing the 'lib' compiler option to es2015 or later.
It's an interesting scenario, since the code below shouldn't be throwing errors.
It's a commom TypeScript error and in most of the cases it should be solved in two ways:
After that, magically the error has disapeared!
I assume if you're here you are trying to learn or to remember how to do something, so, the golden rule before you proceed is: do a backup.
If you're not familiar with some Git concepts it's really very easy to mess up with thing and lose work. We don't want that!
In your terminal, because I know you have one, type the line below:
cp -r <current_dir> <backup_dir>
Now let's create a new branch:
git checkout -b <name_of_your_branch>
Awesome! Now the usual process you used to do. Let's add the files to stage:
git add .
And finally, let's…
In PyCharm Professional you are able to debug Behave out of the box, but of course it's a paid tool. And it's an expensive tool.
But fear not, because it’s possible to use PyCharm CE’s debugger and Behave with just a couple of settings.
What's the benefit of using a debugger in you workflow? There's a lot of reasons to do so but to name a few: breakpoints and expressions evaluators.
This tutorial applies to all distros which use PulseAudio.
It’s no secret that Linux Desktops are powerful and customizable tools. But sometimes you have to dive a little deeper to achieve the level of productivity you want.
In some Linux Distros, at this moment there’s no straightforward method to set a default audio device using a GUI. But we can deal with that easily through a single configuration file. That’s nice!
Enough talk, open the terminal and let’s rock.
List all available devices:
Identify the device and the profile you’re searching for and save it to a text…
Love it or hate it, if you’re a web developer, chances are big that sooner or later you’ll have to handle a Wordpress project. Probably you already have had to.
One of the features WP has out of the box is the ability to organize your posts in categories. But sometimes you need to impose your own kind of content hierarchy.
Let’s imagine you need an url structure like “news/category-name/” to show posts by given category. Using the out of the box feature will do the job perfectly.
Now let’s supose you have to deal with a multi language website…
Interviews are still the focal point to connect professionals and companies. But those are hardly optimised to spot the best developers.
Most of hiring processes still uses the same questions and the same methods of decades ago. And of course it’s possible to hack them all. Actually people are doing this every day. For example: 99% of interviews will have the question “Tell me about yourself”.
I’m not advocating interviews shouldn’t ask you such a question, but the way it’s being done. …
Flask is a well known Python Micro Framework. One can say Python is an easy language to learn and I would say maybe. It depends on what you want to do.
I wouldn't say Python is easy to debug for a beginner. Neither easy to setup if you are not familiar with some basic concepts, most of all from *nix realm.
I'll bring here quick tips to aid the beginner in the process of Dockerising a Flask Application.
Flask is a Micro Framework written in Python, extremely flexible, with low footprint and lightweight.
BEFORE WE BEGIN — A BIG disclaimer…
WordPress is a wonderful tool, there’s no doubt about that. As estimated by Who is Hosting this, WordPress takes a slice of 20% of all web today. It's an incredible mark of 75.000.000 websites running WP as you read this article. To me is pretty impressive. Specially if you think about the huge number of websites misconfigured, vulnerable and miserably sluggish and slow. But it doesn’t need to be that way. We all want more speed, right? There we go!
First things first. I need to tell you that this article is intended for coders. If you’re not a developer…
Weird, strange or annoying errors are part of our lives as miserable developers we are. :)
To all of you beginners in the black art, I'll share a quick antidote for this curse.
Most of cases are related to a bad Node installation or maybe related to the modules your [wrongly] are copying and pasting from another project.