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 {
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 {
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.
34 Views
no comments
users:
Notch:
permissions:
permissions.example: true
groups:
- admin
digitalink2008:
groups:
- owner
permissions:
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
116 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
67 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
'***********************************************************************************************************************-- '***********************************************************************************************************************-- '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
66 Views
no comments
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
132 Views
no comments
/* 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
102 Views
no comments
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 {
251 Views
no comments
/// <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;
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
181 Views
no comments
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))
313 Views
no comments
/// <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
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
183 Views
no comments
/// <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
// 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); }
219 Views
1 comments
/// <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
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
