Skip to content

Instantly share code, notes, and snippets.

View sergey-tihon's full-sized avatar
🦀

Sergey Tihon sergey-tihon

🦀
View GitHub Profile
@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 / 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)
{
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
System.Net.ServicePointManager.ServerCertificateValidationCallback
<- System.Net.Security.RemoteCertificateValidationCallback(fun _ _ _ _ -> true)
///type TypeName = Microsoft.FSharp.Data.TypeProviders.WsdlService<"https://...">
<?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
@sergey-tihon
sergey-tihon / gist:4551155
Last active December 11, 2015 05:18 — forked from v2m/gist:4550877
WSDL schema for https://developer.atlassian.com/rpc/soap-axis/confluenceservice-v2?WSDL updated for WCF compatibility
<?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
@sergey-tihon
sergey-tihon / gist:5343737
Created April 9, 2013 07:37
F#, ServiceStack + Project Service
open System
open ServiceStack.ServiceHost
open ServiceStack.WebHost.Endpoints
open ServiceStack.ServiceInterface
type Project() =
let mutable projectID = 0
let mutable projectName = ""
let mutable companyName = ""
let mutable projectStatus = ""
module MainApp
open System
open System.Windows
open System.Windows.Controls
open FSharpx
type MainWindow = XAML<"MainWindow.xaml">
let loadWindow() =
using java.io;
using edu.stanford.nlp.process;
using edu.stanford.nlp.ling;
using edu.stanford.nlp.trees;
using edu.stanford.nlp.parser.lexparser;
namespace Stanford_Parser
{
class Program
open System
open System.Net
open System.Text
open System.IO
let siteRoot = @"D:\mySite\"
let host = "http://localhost:8080/"
let listener (handler:(HttpListenerRequest -> HttpListenerResponse -> Async<unit>)) cancellationToken =
let hl = new HttpListener()