Concatenating cells in Excel

To concatenate cells in Excel, you can either use the concatenation() function or the & symbol. If

A1 = Hello
A2 = World



will produce



=concatenate(A1," ",A2)

will produce

Hello World

If the concatenation is not working, then make sure that the format of A1 and A2 is "text" and the format of the cell with the concatenation function/formula is "general".

Java file I/O

Java provides a number of classes and methods that allow to read and write files. In Java all files are byte-oriented. Two of the most often-used stream classes are FileInputStream and FileOutputStream, which create byte streams linked to files.

  1. To open a file, simple create an object of one of the classes specifying the name of the file as an argument to the constructor.
  2. Use close() to close the file


Setting script src dynamically

Suppose you need to call some JavaScript code on your page such as:

  <script src"somecode.js"></script>

However, the somecode.js is different based on other parameters on your page. So you would need to pass a variable rather than the static string to the src. If you just replace somecode.js, with a variable name, you code will not be called.

The following example shows how you can manipulate DOM to define src so that your code runs.

Print screen on Mac

The Mac OS keyboard does not have a print screen button. So this is how to capture your screen on Mac:

  • Hold down Apple key ? + Shift + 3 and release all

The screen shot would appear on your desktop.

You can also do a screen capture for a portion of your screen.

  • Hold down Apple key ? + Shift + 4 and release all key
  • Mouse cursor would change to +
  • Select the region you wish to capture