IT Questions and Answers :)

Tuesday, January 28, 2020

You are connecting an external modem to a legacy (non-plug and play) PC which has 4 existing com ports. A serial mouse is already using com1. Which of the following ports could you use?

You are connecting an external modem to a legacy (non-plug and play) PC which has 4 existing com ports. A serial mouse is already using com1. Which of the following ports could you use?

  • 2 or 4
  • 3 or 4
  • 1 or 3
  • 2 or 3 

You are connecting an external modem to a legacy (non-plug and play) PC which has 4 existing com ports. A serial mouse is already using com1. Which of the following ports could you use?

EXPLANATION

Com ports 1 and 3 share the same IRQ (4), whereas Com ports 2 and 4 share IRQ 3. Under normal circumstances,
serial devices can share the IRQ, however, in the case of a mouse, it would have required a driver which would constantly be active, not giving another serial device the opportunity to use the IRQ. So any answer with COM3 would be invalid.

SOURCE

https://en.wikibooks.org/wiki/A%2B_Certification/Exam_Objectives/Hardware/Basics/CPU/IRQ
Share:

Friday, January 24, 2020

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

  • prevents the AP from reloading when it can't join a controller
  • it prevents the AP from reloading when it has active clients in any of the SSIDs
  • prevents the clients from joining the AP during the configuration of it
  • It debugs the latest error logs from the AP 

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

EXPLANATION

This is a hidden command that prevents the Access Point from reloading (restart) after trying and do not find a Wireless LAN controller to join its AP pool, this happens only if the Access point is configured as a Lightweight access point.

SOURCE

https://community.cisco.com/t5/wireless-mobility-documents/installing-autonomous-ios-aios-on-a-lightweight-ap-from-the-cli/ta-p/3111153

https://cciewirelessnotes.wordpress.com/tag/capwap/
Share:

Thursday, January 23, 2020

In T-SQL, which of the following is the purpose of the 'WITH' statement?

In T-SQL, which of the following is the purpose of the 'WITH' statement?

  • Create a Common Table Expression
  • Create a derived table
  • Specify filter criteria
  • Join more than two tables 

In T-SQL, which of the following is the purpose of the 'WITH' statement?

EXPLANATION

'WITH' allows you to define a Common Table Expression (a derived table that is referenced and can be referred to multiple times within a query). 'WHERE' would usually be used to specify a filter. A derived table would be written as part of the query and can only be referenced in that instance.
'JOIN' would be used to join tables together regardless of how many.
See: https://msdn.microsoft.com/en-us/library/ms175972.aspx for more details.

SOURCE

https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql
Share:

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

  • cart
  • cat
  • caat
  • ct 

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

EXPLANATION

cart  does NOT match the regular expression  ca*t  because  the  "r"   in "cart" is not matched.   

caat  matches the "c", the "a" (two times), and the "t" in the regular expression.
cat  matches the  "c", the  "a" (one time), and the  "t"  in the regular expression.
ct  matches the  "c",  the  "a"  (zero times),  and the "t"  in the regular expression.

From:  https://linux.die.net/man/1/grep
"Repetition
A regular expression may be followed by one of several repetition operators:

?
The preceding item is optional and matched at most once.

*
The preceding item will be matched zero or more times.

+
The preceding item will be matched one or more times. "
Note that "bash" will use  *  on the command line to match any string of characters in filenames.  

To match any string of characters with a regex use:     .*    
The period is a regex metacharacter matching any character except newline, and the asterisk metacharacter will expand matches to any length.

Since the asterisk is a globbing character to "bash", it should be escaped when entered on the bash command line with "grep".

Note that the asterisk is escaped in the command below so that bash does not expand the  '*'

$ grep  ca'*'t regex_test
ct
cat
caat
The asterisk could also be escaped to bash via  'ca*t'  or  ca\*t       Escaping passes the  to grep, instead of bash using it to glob filenames in the current directory.

Absent escaping, you could get unexpected results if the asterisk globs a filename:

$ ls
cannot  regex_test  test4
 
$ cat regex_test
ct
cat
caat
cannot
cart
chat

Below, the asterisk is NOT escaped, so bash expanded it to a filename:
$ grep ca*t regex_test
cannot





In the unescaped command above, filename "cannot" was globbed from  ca*t  and passed to grep, making the grep command expand to   "grep cannot regex_test"
Since the file "regex_test" contains the string "cannot" in its data, the results of "grep" are correct for the given command, but that command may have been unintended.

Compare the output of the unescaped  *  above, to the escaped  '*'  in the command below:
$ grep 'ca*t' regex_test
ct
cat
caat

If an unescaped asterisk is parsed by bash, but does not expand to a filename, bash will pass the asterisk to grep (or whatever other command was entered on the command line).  But don't count on bash not  globbing a filename when that's not what you want--always escape characters that are special to bash if you need them passed to your command.

From https://www.tldp.org/LDP/abs/html/globbingref.html
"Bash itself cannot recognize Regular Expressions. Inside scripts, it is commands and utilities -- such as sed and awk -- that interpret RE's.
Bash does carry out filename expansion [1] -- a process known as globbing -- but this does not use the standard RE set. Instead, globbing recognizes and expands wild cards. Globbing interprets the standard wild card characters [2] -- * and ?, character lists in square brackets, and certain other special characters (such as ^ for negating the sense of a match). There are important limitations on wild card characters in globbing, however. Strings containing * will not match filenames that start with a dot, as, for example, .bashrc. [3] Likewise, the ? has a different meaning in globbing than as part of an RE."

Lastly, this is old (but maintained), and a very good writeup on regular expressions: 
http://www.grymoire.com/Unix/Regular.html#TOC


SOURCE

https://linux.die.net/man/1/grep
Share:

Wednesday, January 22, 2020

Which version of Exchange is NOT supported to be a hybrid server?

Which version of Exchange is NOT supported to be a hybrid server?

  • 2016
  • 2013
  • 2010
  • 2007

Which version of Exchange is NOT supported to be a hybrid server?

EXPLANATION

The version of Exchange you have installed in your on-premises organization determines the hybrid deployment version you can install.
You should typically configure the newest hybrid deployment version that's supported in your organization. For example, if your on-premises organization is running Exchange 2007, you need to configure an Exchange 2013-based hybrid deployment.

SOURCE

https://docs.microsoft.com/en-us/exchange/hybrid-deployment-prerequisites
 

Share:

Popular Posts