1
Fork 0

Added pseudo code algorithms to make programming faster (Some may have already been integrated)

This commit is contained in:
Jake Howard 2014-10-22 10:32:51 +01:00
parent cf050d1de8
commit e35c2b8a71
5 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,5 @@
(USB_Location, Drive_Location)
freeSpace <-- getCapacity(Drive_Location)
driveFiles <-- getCapacity(USB_Location)
if driveFiles > freeSpace then return True
else return False

View file

@ -0,0 +1,4 @@
(DriveFormat, DriveName, DriveCapacity)
result <-- ExecuteSQL("SELECT BackupName FROM backups WHERE driveFormat = {} AND DriveName = {} AND DriveCapacity = {};")
if results is None then return False
Else Return True

View file

@ -0,0 +1,3 @@
(BackupName, DriveName, DriveCapacity)
wantsCompression <-- ExecuteSQL("SELECT isCompressed FROM backupTable WHERE driveName = {} AND BackupName = {} AND DriveCapacity = {}", DriveName, BackupName, DriveCapacity)
return wantsCompression

View file

@ -0,0 +1,3 @@
add c# user reference
username <-- computer.UserName()
return username

View file

@ -0,0 +1,5 @@
(backupName, driveLetter)
driveHash <-- calculateHash(driveLetter)
backupHash = ExecuteSQL("SELECT Hash FROM Backups WHERE backupName = {}", backupName)
if backupName is driveHash then return False
Else return True