BestChange - exchange monitor, earn as an affiliate!

Thursday, July 19, 2012

Encryption


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Public Function SimpleCrypt(ByVal Text As String) As String
' Encrypts/decrypts the passed string using 
' a simple ASCII value-swapping algorithm
Dim strTempChar As String, i As Integer
For i = 1 To Len(Text)
  If Asc(Mid$(Text, i, 1)) < 128 Then
    strTempChar = _
CType(Asc(Mid$(Text, i, 1)) + 128, String)
  ElseIf Asc(Mid$(Text, i, 1)) > 128 Then
    strTempChar = _
CType(Asc(Mid$(Text, i, 1)) - 128, String)
  End If
  Mid$(Text, i, 1) = _
      Chr(CType(strTempChar, Integer))
Next i
Return Text
End Function


Monday, July 2, 2012

C++ Notes

VARIABLES
variables must be:
declared (the type of variable)
defined (values assigned to a variable)
before it can be used in a program.

DATA TYPES
C++ supports the following inbuilt data types:-
int (to store integer values),
float (to store decimal values),
char (to store characters),
bool (to store Boolean value either 0 or 1) and
void (signifies absence of information).

KEYWORDS
reserved wordsjavascript:void(0)

IDENTIFIERS
name of functions, variables, classes, arrays etc.

CONSTANTS
fixed values which cannot change.