Posts

javascript - What's the best way to stop a click event propagating in IE9 beta? -

dojo.stopevent no longer appears stop default action of click event (or submit event) in ie9. how has event handling changed ie8 ie9 , what's best way stop event in ie9? event.preventdefault() doesn't appear stop click event happening either. this should resolved of dojo 1.6 rc1. give try. http://download.dojotoolkit.org/release-1.6.0rc1/ http://bugs.dojotoolkit.org/ticket/12257

c++ - Lightweight spinlocks built from GCC atomic operations? -

i'd minimize synchronization , write lock-free code when possible in project of mine. when absolutely necessary i'd love substitute light-weight spinlocks built atomic operations pthread , win32 mutex locks. understanding these system calls underneath , cause context switch (which may unnecessary quick critical sections spinning few times preferable). the atomic operations i'm referring documented here: http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/atomic-builtins.html here example illustrate i'm talking about. imagine rb-tree multiple readers , writers possible. rbtree::exists() read-only , thread safe, rbtree::insert() require exclusive access single writer (and no readers) safe. code: class intsettest { private: unsigned short lock; rbtree<int>* myset; public: // ... void add_number(int n) { // aquire once locked==false (atomic) while (__sync_bool_compare_and_swap(&lock, 0, 0xffff) == false); // perform...

Java Date format of '2010-10-11T22:10:10.000Z' -

what date format '2010-10-11t22:10:10.000z' ? that's iso8601 date format. if you're looking parse date in format (your question doesn't make intentions clear), have @ these other questions.

php - PDO::PARAM for type decimal? -

i have 2 database fields `decval` decimal(5,2) `intval` int(3) i have 2 pdo queries update them. 1 updates int works ok $update_intval->bindparam(':intval', $intval, pdo::param_int); but can't update decimal field. i've tried 3 ways below, nothing works $update_decval->bindparam(':decval', $decval, pdo::param_str); $update_decval->bindparam(':decval', $decval, pdo::param_int); $update_decval->bindparam(':decval', $decval); it seems problem database type decimal ? there pdo::param field of type decimal ? if not, use workaround? there isn't pdo::param decimals / floats, you'll have use pdo::param_str .

Drupal 6 & 7 unset Javascript from header -

edit: question applies drupal 6 & 7, though code example drupal 6. people have provided answers useful both versions of drupal. i'm working in drupal creating mobile theme drupal 6 website , trying remove unnecessary core , module javascript , css through preprocess_page function in template.php file. css files removed, can't seem javascript removed. here's i've got. in example, removed except the ajax scripts. any idea i'm doing wrong? <?php function mytheme_preprocess_page(&$vars) { //////// remove unneccesary drupal head files mobile version // css $css = drupal_add_css(); // core unset($css['all']['module']['modules/user/user.css']); unset($css['all']['module']['modules/node/node.css']); unset($css['all']['module']['modules/system/defaults.css']); unset($css['all']['module']['modules/system/system.css']); ...

jquery - How can you pass GET values to another url in php? GET value forwarding -

ok, i'm using jquery's ajax function , it's having trouble passing url http address. i'm hoping "get" values , send them url — so: local php file begin passed values, in turn forwards values url. maybe curl answer? don't know. it's got short answer know. pseudo code: //retrieve values $var retrieve [get] //passing url send values url ($var, url_address) edit: it's cross scripting solution javascript. if want redirect user: header('location: http://example.com/page.php?' . http_build_query($_get, '', '&')); die(); if want fetch page, use this: file_get_contents('http://example.com/page.php?' . http_build_query($_get, '', '&'));

How do I sign exes and dlls with my code signing certificate -

(i purchased code signing cert thawte , have been going out of mind frustration @ whole process. what have them are: .spc / .p7b file .pvk file (note not have pfx file them. god knows why, have been fighting tech support week) in case find "help" links on site , @ ms signcode.exe useless me because can't find exe on machine, have signtool.exe. unfortunately mystified @ command line parameters listed on ms site . specifically, parameters use , values? tried thought obvious not work @ all. i can signing wizard work, need work non-interactively in hudson ci batch file. it doesn't seem should difficult, far black magic. thanks help first, can generate own pfx file using pvk2pfx tool described @ http://msdn.microsoft.com/en-us/library/ff549703(vs.85).aspx something like pvk2pfx -pvk cert.pvk -spc cert.spc -pfx cert.pfx -pi password ought trick. secondly, signtool tool you're after. http://msdn.microsoft.com/en-us/library...