Skip to content

Commit

Permalink
prettier formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebazhanov committed Oct 21, 2021
1 parent ec93032 commit fccf7c2
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 48 deletions.
22 changes: 12 additions & 10 deletions README.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion aws-lambda/aws-lambda-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@
- [ ] `never`
- [x] `anytime via configuration`


#### Q43. What is the relationship between SAM template and CloudFormation template files?

- [x] SAM templates are a superset of CloudFormation templates. SAM templates include additional resource types.
Expand Down
4 changes: 2 additions & 2 deletions c++/c++quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -1189,15 +1189,15 @@ bool is_even(int);
- [ ] bool is_even_float(float f); bool is_even_str(char \*str);
- [ ] float is_even(float f); char *is_even(char *str);
#### Q70. what is class template ?
- [X] It is a class written with the generic programming paradigm, specifying behavior in terms of type parameters rather than specific types.
- [x] It is a class written with the generic programming paradigm, specifying behavior in terms of type parameters rather than specific types.
- [ ] It is a class that consists only of member variables, with no constructor, destructor, or member functions.
- [ ] It is a blank superclass intended for inheritance and polymorphism.
- [ ] It is a skeleton source code for a class where the programmer has to fill in specific parts to define the data types and algorithms used.
#### Q71. Other than shifting bits to the left, what is the << oprator used for ?
- [ ] shifting characters to the left in a string.
- [x] inserting characters into an output stream like std::cout.
- [ ] comparing floating point numbers as less-than.
Expand Down
20 changes: 10 additions & 10 deletions css/css-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ div a
```

- [ ]
```markdown
```markdown
1. An element with an ID of "nav"
2. A nav element
3. An element with a class of "nav"
Expand Down Expand Up @@ -219,7 +219,7 @@ section + p {
- [ ] Paragraph one will be blue, paragraph two will be red.
- [ ] Both paragraphs will be blue.
- [x] Paragraphs one will be red, paragraph two will be blue.
- [ ] Both paragraphs will be red.
- [ ] Both paragraphs will be red.

#### Q16.What are three valid ways of adding CSS to an HTML page?

Expand Down Expand Up @@ -370,7 +370,7 @@ p {
- [ ] the top right corner of the element
- [ ] the bottom left of the element

#### Q29. Which of the following is not a valid color value? (*Alternative:* Which choice is not a valid color value?)
#### Q29. Which of the following is not a valid color value? (_Alternative:_ Which choice is not a valid color value?)

- [ ] `color: #000`
- [ ] `color: rgb(0,0,0)`
Expand Down Expand Up @@ -1101,7 +1101,7 @@ D. border-top-radius: 10px;
<hl>Heading 1</h1>
<h2>Heading 2</h2>
</header>
<h2>Heading 2</h2>
<h2>Heading 2</h2>
```

- [x] `header h1, header h2 {...}`
Expand Down Expand Up @@ -1224,7 +1224,7 @@ section {
- [ ] `#header {...}`
- [ ] `header > h1 {...}`

#### Q97. What is the correct order for listing different link states in a website so those states display correctly on the page?
#### Q97. What is the correct order for listing different link states in a website so those states display correctly on the page?

- [ ]
```css
Expand All @@ -1233,26 +1233,26 @@ section {
```
- [ ]
```css
:link
:link
:visited
:hover
:active
:focus
:focus
```
- [ ]
```css
:active
:focus
:hover
:link
:visited
:visited
```
- [x]
```css
:link
:visited
:focus
:hover
:active
:active
```
[Reference](https://www.sitepoint.com/pseudo-classes-the-basics/)
[Reference](https://www.sitepoint.com/pseudo-classes-the-basics/)
7 changes: 5 additions & 2 deletions cybersecurity/cybersecurity-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@

[Ref](https://www.okta.com/identity-101/authentication-vs-authorization/)

#### Q27. According to GDPR, a data _____ is the person about whom data is being collected.
#### Q27. According to GDPR, a data **\_** is the person about whom data is being collected.

- [ ] processor
- [ ] object
Expand Down Expand Up @@ -241,6 +241,7 @@
- [ ] assume breach

#### Q33. Which attack exploits input validation vulnerabilities?

- [ ] ARP spoofing
- [ ] pharming attacks
- [x] cross-site scripting (XSS)
Expand All @@ -249,19 +250,21 @@
[Ref](https://www.whitehatsec.com/glossary/content/input-validation)

#### Q34. You are a security analyst, and you receive a text message alerting you of a possible attack. Which security control is the _least_ likely to produce this type of alert?

- [ ] IDS
- [ ] SIEM
- [x] packet sniffer
- [ ] IPS

#### Q35. SQL injection inserts a code fragment that makes a database statement universally true, like ______.
#### Q35. SQL injection inserts a code fragment that makes a database statement universally true, like **\_\_**.

- [ ] `SELECT * FROM users WHERE username = " AND 1=1--'`
- [ ] `SELECT * FROM users WHERE username = " AND 1!=1--'`
- [x] `SELECT * FROM users WHERE username = " OR 1=1--'`
- [ ] `SELECT * FROM users WHERE username = " OR 1!=1--'`

#### Q36. Which type of security assessment requires access to source code?

- [x] static analysis
- [ ] black box testing
- [ ] dynamic analysis
Expand Down
4 changes: 2 additions & 2 deletions hadoop/hadoop-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@
- [ ] library manager
- [ ] lookup store
- [ ] registry
### Q52. To view the execution details of an Impala query plan, which function would you use ?

### Q52. To view the execution details of an Impala query plan, which function would you use ?

- [x] explain
- [ ] query action
Expand Down
7 changes: 4 additions & 3 deletions it-operations/it-operations-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- Reset administrator password.
- Set network name.
- Set network password.

- [ ]

- Set network name.
Expand Down Expand Up @@ -248,7 +249,7 @@
- [x] NIC
- [ ] Router

#### Q24. Networking wire is referred to as _________
#### Q24. Networking wire is referred to as **\_**

- [x] CAT-5 or CAT-6 Ethernet cable
- [ ] thin pair or twisted pair
Expand All @@ -262,7 +263,7 @@
- [ ] Restart the computer.
- [ ] Let Jen take over.

#### Q26. A ______ allows you to plug computers into a central location to communicate on the same local area network.
#### Q26. A **\_** allows you to plug computers into a central location to communicate on the same local area network.

- [x] server
- [ ] layer 2 switch
Expand Down Expand Up @@ -297,7 +298,7 @@
- [ ] The site requires a login and password.
- [ ] You can't tell because a website's security settings are not readily apparent in a browser window.

#### Q31. The client/server model best represents ______.
#### Q31. The client/server model best represents **\_**.

- [x] multiple hosts interacting with a single computer
- [ ] an application consisting of cooperating programs across the Internet
Expand Down
1 change: 1 addition & 0 deletions java/java-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -1387,6 +1387,7 @@ public class Main {
- [x] 3

#### Q98. Which class acts as root class for Java Exception hierarchy?

- [ ] Clonable
- [x] Throwable
- [ ] Object
Expand Down
11 changes: 5 additions & 6 deletions mysql/mysql-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ Note: perror prints a description for a system error code or for a storage engin
#### Q51. How can you list all columns for a given table?

- [ ] SHOW table COLUMNS;
- [x] SHOW COLUMNS FROM table;
- [x] SHOW COLUMNS FROM table;
- [ ] LIST table COLUMNS;
- [ ] SELECT COLUMNS FROM table;

Expand Down Expand Up @@ -603,9 +603,9 @@ Explanation: THe difference between 2 and 3 is that LEFT JOIN will return 1 row
- [ ] `SELECT city FROM json_data;`
- [x] `SELECT city->>'$.name' city FROM json_data;`
- [ ] `SELECT city.name city FROM json_data;`
- [ ] `SELECT city->'$.name' city FROM json_data;`
- [ ] `SELECT city->'$.name' city FROM json_data;`

Note: the last option is valid too but the results will be enclosed with quotation marks
Note: the last option is valid too but the results will be enclosed with quotation marks

#### Q67. If you want to use MyISAM instead of InnoDB, which option do you need to specify in the CREATE TABLE statement?

Expand Down Expand Up @@ -734,7 +734,6 @@ WHERE MATCH(address) AGAINST ('street, drive');
- [x] `SELECT * FROM customers WHERE PhoneNumber IS NULL;`
- [ ] `SELECT * FROM customers WHERE PhoneNumber IS UNKNOWN;`


#### Q80. In the diagram below, the price field is declared as type DECIMAL. What would be a more efficient declaration for this field?

![mysql picture](images/mysql_q80.png)
Expand Down Expand Up @@ -769,7 +768,7 @@ Explnation: BIT is not a string type
- [ ] `SET`
- [ ] `DECLARE`

Explanation: Both `SET` and `DECLARE` are used to create variables. Reference: [MySQL STORED PROCEDURE Tutorial With Examples](https://www.softwaretestinghelp.com/mysql-stored-procedure/)
Explanation: Both `SET` and `DECLARE` are used to create variables. Reference: [MySQL STORED PROCEDURE Tutorial With Examples](https://www.softwaretestinghelp.com/mysql-stored-procedure/)

#### Q84. When a new student is added to a new database, you want new records to be created in the related tables such as Exam, Score and Attendance. How would you accomplish this?

Expand Down Expand Up @@ -827,7 +826,7 @@ SELECT name FROM students WHERE name REGEXP '^to';
- [ ] UNION ALL
- [x] WITH ROLLUP

#### Q91. The left and right joins are also known as _.
#### Q91. The left and right joins are also known as \_.

- [ ] Inner Join
- [ ] Natural Join
Expand Down
12 changes: 10 additions & 2 deletions php/php-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,7 @@ isset($_POST['submit'])
- [ ] 123

##### Q57. When should this php script be used?

```php
$secret_word = 'if i ate spinach';
setcookie('login', $_REQUEST['username']. ','. md5($_REQUEST['username'].$secret_word));
Expand All @@ -665,7 +666,7 @@ setcookie('login', $_REQUEST['username']. ','. md5($_REQUEST['username'].$secret
- [ ] at first registration
- [x] at every login, for security

##### Q58. A PHP "variable variable" takes the value of a variable and treats that as the name of a variable. For example, if `$var` is a variable then `$$var` is a variable variable whose name is the value of `$var`. Which script produces the output below, using variable variables?
##### Q58. A PHP "variable variable" takes the value of a variable and treats that as the name of a variable. For example, if `$var` is a variable then `$$var` is a variable variable whose name is the value of `$var`. Which script produces the output below, using variable variables?

```php
Cat
Expand All @@ -674,30 +675,37 @@ Dog
```

- [ ]

```php
$name = "Cat";
$name = "Dog";
echo $name . "<br/>";
echo $$name . "<br/>";
echo $Dog;
```

- [ ]

```php
$name = "Cat";
$$name = "Dog";
echo $name . "<br/>";
echo $$name . "<br/>";
echo $Dog;
```

- [x]

```php
$name = "Cat";
$$name = "Dog";
echo $name . "<br/>";
echo $$name . "<br/>";
echo $Cat;
```

- [ ]

```php
$name = "Cat";
$$name = "Dog";
Expand All @@ -711,4 +719,4 @@ Dog
- [ ] router
- [x] controller
- [ ] model
- [ ] view
- [ ] view
1 change: 0 additions & 1 deletion scala/scala-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ myClass.foreach(println _)
- [ ] AltProcess
- [x] Future


#### Q53. What value does this code return?

```scala
Expand Down
22 changes: 14 additions & 8 deletions spring-framework/spring-framework-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,40 +554,45 @@ class TestConfig2 {
- [x] bean name

### Q59. What is the result of calling the map controller method using the following HTTP request?

```
POST localhost:8080/map
{"b" : "b", "d" : "d"}
```

```java
@RestController
public class SampleController {
@RequestMapping("/map")
public String map(@RequestBody SampleObject sampleObject) {
return sampleObject.getB() + sampleObject.getC();
}
}
}
```

```java
public class SampleObject {

String b;
String c;

public String getB() { return b; }

public void setB() { this.b = b; }

public String getC() { return c; }
public void setC() { this.c = c; }

public void setC() { this.c = c; }
}
```

- [ ] An InvalidRequestBodyException is thrown at runtime.
- [ ] A MissingPropertyException is thrown at runtime.
- [x] The text "bnull" is returned in the response body.
- [ ] The text "a" is returned in th response body.

#### Q60. What effect does private static have on the object service below?

```java
@SpringBootApplication
public class Question14 {
Expand All @@ -602,7 +607,8 @@ public class Question14 {
@Component
class Service {}
```

- [ ] The application will result in a compile error because you can't autowire a private variable.
- [ ] The application will compile and run, and service will have its dependency correctly injected by Spring.
- [x] The application will compile and run, but service will not be autowired because you cannot autowire a static class member.
- [ ] The application will result in a compile error because you attempted to autowire a static variable.
- [ ] The application will result in a compile error because you attempted to autowire a static variable.
2 changes: 1 addition & 1 deletion wordpress/wordpress-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ endif;

[Ref](https://kinsta.com/blog/wordpress-child-theme/)

#### Q72. You can harden your Wordpress site security by adding ______ to your wp-config.php file?
#### Q72. You can harden your Wordpress site security by adding **\_** to your wp-config.php file?

- [ ] hashes and reCAPTCHA
- [ ] database username and passwords
Expand Down

0 comments on commit fccf7c2

Please sign in to comment.