IE vs Firefox and Chrome and jQuery val() vs attr(‘value’)

Hi folks I am currently fixing one bug at work and found an interesting problem. Something works in IE but doesn’t work on Firefox and Chrome. After some debugging I found the problem And it is used in JavaScript This works only in IE. In Firefox and Chrome it returns null. According to documentation jQuery […]

Get EXIF metadata with PowerShell

Hi folks Sometimes we need to extract some exif data from images. We could do this with PowerShell. Here is the most efficient way to do this PSUsing was described in the previous blogpost Here is the list of tags: http://www.digitalpreservation.gov/formats/content/tiff_tags.shtml For example, date taken tag is http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/datetimeoriginal.html Date in the following format: “yyyy:MM:dd HH:mm:ss” […]

svn for git-addicted or git-svn gotchas and WTFs – Part 4

Part 3 Hi folks SubGit After the frustration with complicated cherry-picks I decided to try SubGit again This time I’ve managed to configure it. Comparing to vanilla git-svn it cloned svn repo much faster. However, I found that it does not populate svn:mergeinfo metadata on cherry-picks, so there is no point for me to use […]

Execution of external commands in PowerShell done right

Part 2 Part 3 Hi folks Execution external (native) commands in PowerShell is not an easy thing. It looks like it is simple but it has a lot of downsides. We’ll consider the following command And use it like that It writes a message to STDOUT, a message to STDERR and returns some exit code. […]

PowerShell auto variable $LastResult

Hi folks If you work a lot with PowerShell you may had the cases when you tried something and then you want to save it to the variable. Many REPLs has a concept of last result variable but not PowerShell, unfortunately. Here are some resource that I’ve used http://stackoverflow.com/questions/14351018/powershell-is-there-an-automatic-variable-for-the-last-execution-result http://dmitrysotnikov.files.wordpress.com/2011/09/scripts-tec-2011-jeffrey-snover-proxy-functions.pdf http://get-powershell.com/post/2008/06/25/Stuffing-the-output-of-the-last-command-into-an-automatic-variable.aspx http://poshcode.org/803 But all these […]

sqlcmd – Get real sql error line number

Hi folks Consider the following sql script When you run with SQLCMD When you run in SQL Server Management Studio with SQLCMD Mode enabled you get But when you double click on the error line the query editor will jump to the problematic line. Reported Line 2 means a line number relative to the batch. […]