Thursday, March 14, 2019

Web definitions a developer or programmer needs to know

Definitions web developers or programmers need to know

Access Modifiers: Public, private, protected and internal

Access modifiers are used to signal the class or method as accessible to other class that inherit or use the Class. Hence, the public access modifier is used to signal that other class can inherit and use the class or methods, properties and events. While, private means that class cannot be inherited or methods can not be used outside the class. protected means that a class or method can only be used outside of its initialization by a class deriving from the Class containing Protected access modifiers for class or methods. Internal access modifier flags class as only accessible in the assembly created in.

Class

A class is a reference type object which is used by programmers to store and retrieve data. Moreover, a class defines properties, fields, events and methods that can be used by programmers in object-oriented programming.

Extension Methods

An extension method is a special static method that can be accessed by an class without creating the method in its base or derived class.

Decompile

The process of converting managed code into its original objects.

Reference Type

A reference type is a type that is defined as a Class. When a Class is created it store a reference to a location in managed memory(Heap).

Property

A Property is a special member of a Class which has a get and a set accessor, used for setting the value or retrieving the value of a private field.

Field

A field is a variable of a specific type declared in a class. A field can be public, private and protected.

JetBrains dotpeek

JetBrains dotpeek is a software tool that can be used to decompile any .net assembly into equivalent c# or IL code.

Methods

Method in a Class is used to perform certain functions against the Fields in the Class, such as "Sum()" method which will add int a and int b if declared as fields in the Class. Furthermore, methods can be public, private, protected and internal to the assembly.

New

The New keyword is used to instantiate a new object. The New keyword is also used to hide method in the base class and use the derived method in the derived class. Obviously, the method in the base class must have the keyword, Virtual. This is used in cases were renaming a method is not an option.

RAMMFAR

RAMMFAR is an acronym that stands for "runAllManagedModulesForAllRequests". "runAllManagedModulesForAllRequests" is an attribute required in the MVC web configuration file in the "module" node to allow or disallow all ASP.net modules to fire whether the request is from managed code or from unmanaged request such as PHP or ASP classic. 

Int, Double,Decimal and Float

Int, Double, Decimal and Float types are for numeric values and are know as value types, instead of reference types which are objects.

References



Wednesday, January 30, 2019

Wordpress disable ftp on Ubuntu Server

How to skip WordPress FTP Credentials on Ubuntu

If you have any experience with installing Ubuntu, you will have surely run into this problem:
ftp credentials are required when ever your try to install a theme or plugin.

This is frustrating especially, if you installing just one WordPress website on your server and you do not want to install ftp, for installing only a theme and a couple of plugins. Moreover, you are looking for a short cut. Obviously, FTP is also a security risk and SFTP would have to be installed. 


Steps to disable ftp credentials popup WordPress

Prerequisite:
  • You must already have Ubuntu Server(version 16) installed.
  • WordPress is installed. Click here to install WordPress
  • Configured a WordPress blog or website. 
  • Nano must be installed.
          To install Nano run the following command: 
          
          #sudo apt-get install nano


1. Logon to your Ubuntu Server
2. Open WordPress website configuration file in nano editor:

#sudo nano nano /var/www/wordpress/wp_config.php

 The command sudo lets you edit the configuration file using administrator rights. Nano is my favourite Debian file editor. The location of where you have installed you WordPress website,                    "/var/www/wordpress/" and in this folder you will find the configuration file.

3. In nano editor add below line, preferable at the end of the file: 

    Define(‘FS_METHOD’,’direct’)

If the editor is empty then you have typed an incorrect path.


References