Skip to content

Commit ea17d9a

Browse files
author
Arie Bregman
authored
Merge pull request iluwatar#66 from austinsonger/master
Python Question - Lambda
2 parents 89aa001 + db533c8 commit ea17d9a

File tree

1 file changed

+94
-3
lines changed

1 file changed

+94
-3
lines changed

Diff for: README.md

+94-3
Original file line numberDiff line numberDiff line change
@@ -3268,6 +3268,16 @@ For more details about errors and exceptions follow this [https://docs.python.or
32683268

32693269
<details>
32703270
<summary>What is Lambda? How is it used?</summary><br><b>
3271+
3272+
Lambda is an anonymous function is known as a lambda function. This function can have any number of parameters but, can have just one statement.
3273+
3274+
Example:
3275+
```
3276+
1 a = lambda x,y : x+y
3277+
2 print(a(5, 6))
3278+
Output: 11
3279+
```
3280+
32713281
</b></details>
32723282

32733283
#### Properties
@@ -4622,6 +4632,13 @@ func main() {
46224632

46234633
<details>
46244634
<summary>What are the advantages of MongoDB? Or in other words, why choosing MongoDB and not other implementation of NoSQL?</summary><br><b>
4635+
4636+
MongoDB advantages are as followings:
4637+
- Schemaless
4638+
- Easy to scale-out
4639+
- No complex joins
4640+
- Structure of a single object is clear
4641+
46254642
</b></details>
46264643

46274644
<details>
@@ -4707,10 +4724,19 @@ as key-value pair, document-oriented, etc.
47074724

47084725
<details>
47094726
<summary>Tell me about your experience with shell scripting</summary><br><b>
4727+
47104728
</b></details>
47114729

47124730
<details>
47134731
<summary>What this line in scripts mean?: <code>#!/bin/bash</code></summary><br><b>
4732+
4733+
4734+
`#!/bin/bash` is She-bang
4735+
4736+
/bin/bash is the most common shell used as default shell for user login of the linux system. The shell’s name is an acronym for Bourne-again shell. Bash can execute the vast majority of scripts and thus is widely used because it has more features, is well developed and better syntax.
4737+
4738+
4739+
47144740
</b></details>
47154741

47164742
<details>
@@ -4799,10 +4825,40 @@ Using the keyword <code>read</code> so for example <code>read x</code> will wait
47994825

48004826
<details>
48014827
<summary>Write a script to determine whether a host is up or down</summary><br><b>
4828+
4829+
**EXAMPLE ONE**
4830+
```
4831+
#!/bin/bash
4832+
SERVERIP=<IP Address>
4833+
4834+
4835+
ping -c 3 $SERVERIP > /dev/null 2>&1
4836+
if [ $? -ne 0 ]
4837+
then
4838+
# Use mailer here:
4839+
mailx -s "Server $SERVERIP is down" -t "$NOTIFYEMAIL" < /dev/null
4840+
fi
4841+
```
4842+
48024843
</b></details>
48034844

48044845
<details>
48054846
<summary>Write a script to remove all the empty files in a given directory (also nested directories)</summary><br><b>
4847+
4848+
**EXAMPLE ONE**
4849+
```
4850+
#! /bin/bash
4851+
for x in *
4852+
do
4853+
if [ -s $x ]
4854+
then
4855+
continue
4856+
else
4857+
rm -rf $x
4858+
fi
4859+
done
4860+
```
4861+
48064862
</b></details>
48074863

48084864
<a name="shell-scripting-advanced"></a>
@@ -5031,6 +5087,10 @@ the pseudo table to retrieve the sum of the prices spent by each customer, then
50315087

50325088
<details>
50335089
<summary>Explain availability sets and availability zones</summary><br><b>
5090+
5091+
An availability set is a logical grouping of VMs that allows Azure to understand how your application is built to provide redundancy and availability. It is recommended that two or more VMs are created within an availability set to provide for a highly available application and to meet the 99.95% Azure SLA.
5092+
5093+
50345094
</b></details>
50355095

50365096
<details>
@@ -5236,28 +5296,45 @@ Authorization is the process of identifying what level of access the service or
52365296

52375297
<details>
52385298
<summary>Explain what is Single Sign-On</summary><br><b>
5299+
5300+
SSO (Single Sign-on), is a method of access control that enables a user to log in once and gain access to the resources of multiple software systems without being prompted to log in again.
5301+
5302+
52395303
</b></details>
52405304

52415305
<details>
52425306
<summary>Explain MFA (Multi-Factor Authentication)</summary><br><b>
5307+
5308+
Multi-Factor Authentication (Also known as 2FA). Allows the user to present two pieces of evidence, credentials, when logging into an account.
5309+
5310+
- The credentials fall into any of these three categories: something you know (like a password or PIN), something you have (like a smart card), or something you are (like your fingerprint). Credentials must come from two different categories to enhance security.
5311+
52435312
</b></details>
52445313

52455314
<details>
52465315
<summary>Explain RBAC (Role-based Access Control)</summary><br><b>
5316+
5317+
Access control based on user roles (i.e., a collection of access authorizations a user receives based on an explicit or implicit assumption of a given role). Role permissions may be inherited through a role hierarchy and typically reflect the permissions needed to perform defined functions within an organization. A given role may apply to a single individual or to several individuals.
5318+
5319+
- RBAC mapped to job function, assumes that a person will take on different roles, overtime, within an organization and different responsibilities in relation to IT systems.
5320+
52475321
</b></details>
52485322

52495323
<details>
52505324
<summary>Explain Symmetric encryption</summary><br><b>
5325+
5326+
A symmetric encryption is any technique where the same key is used to both encrypt and decrypt the data.
5327+
52515328
</b></details>
52525329

52535330
<details>
52545331
<summary>Explain Asymmetric encryption</summary><br><b>
5255-
</b></details>
52565332

5257-
<details>
5258-
<summary>Explain RBAC (Role-based Access Control)</summary><br><b>
5333+
A asymmetric encryption is any technique where the there is two different keys that are used for encryption and decryption, these keys are known as public key and private key.
5334+
52595335
</b></details>
52605336

5337+
52615338
<details>
52625339
<summary>Explain the following:
52635340

@@ -5376,6 +5453,9 @@ You can use OWASP ZAP to analyze a "request", and if it appears that there no pr
53765453

53775454
<details>
53785455
<summary>Explain HTTP Header Injection vulnerability</summary><br><b>
5456+
5457+
HTTP Header Injection vulnerabilities occur when user input is insecurely included within server responses headers. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.
5458+
53795459
</b></details>
53805460

53815461
<details>
@@ -5580,6 +5660,11 @@ This allows Elasticsearch to scale to an entire cluster of servers.
55805660

55815661
<details>
55825662
<summary>Explain Replicas</summary><br><b>
5663+
5664+
In a network/cloud environment where failures can be expected any time, it is very useful and highly recommended to have a failover mechanism in case a shard/node somehow goes offline or disappears for whatever reason.
5665+
To this end, Elasticsearch allows you to make one or more copies of your index’s shards into what are called replica shards, or replicas for short.
5666+
5667+
55835668
</b></details>
55845669

55855670
<details>
@@ -5701,6 +5786,10 @@ In general the process is as follows:
57015786

57025787
<details>
57035788
<summary>What is a A record?</summary><br><b>
5789+
5790+
5791+
A (Address) Maps a host name to an IP address. When a computer has multiple adapter cards and IP addresses, it should have multiple address records.
5792+
57045793
</b></details>
57055794

57065795
<details>
@@ -5715,6 +5804,8 @@ While an A record points a domain name to an IP address, a PTR record does the o
57155804

57165805
<details>
57175806
<summary>What is a MX record?</summary><br><b>
5807+
MX (Mail Exchange) Specifies a mail exchange server for the domain, which allows mail to be delivered to the correct mail servers in the domain.
5808+
57185809
</b></details>
57195810

57205811
<details>

0 commit comments

Comments
 (0)