Skip to content

Instantly share code, notes, and snippets.

/*****************************************************************************\
Javascript "SOAP Client" library
@version: 1.4 - 2005.12.10
@author: Matteo Casati, Ihar Voitka - http://www.guru4.net/
@description: (1) SOAPClientParameters.add() method returns 'this' pointer.
(2) "_getElementsByTagName" method added for xpath queries.
(3) "_getXmlHttpPrefix" refactored to "_getXmlHttpProgID" (full
ActiveX ProgID).
function SOAPClientParameters()
{
var _pl = new Array();
this.add = function(name, value)
{
_pl[name] = value;
return this;
}
this.toXml = function()
{
@kohav
kohav / gist:d797dc454b7d69cff32f0ddb4e926e05
Created April 28, 2017 08:55
MS SQL Server / pivot example
CREATE TABLE [dbo].[tTMP](
[Id] [int] NOT NULL,
[IdResp] [int] NULL,
[IdBranch] [int] NULL,
[IdPost] [int] NULL,
[CountWorks] [int] NULL,
[CountSub] [int] NULL,
CONSTRAINT [PK_tTmp] PRIMARY KEY CLUSTERED
( [Id] ASC
)WITH (PAD_INDEX = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]) ON [PRIMARY]
@kohav
kohav / gist:b3233c63507323e616158e7d1ddc637f
Last active April 28, 2017 09:04
MS Sql Server / using row_number()over & reversal of result set.
/*using row_number()over*/
select Id_Otdel,
firstName,
row_number()over(partition by Id_Otdel order by firstName) rn
from d_Sotr
where Id_Otdel in (11, 12, 21)
/*with reversal of result set*/
select max(case when Id_Otdel=11
then firstName else null end) as analysts,
@kohav
kohav / gist:86697c482c578e6a1f99b2cefc824301
Created April 27, 2017 12:51
все из запросов
учись - главное знать все из запросов
<SELECT statement> ::=
[ WITH { [ XMLNAMESPACES ,] [ <common_table_expression> [,...n] ] } ]
<query_expression>
[ ORDER BY { order_by_expression | column_position [ ASC | DESC ] }
[ ,...n ] ]
[ <FOR Clause>]
[ OPTION ( <query_hint> [ ,...n ] ) ]
<query_expression> ::=
{ <query_specification> | ( <query_expression> ) }
@kohav
kohav / gist:f9dec26c721c3ed789a5393eac441b3d
Last active April 26, 2017 13:37
wordpress content of post
<?php if ( have_posts() ) : query_posts('p=1');
while (have_posts()) {
the_post();
the_content();
}endif; wp_reset_query(); ?>
@kohav
kohav / gist:7547ab6170d82f8f8f8cb12a7865f23c
Created April 26, 2017 06:55
#Ссылки из видео про полезные ништяки ништяки от ХаудиХо:
1) http://svgporn.com
2) http://www.dummytextgenerator.com
3) http://www.behindthename.com
4) https://nick-name.ru/generate/
5) https://www.hipsterlogogenerator.com/
6) http://compressjpeg.com/
7) http://revaxarts-themes.com/documenter/
8) http://easings.net/
9) https://www.toptal.com/designers/subt...