Format:
Recent snippets matching tags of SHA
SPListItem item = properties.ListItem; SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Customer"); SPFieldUserValue fieldValue = (SPFieldUserValue)userField.GetFieldValue(item[userField.ID].ToString()); string customerEmail = fieldValue.User.Email;
54 Views
no comments
Sol Reqs: .NET 3.5 x64 Add Ref: Microsoft.SharePoint assembly // Applying a template to a new site Site Actions –> New Site. You'll find your Site Template in the list of Installed Items, in the All Categories or Blank & Custom filters. // how to upgrade the content database - after applying SP1 C:\Program Files\Common Files\Microsoft Shared\Web ServerExtensions\14\bin\psconfig.exe –cmd upgrade
193 Views
no comments
Get-Process | Where-Object {$_.ProcessName -like "w*"}
Table 1-4. Commonly Used Windows PowerShell Comparison Operators
Operator Purpose
-lt Less than
-le Less than or equal to
-gt Greater than
-ge Greater than or equal to
-eq Equal to
79 Views
no comments
<!--In the html add this some where --> <script type="text/javascript"> var addthis_share = { templates: { twitter: 'check out {{url}} (from @example_dot_com)'}, url:'http://www.mywebsite.com' } var addthis_config = { ui_email_note: 'you custom message here', ui_email_to: 'you@yahoo.com', ui_email_from: 'me@yahoo.com' } </script> <!-- AddThis Button BEGIN (Some where in the html)--> <div class="addthis_toolbox addthis_default_style addthis_32x32_style" > <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a>
89 Views
no comments
JetBrains.ReSharper.Psi.Parsing.UnexpectedToken occurred
Message=Unexpected token
Source=JetBrains.ReSharper.Psi.CSharp
StackTrace:
at JetBrains.ReSharper.Psi.CSharp.Gen.CSharpParserGenerated.match(NodeType tokenType)
InnerException:
JetBrains.Application.Progress.ProcessCancelledException occurred
Message=Exception of type 'JetBrains.Application.Progress.ProcessCancelledException' was thrown.
124 Views
no comments
namespace SharePointUpload { class Program { static void Main(string[] args) { ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; }); WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging(); img.UseDefaultCredentials = true; img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx"; try { foreach (string filename in Directory.GetFiles("LOCAL_FOLDER")) { img.Upload("PICTURE_LIBRARY_NAME", "PICTURE_FOLDER_IF_ANY", File.ReadAllBytes(filename), Path.GetFileName(filename), true);
126 Views
no comments
namespace SharePointUpload { class Program { static void Main(string[] args) { ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback((a, b, c, d) => { return true; }); WEB_REFERENCE_NAME.Imaging img = new WEB_REFERENCE_NAME.Imaging(); img.UseDefaultCredentials = true; img.Url = "SHAREPOINT_SITE/_vti_bin/imaging.asmx"; //img.up try { //var x = img.GetListItems("Implementation Team Photos", "");
81 Views
no comments
module HDF5_185 open System open System.Text open System.Runtime.InteropServices type double1d = System.Double[] type double2d = System.Double[,] type double3d = System.Double[,,] #nowarn "51" // no warnings for native pointer use (they are used as stand ins for byref)
308 Views
1 comments
<a href="http://drury.blog.sector.sk/blogclanok/8720/sector_awards_2010.htm"><img title="2. Najlepšia ikonka za rok 2010" src="http://i.imgur.com/R2rdz.png" alt="2. Najlepšia ikonka za rok 2010" border="0"></a>
105 Views
no comments
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server"> <style type="text/css"> .sys-template { display: none; } </style> <script src="../Scripts/MicrosoftAjax/MicrosoftAjax.js" type="text/javascript"></script> <script src="../Scripts/MicrosoftAjax/MicrosoftAjaxDataContext.js" type="text/javascript"></script>
572 Views
no comments
/// <summary> ///This is a test class for MemberTest and is intended ///to contain all MemberTest Unit Tests ///</summary> [TestClass()] public class MemberTest { public void CanGetArgHelper(string argument) {
190 Views
no comments
/// <summary> /// Represents static and extension methods to retrieve the name /// of a member or argument from lamba expressions. /// </summary> public static class Name { /// <summary> /// Gets the name of a member or argument from a lamba expression. /// </summary>
173 Views
no comments
<CustomPatterns> <Pattern Severity="SUGGESTION"> <Comment>Use method Any()</Comment> <ReplacePattern>$seq$.Any()</ReplacePattern> <SearchPattern><![CDATA[$seq$.Count() > 0]]></SearchPattern> <Params /> <Placeholders> <ExpressionPlaceholder Name="seq" ExpressionType="System.Collections.IEnumerable" ExactType="False" /> </Placeholders> </Pattern>
570 Views
no comments
public class ErrorModel : IEnumerable<string> { public IEnumerator<string> GetEnumerator() { throw new NotImplementedException(); } IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator();
139 Views
no comments
using System; using System.Collections; using System.IO; using System.Text; namespace Handlers { /// <summary> /// A data-reader style interface for reading Csv (and otherwise-char-separated) files.
799 Views
no comments
/*database name here*/ $database = ''; /*host name for MySQL*/ $hostname = 'localhost'; /*user name for MySQL*/ $username = ''; /*password for MySQL*/ $password = ''; //Get the h3fileid
214 Views
no comments
[ContextAction(Group = "C#", Name = "ConvertSpacesToUnderscore", Description = "Adds context action to convert spaces in method names to underscore")] public class ConvertSpacesToUnderscore : BulbItemImpl, IContextAction { readonly ICSharpContextActionDataProvider _provider; public ConvertSpacesToUnderscore(ICSharpContextActionDataProvider provider) { _provider = provider; }
512 Views
no comments
syntax: glob Obj obj Bin bin *.user *.suo *.Cache *.cache *.bak
1054 Views
no comments
foreach (var group in groups) { if (group.AllowsPermission(permissionType)) { cache.Put(cacheKey, new List<bool> {true}); return true; } }
296 Views
no comments
<TemplatesExport family="Live Templates"> <Template uid="9860a3ff-f597-476b-bb22-88e8c6d13244" shortcut="taf" description="Test with Assert.Fail" text="[Test]
public void $Action$_$Scenario$_$Result$()
{
 Assert.Fail();
}
" reformat="True" shortenQualifiedReferences="True"> <Context> <CSharpContext context="TypeMember" minimumLanguageVersion="2.0" /> </Context> <Categories /> <Variables> <Variable name="Action" expression="" initialRange="0" /> <Variable name="Scenario" expression="" initialRange="0" /> <Variable name="Result" expression="" initialRange="0" />
311 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
