[MAC] Virtualbox : The remote device or resource won’t accept the connection.

Solution :

In Internet Explore :

Goto Tools -> Options -> Connections Tab and click LAN Setting

And Check ‘Automatically detect settings’ and Uncheck Use a proxy server … option.

 

ieRef ref1 ref2

Posted in Error Note, Tech Note | Tagged , , , | Leave a comment

Quick sorting algorithm in C# and PHP

Boring friday, I just write codes for Quick sorting algorithm using C# and PHP. :)

 

[Using C#]

using System;
using System.Collections.Generic;
using System.Linq;

public class Test
{
  public static List quickSort (List list) where T : IComparable {
    int length = list.Count;
    if(length <= 1) return list;
    
    T pivot = list[0];
    List leftList = new List();
    List rightList = new List();
    
    for(int i = 1;  i < length; i++){
      if(list[i].CompareTo(pivot) <= 0){
        leftList.Add(list[i]);
      }else{
        rightList.Add(list[i]); 
      }
    }

    List pivotList = new List();
    pivotList.Add(pivot);

    return quickSort(leftList).Concat(pivotList).Concat(quickSort(rightList)).ToList();
  }
  
  public static void Main()
  {
    // Sorting Integer
    List test = new List(){4,2,3,6,1,5,9,8,7};
    List result;

    result = quickSort(test);

    Console.WriteLine("Result >");
    foreach(var t in result){
      Console.Write(t+" ");
    }
    //Result > 1 2 3 4 5 6 7 8 9 

    // Sorting string
    List stringTest = new List(){"s","e","t","h","w","u","s","w","e","u","a","c","b","e","r"};
    List stringResult;

    stringResult = quickSort(stringTest);
    Console.WriteLine("\r\nResult >");
    foreach(var st in stringResult){
      Console.Write(st+" ");
    }
    //Result > a b c e e e h r s s t u u w w 

  }
}

[Using PHP]

function quickSort($array){
  $length = sizeof($array);
  if($length <= 1) return $array;
  $pivot = $array[0];
  $leftArray = $rightArray = Array();
  for($i = 1; $i < $length; $i++){
    if($array[$i] <= $pivot){
      $leftArray[] = $array[$i];
    }else{
      $rightArray[] = $array[$i];
    }
  }

  return array_merge(quickSort($leftArray), (array) $pivot, quickSort($rightArray));
}

$array = [2,1,3,5,7,4,6,9,10];
$result = quickSort($array);

echo "Result > ";
foreach($result as $k => $v){
  echo $v." ";
}
//Result > 1 2 3 4 5 6 7 9 10

$array = ['s','e','g','a','p','q','n','v','b'];
$result = quickSort($array);
echo "\r\nResult > ";
foreach($result as $k => $v){
  echo $v." ";
}
//Result > a b e g n p q s v
Posted in Others, Tech Note | Tagged , , | Leave a comment

Protected: Solving MaxCounters quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , | Enter your password to view comments.

Protected: Solving PermCheck quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , , | Enter your password to view comments.

Protected: Solving PermMissingElem quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , , | Enter your password to view comments.

Protected: Solving Flog-Jump quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , , | Enter your password to view comments.

Protected: Solving TapeEquilibrium quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , , | Enter your password to view comments.

Protected: Solving Equilibrium Index quiz using PHP and C#

This content is password protected. To view it please enter your password below:

Posted in Others, Tech Note | Tagged , , | Enter your password to view comments.

dSlider – Hierarchy Slider (Jquery Plugin)

I need a slider for folder hierarchy. but I couldn’t find any plugin for that.

So, I made it very simply, and now I’m sharing. I hope it could help someone :)

dSlider Screen Shot

Download PluginĀ 

View Demo

 

Posted in JavaScript, Tech Note | Tagged , | Leave a comment

New York City night view

New York City night view SONY DSC SONY DSC SONY DSC SONY DSC SONY DSC SONY DSC SONY DSC

Posted in Landscape, Photo | Leave a comment