Labels

Android (1) Apache (1) bash (2) boost (2) C (37) C++ (5) cheatsheet (2) CLion (6) css (3) Debian (34) DL (17) dns (1) Docker (3) Dreamweaver (2) Eclipse (3) fail2ban (5) git (6) GitHub (5) Hacking (4) html (8) http (1) iOS (1) iPad (1) IRC (1) Java (33) javascript (3) Linux (182) Mac (21) Machine Learning (1) mySQL (53) Netbeans (6) Networking (1) Nexus (1) OpenVMS (6) Oracle (4) Pandas (3) php (17) Postgresql (8) Python (9) raid (1) RedHat (15) Samba (2) Slackware (52) SQL (14) ssh (1) svn (1) tar (1) ThinkPad (1) Virtualbox (4) Visual Basic (2) Visual Studio (1) Windows (7) wire (1)

Tuesday, 30 January 2018

ECC Memory

WINDOWS 7 
wmic MEMORYCHIP get DataWidth,TotalWidth

LINUX
dmidecode -t 17

Friday, 6 October 2017

Python misc

def myFunction(prices, credit):
    for a in range(len(prices)):
        for b in range(a+1,(len(prices))):
            if(prices[a]+prices[b]==credit):
                if (prices[a]>prices[b]):
                    myT=[prices[b],prices[a]]
                    return(myT)
                else:
                    myT=(prices[a],prices[b])
                    return(myT)



prices=(10, 6, 3, 4, 5, 6, 7, 8, 9, 10)
credit=16
print(myFunction(prices,credit))

Saturday, 6 May 2017

Pre condition, post condition and Invariants

  1. Pre-conditions are the things that must be true before a method is called.The method tells clients "this is what I expect from you".
  2. Post-conditions are the things that must be true after the method is complete. The method tells clients "this is what I promise to do for you".
  3. Invariants are the things that are always true and won't change. The method tells clients "if this was true before you called me, I promise it'll still be true when I'm done".

Friday, 28 April 2017

Functions in VB

Public Function addSlash(ByVal temp As String)
        If Microsoft.VisualBasic.Right(temp, 1) <> "\" Then
            Return temp & "\"
        Else
            Return temp
        End If
End Function


'VB6
Public Function addSlash(temp As String)
    If Right(temp, 1) <> "\" Then
        addSlash = (temp + "\")
    Else
        addSlash = temp
    End If
End Function

Friday, 10 March 2017

Java Class EASY MODE

package somePackage;
import java.*;

public class someClass
{
   public someClass()
   {
   //Constructor
   }
   public void someMethod()
   {
   //do stuff
   }
}

Monday, 27 February 2017

Java Access Modifiers

Public, Protected, Default & Private

Polymorphism

Polymorphism

When methods understand the same message but it means different things, so, if we have two classes and both classes have a method called toString()

Each classes toString() will do something slightly different.

When methods are overridden we can say that they are Polymorphic


Tuesday, 17 January 2017

Formal Argument v Actual Argument

Formal Argument...

Formal when declaring and the Actual is when called.

public doSomething (Frog aFrog) //Formal

dosomething(jimmy) // Actual

Monday, 16 January 2017