Skip to content

Instantly share code, notes, and snippets.

View sergey-tihon's full-sized avatar
🦀

Sergey Tihon sergey-tihon

🦀
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<ServiceMetadataFiles>
<ServiceMetadataFile name="developer.atlassian.com.rpc.soap-axis.confluenceservice-v2.wsdl">
<wsdl:definitions xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:intf="https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns1="http://rpc.confluence.atlassian.com" xmlns:tns2="http://beans.soap.rpc.confluence.atlassian.com" xmlns:impl="https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2" targetNamespace="https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2">
<import namespace="http://beans.soap.rpc.confluence.atlassian.co
System.Net.ServicePointManager.ServerCertificateValidationCallback
<- System.Net.Security.RemoteCertificateValidationCallback(fun _ _ _ _ -> true)
///type TypeName = Microsoft.FSharp.Data.TypeProviders.WsdlService<"https://...">
type IndependentSets(n) =
let rank, boss = Array.create n 0, Array.init n (fun x->x)
member this.find(x) =
if boss.[x] = x then x else boss.[x] <- this.find(boss.[x]); boss.[x]
member this.union(x,y) =
let a,b = this.find(x), this.find(y)
if (rank.[a] < rank.[b]) then boss.[a] <- b
if (rank.[a] > rank.[b]) then boss.[b] <- a
if (rank.[a] = rank.[b]) then boss.[b] <- a; rank.[a] <- rank.[a] + 1
@sergey-tihon
sergey-tihon / gist:3894956
Created October 15, 2012 20:01
ADO.NET Table Columns Names
namespace ADOConsoleApplication
{
using System;
using System.Data;
using System.Data.SqlClient;
class Program
{
static void Main(string[] args)
{
@sergey-tihon
sergey-tihon / TableCellSource.cs
Created September 28, 2012 13:47
Table Cell Source for Document Builder
public class TableCellSource : ISource
{
public WmlDocument WmlDocument { get; set; }
public bool KeepSections { get; set; }
public string InsertId { get; set; }
public int TableNum { get; set; }
@sergey-tihon
sergey-tihon / SourceDocumentBuilder.cs
Created September 28, 2012 13:41
ISource for DocumentBuilder
/***************************************************************************
Copyright (c) Microsoft Corporation 2011.
This code is licensed using the Microsoft Public License (Ms-PL). The text of the license can be found here:
http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
***************************************************************************/
open System.IO;
let rec getAllDirectories dir =
Directory.GetDirectories(dir)
|> Array.collect getAllDirectories
|> Array.append [|dir|]
let directoryName = System.Environment.GetCommandLineArgs().[1]
/**************************************************************************************************
* SuperSDG v2.2 release *
* Copyright (c) 2002-2008 Ravent *
* All rights reserved *
* Нарушение авторских прав карается жесотким и мучительным угрызением совести. *
**************************************************************************************************/
#pragma comment (lib,"glut32.lib")
#pragma comment (lib,"glaux.lib")
#include <gl/glaux.h>
@sergey-tihon
sergey-tihon / gist:2838208
Created May 30, 2012 18:41
How to update SPListItem Created/Modified date
using System;
using Microsoft.SharePoint;
namespace EPAM.USPS.SharePoint.Core.Utilities.Specific
{
public class ListItemPropertySet
{
public ListItemPropertySet()
{
}
@sergey-tihon
sergey-tihon / masterpage.master
Created March 27, 2012 16:19
script loading
before:
<body onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">
after:
<script type="text/javascript">
var attempts_remain = 200;
function _lazySpBodyOnLoadWrapper() {
if (typeof(_spBodyOnLoadWrapper) == 'undefined' || !(document.readyState === "complete")) {
if (attempts_remain > 0) {
attempts_remain--;