Format:
Recent snippets matching tags of FUNCTION
<# .COMPONENT NUPosh .SYNOPSIS Test if an Assembly (.dll) is already loaded. .DESCRIPTION Test if an Assembly of the same name is already loaded in the current runspace. Using the -PasThru parameter will return the AssemblyInfo object along with the boolean. .PARAMETER Name The file name of the Assembly.
18 Views
no comments
//start processing var api = new moviesApi(); api.getRatings({ success: function (result) { for (var i = 0; i < result.length; i++) { //new Option(text, value) var option = new Option(result[i].ID, result[i].Name); $('#ratings').append( $('<option></option>').val(result[i].ID).html(result[i].Name) );
22 Views
no comments
displayError = function (result) { $('#errorDisplay').show(); $('#errorDisplay').html(result.responseText); }
29 Views
no comments
#ifndef FONKSIYONLAR_H_INCLUDED #define FONKSIYONLAR_H_INCLUDED #include <iostream> #include <conio.h> #include <fstream> #include <windows.h> using namespace std; int girdiKontrol(string); void komutListele();
20 Views
no comments
/* @ 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');
111 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 = '';
92 Views
no comments
CREATE FUNCTION [dbo].[udf_StringToTable] ( @string VARCHAR(MAX), @delimiter CHAR(1) ) RETURNS @output TABLE( data VARCHAR(256) ) BEGIN
106 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))
170 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; }
1608 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
266 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
291 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
306 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
291 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;
314 Views
1 comments
param ([string] $filename) function splitString([string]$string, [int]$length) { $lines = @(); $stringLength = $string.Length; $position = 0; while ($position -lt $stringLength) {
745 Views
no comments
function truncate-string([string]$value, [int]$length) { if ($value.Length -gt $length) { $value.Substring(0, $length) } else { $value } }
1998 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
285 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 {
315 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
