Skip to content

Instantly share code, notes, and snippets.

View uzbekdev1's full-sized avatar
🌴
On vacation

Elyor Latipov uzbekdev1

🌴
On vacation
View GitHub Profile
fun main(args: Array<String>) {
var s=0
for (i in 1..173) {
s+=i*i;
}
println(s)
}
// LOAD AJAX PAGES
function loadURL(url, container) {
$.ajax({
type: "GET",
url: url,
dataType: 'html',
cache: true,
beforeSend: function(){
container.html('<h1><i class="fa fa-cog fa-spin"></i> Loading...</h1>').fadeIn('fast');
},
@uzbekdev1
uzbekdev1 / crypto.cs
Created February 25, 2018 13:03 — forked from zachbonham/crypto.cs
RSA public key encryption in C#
using System;
using System.Diagnostics;
using System.Security.Cryptography;
using System.Text;
namespace Crtypto
{
class Program
{
static void Main(string[] args)
@uzbekdev1
uzbekdev1 / gist:6c46411f41cfecff0d5b06b684636e9a
Created March 24, 2018 14:44 — forked from rippinrobr/gist:3241701
updated app.config file to add Npgsql as a data provider for this app.
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<connectionStrings>
<add name="hockeydb"
connectionString="Server=127.0.0.1;Port=5432;Database=hockeydb;User Id=demo;Password=demo;"
providerName="Npgsql"
/>
</connectionStrings>
<system.data>
@uzbekdev1
uzbekdev1 / bracketsMatchingTest.js
Created May 4, 2018 09:23 — forked from jenyayel/bracketsMatchingTest.js
Implement function check (text) which checks whether brackets within text are correctly nested. You need to consider brackets of three kinds: (), [], {}.
var expect = require('expect')
var _matches = {
'{': { invert: '}', isOpening: true },
'}': { invert: '{', isOpening: false },
'(': { invert: ')', isOpening: true },
')': { invert: '(', isOpening: false },
'[': { invert: ']', isOpening: true },
']': { invert: '[', isOpening: false }
};
//source
function strcasecmp (a, b){
var size = a.length>=b.length?a.length:b.length;
var counter=0;
var aLow=a.toLowerCase();
var bLow=b.toLowerCase();
for(var i=0;i<size;i++){
if((i<=aLow.length || i<=bLow.length) && aLow[i]!=bLow[i]){
@uzbekdev1
uzbekdev1 / DomainRoute.cs
Created May 16, 2018 12:04 — forked from IDisposable/DomainRoute.cs
Domain (hostname) Routing for Asp.Net MVC and WebAPI
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Http;
using System.Web.Http.Routing;
using System.Web.Mvc;
@uzbekdev1
uzbekdev1 / DomainRoute.cs
Created May 16, 2018 12:04 — forked from fiting/DomainRoute.cs
Domain (hostname) Routing for Asp.Net MVC and WebAPI
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Http;
using System.Web.Http.Routing;
using System.Web.Mvc;
@uzbekdev1
uzbekdev1 / ProcessUtil.cs
Created June 5, 2018 20:14 — forked from mxpv/ProcessUtil.cs
Process start helper utility with CancellationToken and async output reading support
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
using Microsoft.Win32.SafeHandles;
namespace ConsoleApplication
{
public class ProcessUtil : IDisposable
{
@uzbekdev1
uzbekdev1 / ProcessHelper.cs
Created June 5, 2018 20:24 — forked from gokulraja/ProcessHelper.cs
Process Start Helper C#
private static void ProcessHelper(string fileName, string arguments, bool showResultsinConsole)
{
// Start the child process.
using (var p = new Process{
StartInfo =
{
UseShellExecute = false,
CreateNoWindow = true,