IT Questions and Answers :)

Thursday, November 23, 2017

Which of these is NOT a PHP class?

Which of these is NOT a PHP class?

  • ErrorLog
  • DateTime
  • PDO
  • XMLReader 

 
Which of these is NOT a PHP class?

EXPLANATION

"ErrorLog" is the correct answer.  PHP has a function called "error_log", but it returns true/false and there is no object-oriented version like there is with some of the other classes.
PDO is a PHP extension for working with databases. XMLReader and DateTime are also classes, though they both have procedural versions too.

Share:

In Unix, which of the following commands could you use to find files with a .log extension in the /var directory?

In Unix, which of the following commands could you use to find files with a .log extension in the /var directory?

  • find / | grep "*.log"
  • find /var -name "*.log"
  • ls -l *.log
  • mv "*.log" 

 
In Unix, which of the following commands could you use to find files with a .log extension in the /var directory?

EXPLANATION

The "find" command specifies the directory, "/var". The "-name" option tells the "find" command to show only files that have a ".log" extension.

SOURCE

https://www.lifewire.com/uses-of-linux-command-find-2201100
Share:

When running any kind of wires for networked equipment (ie. printers, PC's, video cameras, door locks and readers, etc,) who would be the ultimate authority to ensure code requirements are not violated?

When running any kind of wires for networked equipment (ie. printers, PC's, video cameras, door locks and readers, etc,) who would be the ultimate authority to ensure code requirements are not violated?

  • The local fire marshal.
  • The local building inspector.
  • The state fire marshal and state building inspector.
  • The authority having jurisdiction. 
 
When running any kind of wires for networked equipment (ie. printers, PC's, video cameras, door locks and readers, etc,) who would be the ultimate authority to ensure code requirements are not violated?

EXPLANATION

The Authority Having Jurisdiction, or AHJ, is a general term for whatever agency has the ultimate authority concerning building and life safety codes for a given locality. That authority can vary by location and region, and also by what the actually work pertains to. It can be building inspector, fire marshal, a port authority if the property location falls under such province, a health inspector are some examples.
This may seem like an out of place question for IT matters, but considering many IT professionals are required, or prefer to do "do it yourself" (DIY) projects which sometimes involves running wires, it's important to know the laws and governance that regulate where and how wires are run, the type used, and if any special licensing is required to run such wires. Even a simple wire run in the ceiling from one room to another might run afoul of local building codes. It's also good to know if using contractors to insure they know what they are doing.

SOURCE

https://www.nfpa.org/Assets/files/AboutTheCodes/101/101_FAQs.pdf
Share:

You take a full backup every Sunday and a daily differential backup each morning. Assuming you don't have software that would simplify the process, how many backups would you have to restore following a disaster on Friday?

You take a full backup every Sunday and a daily differential backup each morning. Assuming you don't have software that would simplify the process, how many backups would you have to restore following a disaster on Friday?

  • 1
  • 5
  • 2

You take a full backup every Sunday and a daily differential backup each morning. Assuming you don't have software that would simplify the process, how many backups would you have to restore following a disaster on Friday?

EXPLANATION

With differential backups, you only need to restore the last full backup and the last differential backup. If you were using incremental backups, then you'd need to restore the last full and all intervening incremental backups for full recovery.
Share:

For a 64Bit installation of Windows using a 32-Bit installation of Microsoft Office, which ODBC setup would you use to connect to data sources

For a 64Bit installation of Windows using a 32-Bit installation of Microsoft Office, which ODBC setup would you use to connect to data sources?

  • C:\\Windows\Sys\odbcad32.exe
  • C:\Windows\System32\odbcad32.exe
  • Data source (ODBC)
  • C:\Windows\SysWOW64\odbcad32.exe 
 
For a 64Bit installation of Windows using a 32-Bit installation of Microsoft Office, which ODBC setup would you use to connect to data sources

EXPLANATION

The default data source (ODBC) uses the 64Bit instance of Microsoft's 32Bit ODBC connector running in the 64Bit memory space.  Microsoft's default Office installation includes the 32Bit version by default for the highest compatibility with other applications.  So, to use ODBC connections with a default installation of Microsoft's Office products, you must use the instance of the ODBCAD32 application that runs in the 32Bit address space that resides in the C:\Windows\SysWOW64 directory.
This is counter intuitive when you look at the directory, one would logically assume that the SysWOW64 directory would be for 64Bit applications but, this is not the case:  "In computing on Microsoft platforms, WoW64 (Windows 32-bit on Windows 64-bit) is a subsystem of the Windows operating system capable of running 32-bit applications that is included on all 64-bit versions of Windows—including Windows XP Professional x64 Edition, IA-64 and x64 versions of Windows Server 2003, as well as 64-bit versions of Windows Vista, Windows Server 2008, Windows 7, Windows 8, Windows Server 2012, Windows 8.1 and Windows 10. In Windows Server 2008 R2 Server Core, it is an optional component. WoW64 aims to take care of many of the differences between 32-bit Windows and 64-bit Windows, particularly involving structural changes to Windows itself." -- https://en.wikipedia.org/wiki/WoW64
https://support.microsoft.com/en-us/help/2721825/unable-to-create-dsn-for-microsoft-office-system-dr...
Share:

An initialization vector should be which of the following?

An initialization vector should be which of the following?

  • Unique and predictable
  • Repeatable and random
  • Unique and unpredicatable
  • Repeatable and unique 

 

 EXPLANATION

An initialization vector (IV) should be unique and unpredictable. To prevent an attack, an IV must not be repeated with a given key and should appear random.

SOURCE

https://en.wikipedia.org/wiki/Initialization_vector
Share:

Which of the following is considered the first object-oriented programming language?

Which of the following is considered the first object-oriented programming language?

  • Java
  • Simula 67
  • C++
  • Smalltalk 

 
Which of the following is considered the first object-oriented programming language?

EXPLANATION




The formal programming concept of objects was introduced in the 1960's in Simula. The Simula 1 and later Simula 67 were programming languages designed for discrete event simulation/ jSijmula was created by Ole-Johan Dahl and Kristen Nygaard of the Norwegian Computing Center in Oslo/
https://en.wikipedia.org/wiki/Object-oriented_programming#History
https://en.wikipedia.org/wiki/Simula

SOURCE

https://en.wikipedia.org/wiki/Simula
Share:

Popular Posts