Skip to content

Instantly share code, notes, and snippets.

View NikolayIT's full-sized avatar

Nikolay Kostov NikolayIT

View GitHub Profile
namespace MyWebApp
{
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web.Configuration;
using System.Web.Mvc;
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
public static class Program
{
private const string BookUrlPattern = "http://it-ebooks.info/book/{0}/";
@NikolayIT
NikolayIT / ComparePlusEqualWithEqualPlus.cs
Last active August 29, 2015 14:16
Compare a += b with a = a + b
using System;
using System.Diagnostics;
class Program
{
static void Main(string[] args)
{
int a = 0;
int b = 1;
Stopwatch sw = new Stopwatch();
@NikolayIT
NikolayIT / Enigma Cat solution (Telerik Academy C# 2 Exam 2015).cs
Last active November 15, 2015 00:46
Enigma Cat solution (Telerik Academy C# 2 Exam 2015)
using System;
using System.Text;
public class Program
{
public static void Main()
{
var words = Console.ReadLine().Split(' ');
foreach (var word in words)
{
// 17 to decimal
(ex as System.Data.Entity.Validation.DbEntityValidationException)
.EntityValidationErrors
.ToList()[0]
.ValidationErrors
.ToList()[0]
@NikolayIT
NikolayIT / gist:0c3a9f8330db10d892a9
Created October 23, 2015 06:23
Become SQL Admin.cmd
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
var client = new HttpClient { BaseAddress = new Uri("https://api.guildwars2.com/v2/") };
var result = client.GetAsync("items/57").Result.Content.ReadAsStringAsync().Result;
Console.WriteLine(result);
using Encog;
using Encog.ML.Data;
using Encog.ML.Data.Basic;
using Encog.ML.Train;
using Encog.Neural.Networks;
using Encog.Neural.Networks.Layers;
using Encog.Neural.Networks.Training.Propagation.Resilient;
using System;
using System.Collections.Generic;
using Encog.Engine.Network.Activation;
@NikolayIT
NikolayIT / Илевън Фънд Кооператиф.md
Last active April 19, 2016 12:22
Български фирми, в които Eleven има участие към 19-ти април 2016
ЕИК Име на фирма [състояние] дял
202582245 Куизенс ООД [заличена] 80 лв.
202726418 Грувит ООД [заличена] 80 лв.
202724560 Волофай ООД [заличена] 80 лв.
202270847 Юлимпикс ООД [активна] 140 лв.
202727922 Хангрио ООД [заличена] 80 лв.
202739821 Бииклауд ООД [активна] 140 лв.
202727192 Паруди ООД [заличена] 140 лв.
202724335 Дейта Крафт енд Меджик ООД [активна] 140 лв.
@NikolayIT
NikolayIT / LinearRegression.cs
Created March 17, 2017 13:43
Linear regression implementation in pure C# with example of Bulgarian population prediction
namespace LinearRegression
{
using System;
using System.Diagnostics;
public static class Program
{
public static void Main()
{
var xValues = new double[]