Format:
Recent snippets matching tags of function
/* @ 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
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; }
1256 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
239 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
256 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
280 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
259 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;
294 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
function truncate-string([string]$value, [int]$length) { if ($value.Length -gt $length) { $value.Substring(0, $length) } else { $value } }
1785 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
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
