Posts

javascript - How to avoid using overflow -

i creating navigation/menu bar , want move horizontally cursor moves on it. working not want set overflow property hidden because have drop down tabs should appear when cursor on menu option. if use overflow cut off @ point drop down cut off. inside scroll contains menu options. var sum = 0; $("#scroll li").each(function () { sum += $(this).width() + parseint($(this).css('paddingleft')) + parseint($(this).css('paddingright')) }); $("#scroll").css('width', sum); $("#holder").mousemove(function (e) { x = -(((e.pagex - $('#scroll').position().left) / $("#holder").width()) * ($("#scroll").width() + parseint($("#scroll").css('paddingleft')) + parseint($("#scroll").css('paddingright')) - $("#holder").width())); $("#scroll").css({ 'marginleft': x + 'px' }); }); #scroll{ height: 30px; line-height: 30...

php - How i can enable WordPress Posts Pagination -

how can enable pagination in page (template page wordpress) my code <?php $catquery = new wp_query( 'cat=2&posts_per_page=10' ); while($catquery->have_posts()) : $catquery->the_post(); ?> <div> <br /> <div class="news"><!-- start news box --> <div class="img_news"><!-- start image news --> <?php $url_thumb = wp_get_attachment_url( get_post_thumbnail_id($post->id) ); ?> <img class="img_thumbs" title="" alt="" src="<?php echo $url_thumb; ?>"> </div><!-- end image news --> <div class="title_news"><!-- start title news --> <h2> <?php the_title(); ?> </h2> <div class="details"> <?php the_content_limit(500, "read more..."); ?> </div> </div><!-- end title news --> <hr> </div><!-- end news box --> </div> <?php endwhile...

c++ - ConvertUTF16toUCS4 in Apache Xerces -

the source code apache xerces: convertutf16toucs4 is: conversionresult convertutf16toucs4( utf16 **sourcestart, utf16 *sourceend, ucs4 **targetstart, const ucs4 *targetend) { conversionresult result = ok; register utf16 *source = *sourcestart; register ucs4 *target = *targetstart; while (source < sourceend) { register ucs4 ch; ch = *source++; if (ch >= ksurrogatehighstart && ch <= ksurrogatehighend && source < sourceend) { register ucs4 ch2 = *source; if (ch2 >= ksurrogatelowstart && ch2 <= ksurrogatelowend) { ch = ((ch - ksurrogatehighstart) << halfshift) + (ch2 - ksurrogatelowstart) + halfbase; ++source; }; }; if (target >= targetend) { result = targetexhausted; break; }; *target++ = ch; }; *sourcestart = source; *...

java - what these buzz words actually stand for? -

m2e :- know maven 2 eclipse 2 stands maven version 2 or english literal "to" ? j2ee :- java 2 enterprise edition 2 stands java version 2 or english literal "to" ? both "version" numbers. j2ee no longer used, it's java ee. i suspect m2e meaning maven 2, evolved name.

Whether SIM card is available or not in windows phone universal project -

i'm creating winrt universal project mobile , tablet. i want check: in mobile application, sending sms text sms application this. var message = new chatmessage(); message.recipients.add("9999"); message.body = "r*" + voucherno + "*" + accountno + "*" + pin; await chatmessagemanager.showcomposesmsmessageasync(message); i want place check above whether user has inserted sim card or using mobile out sim card. app not crashing due not big issue if couldn't place check here (as have searched alot got nothing i'm assuming not possible right not in winrt check sim card availability), link of documentation/blog/so question regarding mentioned can't check sim card availability helpful. thanks. bool simavailable = false; var device = await chatmessagemanager.gettransportsasync(); if (device != null && device.count > 0) { foreach (var item in device) { if (item.transportfriendlyname != "...

oracle - Different queries or One? Which one is feasible? -

i have following queries want delete 3 employees in admin department. delete employee_tbl emp_id = 123 , emp_dep = 'admin'; delete employee_tbl emp_id = 456 , emp_dep = 'admin'; delete employee_tbl emp_id = 789 , emp_dep = 'admin'; i thinking write single query like- delete employee_tbl emp_id in (123, 456, 789) , emp_dep = 'admin'; is correct way write query in case of performance , all? confused. any explanation appreciated. both queries have pros , cons 1) multiple selects. i rather rewrite query using bind variables. delete employee_tbl emp_id = :l_emp_id , emp_dep = :l_emp_dep; and run multiple times. this way, oracle don't hard parse query every time, , oracle re-uses explain plan reducing latch activity in shared global area(sga) minimizing cpu usage. more details bind variables - key application performance but 1 glitch here is, every execution of query actually, needs switch client sql engine process.(con...

objective c - xcode, ios, Can't move buttons around screen -

Image
the output on console: 2015-07-02 17:31:49.105 make maths fun[15079:90b] but_1.center.x = 155.000000 but_1.center.y = 90.000000 2015-07-02 17:31:49.105 make maths fun[15079:90b] but_2.center.x = 155.000000 but_2.center.y = 140.000000 the code: but_1.center = cgpointmake(155, 90); but_2.center = cgpointmake(155, 140); screenshot: the output says @ x , y when run program had them on viewcontroller try disable use auto layout option , try again. hope helps.