How to fix : ImportError: cannot import name ‘IncompleteRead’ [Python]

First remove the package from the package manager:

apt-get remove python-pip

And then install the latest version by side:

easy_install pip

http://stackoverflow.com/a/27425458

how to install docker with apt-get

Instead of using docker use docker.io
sudo apt-get install docker.io
http://stackoverflow.com/a/30379382?stw=2

Why install docker on ubuntu should be `sudo apt-get install docker.io`?
Ans =
Why do Ubuntu use docker.io as executable name instead of just docker? Tutorials, blog posts all now have to mention this difference, “if you use Ubuntu 14.04, or if you are with rest of the world (including earlier versions of Ubuntu)”. Why?

This is because of a Debian/Ubuntu policy; there is already a program called “docker” [1], and it was not allowed to use the same binary name.
http://stackoverflow.com/a/27978397

convert seconds into (Hour:Minutes:Seconds:Milliseconds) / .NET

<= .NET 4.0

TimeSpan t = TimeSpan.FromSeconds( secs );
string answer = string.Format(“{0:D2}h:{1:D2}m:{2:D2}s:{3:D3}ms”,
t.Hours,
t.Minutes,
t.Seconds,
t.Milliseconds);

NET > 4.0

TimeSpan time = TimeSpan.FromSeconds(seconds);
string str = time .ToString(@”hh\:mm\:ss\:fff”);

http://stackoverflow.com/a/463668

Answer:How to get the command that invoked a task with tasklist

CMD

wmic process get commandline,processid /format:csv

PowerShell

Get-WmiObject win32_process | select CreationDate,ProcessId,CommandLine|ft -AutoSize

http://superuser.com/a/683052

AJAX jQuery PHP Return Value

data.php

echo json_encode($myArray);

display.php

$.ajax({ url: ‘/my/site’,
data: {action: ‘test’},
dataType: ‘json’,
type: ‘post’,
success: function(output) {
alert(output);
}
});

http://stackoverflow.com/a/13366307

WinDBG – The Basics for Debugging Crash Dumps in Windows 10

1. download WinDBG and install “Debugging Tools for Windows” => http://www.microsoft.com/click/services/Redirect2.ashx?CR_EAC=300135395
2. run cmd as admin
3. cmd => cd \Program Files (x86)\Windows Kits\8.1\Debuggers\x64\
4. cmd => windbg.exe -IA

5. open WinDBG => Start > All Programs > Windows Kits > Debugging Tools for x64 > WinDBG (x64)
6. set symbol file path :: File => Symbol File Path
7. SRV*C:\SymCache*http://msdl.microsoft.com/download/symbols
8. File > Save WorkSpace

ที่เหลือไปตามต่อได้ใน http://www.tenforums.com/tutorials/5558-windbg-basics-debugging-crash-dumps-windows-10-a.html

C# Splitting a string into chunks of a certain size (one-line)

List a = text.Select((c, i) => new { Char = c, Index = i }).GroupBy(o => o.Index / 4).Select(g => new String(g.Select(o => o.Char).ToArray())).ToList();

http://stackoverflow.com/a/1450808

PHP PDO: Text Encoding

$dbh = new PDO(“mysql:$connstr”, $user, $password);
$dbh->exec(“set names utf8”);

http://stackoverflow.com/a/4361485

MySQL C# Text Encoding

Charset=utf8

“Server=localhost;Database=test;Uid=test;Pwd=test;Charset=utf8;”

http://stackoverflow.com/a/8296742

How To “arp -a” In IPv6

Windows:
netsh int ipv6 show neigh

Linux:
ip -6 neigh show

http://midnightfreddie.com/how-to-arp-a-in-ipv6.html