Tech Junkie Blog - Real World Tutorials, Happy Coding!: 2018

Friday, December 21, 2018

I think I've gotten rid of all the spams on my blog.  It was quite an effort.  I am not going to be mean about it.  I know the spammers are just trying to do their job.  But just keep in mind that the people who comes to my blog are people who wants to learn about coding.  Heck I come here just for self reference.  So you can still spam is you want.  But, I will delete your spam.  I just hope people will learn from this blog. It's not the bible, but I hope you are interested in coding because of it.

Friday, December 14, 2018

The best way to connect to a virtual machine in Azure if it's a Windows operating system is through a Remote Desktop Connection or RDP.  In this post I am going to show how to set the Azure portal virtual machine to accept RDP connection from your desktop.

Thursday, December 13, 2018

It is time consuming and a lot of work to set up your own data science virtual machine locally.  If you don't mind the cost, the alternative to is to setup a data science Virtual Machine in Azure and let Azure take care of the plumbing such as the hardware requirements and etc, because a data science Virtual Machine is a little beefier than an regular mainstream laptop.

Tuesday, September 25, 2018

If you have been following along with the ASP.NET MVC tutorials you would have noticed that the URLs have a port next to them.  In this post we are going to get rid of that annoying port have a just the URL as localhost/{mycustomroute}

Monday, September 17, 2018

In the previous post we created a Admin Area, however we had to type in localhost/Admin/Home/Index to get to the Admin index page.  In this post we are going to make the Index page more user friendly.

To do that first let's assign the namespace to a local variable so that we can use it in multiple routes.

Open the "AdminAreaRegistration.cs" file in the /Areas/Admin folder and change the RegisterArea method to the following:


        public override void RegisterArea(AreaRegistrationContext context) 
        {
            var namespaces = new string[] { typeof(NorthwindCafe.Areas.Admin.Controllers.HomeController).Namespace };

            context.MapRoute(
                "Admin_default",
                "Admin/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional },
                namespaces 
            );
        }


Monday, August 27, 2018

Love it or hate it the Eclipse IDE is a comprehensive development tool that rivals or surpasses Microsoft's Visual Studio.  If you are working outside of the .NET stack Eclipse will probably have plug-in for your development platform. I myself find the UI a little bit overwhelming.  But for the price it's a pretty good value, which is free!

Friday, August 17, 2018

If you've installed an operating system in VirtualBox before you've probably noticed the screen is really small even when you switch to Fullscreen mode.  It's so small that you can't even see the fonts for the icons if you have a desktop GUI installed.  To fix this problem VirtualBox provides us with the Guest Additions tool.  Which enables the virtual machine to be viewed at fullscreen.

Wednesday, August 15, 2018

One of the most common task you have to do as a Linux administrator is to add a new user.  Especially developers who always wants root access.  To accomplish this task you can use the useradd command in the Terminal session.  Follow the steps below to add a new user to CentOS.

Friday, August 10, 2018

Linux installation comes with OpenJDK, but you want to use the official JDK from Oracle instead to run most of the software.  This post will show you the steps to install the Oracle JDK

First let's check to see what version of JDK we have installed by running the command

java -version

Thursday, August 9, 2018

One of the most useful feature in Azure is the ability to reset your virtual machine's password.  There will be times when you create a virtual machine that you put aside for a long time and you forgot the password for the machine.

To reset your password do the following:

Wednesday, August 8, 2018

An ASP.NET MVC can get big, and it could be overwhelming.  Areas are a way to break up the application into smaller segments,  A perfect candidate for an Area is the Administrative features of the site because it has multiple pages, and functionalities.  So it is a good idea to segment off the Administration area to its own area (no pun intended).

Tuesday, August 7, 2018

In the previous blog we deployed a full stack CentOS Server in Azure.  In this blog we are going to connect the server using a tool call Putty.  You can download Putty at https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html .

Follow the steps below to connect to your Ubuntu Server in Azure:

Friday, August 3, 2018

In our previous series we've gone over how to install Ubuntu Server on Oracle VirtualBox to use it as a server.  In this series we will go over how we can use the Fedora desktop as your developer's machine/virtual machine.  Having a Linux developer machine is great because a lot of the more expensive Windows developer's program are expensive.  There's usually a Linux equivalent application that is comparable to their Windows big brother that are usually free or a lot less expensive.  Also most Java technologies work better on Linux than Windows.  So let's begin on journey into the Linux desktop experience.

Thursday, August 2, 2018

In this tutorial we will add icons to your navbar.  In the previous tutorial we added a responsive layout with bootstrap.  In this post we will add some icons to your navigation.  Font-Awesome gives you professional looking vector graphics, which are implemented using CSS.  Bootstrap 4 uses Font-Awesome as it's icons. Glyphaicons will goes away. So we might as start using it.

Wednesday, August 1, 2018

With Microsoft Azure, any developer can easily add a membership service immediately when you are ready to use it.  In my other tutorials we started to create the "Northwind Cafe" sample application.  Traditionally, we would store our user information in an SQL Server database.  While that would be the easiest place to store user information.  There are many downsides to doing that, for instance you have to lock down the SQL Server so that hackers are not able to hack into the database.  You also have to worry about network security and so forth.  The beauty of Microsoft Azure Active Directory is that you let Azure take care of all of that.  It also comes with many services already built-in like OAuth, and two-factor authentication.

Before we go on, we need to make the distinction that Azure Active Directory is not the same thing as your on-premise Active Directory.  Your on-premise machines will still be managed by your on-premise Active Directory.  Azure Active Directory is designed to scale your internet-based applications and APIs.

So let's get on with it!

Tuesday, July 31, 2018

In our previous blog post we installed CentOS on our local virtualization software call VirtualBox.  In this blog we are going to go through how we are going to do the same in Azure, and host our CentOS server on the cloud.

People often get confused when they work with Azure because there are two versions of Azure.  Most people call it the classic mode and the new portal Azure or the more official term is ASM vs ARM.  In this post we will create a CentOS Linux virtual machine in the new Azure portal.

Tuesday, July 24, 2018

In most environments you are not allowed to have direct access to the Linux server.  The most common way to gain access is through a secure shell connection or SSH.  The most common tool that is used on a Windows environment to connect to Linux is a utility software call Putty. In this post we are going to connect to our CentOS instance that we've installed on VirtualBox.

Sunday, July 22, 2018

In older versions of SQL Server, the "sa",  System Administrator account is given a blank password by default.  In SQL Server 2014, that is no longer the case.

To set the "sa" account's password, perform the following steps:

Saturday, July 21, 2018

In this tutorial we will add the INSERT functionality to our GridView control.

Follow the steps below to enable insert on our GridView control.

1. Open the source view in the .aspx page and add the ShowInsertButton attribute to the <asp:CommandField element inside the <asp:GridView element

        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" AllowSorting="True" DataKeyNames="ProductID" DataSourceID="SqlDataSource1">
            <Columns>
                <asp:CommandField ShowInsertButton="True" />
                <asp:BoundField DataField="ProductName" HeaderText="ProductName" SortExpression="ProductName" />
                <asp:BoundField DataField="QuantityPerUnit" HeaderText="QuantityPerUnit" SortExpression="QuantityPerUnit" />
                <asp:BoundField DataField="UnitPrice" HeaderText="UnitPrice" SortExpression="UnitPrice" />
                <asp:BoundField DataField="UnitsInStock" HeaderText="UnitsInStock" SortExpression="UnitsInStock" />
                <asp:BoundField DataField="UnitsOnOrder" HeaderText="UnitsOnOrder" SortExpression="UnitsOnOrder" />
                <asp:BoundField DataField="ReorderLevel" HeaderText="ReorderLevel" SortExpression="ReorderLevel" />
                <asp:CheckBoxField DataField="Discontinued" HeaderText="Discontinued" SortExpression="Discontinued" />
            </Columns>
        </asp:GridView>

Tuesday, July 10, 2018

In previous blog we've installed the CentOS operating system on VirtualBox however, when we reboot, it takes us to a text prompt.  In this blog we will be installing a graphical desktop environment to our operating system using "yum".  Follow the steps below to get the Gnome desktop in your CentOS.

1.  Make sure you have internet connection
2.  Click "Start" on your "CentOS" VM

Tuesday, July 3, 2018

If you are a startup or an entrepreneur, learning Linux is essential. Most of the open source and latest innovations starts out with Linux such as Docker.  That's because Linux is for the most part free and has a great community of techies supporting it.  Even Microsoft loves Linux now, it even made a commitment by releasing SQL Server on Linux.  Although it could  be a fling, instead of a long term engagement.  Also if you noticed the Virtual Machines on the clouds are cheaper if you choose the Linux version.  In this series on Linux I will go over what you need to do to get yourself started on Linux.  The best way to learn about Linux is to install it on a Virtual Machine.  We could host it on the cloud, but then we need to pay for it.  There are some free-tiers but they are limited.  So we are going to use VirtualBox from Oracle to host our CentOS instance.

On the previous blog we went over how to create a new virtual machine for CentOS in VirtualBox.  In this blog we will go over how to install the CentOS ISO file on the new virtual machine that we've just created. Below are the step by step instructions of how to install CentOS on VirtualBox.

Tuesday, June 26, 2018

If you want to know your way around Red Hat Enterprise Linux distribution, but the you don't have the financial ability to obtain a license.  CentOS is your best bet get to the the Red Hat Enterprise Linux official experience.  Because CentOS is a binary compatible version of Red Hat Enterprise Linux.  Meaning all the things that matters are the same, only the branding and logos are different.  CentOS is open sourced and can be downloaded for free.  Although it might be a couple of versions behind Red Hat Enterprise Linux.  But, you should be able to perform everything you can with CentOS that you can with Red Hat Enterprise.  Below is a step by step instruction on how to install CentOS in Oracle VirtualBox.

Tuesday, June 19, 2018

In this post we are going to install the Putty client for Windows.  Which is the most common way to connect to a Linux instance remotely.

Here are the steps to install Putty:

1.  Go to the URL https://www.putty.org/
2. Click on the "Download" link

Thursday, May 17, 2018

R is a programming language that is a little different in syntax then your typical mainstream languages like Java or C#. In this post we will go over how to create variables in R.

Let's create some variables about a user:

To create a variable in we use the <- key for example if you want to assign a value to variable firstName, you would write firstName <-  "John" or "John" -> firstName

Thursday, May 10, 2018

Now that we R installed in Visual Studio let's install some of the more useful packages that we will use in our R development.  Packages provides you  with the tools to perform tasks, functionalities and datasets for the those features.

To install R devtools package do the following:

In your R project, type the following command into the R Interactive window install.packages("devtools")

Wednesday, May 2, 2018

In this post we are going to go over the steps to install R Tools For Visual Studio 2017.  RStudio has a development environment that is bare bones for the free version.  Visual Studio 2017 offers a more robust development environment if you download the R Tools feature.

Thursday, April 5, 2018

In this post I am going to go over how to install Python on a Windows machine

Here are the steps to install Python

1.  Type in the URL https://www.python.org/downloads/
2.  Click Download Pythong 3.6.5, save it to a location that you will remember

Wednesday, April 4, 2018

R is a programming language used by data scientists to present and manipulate data.  In this blog post I will go over the steps you need to do to install R in your Windows machine.

Here are the steps to install R:

1. Type the following URL into the address bar https://cran.r-project.org

2. Once you are on the page click on the link that says "Download R for Windows"

Tuesday, April 3, 2018

In CSS you can define styles for HTML elements and apply the styles globally on the page where the HTML element is used.  For example you can define styles for the entire html element or the p element.  Like the following markup


        html {color:blue;}
        p {font-weight:bold;}
        h1 {color:red;}


This is a paragraph

This h1 tag


Search This Blog