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('/'));
18 Views
no comments
CREATE PROC SearchAllTables ( @SearchStr nvarchar(100) ) AS BEGIN CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630)) SET NOCOUNT ON
62 Views
no comments
select name as 'Database Name', [dbid] from master.dbo.sysdatabases
66 Views
no comments
/* 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'
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 = '';
92 Views
no comments
// =============================================================================== // 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.
204 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
267 Views
no comments
[Mixin("String.prototype")] public static class StringExtensions { public static bool StartsWith(string value) { return ((string)Script.Literal("this")).IndexOf(value) == 0; } }
351 Views
1 comments
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);
153 Views
no comments
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
280 Views
no comments
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>
698 Views
no comments
private static String base32Chars = "ybndrfg8ejkmcpqxot1uwisza345h769"; private void Test() { RandomNumberGenerator rng = RandomNumberGenerator.Create(); byte[] randomBytes = new byte[7]; string uniqueID = string.Empty; uniqueID = Base32Encode(randomBytes); }
519 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
287 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
