Saturday, December 28, 2013

Obtaining Computer Name From an IP Address

In this world all the computers that are connected to a network have to be identified in some way, hence, the IP (Internet Protocol) address exists and gives each computer a unique identification number by which we can find them.

However, when you work with a computer that is in a local network it's always necessary to get connected to it, what is more, sometimes you need to access to it without being physically there. Thanks to god that we have a mechanism to see our machine remotely, and this requires obviously the IP address or the computer name.

Yes, a computer name, because remember that the IP address is composed by many numbers that are not easy to remember, even more, sometimes the name of the machine gives you a clue about what kind of computer is, for example, where I work a name beginning with "PE" means that the computer is located at Peru meanwhile starting with "CO" means that it's in Colombia.

Perhaps it happened that you only have the IP address but no idea if the computer is the one you need, if the name can help you to be sure you can use the "nbtstat" command in Windows using the parameter "-a" with the IP address of the computer.




Execute the command and wait for results.




You will notice that there are four names, this is because there are two different names the first one is the domain name and the second one is the computer name (the final goal). The another two names are the same but they have other codes because of the names clasification.


Monday, December 23, 2013

Making Excel VLOOKUP Function to Work


I have seen many times that there are some scenaries where the Excel VLOOKUP function is not able to calculate the value we are looking for. For example, let's search the amount for the ID 16 according to a little table with this value.




This is something really easy to do, we need only to use VLOOKUP function selecting the ID, the matrix and the column to be search.




However, when you see the result of this function you notice that there's an error despite the values are fine.




The reason of this error is that the searched ID value is stored as text, so you can convert it in number in this case because it's only one value, but what if it were a thousand of them?.




To avoid worrying about format issues just embraces the key value in the VALUE function inside the VLOOKUP function.




Once you use the function you are going to get the value that corresponds to the ID.




Consider that this is an example where the VLOOKUP function won't work as we want, I helped many people with this to solve another kind of problems with this function.

Sunday, December 15, 2013

Changing Size of VirtualBox Disc

Since I decided to use Linux, because I like it a lot, I knew that I'll need Windows anyway due to the fact that everyone (at most) uses it and considering also that my posts would have to be focused in this operating system (my readers use it).

To overcome this situation I decided to install a virtual machine on my Linux (Debian specifically) to avoid rebooting anytime I need to do something in Windows, to accomplish this purpose I installed VirtualBox and installed in it Windows 7.

However, In some point there was need to get more disk space but I couldn't get it because when you define a virtual machine you specify a determined disk size. But, it can be done the following to increase the disk size using the tools provided by VirtualBox.

First, increase the disk size by using a VirtualBox command created for this task. Remember that the virtual machine has to be turned off to be able to modify the virtual disk, once you are sure about this, go to the configuration of the machine.




Then, go to "Storage" section and pick your virtual disk, this is just to get the physical path of it in your computer, copy it from "Location" label.




With this path copied go to a command line and execute "vboxmanage modifyhd <your_disk_path> --resize <new_size_in_megabyter>", it's very similar in Windows so you won't have any problem, in this example I'm increasing the size to 26 GB.




Now you have your virtual disk with the desired size, but as a physical disk it's necessary to asing the new space to the operating system, to do this boot the virtual machine (in my case Windows) and go to "Start", right click over "Computer" and click on "Manage".




In the new window go to "Disk Management" and you will see not asigned space (consequence of the size increment), just right click over the partition next to this free space and select "Extend Volume...".




Finally, select the amount of bytes you will need in the new partition and that's all, more space for your virtual machine.