<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 22:12:43 +0000</lastBuildDate>
    <item>
      <title>(DOS Batch) Turn Developer Dashboard ON or OFF - blackf0rk</title>
      <link>https://snipplr.com/view/38810/turn-developer-dashboard-on-or-off</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 10 Aug 2010 05:04:29 UTC</pubDate>
      <guid>https://snipplr.com/view/38810/turn-developer-dashboard-on-or-off</guid>
    </item>
    <item>
      <title>(C#) Return string from between two matched strings - blackf0rk</title>
      <link>https://snipplr.com/view/35199/return-string-from-between-two-matched-strings</link>
      <description>&lt;p&gt;This code will take a start and end string and then search for them within the subject string. It returns what is between the start and end strings. As an example, if I had the following text...&#13;
&#13;
Some test text string, with a start &lt;tag&gt; and an end &lt;/tag&gt;.&#13;
&#13;
...I could call this function to get the text between the &lt;tag&gt; and the &lt;/tag&gt; strings. This function will return: "and an end"&lt;/p&gt;</description>
      <pubDate>Tue, 25 May 2010 11:40:25 UTC</pubDate>
      <guid>https://snipplr.com/view/35199/return-string-from-between-two-matched-strings</guid>
    </item>
    <item>
      <title>(C#) Cause a Postback in .NET - blackf0rk</title>
      <link>https://snipplr.com/view/34651/cause-a-postback-in-net</link>
      <description>&lt;p&gt;This code will execute a postback.&lt;/p&gt;</description>
      <pubDate>Mon, 17 May 2010 16:25:32 UTC</pubDate>
      <guid>https://snipplr.com/view/34651/cause-a-postback-in-net</guid>
    </item>
    <item>
      <title>(C#) Sort People Picker Lists - blackf0rk</title>
      <link>https://snipplr.com/view/29284/sort-people-picker-lists</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 04 Mar 2010 10:10:46 UTC</pubDate>
      <guid>https://snipplr.com/view/29284/sort-people-picker-lists</guid>
    </item>
    <item>
      <title>(C#) Get a user from Active Directory - blackf0rk</title>
      <link>https://snipplr.com/view/25016/get-a-user-from-active-directory</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 18 Dec 2009 11:00:02 UTC</pubDate>
      <guid>https://snipplr.com/view/25016/get-a-user-from-active-directory</guid>
    </item>
    <item>
      <title>(C#) Add user to SharePoint - blackf0rk</title>
      <link>https://snipplr.com/view/25015/add-user-to-sharepoint</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 18 Dec 2009 10:52:31 UTC</pubDate>
      <guid>https://snipplr.com/view/25015/add-user-to-sharepoint</guid>
    </item>
    <item>
      <title>(C#) Add a new group to SharePoint Site Collection; Add Role Definition and Assignment - blackf0rk</title>
      <link>https://snipplr.com/view/25013/add-a-new-group-to-sharepoint-site-collection-add-role-definition-and-assignment</link>
      <description>&lt;p&gt;An important thing to keep in mind about adding groups is that you add groups to site collections and not webs. To do this, we access the SiteGroups collection rather than the Groups collection.&#13;
&#13;
In order to assign permissions, each group you add needs a role definition (i.e. Read, Contribute, Design, or Full Control). It's best practice to assign role definitions to a group and assign users to the group, rather than assign definitions to individual users.&lt;/p&gt;</description>
      <pubDate>Fri, 18 Dec 2009 10:46:08 UTC</pubDate>
      <guid>https://snipplr.com/view/25013/add-a-new-group-to-sharepoint-site-collection-add-role-definition-and-assignment</guid>
    </item>
    <item>
      <title>(C#) Delete all items in a SharePoint list - blackf0rk</title>
      <link>https://snipplr.com/view/24919/delete-all-items-in-a-sharepoint-list</link>
      <description>&lt;p&gt;This will delete all items in a SharePoint list. Better than looping through a SPListItemCollection and doing a .delete();&lt;/p&gt;</description>
      <pubDate>Wed, 16 Dec 2009 18:03:00 UTC</pubDate>
      <guid>https://snipplr.com/view/24919/delete-all-items-in-a-sharepoint-list</guid>
    </item>
    <item>
      <title>(C#) Using Exchange Web Services API - blackf0rk</title>
      <link>https://snipplr.com/view/24772/using-exchange-web-services-api</link>
      <description>&lt;p&gt;In order for the code snippet(s) to work, you need to do the following:&#13;
&#13;
1. Go download the EWS API SDK: http://www.microsoft.com/downloads/details.aspx?displaylang=en&amp;FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1&#13;
2. Install the SDK on your machine. It will install a .dll .xml and walkthrough guide to C:\Program Files\Microsoft\Exchange...&#13;
3. Open up your VS project solution and add a reference to the installed DLL&#13;
&#13;
It's important to note that you should use the service.AutodiscoverUrl instead of service.Url because the URL you use may not be the correct URL down the line (due to redirection). If you are using service.Url and you call a method and get a 405 error, switch to the AutodiscoverUrl method instead.&lt;/p&gt;</description>
      <pubDate>Mon, 14 Dec 2009 16:38:20 UTC</pubDate>
      <guid>https://snipplr.com/view/24772/using-exchange-web-services-api</guid>
    </item>
    <item>
      <title>(C#) Next SPListItem ID From SPList - blackf0rk</title>
      <link>https://snipplr.com/view/24210/next-splistitem-id-from-splist</link>
      <description>&lt;p&gt;In order to accurately get the next ID from a SharePoint list you need to access the content database for one reason: If you delete all the items from a list, and execute this simple code: list.Items[list.ItemCount -1].ID) + 1 the ID will always return 0 when in reality the real ID of the next ID will be the auto-increment number in the content database.&#13;
&#13;
Note that list.Items[list.ItemCount -1].ID) + 1 will work as long as one record is always kept in the list and is never deleted.&lt;/p&gt;</description>
      <pubDate>Thu, 03 Dec 2009 11:38:37 UTC</pubDate>
      <guid>https://snipplr.com/view/24210/next-splistitem-id-from-splist</guid>
    </item>
    <item>
      <title>(PHP) Format Currency - blackf0rk</title>
      <link>https://snipplr.com/view/16888/format-currency</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 11 Jul 2009 17:02:16 UTC</pubDate>
      <guid>https://snipplr.com/view/16888/format-currency</guid>
    </item>
    <item>
      <title>(VB.NET) Get Latitude and Longitude from Address (using Google Maps) - blackf0rk</title>
      <link>https://snipplr.com/view/14929/get-latitude-and-longitude-from-address-using-google-maps</link>
      <description>&lt;p&gt;Use inType=0 and feed in a specific Google Maps URL to parse out the GeoCoords from the URL&#13;
e.g. http://maps.google.com/maps?f=q&amp;source=s_q&amp;hl=en&amp;geocode=&amp;q=53154&amp;sll=37.0625,-95.677068&amp;sspn=52.505328,80.507812&amp;ie=UTF8&amp;ll=42.858224,-88.000832&amp;spn=0.047943,0.078621&amp;t=h&amp;z=14&#13;
Function returns a string of geocoords (e.g. "-87.9010610,42.8864960")&#13;
&#13;
Use inType=1 and feed in a zip code, address, or business name&#13;
Function returns a string of geocoords (e.g. "-87.9010610,42.8864960")&#13;
If an invalid address, zip code or location was entered, the function will return "0,0"&lt;/p&gt;</description>
      <pubDate>Tue, 12 May 2009 10:33:03 UTC</pubDate>
      <guid>https://snipplr.com/view/14929/get-latitude-and-longitude-from-address-using-google-maps</guid>
    </item>
    <item>
      <title>(VB.NET) Test for Internet Connection - blackf0rk</title>
      <link>https://snipplr.com/view/14928/test-for-internet-connection</link>
      <description>&lt;p&gt;This is a simple function to test for an internet connection. Originally grabbed from "devbuzz" at the devbuzz forums (see link) and now modified for VB.NET 3.5&lt;/p&gt;</description>
      <pubDate>Tue, 12 May 2009 10:29:23 UTC</pubDate>
      <guid>https://snipplr.com/view/14928/test-for-internet-connection</guid>
    </item>
    <item>
      <title>(SQL) Return a table list with row count - blackf0rk</title>
      <link>https://snipplr.com/view/14543/return-a-table-list-with-row-count</link>
      <description>&lt;p&gt;This will return a list of all the tables in a certain database along with their row count.&lt;/p&gt;</description>
      <pubDate>Tue, 28 Apr 2009 14:18:29 UTC</pubDate>
      <guid>https://snipplr.com/view/14543/return-a-table-list-with-row-count</guid>
    </item>
    <item>
      <title>(Other) Add users to SharePoint via Command Line - blackf0rk</title>
      <link>https://snipplr.com/view/14057/add-users-to-sharepoint-via-command-line</link>
      <description>&lt;p&gt;Execute this commend to add users to SharePoint&lt;/p&gt;</description>
      <pubDate>Wed, 15 Apr 2009 10:20:02 UTC</pubDate>
      <guid>https://snipplr.com/view/14057/add-users-to-sharepoint-via-command-line</guid>
    </item>
    <item>
      <title>(Other) Increase SharePoint list template size limit - blackf0rk</title>
      <link>https://snipplr.com/view/13641/increase-sharepoint-list-template-size-limit</link>
      <description>&lt;p&gt;This command will fix the â€œThe list is too large to save as a template. The size of a template cannot exceed 10485760 bytes." error when saving a list (including content) that's too big.&lt;/p&gt;</description>
      <pubDate>Tue, 31 Mar 2009 14:44:31 UTC</pubDate>
      <guid>https://snipplr.com/view/13641/increase-sharepoint-list-template-size-limit</guid>
    </item>
    <item>
      <title>(VB.NET) JavaScript Confirmation Alert before Deleting a Record - blackf0rk</title>
      <link>https://snipplr.com/view/13161/javascript-confirmation-alert-before-deleting-a-record</link>
      <description>&lt;p&gt;If you want to have a JavaScript confirmation alert to popup before executing the codebehind (e.g. asking the user if they really want to delete a record):&lt;/p&gt;</description>
      <pubDate>Mon, 16 Mar 2009 12:50:40 UTC</pubDate>
      <guid>https://snipplr.com/view/13161/javascript-confirmation-alert-before-deleting-a-record</guid>
    </item>
    <item>
      <title>(VB.NET) DataKey on RowDataBound - blackf0rk</title>
      <link>https://snipplr.com/view/13158/datakey-on-rowdatabound</link>
      <description>&lt;p&gt;If you need to get the DataKey value in RowDataBound (e.g. Assigning the DataKey to the CommandArgument of a button):&lt;/p&gt;</description>
      <pubDate>Mon, 16 Mar 2009 12:40:35 UTC</pubDate>
      <guid>https://snipplr.com/view/13158/datakey-on-rowdatabound</guid>
    </item>
    <item>
      <title>(JavaScript) Limit text input to numbers (with or without decimals) - blackf0rk</title>
      <link>https://snipplr.com/view/13064/limit-text-input-to-numbers-with-or-without-decimals</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:31:57 UTC</pubDate>
      <guid>https://snipplr.com/view/13064/limit-text-input-to-numbers-with-or-without-decimals</guid>
    </item>
    <item>
      <title>(VB.NET) Hex to Dec (RGB) - blackf0rk</title>
      <link>https://snipplr.com/view/13062/hex-to-dec-rgb</link>
      <description>&lt;p&gt;Convert hexidecimal color codes (ie #C0C0C0) to decimal RGB (ie 255,255,255)&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:28:59 UTC</pubDate>
      <guid>https://snipplr.com/view/13062/hex-to-dec-rgb</guid>
    </item>
    <item>
      <title>(VB.NET) ObjectDataSource SelectParameters - blackf0rk</title>
      <link>https://snipplr.com/view/13061/objectdatasource-selectparameters</link>
      <description>&lt;p&gt;If you have a component being bound from an ObjectDataSource (like a drop-down menu, or a grid view) and you wish to change the value's SelectParameters. Where # is which SelectParameter you'd like to change. If there's just one SelectParamter, default is 0. Then reference your object that uses that datasource, in this case a GridView, to rebind.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:27:21 UTC</pubDate>
      <guid>https://snipplr.com/view/13061/objectdatasource-selectparameters</guid>
    </item>
    <item>
      <title>(VB.NET) Editing Meta Tags From Code Behind - blackf0rk</title>
      <link>https://snipplr.com/view/13060/editing-meta-tags-from-code-behind</link>
      <description>&lt;p&gt;Dynamically change the content of meta tags from the code behind. This allows you to feed the meta tags with content from a database or other dynamic content.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:25:20 UTC</pubDate>
      <guid>https://snipplr.com/view/13060/editing-meta-tags-from-code-behind</guid>
    </item>
    <item>
      <title>(VB.NET) Loop through a DataReader - blackf0rk</title>
      <link>https://snipplr.com/view/13059/loop-through-a-datareader</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:22:54 UTC</pubDate>
      <guid>https://snipplr.com/view/13059/loop-through-a-datareader</guid>
    </item>
    <item>
      <title>(SQL) Randomize Query in SQL - blackf0rk</title>
      <link>https://snipplr.com/view/13058/randomize-query-in-sql</link>
      <description>&lt;p&gt;Sometimes you want to return a bunch of data from a table, but you want it coming back in a random order. Maybe it's for keeping some content on a home page fresh. Here's how:&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:21:54 UTC</pubDate>
      <guid>https://snipplr.com/view/13058/randomize-query-in-sql</guid>
    </item>
    <item>
      <title>(VB.NET) Call a Function in your MasterPage from your .aspx page - blackf0rk</title>
      <link>https://snipplr.com/view/13057/call-a-function-in-your-masterpage-from-your-aspx-page</link>
      <description>&lt;p&gt;If you're going to be using a common function throughout the Web site, you can include the function in your MasterPage and gain access to it from each aspx that inherits from this MasterPage; like so:&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:20:44 UTC</pubDate>
      <guid>https://snipplr.com/view/13057/call-a-function-in-your-masterpage-from-your-aspx-page</guid>
    </item>
    <item>
      <title>(VB.NET) Generate a Random String - blackf0rk</title>
      <link>https://snipplr.com/view/13056/generate-a-random-string</link>
      <description>&lt;p&gt;If you need to generate a random string of mixed characters, this simple function will do it for you. This will return something like this: 80a7a705-9c23-47bc-92b6-2b5c4f9d728d. Which you then can do various string functions to make it the way you want.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:19:13 UTC</pubDate>
      <guid>https://snipplr.com/view/13056/generate-a-random-string</guid>
    </item>
    <item>
      <title>(JavaScript) Validate Decimals with Javascript - blackf0rk</title>
      <link>https://snipplr.com/view/13055/validate-decimals-with-javascript</link>
      <description>&lt;p&gt;Validating a decimal such as a measurement of time or currency (10.5 or 0.4). This function will return the correct number. If you feed in "10.5foo" the function will spit back 10.5. If you feed in "bar" the function will return nothing.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:17:52 UTC</pubDate>
      <guid>https://snipplr.com/view/13055/validate-decimals-with-javascript</guid>
    </item>
    <item>
      <title>(VB.NET) Use a Generic Dictionary - blackf0rk</title>
      <link>https://snipplr.com/view/13054/use-a-generic-dictionary</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:16:19 UTC</pubDate>
      <guid>https://snipplr.com/view/13054/use-a-generic-dictionary</guid>
    </item>
    <item>
      <title>(VB.NET) Loop Through a DataSet - blackf0rk</title>
      <link>https://snipplr.com/view/13053/loop-through-a-dataset</link>
      <description>&lt;p&gt;Assuming your DataSet (named, ds) is already populated with Data and contains only one table.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:14:19 UTC</pubDate>
      <guid>https://snipplr.com/view/13053/loop-through-a-dataset</guid>
    </item>
    <item>
      <title>(VB.NET) Format a Phone Number - blackf0rk</title>
      <link>https://snipplr.com/view/13052/format-a-phone-number</link>
      <description>&lt;p&gt;It's important that the newPn var that you pass into the Convert.ToInt64 function is in the xxxxxxxxxx format and that no characters are present.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:12:58 UTC</pubDate>
      <guid>https://snipplr.com/view/13052/format-a-phone-number</guid>
    </item>
    <item>
      <title>(VB.NET) Get record count from ObjectDataSource - blackf0rk</title>
      <link>https://snipplr.com/view/13051/get-record-count-from-objectdatasource</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:11:44 UTC</pubDate>
      <guid>https://snipplr.com/view/13051/get-record-count-from-objectdatasource</guid>
    </item>
    <item>
      <title>(VB.NET) Loop Through Web AppSettings - blackf0rk</title>
      <link>https://snipplr.com/view/13049/loop-through-web-appsettings</link>
      <description>&lt;p&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:09:19 UTC</pubDate>
      <guid>https://snipplr.com/view/13049/loop-through-web-appsettings</guid>
    </item>
    <item>
      <title>(VB.NET) Simple String Encryption - blackf0rk</title>
      <link>https://snipplr.com/view/13048/simple-string-encryption</link>
      <description>&lt;p&gt;Passing in a seed and your string will return an encrypted string. Pass in the same seed and the encrypted string again and it will return the original unencrypted string.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:08:19 UTC</pubDate>
      <guid>https://snipplr.com/view/13048/simple-string-encryption</guid>
    </item>
    <item>
      <title>(VB.NET) Return HTML from a Web page - blackf0rk</title>
      <link>https://snipplr.com/view/13047/return-html-from-a-web-page</link>
      <description>&lt;p&gt;If you need to get the HTML from a Web page to rip it, process it, and/or display it in the way you want, the following function will work for you.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:07:15 UTC</pubDate>
      <guid>https://snipplr.com/view/13047/return-html-from-a-web-page</guid>
    </item>
    <item>
      <title>(VB.NET) Get Google Maps Coordinates from URL - blackf0rk</title>
      <link>https://snipplr.com/view/13046/get-google-maps-coordinates-from-url</link>
      <description>&lt;p&gt;This function will parse out the Google Maps coordinates from a Google Maps link url like this one: http://maps.google.com/?ie=UTF8&amp;ll=43.068888,-87.978516&amp;spn=23.565589,33.925781&amp;t=h&amp;z=5. The coordinates in this URL are 43.068888,-87.978516.&lt;/p&gt;</description>
      <pubDate>Thu, 12 Mar 2009 17:04:57 UTC</pubDate>
      <guid>https://snipplr.com/view/13046/get-google-maps-coordinates-from-url</guid>
    </item>
  </channel>
</rss>
