0% found this document useful (0 votes)
14 views12 pages

Notes

certiport java, sql, and device config

Uploaded by

Pavel Balan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views12 pages

Notes

certiport java, sql, and device config

Uploaded by

Pavel Balan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

static (in method name) – you don’t have to create an object to run this.

Use static for variables outside a method if you won’t be creating instances of them
(and just read or alter their value)

You can run your code like this from the console using
javac (java file name)
java (java file name w/out .java)

Javadoc multi-line comment: Java multi-line comment


/** /*
*a * for each line *a * for each line here too
*/ */

In java there are 8 types of primitive data.


long needs an “l” after the integer and float needs an “f” after the integer, lest the
compiler think the variable is purely an integer

instead of writing int rand = parseInt(somestring);


you can write Integer rand = new Integer(somestring); waw :D

System.out.println(String.format(“%s”, somestring)); used to format strings more


easily

Add %20s to make the string be displayed across 20 spaces (sorta like that cout
setw in C++ we use to print out matrices)
String.format(“%3.f”, someInt); used to set how many decimals will be displayed
String.valueOf() – function that transforms any primitive data type to string
String variables are immutable
Print out an array of strings: (using for-each loop)
for(string randomstr: arr){
System.out.println(randomstr);
}

You cannot alter arrays’ size once initialized; however, you can add and remove
items from an ArrayList
ArrayList<String> name = new ArrayList<>();
You can use an Iterator object to go through an ArrayList using a while loop.
Iterator it = name.iterator(); //notice how iterator() is with a lowercase i
While(it.hasNext()){
//do sumn
System.out.println(it.next());
}

Conversion of primitive types to other primitive types

PEMDAS – order of arithmetic operations

If statements inline w variable declaration:


int nr = (bool) ? (int value for true) : (int value for false);
String str = nr>=2 ? “Greater or equal to 2” : “Less than 2”;

Break – stops a loop Continue – skips an iteration of a loop


A constructor is a method with the same name as the class it uses.
You can overload a constructor by adding another contructor of the same name and
change its parameters or values of variables (make them constant, perchance).
You can only have one public non-static class per java file, but multiple classes in
general.
An override in an extended class is a change to a method defined in a parent class
(like the parent class has a method for reading the user’s username, the extended
class might override it to reading a person’s password).

Static data members only ever use one memory space.


Instance members can change, static members cannot be altered .

Encapsulation – making data private (like actually using the keyword private), hiding
data.
Instance method creates an instance of a class, static method is standalone and
works by itself

Instantiate a class – make a new instance of a class (ClassName var = new


ClassName(….); )
Initializa a class – building a class

The only properties declared in a constructor are the ones who aren’t constant

There are two types of exception class types: checked and unchecked. The checked
exceptions are checked at compile time (before runtime), while the unchecked
exceptions happen at runtime.
Device config and management
Windows 11 got a new feature for the maximise option – snap layouts (arrange app
windows in certain gridded layouts)
Optional updates do not include security updates
HDMIs transport digital video + they got 19 pins
Mini HDMIs are used by smaller devices
Displayports are most often found on pcs
VGA transports analog video
USBs can be used to transfer power

SharePoint is a Microsoft app that lets you use a server in which you can put files in
and share them from.

Explicit permissions – default permissions


Inherited permissions – permissions of a child object inherited from a parent object
Effective permissions – permissions that a user has for an object

Effective permissions = explicit + inherited permissions

Mapped drive – provides users with a shortcut to files from a different device.
Basic ideas of security:
What you know: passwords, usernames, emails (what you can remember)
What you have: certain identification documents, cards, a phone etc.
Who you are: biometrics like fingerprints, retina scans

BYOD – bring your own devices (for the test know that they are at risk of being
stolen or tampered with when employees are transporting them from home to their
workplace).

Types of malware:
Computer virus – malicious code that can copy itself on your device. A virus must be
attached to a program in order to spread.
Worm – can replicate and spread across devices within a network.
Spyware – software that can track your activity and collect data about you without
your knowledge. (Which it then sends to a third party)
A trojan – spyware functioning similar to a virus. Looks legitimate but is malware. An
example of a trojan would be an ad promoting an antivirus software that is actually
harmful to your device.
Keylog – captures every keyboard keystroke.
Adware – causes popup windows to appear with ads. Can appear while installing
unknown files/apps from the internet which contain this malware. It also steals
personal information lol. It’s not that big a threat as it was in the past due to the
enhanced browser security
Ransomware – locks users out of their personal data until they pay up to regain their
access.
Phishing (Social Engineering attacks) – attacks where users are tricked into
revealing their private information (passwords, card information…). Such trickery
usually takes the form of manipulative emails.
Combating malware:
Have a good antivirus and antimalware program. Antivirus programs are best used
against common threats (viruses, trojans, worms)
Antimalware programs should be used against more sophisticated intruders.
Windows Defender is an antimalware program.
UAC – user account control

Site group policies allow administrators to control the working environment of


accounts in the Active Directory (some app)
Domain policy establishes security settings for users and computers, including
password and lockout policies.
Organisational Unit groups allow administrators to place different users into groups
in order to more efficiently manage policies for sub-divisions of employees.

Active Directory applies group policy in this order:


1. Local policy
2. Site policies
3. Group policies
4. Organisational Unit groups

Important for test !!


After uninstalling an application, one should restart the computer to remove any
leftover files.
Boot logging – pc keeps a log of every time a driver is used. Stops when an error
occurs.
Safe mode – computer starts with limited access to files and drivers. This helps you
nail down the problem

Another option is to go back to a previous version of the operating system, known


as a rollback.
devmgmt.msc – open from windows+R (driver updates n
such) !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
A user should go to Device Manager to see if a device has the most recent driver
installed
APIPA – protects the device from system failure
DATABASES
Composite/Compound key – combination of primary keys
One to one relationships use primary keys from two tables
One to many relationships use a primary key from one table and non-primary keys
from many others.
Referential integrity ensures that a primary key value exists before a foreign key
value. This rule enforcement is done by enforcing foreign key restraints
Third normal form – we don’t want change in one variable to affect any other
variable.
A row is a line within an entity.
Datetime – 8 bytes
Integer – up to 2 billion
Smallmoney - 214000
View – a storage statement that leads you to specific information (does not save
info)

(inner) Joining tables only works if there is an identical primary key located in each
table.

A left outer join shows all records from the first table in a join plus matching records
from the second table. A right outer join shows all records from the second table in
a join plus matching records from the first table. A full outer join will show all
records from both tables. If a join is not specified, a cartesian product will show how
every record in one table is related to every record in another table. A self join is a
join between two columns in the same table, usually when a table has a hierarchical
structure.

UNION – adds the column entries of both tables, no matter if information may
repeat itself
INTERSECT – adds the column entries that are present in both tables.
DISTINCT – adds all column entries, but removes the repeating ones.
ORDER BY query can display column entries in descending order if you type DESC
next to the column name.

We use ON clause to specify a join condition. This lets us specify join conditions
separate from any search or filter conditions in the WHERE clause.

You can only have one WHERE statement in an SQL statement, so you should use
HAVING instead of WHERE if you need to use it after it’s been defined. (they have
the same function)

INSERT INTO … SELECT … - used when inserting data from a table into another.
Required fields must be included when inserting into a table
The UPDATE statement uses SET (UPDATE updates row info, but SET takes a column
as parameter). You always use WHERE in an UPDATE statement.

To change a view, we just need to change the CREATE keyword to ALTER (and the
rest of the syntax is identical). Alter changes the columns of a table/view…

Clustered indexes are based on the primary keys of a table, whereas non-clustered
indexes are based on any column of said table. Each non-clustered index speeds up
the query process; however, they adda to a table’s size.
You should use the keyword USE at the beginning of every query if you have copies
of a table.

You might also like