Saturday, February 15, 2014

A beginners guide to Excel 2010


There are many uses for Excel in today's digital world. You can do many things in Excel such as put together reports, charts, graphs and numbers for analysis. 

During this tutorial I will be going over some of the basic functions of Excel.

Say, for example, you are doing your finances and you have entered in your numbers, but now you want a running total or sum of all your numbers for a given column. In the below image, I have selected the box under the column I want a total of. Next I have clicked and circled the "AutoSum" button.



After clicking the AutoSum button, it has updated this box for me. It now says "=SUM(B1:B3)". This means that the values entered in from the box ranges of B1 to B3, add them up and produce the sum; place the sum in the box I have highlighted. If you mess up and have the wrong boxes highlighted or you want more boxes highlighted, the selected area has little boxes at each corner. All you need to do is click+hold one of the boxes and drag. You can also just sum the box and enter the total. After you enter the total, you can click on the total box and change the range, manually.


You can then put all of this content within a table and have it highlighted. Under the "Home" tab on the ribbon, you can click "Format as Table" and select the layout you want.



Once you select the layout you want and click it, you will get a new dialog box that will prompt you for the range of your data. Also note that there is a check-box here that says "My table has headers". If you have this checked, it will not create headers for the columns for you. The default headers will say something like "column1", "column2" and so on.



If you think the range is wrong, you can once again grab the corners of the box, drag and it will update the range for you. In this example the box states that my range of data is from A1 to B4. A1 being the top left of my data and B4 being the bottom right of my data.



After you select your data range and hit okay, your table should look something similar to the below, but depending on your layout you may have different colors. You can also center all the text by click A1 and dragging the mouse to B4. On the "Home" bar you can click "Center" and it will center all the text in all the boxes you highlighted. 



When you first add a table, it will have arrows for drop downs on the table's headers. This is for if the user wants to add a data filter. You can simply remove data filters by going to the ribbon under "Data" and click "Filter". This will un-highlight "Filter" and it will remove the data filter/arrows on the table's headers for you.



One additional item to make things easier to read in your table is if you have a scrolling list of data, you may want to "Freeze top row" so when a user scrolls downward on the data set, they can always keep the headers on the page. It makes things easier so that when they scroll down to find the data they want, they know the corresponding table header for the column without having to scroll back up.




Moving on we can also create a pie chart out of this data. Column A has my data's titles. For example, if you are doing your finances, you can have A1 = Car, A2 = insurance, A3 = Loans, A4 = bills. These will be the titles for the amounts that take up a piece of my pie chart. You will need to select the data range first before you go under the ribbon and select "Pie". If you do not select the data first, this will produce a blank pie chart. Under "Insert" on the ribbon, you can select "Pie" and select the chart  you want. 




Notice below when I select the chart, the data sheet highlights in purple on the left and blue on the right. This is excel separating the titles from the content. You can, too, in this mode re-select the data range and adjust. 



If you do not want to make a pie chart, then the other options are a Line graph, Bar graph, Column graph and so on. These graphs can be created in the same manner shown above. 

Friday, February 14, 2014

Satisfying the Web Stack for Web Programming. (The easy way.)

Everyone has always wondered about creating their own website for their great ideas they have. They have questions like, "Where do I find a good domain to host?" or "How do I learn how to code this stuff?"

Web hosting is available from many websites. You can do a simple web search for "web hosting" and determine what one has the best offering for you.

Today we will talk about hosting a site locally on your PC, securing it from nasty hackers on your network and the basics of coding some simple test web pages.

The first thing you will need to do is to download XAMPP. You can find the latest version from here: http://www.apachefriends.org/index.html

Select the version that best fits your OS needs.

Upon installing you will see the below notification telling you that anti-virus may interfere with the install. I usually never disable my anti-virus in order to install this product. It may vary depending on what you use though.


Once you click "Yes", it will warn you about Windows' UAC. Just go ahead and click "Ok".



Next up is selecting the items you need to check in order to fit your website needs. 



You don't need much to get started and activating more things than what you need only makes more work for you. So just select what you need. In order to get things up and running, the below items are the things you SHOULD have active.



Once the installation is complete and you run the application for the first time, you will see the below image. Notice that some of the items have no "Start" button available on them. This is because you didn't install these features.



Once you start the app, you will notice it states that it has an adjacent port # for the service. This means the service was able to attach to a communication port and run. If it failed to run, then it would not have a port #. Sometimes this happens when another service is using that port # and it cannot take over the port. 



If you are succesfully able to run the services, you can select "Admin" on "MySQL" and it will take you to: http://localhost/phpmyadmin/.



Once you login, you will be brought to the below screen:



Select the "users" tab" and you will see the below image. Lots of accounts here initially. 



Select "Edit Privileges" on "Root:localhost" and scroll down to where you see "change password"



Settings a password for Root is VERY important for securing myphpadmin. Resrticting IP ranges to access this internal site is also a good approach. Here are some more tips:
  1. Consider using HTTP Basic Auth in front of PHPMyAdmin
  2. Always restrict access to only your IP Address if you can (this can help cut down on a number of login attempts)
  3. PHPMyAdmin needs to be secured, and kept up to date
  4. don't have predictable file locations such as /PHPMyAdmin (this cuts down on the attempts from automated scanners)
  5. Make sure you use HTTPS
  6. PHPMyAdmin configuration can store credentials, these could be compromised
Now that you have considered some security settings and setup everything. Try to test your server out. Go here: http://localhost/xampp/splash.php

Select your language and you should see the below image:



Test your PHP and make sure it's working. Click on the left hand side "phpinfo()". If you clicked it and do not get any errors, then it's installed properly and working. You should get information about your php version and such.

Make sure to edit C:\xampp\phpMyAdmin\config.inc if you get the dreaded: #1045 - Access denied for user 'root'@'localhost' (using password: NO) error.

Now, whatever you create as far as a website goes if it be .CSSs or HTMLs, you can place them in the folder of: C:\xampp\htdocs

After you place all your files in this location, you can browse to: 127.0.0.1.

If you have an index.html file, you can browse to http://127.0.0.1/index.html

Otherwise it will default to: http://127.0.0.1/xampp and it will generate an error if you do not have this file.

Have fun!

Disclaimer: I am not responsible for any damage or any malfunctions that may occur during the process of installing this application and use.

Playing Android apps on the computer using BlueStacks.

I found an application you can download for free and it allows you to play your Android apps for free on your computer!

Simply go to: http://www.bluestacks.com/
Download the application for your appropriate OS. Install the application and run.

Once you run the application for the first time, it will ask you to enable a few things for it to run properly. I selected all, but the last one. I believe App Sync and the other option needs to be enabled. You can uncheck all three and choose 0 permissions.

Once you start browsing the Google Play store and try to install an application, it will prompt you to login to your Google email (Gmail) account. Login and try to download something. It will tell you the exact items you need to enable in order for the applications to function, enable these.

Once you have logged into your Google account, downloaded your app and installed it. You are ready to play your app on your computer!

Here is what the settings screen looks like. The bottom bar is your notification area and any new updates on your apps will appear here.



Here is what the full application looks like when it is ready to roll:



Here is what happens when you select an app:



Disclaimer: I am not responsible for any damage or any malfunctions that may occur during the process of installing this application and use.

Fiddler by Telerik - Web Debugging Proxy

Today we will take a look at Fiddler 2. Fiddler is a web debugging tool for free by Telerik. This can be a very useful tool for seeing what items are hit/downloaded and viewed with your web browser when you hit a web page. Ever wondered how many images, links, scripts, etc. are downloaded when you hit just one site? Then this is the tool that will show you this.

Here are some key features:


Simple go to: http://www.telerik.com/download/fiddler and download the proper Fiddler for your version of the .NET framework you have for your PC. You can check what you have in your Add/Remove Programs from Control panel.


Once you have Fiddler downloaded and installed. You can run it and it will immediately begin to start listening for traffic. The first two items it will hit will be itself checking Telerik for updates. You will see these hits immediately. 

If you would like to clean these hits up, just control+select them all and right click. Go to Remove and click Remove Selected Sessions.



Now you have a clean slate and are ready to start hitting sites and seeing what goodies show up.

Now let's try just hitting www.yahoo.com and see what it yields. The below screen capture is all the items that load when I hit the website.

Notice item 49, y.analystics.yahoo.com. What in the world is analystics.yahoo.com? Are they gathering information about me? Personal information? Well, not really. They monitor the items you select, you click and they build trends based on this. They aren't saying "Oh Joe Schmoe clicked this and he's looking for blah blah". They more, so look for what people want to read based on what they click and then they surround their articles around that. Supply and demand.

If you will also notice, the "Protocol" column says "HTTP". So anything I click or go to or read is going over clear text. Anyone on my network could easily sniff this traffic. Not a big deal because I'm just browsing the world wide web, right? Right, these are good things to note.

Now lets try to login to mail. Is that clear text?

No, one key thing to note here is that under "host", it says "tunnel to". This means it is creating a secure tunnel to the host and you can't see the contents. I know this is a strange reading because it says it's going through port 443 instead of 8443, but if you will notice in your URL bar it says HTTPS and not HTTP. 

Try navigating to www.youtube.com. Your "host" coloum will look a lot different.


Notice in the above image that the Host filed actually has content instead of it saying "Tunnel to"?

Lets go ahead and start analyzing HTML code. Right click the page and go to "View Page Source".


Once you view the page source, you can Contr+F for "Login". We are looking for the action the login button does and the file it loads when you click it.


There it is, you can even click the link live from here and it will take you to the normal login page. The reason why we did this is because sometimes we can view CSS files and see what the website is doing. We can also see if they are using encryption for you login or not. Notice the link has "HTTPS" in it? Secure login!

Lets take a look at the pane on the right side.


This pane will show you the most useful information. This pane will show you the exact data you sent to the Host. Items in here can include: browser type, amount of bytes sent, time sent, cookies dropped from it and various other bits of information helpful to determining what is being transacted between you and the host.

You may wonder, "What am I supposed to do with this information? It's nice and all, but seems useless."

This information is useful because you can see what the server is accepting and what it expects. Beyond this, you can use this information against the server if you choose to. If a server expects the browsing client to be X, then you can craft a packet to LOOK like what the server is expecting. 

There's many variants to what you could do.

Disclaimer: I am not responsible for any damage or any malfunctions that may occur during the process of installing this application and use.

Visual Studio 2010 - Beginning tutorial

This is a tutorial on how to install, compile and run your first Visual Studio 2010 Windows form application from start to finish.

We will be performing this coding in C# and you will not need to know much or anything about C# in order to run your first application in this example.
  1. Simply go to: http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
  2. Scroll down to about mid-page and select the Visual C# 2010 Express button.


  3. Click "Install Now". A download will start, an exectuable. Once it is completed, run it.
After you have installed the product and run it for the first time, it will prompt you for a registration code.


You will need to click "Obtain a registration key online" and login with your Microsoft email account. Once you login, it will ask you a few questions about what you are using the product for. Fill out the questions and next you will receive your code.

Now you are ready to start writing your first application!

Here are the next steps you will need to take:

Go to file and select new project. You will see the below screen come up.



In this screen, select "Windows Forms Application".

Once you have created your new Windows Form Application, your screen should look like this above. Please notice the items on your right hand as these are the files that are stored on your local file system.



You can right click "Form1.cs" and go to "View Code".




Once you click "View Code", you can see what the actual code looks like for this project and here you can edit items in your project as needed.

All you need to do is click the green triangle under the "Window" button and your application will run.

Congratulations! You just built, compiled and ran your first C# program!

Disclaimer: I am not responsible for any damage or any malfunctions that may occur during the process of installing this application and use.