Monthly Archives: March 2016

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

c# equivalent of php’s password-verify()

using CryptSharp;
bool matches = Crypter.CheckPassword(“password goes here”, “hash goes here”);

http://stackoverflow.com/a/22616852

Answer:Is there an equivalent for var_dump (PHP) in Javascript

function dump(obj) {
var out = ”;
for (var i in obj) {
out += i + “: ” + obj[i] + “\n”;
}

alert(out);

// or, if you wanted to avoid alerts…

var pre = document.createElement(‘pre’);
pre.innerHTML = out;
document.body.appendChild(pre)
}

http://stackoverflow.com/a/323809

การทำ Workspace แบบ AutoCAD Classic ใน AutoCAD 2015

พิมพ์คำสั่ง TOOLBAR => ช่อง Command List พิมพ์ STANDARD => ลากไปวางที่หน้าจอ
คลิกขวาเลือก tool ที่ต้องการ
Untitled