Format:
Recent snippets matching tags of ss
//Email regex validator Regex regex = new Regex(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"); //Website regex validator Regex regex = new Regex(@"^http\://[a-zA-Z0-9\-\.]+\.[a-zA-Z]{2,3}(/\S*)?$"); //Comments on forum regex validator (max 4000 characters) Regex regex = new Regex(@"^[+_%@:,.'!?"\\\^\&\#\$\*\(\)\-\/a-zA-Z0-9\s]{1,4000}$");
14 Views
no comments
/// <summary> /// Creates the mail message. /// </summary> /// <param name="emailBody">The email body.</param> /// <param name="maTo">The ma to.</param> /// <param name="maFrom">The ma from.</param> /// <param name="maBcc">The ma BCC.</param> /// <param name="attachment">The attachment.</param> /// <returns></returns> public static MailMessage CreateMailMessage(string emailBody, string maTo, string maFrom, string maBcc, Attachment attachment)
23 Views
1 comments
/etc/gdm3/Xsession: Beginning session setup... GNOME_KEYRING_CONTROL=/tmp/keyring-x1jPm2 GPG_AGENT_INFO=/tmp/keyring-x1jPm2/gpg:0:1 SSH_AUTH_SOCK=/tmp/keyring-x1jPm2/ssh GNOME_KEYRING_CONTROL=/tmp/keyring-x1jPm2 GNOME_KEYRING_CONTROL=/tmp/keyring-x1jPm2 GPG_AGENT_INFO=/tmp/keyring-x1jPm2/gpg:0:1 SSH_AUTH_SOCK=/tmp/keyring-x1jPm2/ssh GNOME_KEYRING_CONTROL=/tmp/keyring-x1jPm2 GPG_AGENT_INFO=/tmp/keyring-x1jPm2/gpg:0:1
173 Views
no comments
<!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title></title> <style> .bigbutton { background: #1e5799; /* Old browsers */ color: White;
68 Views
no comments
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Soneta.Types; using Soneta.Business; using Soneta.Business.App; using Soneta.Tools; using Soneta.Forms; using System.Windows.Forms;
34 Views
no comments
<configuration> <httpHandlers> <add verb="*" path="*.jsp" type="HinoCentral.Website.AppCode.JSPHandler"/> <add verb="*" path="*.jspf" type="HinoCentral.Website.AppCode.JSPHandler"/> </httpHandlers> <system.webServer> <handlers> <add name="JSPHandler_jsp" path="*.jsp" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" /> <add name="JSPHandler_jspf" path="*.jspf" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" /> </handlers>
60 Views
no comments
cls
@ECHO OFF
title Folder Personal
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK
if NOT EXIST Personal goto MDLOCKER
:CONFIRM
echo Are you sure u want to lock the folder(Y/N)
set/p "cho=>"
if %cho%==Y goto LOCK
if %cho%==y goto LOCK
93 Views
no comments
using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; using Orchard.DisplayManagement.Descriptors; using Orchard.Environment.Descriptor.Models; using Orchard.Environment.Extensions; using Orchard.Environment.Extensions.Models;
147 Views
no comments
/////////////////////////////////////////////////////////////////////////////// // SAMPLE: Generates random password, which complies with the strong password // rules and does not contain ambiguous characters. // // To run this sample, create a new Visual C# project using the Console // Application template and replace the contents of the Class1.cs file with // the code below. // // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
48 Views
no comments
<ifModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* </ifModule>
102 Views
no comments
$('input:checkbox').addClass(function (index, currentClass) { var addedClass; if (currentClass === "") { addedClass = "rTick"; } return addedClass; });
103 Views
no comments
//Class fields needed private static int addFileFailures = 0; //some other code //addFile() Method public void addFile(File file) throws FileLimitReachedException, MemoryLimitReachedException, InvalidFileSizeException { //Increments the addFileFailures
90 Views
2 comments
using System; using System.Collections.Generic; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Features_ImportExport : System.Web.UI.Page { const string DocumentUrl = @"~/Content/Demo/SampleImportDocument.rtf"; const string ContentFolder = @"~/UploadImages/Imported";
220 Views
no comments
body { background-color: #000000; } .MainTitle /* Class */ { font-family: Arial, Helvetica, sans-serif; font-size: xx-large; color: #0000CC;
85 Views
no comments
var text = "I (Iceland) Found (Faroe Islands) the Needles (Norway) South (Sweden) of Finland (Finland). Drinks (Denmark) for Everyone (Estonia) Laughed (Latvia) the Little (Lithuania) Neanderthal (Northern Ireland) Selling (Scotland) English (England) Wales (Wales) Inside (Ireland) Northern Europe"; var rg = new Regex(@"\([^)]*\)", RegexOptions.IgnorePatternWhitespace); var replacedStr = rg.Replace(text,"");
107 Views
no comments
protected void Map(Expression<Func<T, object>> property, Func<PropertyDescriptor, string> columnNamer) { MemberInfo memberInfo; if (property.Body is MemberExpression) memberInfo = ((MemberExpression)property.Body).Member; else memberInfo = ((MemberExpression)((UnaryExpression)property.Body).Operand).Member; Map(memberInfo.Name, columnNamer);
184 Views
no comments
/// <summary> /// An entry that can be either a single ip or a range /// </summary> public class IpEntry { public string StartRange { get; set; } public string EndRange { get; set; } public bool IsRange
196 Views
2 comments
//Calling Code for VM to pass message box delegate Func<string, string, MessageBoxButton, MessageBoxImage, MessageBoxResult> messageBox = (msg, caption, buttons, image) => MessageBox.Show(msg, caption, buttons, image); //pass above variable to VM //Usage of message box delegate variable inside VM MessageBoxResult = messageBoxinVM("Test Message", "Test Caption for Message", MessageBoxButton.YesNoCancel, MessageBoxImage.Question);
289 Views
no comments
using System; using System.Linq.Expressions; public static class Aaa { public class A { public string NameField; }
177 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
