Over the Years I have seen a lot of ways to do this, but this is by far my favorite and the cleanest method to detect last row in a foreach statement
foreach($input as $key => $value) {
$ret .= “$value”;
if (next($input)==true) $ret .= “,”;
}

You can use white-space: pre; to make elements act like <pre>, which preserves newlines.

Example:

<style> p { white-space: pre; } </style> <p>hello How are you</p> 

On this note in  <pre>Line 1\nLine2\nLine\n</pre> Will show up as 3 lines.

This is great for many things including WordPress plug-in’s and Drupal Modules where you input is textarea now you can simply capture text and simply show it as the user input’s it.

Finally the use for this particular scenario was to build a custom tab,   in the textarea I am allowing the customer to define readable tags (i.e. <subheader></subheader>) and now I can format text within the tag to their specifications.

Note

  • Some keyboards or mobile PCs that don’t have the PRINT SCREEN button might use other keyboard combinations, such as FN+INSERT, to take a screen capture. Check the information that came with your computer or the manufacturer’s website for more information.

To copy the entire screen

  • Press PRINT SCREEN.

To copy only an active window

  • Press ALT+PRINT SCREEN

Manually Install Windows 7 and Vista Sidebar Gadgets

Problem:   You policy currently restricts unsigned gadget installation with the following message:

Desktop Gadget Policy Block Message

Desktop Gadget Policy Block Message

 

There are two folders where they can be located.

  • C:\Users\(Your Name)\AppData\Local\Microsoft\Windows Sidebar\Gadgets
  • C:\Program Files\Windows Sidebar\Gadgets

In this folder you should be able to see several Gadget Folders.

Picture of Windows 7 Gadets Folder

Picture of Windows 7 Gadets Folder

 Notice how they are simple a folder with .Gadget on the end.

Now simply rename you .gadget file to .zip,  in our example mytodolist.gadget  will be renamed to mytodolist.zip

Rename Todo Windows Gadget

Rename Todo Windows Gadget

 Extract it:

Extract Windows Gadget

Extract Windows Gadget

Add .Gadget to the end of your new folder

Add .Gadget to New Extracted Windows Gadget Folder
 
Finally simply drop it in one of the folders above and right click on the desktop and click Gadgets and choose your new gadget!

** SharePoint users be aware! The command “stsadm -o uninstall” works, and it doesn’t warn you, it simply uninstalls SharePoint!

I thought this was a commical status of a user on  the microsoft foumns, still a very good piece of information.   No warning!!! Oversight?

Multiline JavaScript Tip:

Ever wanted to have multi-line strings in JavaScript?  Ever been sitting there putting html into javascript and having finish out each like with a “+.  Well here is a way to perform the the return line without any breaking quote.  A continuous string across spanning multiple lines.  The simple answer is escape the end of the line with a backslash \  this will cause JavaScript to look for the char to escape and allow you to have clean looking HTML in JavaScipt without quotes.

 Multiline JavaScript Code Example:

 var multilineString =
“<table> \
      <tr> \
           <td> \
           </td> \
      </tr> \
</table>”;

Magic!!!!

Problem Description

In Windows 7 or like operating system you have Office 2010 installed and go into SharePoint 2010 and click DataSheet View and you get:

SharePoint 2010 and Office 2010 Datasheet Error Message

SharePoint 2010 and Office 2010 Datasheet Error Message

The list cannot be displayed in Datasheet view for one or more of the following reasons:

  • A datasheet component compatible with Microsoft SharePoint Foundation is not installed.
  • Your Web browser does not support ActiveX controls.
  • A component is not properly configured for 32-bit or 64-bit support

Fix

Download and install:

http://www.microsoft.com/en-us/download/details.aspx?id=23734

Problem Description

Error message received when using SecureStore: Unable to obtain the application proxy for the context.

Cause:

Secure Store service is not running on the web application.

Fix:

  • From Central Administration choose Application Management
  • Next Choose Manage Web Applications.
  • Click the name of the web application your code is running on
  • Then click Service Connections in the ribbon
  • In the dialog that appears check both “Secure Store Service” and “Secure Store Service Application Proxy”
  • Click OK.

Problem Description

Error messages include:

  • Message Box: Could not perform this operation because the default
    mail client is not properly installed ( This happens at 76 recipients
    )
  • Javascript Error: The data area passed to a system call is too
    small ( This happens at 77 recipients and above )

Reason:

The max Outlook can take is 75 recipients, at 76 it tells you have a
problem and at 77 and above your browser will simply convert the
mailto: href result to simply “” an empty string.

Additionally there is a simple 2048 character limit. So if
either of these limits are reached you have two many recipients.

Possible Fixes:

The most simple fix would be to have two mailto strings in javascript.


i.e. location.href = "mailto:one@mail.com;..."; location.href =
"mailto: two@mail.com...";
- or -
Build a server function to send a mail form.

Problem Description:

The list cannot be displayed in Datasheet view for one or more of the
following reasons:
 – A datasheet component compatible with Microsoft SharePoint
Foundation is not installed.
 – Your Web browser does not support ActiveX controls.
 – A component is not properly configured for 32-bit or 64-bit support

Reason:

The reason is because you are running 64-bit Microsoft Products on a
64-bit system.

Download:

http://www.microsoft.com/en-us/download/details.aspx?id=23734

Fix:

You basically need a 32-bit Microsoft bridge. Download it below and install
it.

References:

http://office.microsoft.com/en-us/sharepoint-foundation-help/use-datasheet-view-in-64-bit-office-2010-HA101882420.aspx