CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of base
var baseUrl;
var applicationUrl;
 
baseUrl = document.location.href;
baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/'));
applicationUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/'));
by Warren Wiltshire   May 02, 2012 @ 5:24am
18 Views
no comments
 
SQL
CREATE PROC SearchAllTables
(
    @SearchStr nvarchar(100)
)
AS
BEGIN
    CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))
 
    SET NOCOUNT ON
by Prithvi Ramana A   December 22, 2011 @ 6:46am
62 Views
no comments
 
SQL
select name as 'Database Name', [dbid] from master.dbo.sysdatabases
by Egli   November 09, 2011 @ 4:56pm
66 Views
no comments
 
SQL
/*
Since you cant alter the database straight away, you first need to kill the user thats currently connected to it...
So...
Step 1:
Get the session thats connected to that database
*/
 
select d.name, d.dbid, spid, login_time, nt_domain, nt_username, loginame
from master.dbo.sysprocesses p inner join master.dbo.sysdatabases d on p.dbid = d.dbid
where d.name = 'DATABASE NAME GOES HERE'
by Egli   November 01, 2011 @ 5:33pm
64 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 = '';
by Luca Provenzano   September 13, 2011 @ 2:58pm
92 Views
no comments
 
C#
// ===============================================================================
// Microsoft Data Access Application Block for .NET
// http://msdn.microsoft.com/library/en-us/dnbda/html/daab-rm.asp
//
// SQLHelper.cs
//
// This file contains the implementations of the SqlHelper and SqlHelperParameterCache
// classes.
//
// For more information see the Data Access Application Block Implementation Overview. 
by mattjcowan   August 18, 2011 @ 8:46am
Tags: database
204 Views
no comments
 
C++
#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
by Matt Calabrese   November 13, 2010 @ 11:21am
267 Views
no comments
 
C#
[Mixin("String.prototype")]
public static class StringExtensions
{
    public static bool StartsWith(string value)
    {
        return ((string)Script.Literal("this")).IndexOf(value) == 0;
    }
}
by Bruno Figueiredo   October 13, 2010 @ 2:47pm
351 Views
1 comments
 
C#
using System.Data;
using System.Data.OracleClient;
using Microsoft.Practices.EnterpriseLibrary.Data;
 
string sql = "DELETE from FFATA_RULES where N_ID = :N_ID";
Database db = DatabaseFactory.CreateDatabase();
System.Data.Common.DbCommand cmd = db.GetSqlStringCommand(sql);
db.AddInParameter(cmd, ":N_ID", DbType.Int32, ID);
db.ExecuteNonQuery(cmd);
by Gary Cline   September 22, 2010 @ 7:19am
153 Views
no comments
 
C#
using System;
using System.Text;
 
namespace ConsoleApplication2 {
    class Program {
        static void Main(string[] args) {
            //ავიღოთ რაიმე სტრინგი
            string s = "me miyvars samyaro imitom rom mze amodis da natels fens yovels";
            //გადავიყვანოთ ბაიტების მასივში, რადგან Convert.ToBase64String ბაიტის მასივს იღებს პარამეტრად
            byte[] strBytes = Encoding.ASCII.GetBytes(s);//თუ გაქვთ უნიკოდური ტექსტი უნდა გამოიყენოთ შესაბამისი კლასი. მაგ Encoding.Unicode
by Zviadi   February 10, 2010 @ 4:47am
280 Views
no comments
 
C#
static string base36Chars = "0123456789abcdefghijklmnopqrstuvwxyz";
static char[] base36CharArray = base36Chars.ToCharArray();            
 
 
/// <summary>
/// Encodes an integer into a string by mapping to alpha and digits (36 chars)
/// chars are embedded as lower case
/// 
/// Example: 4zx12ss
/// </summary>
by Rick Strahl   December 23, 2009 @ 7:28pm
Tags: Base32
698 Views
no comments
 
C#
private static String base32Chars = "ybndrfg8ejkmcpqxot1uwisza345h769";
 
private void Test()
{
          RandomNumberGenerator rng = RandomNumberGenerator.Create();
          byte[] randomBytes = new byte[7];
          string uniqueID = string.Empty;
          uniqueID = Base32Encode(randomBytes);
}
by Tony Abell   August 14, 2009 @ 11:27am
519 Views
no comments
 
C#
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
by tomy ismail   July 15, 2009 @ 10:32pm
287 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate