CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets My Favorites Favorites Web Code Search Snippets Search
Sign inor Register
Format:
Recent Snippets
#INCLUDE wconnect.h
 
DO wwJsonSerializer
 
loJson = CREATEOBJECT("wwJsonSerializer")
lcJson =  loJson.Serialize("'" + CHR(153) + " West Wind Technologies'")
? lcJson
 
loJson.DeserializeJson(lcJson)
by Rick Strahl   Today @ 4:57pm
Tags:
7 Views
no comments
 
C#
void Main()
{
    
    JavaScriptSerializer ser = new JavaScriptSerializer();
    var json = ser.Serialize(" ™  ﻰ West Wind Technologies");
    Console.WriteLine(json);
    
    var s = ser.Deserialize<string>(json);
    Console.WriteLine(s);
by Rick Strahl   Today @ 4:42pm
Tags:
7 Views
no comments
 
C++
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
 
struct Node
{
    struct Node *next;
    int data;
};
Today @ 4:38pm
Tags:
6 Views
no comments
 
SQL
-- Measure Time
SET STATISTICS TIME ON
SET STATISTICS IO ON
GO
by Egli   Today @ 3:57pm
9 Views
no comments
 
SQL
------------------------------------
-- Identify Index Defragmentation---
------------------------------------
 
SELECT ps.database_id, OBJECT_NAME( ps.OBJECT_ID),
ps.index_id, b.name,
ps.avg_fragmentation_in_percent
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS ps
INNER JOIN sys.indexes AS b ON ps.OBJECT_ID = b.OBJECT_ID
11 Views
no comments
 
SQL
/****************************************************************
Description: Script to show UnUsed Indexes using DMVs
****************************************************************/
 
SELECT TOP 25
o.name AS ObjectName
, i.name AS IndexName
, i.index_id AS IndexID  
, dm_ius.user_seeks AS UserSeek
by Egli   Today @ 3:12pm
13 Views
no comments
 
SQL
/****************************************************************
Description: Script to detect Missing Indexes
****************************************************************/
 
SELECT TOP 25
dm_mid.database_id AS DatabaseID, 
dm_migs.avg_user_impact*(dm_migs.user_seeks+dm_migs.user_scans) Avg_Estimated_Impact,
dm_migs.last_user_seek AS Last_User_Seek,
object_name(dm_mid.object_id,dm_mid.database_id) AS [TableName],
by Egli   Today @ 3:11pm
15 Views
no comments
 
SQL
/****************************************************************
Description: Script to detect duplicate Index
****************************************************************/
 
 
WITH MyDuplicate AS (SELECT 
    Sch.[name] AS SchemaName,
    Obj.[name] AS TableName,
    Idx.[name] AS IndexName,
by Egli   Today @ 3:04pm
14 Views
no comments
 
500M:-
tejyt2yqu7    5ntk1apw2j
y5pko6kfkf    y7a7q642gc
gtqaz00v95    zg7hc8nr94
h7930b1x7m    ebkrp1mlv5
wxcxeoo56o    n8nb3jd686
061amx8b2l    1hbqj5aqr2
edxl0elcla    mpuvr0b432
ea0crt1ruk    eaxxg5rsr4
Today @ 2:51pm
Tags:
16 Views
no comments
 
<div class="wpdestek_pagination_single"> 
  1 
  <a href="http://localhost/Wordpress/Nihat/galeriler/emma-watson/2/">2</a> 
  <a href="http://localhost/Wordpress/Nihat/galeriler/emma-watson/3/">3</a> 
  <a href="http://localhost/Wordpress/Nihat/galeriler/emma-watson/4/">4</a> 
  <a href="http://localhost/Wordpress/Nihat/galeriler/emma-watson/5/">5</a>
  <a href="http://localhost/Wordpress/Nihat/galeriler/emma-watson/2/">Sonraki</a>
</div>
Today @ 2:41pm
Tags:
17 Views
no comments
 
C#
// this code will compile
class A
{
    private A()
    { }
}
 
//creating instance of B will result in StackOverlow
class B : A
by Ilya Ivanov   Today @ 2:19pm
Tags:
36 Views
no comments
 
public void moveDownOneLevel(int subRoot,int index,int difference)
     {
 
         if(index > size)
         {
             reallocate();
         }
        
         if(2*index+1 < size)
Today @ 2:14pm
Tags:
19 Views
no comments
 
public void moveDownOneLevel(int subRoot)
    {
        int difference = 2*subRoot + 2 - subRoot;
        
        moveDownOneLevel(subRoot, subRoot, difference);
 
    }
     
     public void moveDownOneLevel(int subRoot,int index,int difference)
Today @ 2:01pm
Tags:
17 Views
no comments
 
public void moveDownOneLevel(int subRoot)
    {
        int difference = 2*subRoot + 2 - subRoot;
        
        moveDownOneLevel(subRoot, subRoot, difference);
 
    }
     
     public void moveDownOneLevel(int subRoot,int index,int difference)
Today @ 1:38pm
Tags:
19 Views
no comments
 
 
void bastirevladim(vp graph) {
    int i,j;
    
    for(i=0;EDGE(graph)[i];i++) {
 
        printf("%s\n",LABEL(EDGE(graph)[i]));
        
        TAG(EDGE(graph)[i])=1;
Today @ 10:17am
Tags:
32 Views
no comments
 
//#include "lab3.h"
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
 
int contains(char* path, char* str)
{
int i,j,c,a=strlen(str);
 
Today @ 9:21am
Tags:
31 Views
no comments
 
onMapSingleClick "
    if (_alt) then {
        if (player getvariable ['puede_teleport',false]) then {
            player setpos _pos;
            true
        } else {
            false
        };
    } else {
Today @ 5:52am
Tags:
45 Views
no comments
 
void bastirevladim(vp graph) {
    int i,j;
    
    for(i=0;EDGE(graph)[i];i++) {
        printf("%s\n",LABEL(EDGE(graph)[i]));
        TAG(EDGE(graph)[i])=1;
        for(j=0; EDGE(EDGE(graph)[i])[j];j++) {
            
            if(TAG(EDGE(graph)[j])!=1) {
Today @ 4:16am
Tags:
48 Views
no comments
 
C++
#include <stdio.h>
#include <stdlib.h>
#define TAG(vp) ((vp)->tag)
#define LABEL(vp) ((vp)->label)
#define EDGE(vp) ((vp)->edge)
int i=0;
typedef struct vertex
      { char tag;
        char *label;
Today @ 3:22am
Tags:
48 Views
no comments
 
$ python srpg.py
Loading options!
Loaded saved options!
/home/bo/lost-sky-project/Story of a Lost Sky/lostsky/core/xmlreader.py:382: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if emit_target_node:
/home/bo/lost-sky-project/Story of a Lost Sky/lostsky/core/xmlreader.py:388: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.
  if receive_sources_node:
Saving Options!
Saved Options!
Today @ 12:30am
Tags:
67 Views
no comments
 
brought to you by:
West Wind Techologies