Answer:WMI: Get USB device description on insertion

        ManagementScope sc =
            new ManagementScope(@"\\YOURCOMPUTERNAME\root\cimv2");

        ObjectQuery query =
            new ObjectQuery("Select * from Win32_USBHub");

        ManagementObjectSearcher searcher = new ManagementObjectSearcher(sc, query);
        ManagementObjectCollection result = searcher.Get();

        foreach (ManagementObject obj in result)
        {
            if (obj["Description"] != null) Console.WriteLine("Description:\t" + obj["Description"].ToString());
            if (obj["DeviceID"] != null) Console.WriteLine("DeviceID:\t" + obj["DeviceID"].ToString());
            if (obj["PNPDeviceID"] != null) Console.WriteLine("PNPDeviceID:\t" + obj["PNPDeviceID"].ToString());
        }

WMI Code creator : http://sdrv.ms/PZKlKu

http://stackoverflow.com/a/6643234
https://social.msdn.microsoft.com/Forums/vstudio/en-US/f3003f55-aecf-41da-b0a8-1b5e8bf99894/extracting-serial-number-vendor-id-and-product-id-from-usb-pendrive-using-c?forum=netfxbcl

Get different and common items in two arrays with LINQ [C#]

var list1 = new string[] {"1", "2", "3", "4", "5", "6"};
var list2 = new string[] {"2", "3", "4"};
var listCommon = list1.Intersect(list2);
foreach (string s in listCommon) Console.WriteLine(s);

Output:

2
3
4

 

http://stackoverflow.com/a/10648270

How to create a Winforms Combobox with Label and Value [C#]

    private void PopulateComboBox()
    {
        var dict = new Dictionary<int, string>();
        dict.Add(2324, "Toronto");
        dict.Add(64547, "Vancouver");
        dict.Add(42329, "Foobar");

        comboBox1.DataSource = new BindingSource(dict, null);
        comboBox1.DisplayMember = "Value";
        comboBox1.ValueMember = "Key";
    }

http://stackoverflow.com/a/2023457

Remove duplicates from array c#

int[] s = { 1, 2, 3, 3, 4};
int[] q = s.Distinct().ToArray();

http://stackoverflow.com/a/9685

search value (with regex) in array and push search value to multidimensional array in PHP

Example Data

Array
(
    [0] => [DATA_1_A]
    [1] => [DATA_1_B] [DATA_2_B]
    [2] => [DATA_1_C] [DATA_2_C] [DATA_3_C]
)

And push value to multidimensional array.

Array
(
    [0] => Array
        (
            [0] => DATA_1_A
        )
    [1] => Array
        (
            [0] => DATA_1_B
            [1] => DATA_2_B
        )
    [2] => Array
        (
            [0] => DATA_1_C
            [1] => DATA_2_C
            [2] => DATA_3_C
        )
)

$new = array_map(function($i) {
if(preg_match_all('/\[([^\]]+)\]/', $i, $m)) return $m[1];
return $i; }, $arr);

http://stackoverflow.com/a/37666969

Answer:Scripts to convert data-dump to other formats

https://github.com/testlnord/sedumpy/blob/master/makedb.py
http://meta.stackexchange.com/a/28231

ref: https://twitter.com/sornram9254/status/738783811073232896

Answer:How to print all information from an HTTP request to the screen, in PHP

echo file_get_contents( 'php://input' );

http://stackoverflow.com/a/3136304
ref: https://twitter.com/sornram9254/status/738058662141263872

Answer:Remove empty array elements (PHP)

$emptyRemoved = array_filter($linksArray);

http://stackoverflow.com/a/3654335
ref: https://twitter.com/sornram9254/status/737673183155740672

Answer:Rebase array keys after unsetting elements [php]

$array = array_values($array);

http://stackoverflow.com/a/5943165
ref: https://twitter.com/sornram9254/status/737696350146437120

Answer:Detecting request type in PHP (GET, POST, PUT or DELETE)

$_SERVER['REQUEST_METHOD']

http://stackoverflow.com/a/359050
ref: https://twitter.com/sornram9254/status/738063120422174720