'FYI' Category

  • HOWTO: Integrate Visual Studio and DiffMerge

    April 25, 2011

    Go to Tools->Options /Source Countrol/VSTFS-Configure User Tools… View: .* C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe /title1=%6 /title2=%7 %1 %2 Merge: .* C:\Program Files (x86)\SourceGear\DiffMerge\DiffMerge.exe /title1=%6 /title2=%8 /title3=%7 /result=%4 %1 %3 %2

  • Django is slow?

    March 2, 2010

    Check that Debug=False and that Google Analytics is off! In my case analytics slows speed dramatically.

  • Bitwise gems – fast integer math

    September 24, 2009

    Found an interesting link: how to speed arithmetic operations, e.g.: x = x * 2; x = x * 64; //equals, but 300% faster: x = x << 1; x = x << 6; Others: http://lab.polygonal.de/2007/05/10/bitwise-gems-fast-integer-math/ Compiler I think does all of those tricks.

  • JavaScript frameworks

    September 15, 2009

    For testing JavaScript we use YUITest (http://developer.yahoo.com/yui/yuitest/) – it has all necessary assertions, is able to run asynchronous tests, simulate user clicks and keypresses and moreover it has the ability to build test suites and send their results in xml. I should say that guys from Yahoo are great – not every framework has so […]

  • Test that alert was called in JavaScript

    September 15, 2009

    We started to write tests for JavaScripts in our web UI to ‘freeze’ it and not to be worried when making changes… So, we have a function that checks some form’s data and displays a message if something is wrong. Messages are displayed via alert function and I needed to test that alerts are showed. […]

  • urllib and cookies

    September 10, 2009

    urllib doesn’t have cookie support and it’s difficult to test a django application that uses sessions as session id is stored in the cookies. However, urllib2 is able to handle cookies: import urllib2, cookielib jar = cookielib.CookieJar() handler = urllib2.HTTPCookieProcessor(jar) opener = urllib2.build_opener(handler) urllib2.install_opener(opener) data = urllib2.urlopen(someurl).read() Source: http://coding.derkeiler.com/Archive/Python/comp.lang.python/2006-04/msg04229.html

  • Django + new thread v.2

    September 4, 2009

    Here I wrote about creating a new thread in django-application, where I had some difficulties with created thread as it was killed by Apache after some time. So I had to create a new task by opening another link via urllib. I was OK with that until I had to work with session. As session […]

  • Maximum of GET request line

    September 4, 2009

    Apache has a setting which configures the maximum length of HTTP request: http://httpd.apache.org/docs/2.2/mod/core.html#limitrequestline Description: Limit the size of the HTTP request line that will be accepted from the client Syntax: LimitRequestLine <var style=”font-style: italic;”>bytes</var> Default: LimitRequestLine 8190 Context: server config Status: Core Module: core However for IE it’s not true: I found out that if request length is over […]

  • Empty POST data, IE 6

    September 3, 2009

    IE6 (may be IE7) has an interesting feature(bug). While sending data via POST I get an empty POST dictionary at the server side – all data is lost somehow. I don’t know why, but IE6 doesn’t send data from an url with NTLM authenctication to a non-authenticated. Suprisingly, but IE8 does’t have this behaviour. So I had […]

  • Таблица умножения для ребенка

    July 21, 2009

    Попросили тут написать простенькую программу, которая появлялась бы при запуске компьютера и которую нельзя было закрыть, пока ребенок не ответить на определенное количество примеров. Я написал, а потом подумал, что такая программа может быть еще кому-то быть полезной.

Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org