Urbano's Blog
The Urbano A. Company’s Blog
The Urbano A. Company’s Blog
Mar 9th
Alright I've seen many people who are struggling to understand C++, students, developers... and many more. I will publish here an amazing a decent guide to get you started. I'm assuming you have "some" knowledge of programming (i.e. what is a variable, an integer... )
If you know a little about C++, you can probably skip this short introduction. Basically C++ is a multi-purpose programming language. It is used for all sorts of applications, from simple command-line ones, to large statistical programs or videogames.
For know, you should know that you code in C++ using any editor you like, and then you must run a compiler to generate machine code (a .exe file) which is called an executable. But don't worry about that yet.
Enough of the boring stuff, let's get started doing some real stuff. For now I recommend you download a source code editor, like Dev-C++.
First steps in Dev C++:
You will now see an empty page where we will write our code
Our C++ programs will always have the same base structure for now: First we will include necessary files (I will explain later on what they are), then we will declare our functions, and then will go the main code.
So first things first, we will include the necessary files. In order to display on the screen "Hello World!" we are not going to set up an interface, that's more advanced stuff. We will be using the system console (Yes, that black thing with white text on it). The file that will allow us to do that is iostream. So our first line will be:
#include <iostream>
Now that we hace access to the input and output functions, we will tell the compiler that all functions we use are from there, we do that by declaring a namespace:
#include <iostream> using namespace std;
And that is all we need in the header. We can now move on to the main code. In C++ the program executes always the code found inside a function called main. Whether you are on Linux, Windows, Mac, or other OS, it will be of one type or another. For Windows users it will be int
So let's set up an empty main for now:
#include <iostream>
using namespace std;
int main(){
return 0;
}
And finally the Hello world code, we want to display it on the screen, and the function for that is cout (If you are a programmer in other languages, equivlents would be echo or printf)
We must remember to add a "pause" after we display the message, to leave the console open. If we develop in a Windows environment, we can use the command system("pause"); but I recommend using a more global solution like cin.get();
So the final program would be:
#include <iostream>
using namespace std;
int main(){
cout << "Hello world!";
cin.get();
return 0;
}
And this finishes lesson 1
In our next tutorial I will teach you the use of variables and a more advanced look at the iostream functions cout and cin
Feb 15th
Nowadays, whether it’s in the real or virtual world, scammers and thefts are just about anywhere. They are always waiting for a victim to take their bait. I wouldn’t even go explaining why there are such people as I’m pretty sure it would be an endless discussion. Just a simple question as why is it hard for them to exert an effort doing a decent or legal business rather than scamming people is already a mind boggling thing to figure out.
And now, they have indeed found another way to scam people and get money from their pockets. By offering free web hosting services, they can easily lure people to sign up and eventually charge them with hidden fees. To register for a free web hosting company is pretty much easy these days. Though there are still, of course, legit free web hosts, everyone should still be careful signing up with a hosting company.
To avoid ending up with the wrong hosting provider, it’s important that you take into consideration how long the company has been doing business. It’s often safer to go with hosts that have been providing their services at least for more than a year or two. Doteasy is a hosting company that also provides domain name registration service. They are currently one of the best that offer free web hosting and have been in the business for around 10 years now. They provide an ad free site and guarantee 99.9% uptime. With their free web hosting package which is their basic plan, you get 100MB of disk space all for free. There’s no set up fee, monthly fee and no hidden charges. You get to have great web site builder to use in creating your site. Plus, you also get to use a cPanel which is only common with paid hosting. To sign up for a free hosting account is easy, just click here.
They also have a great offer right now with their domain name registration service. The offer lets you register any domain name for only $4.95 for your first year and get a free hosting along with it. To take advantage to this offer, just use the coupon code 0910FWH or simply click here.
Jan 31st
I mean seriously, the people who write those spam emails got to be kidding us! A spam email just looks "so" much like spam it's just pathetic! I had to write this because I am fed up of stupid emails that make no sense and go directly to my trash folder without even reading them
First things first, the subject, I mean seriously, putting viagra? Free credit? If you want people to open a message, there are some things you must avoid in subjects:
Of course there are many more things, but the list is simple unending! Basically, if I wanted someone to open an email, I guess I would fake a reply or a comment, because those are the kind of emails that you don't expect, and still sometimes we open them to see the comment, as in youtube for example.
Now in the body, there are things called spam detectors! So cramming your email with 50 emails, and all of them with porn-related words, free stuff, or things like that doesn't help!
And the next big thing, is it really that hard to spell check the email? I have received things like "Dear mr sir Alex, We want informer you of free gift we give to you..." and so on...
The keyword here is to Look Professional. If you want to be taken seriously, do things seriously. Until you do that, you are just wasting your time!
Jan 27th
The error codes that accompany various computer errors are not just random numbers. They denote something and are your first step toward identifying the cause of the error. For example, based on the error code, you may determine whether an error is a software error or a hardware error.
To successfully resolve error codes, you first need to ascertain the cause of the error. Understanding the cause of an error code immensely helps in troubleshooting the error.
In this article, we will discuss common causes of computer error codes and steps you can perform to resolve them.
Malware Infection
Malware infection is the root cause of many computer errors, such as error 0x80040702. Malware programs, such as viruses, rootkits, and trojans are known to modify or delete important files. As a result, an error occurs every time a program tries to access the infected file.
To resolve errors occurring due to malware infections, perform a malware scan of your entire computer using reliable and advanced antivirus tool and antispyware tool.
Incorrect installation/uninstallation of programs
Incorrect or incomplete installation of programs or software also causes various errors. To resolve errors that are a result of incorrect installation, uninstall the program and reinstall it. When installing the program, ensure that the installation setup files are healthy and undamaged. Furthermore, if you are installing the new program using an installation disc, make sure that the installation CD or DVD is unscratched.
Furthermore, do not install programs that are incompatible with your operating system. Conflicting software may alter or replace important Windows files and cause errors, such as the stop error c000021a. To resolve such errors, remove the software that is causing the error.
Incomplete unisntallation of programs also leads to various errors. The leftover files or processes of the removed program may interfere with other running processes and cause errors. To ensure complete removal of programs, you may use an advanced and reliable third-party uninstaller tool.
Outdated Windows, software and driver files
You may also receive various errors if your Windows or driver files are outdated. This is why it is imperative that you regularly install new updates pertaining to your operating system and drivers.
To automatically install new Windows updates, enable the Automatic Update feature that is available in Windows XP and later versions of Windows computers. To ensure that your drivers are regularly updated, you may use a reliable and easy to use third-party driver scanner tool. Such tools automatically install new drivers, as and when they are released by their manufacturers.
Furthermore, also ensure that all your third-party software programs are also regularly updated. Outdated software may slow down your computer or cause errors due to compatibility issues with other computer components or programs.
Corrupt or damaged registry
A corrupt or damaged registry may cause innumerable errors, such as error 2739. To fix your damaged registry and errors caused by it, schedule regular registry scans using efficient registry cleaning software.
Faulty hardware
You may also receive various errors if your hardware components, such as memory modules or hard disk, are damaged or corrupt. To resolve hardware related errors, first identify the hardware component that is causing the error and then get it replaced or repaired.
Nov 22nd
First of all, what do we call intelligence when talking about algorithms? Well, if we have an algorithm that is able to forecast when it is going to rain and when it will be sunny, we might call that intelligent, but it depends on some other variable, the time and effort it took for it to get those results. Thus the faster and lower number of variables our algorithm needs to return the same or even better results, the more intelligent it is.
That is a rule of thumb, but how do we do that?
Well, many scientists say "Copy nature", and that is indeed a good solution, why? Because nature know how to do perfect algorithms. I'll take simple animals to explain this, for example the ants. If we were to program ants, we would say it is too hard, but are we sure?
How nature did them was by "programming" the simplest possible set of rules (Apart from the moving/eating/basic functions), which put together create the complex societies we see them live in.
Say we want to program ourselves an animal, and we want it to always be safe. Then, instead of programming complex recognition software, or advanced algorithms that determine the surroundings, why don't we try nature's approach, the simplistic approach?
Of course we need to build some "complex" systems, for understanding certain objects, lighting conditions, wet/dry states... Now, we give its algorithms a set of rules, to call them somehow:
First, don't run out of battery. So it has to learn how to plug itself, or any other charging method right?
Second, escape from moving objects.
Third, shade is safer.
Another requirement is that we give the robot the ability to store information, so it can learn what places are better and which ones are not. Now if we set it to "on" and watch what happens, the robot will cautiously start moving toward safer environments, and whenever battery runs lower, it will leave the safe place to look for a plug.
This sounds ok right? Now from this base we could start building better intelligence, but the base is this. We need something basic, some sort of default behavior.
If I have time I will build a java applet or something of the sort to test this out,
Best regards,
Alex