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 server
package eu.man.phevos.dx.mock.gep.test
 
import java.io.FileInputStream
import java.util.Arrays
import akka.actor.Actor
import akka.actor.ActorSystem
import akka.actor.Props
 
object StreamTest extends App {
by Michael Wellner   May 15, 2012 @ 11:17am
15 Views
no comments
 
package eu.man.phevos.dx.mock.gep.test
 
import java.io.FileInputStream
import java.util.Arrays
import akka.actor.Actor
import akka.actor.ActorSystem
import akka.actor.Props
 
object StreamTest extends App {
by Michael Wellner   May 15, 2012 @ 11:15am
17 Views
no comments
 
2012-02-22 14:13:30 [INFO] This server is running CraftBukkit version git-Bukkit-1.1-R3-b1846jnks (MC: 1.1) (Implementing API version 1.1-R3)
2012-02-22 14:13:30 [INFO] Unknown command. Type "help" for help.
2012-02-22 14:13:34 [INFO] Plugins: WorldBorder, XrayInformer, WorldEdit, TradeCraft, EnderCrystalizer, CommandBook, PermissionsBukkit, Vault, LogBlockQuestioner, PvPToggle, LogBlock, LWC, FirstLastSeen, WorldGuard, mChatSuite, SimpleJail, SpawnerAdjuster, GroupAnnouncer, Points, LimitedCreative, Honeypot, ThumbsApply, WeatherRestrictions, TeleportSuite, mcbans, CFBanner, MultiSpawn, Xray Detection, SimpleSpleef, NoCheat, Votifier, SimpleReserve, Residence
2012-02-22 14:13:34 [INFO] Unknown command. Type "help" for help.
by Digitalink2008   February 22, 2012 @ 1:14pm
34 Views
no comments
 
users:
    Notch:
        permissions:
            permissions.example: true
        groups:
        - admin
    digitalink2008:
        groups:
        - owner
        permissions:
by Digitalink2008   February 22, 2012 @ 1:12pm
39 Views
no comments
 
superm.bukkit.denyall:
    description: Deny all default bukkit commands
    default: false
    children:
        bukkit.command.version: false
        bukkit.command.plugins: false
 
superm.commandbook.moderator:
    description: Mod powers
    default: false
by Digitalink2008   February 22, 2012 @ 1:04pm
116 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
67 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
 
'***********************************************************************************************************************--
'***********************************************************************************************************************--
'This is a Visual Basic Script that hits a WebURL
'The WebURL hit is the one provided as the parameter (in this case through the windows task scheduler)
'Instructions: Set this .vbs as the action for a schedule task and in the parameters section pass in the WebUrl u wish to hit
'***********************************************************************************************************************--
'***********************************************************************************************************************--
 
'Create variable to hold passing in arguments
args = WScript.Arguments.Count
by Egli   October 30, 2011 @ 6:01pm
66 Views
no comments
 
SQL
CREATE Procedure spDeleteRows
/* 
Recursive row delete procedure. 
 
It deletes all rows in the table specified that conform to the criteria selected, 
while also deleting any child/grandchild records and so on.  This is designed to do the 
same sort of thing as Access's cascade delete function. It first reads the sysforeignkeys 
table to find any child tables, then deletes the soon-to-be orphan records from them using 
recursive calls to this procedure. Once all child records are gone, the rows are deleted 
from the selected table.   It is designed at this time to be run at the command line. It could 
by Egli   August 17, 2011 @ 5:50am
132 Views
no comments
 
SQL
/*
Only showing the top 100 for this result
*/
 
SELECT TOP(100) total_worker_time/execution_count AS AvgCPU  
, total_worker_time AS TotalCPU
, total_elapsed_time/execution_count AS AvgDuration  
, total_elapsed_time AS TotalDuration  
, (total_logical_reads+total_physical_reads)/execution_count AS AvgReads 
, (total_logical_reads+total_physical_reads) AS TotalReads
by Egli   July 26, 2011 @ 12:52am
102 Views
no comments
 
C#
using System;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using EPiServer;
using EPiServer.ClientScript;
using EPiServer.Core;
using EPiServer.Editor;
 
namespace MyProject
{
by rawbert   May 19, 2011 @ 12:50am
251 Views
no comments
 
C#
/// <summary>
/// Get the file that will be read/written to
/// </summary>
/// <returns></returns>
public UnifiedFile GetFileFromProperty(PageData page, string propertyName)
{
    var filePath = page.Property[propertyName] != null
                       ? (string)page.Property[propertyName].Value
                       : string.Empty;
    if (string.IsNullOrEmpty(filePath)) return null;
by rawbert   February 25, 2011 @ 12:45am
294 Views
no comments
 
 
 
$dbDir = "C:\Dev\MyProject\branches\1.0.0\src\Database\"
$viewsDir = [IO.Path]::Combine($dbDir, "Views")
$functionsDir = [IO.Path]::Combine($dbDir, "Functions")
$sprocsDir = [IO.Path]::Combine($dbDir, "Stored Procedures")
$dbServer = "(local)\SQL2k8"
 
#Write-Host $dbDir
#Write-Host $viewsDir
by Jon Sagara   December 27, 2010 @ 5:43pm
181 Views
no comments
 
C#
public class SqlAppender : AppenderSkeleton
{
    private static readonly string CommandText = "INSERT INTO Log ([Date],[Thread],[Level],[Logger],[Message],[Exception]) VALUES (@log_date, @thread, @log_level, @logger, @message, @exception)";
 
    public string ConnectionString { get; set; }
 
    protected override void Append(LoggingEvent loggingEvent)
    {
        using (var conn = new SqlConnection(ConnectionString))
        using (var cmd = new SqlCommand(CommandText, conn))
by Jon Sagara   April 25, 2010 @ 1:14am
313 Views
no comments
 
C#
/// <summary>
/// Return all properties from a type up to a specified base type in the inheritance hierarchy
/// </summary>
/// <param name="type">Type that will be examined</param>
/// <param name="baseType">Where to stop in the inheritance hierarchy. Must be a type that first parameter inherits from
/// </param>
/// <returns>A list of all found properties</returns>
public static List<PropertyInfo> GetAllProperties(Type type, Type baseType)
{
   List<PropertyInfo> properties = new List<PropertyInfo>();
500 Views
no comments
 
SQL
DECLARE @str nvarchar(128)
SET @str = '[AdventureWorks].[dbo].[ErrorLog]'
 
SELECT    ISNULL(PARSENAME(@str, 4), @@SERVERNAME) AS [ServerName],
        ISNULL(PARSENAME(@str, 3), DB_NAME()) AS [DatabaseName],
        ISNULL(PARSENAME(@str, 2), ISNULL([default_schema_name], 'dbo')) AS [SchemaName],
        PARSENAME(@str, 1) AS [ObjectName]
       
FROM [sys].[database_principals]
WHERE [name] = SYSTEM_USER
by kopelli   December 31, 2009 @ 6:32am
183 Views
no comments
 
C#
/// <summary>
/// Creates a string list that contains the hierrarchy leading to the current page
/// </summary>
/// <param name="currentPage"></param>
/// <param name="ReplaceStartWithLangCode"></param>
/// <param name="ReverseSort"></param>
/// <returns></returns>
public static List<string> GetBreadCrumb(PageData currentPage, bool ReplaceStartWithLangCode, bool ReverseSort)
{
   if (currentPage != null)
642 Views
no comments
 
C#
// Extension method for retrieving a page from a PageReference
// For example:
// PageData parent = CurrentPage.ParentLink.GetPage()
public static PageData GetPage(this PageReference link)
{
    if (link==PageReference.EmptyReference)
        return null;
 
    return DataFactory.Instance.GetPage(link);
}
by Ted Nyberg   December 08, 2009 @ 8:02am
219 Views
1 comments
 
C#
/// <summary>
/// Get all pages from the LinkItemCollection property
/// </summary>
/// <returns>PageDataCollection</returns>
public PageDataCollection GetLinkCollectionPages(string propertyName)
{
   PageDataCollection pages = new PageDataCollection();
   LinkItemCollection links = CurrentPage[propertyName] != null ? CurrentPage.Property[propertyName].Value as LinkItemCollection : null;
   if (links != null)
   {
541 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