Tech Junkie Blog

Latest Posts

Tuesday, September 25, 2018

If you have been following around 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 24, 2018

Yum is a update manager used by CentOS and other RPM-based Linux distributions.  It not only updates and install software from the defined repositories, it also takes cares of the dependencies.

One of the most common task that you will do is to keep your server up to date.  With yum it is quite easy because CentOS comes with many official repositories that enabled by default.  That means for the most part running software updates will not break your existing server.

Here are the steps to update your CentOS server.

1. To update your server, log into your CentOS instance and start a terminal session
2. Switch to super user privilege with the command sudo su









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!

Here are the steps to install the Eclipse IDE on your Fedora instance:

1.  Log into your Fedora instance, and open a terminal session
2.  Type sudo su to switch to super user priviledges
3.  Now type sudo dnf install eclipse to install Eclipse













4.  Type y to confirm that you want to install











5. Launch Eclipse with the command, make sure you are not logged in as root user or a super user.  Accept the default "Workspace" by clicking "Launch"




















6.  You will see that Eclipse is launched for the first time.  It's up to you if you want to send information to the JBoss Tools team.


Monday, August 20, 2018

If you come from C# or Java, JavaScript inheritance is a little different than what you are used to.  In JavaScript you don't inherit from a class, but you inherit the classes' prototype object.  In our previous post we created an Account class.  In this post we are going to inherit from the account class.  First let's recreate the Account class with the code below.


    <script>
    <script>
        function Account(balance, type) {
            this.balance = balance;
            this.type = type;
        }

        Account.prototype.deposit = function (d) {

            this.balance = this.balance + d;
            return this.balance;
        }

        Account.prototype.withdrawal = function (w) {
            this.balance = this.balance - w;
            return this.balance;
        }

    </script>


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.

To enable full screen on a Linux operating system.  Perform the following actions, this should work on all Linux distribution that VirtualBox supports.

1.  Start the virtual machine that you want to make full screen


2.  Log into your GUI desktop