Posts

c# - Why is IQueryable lacking all the extension methods that IQueryable<T> has? -

same ienumerable vs ienumerable<t> . oversight? or there problem when don't have type specified makes implementing extensions .count() , .where() , etc impossible? from docs : the iqueryable interface intended implementation query providers. supposed implemented providers also implement iqueryable<t> . if provider not implement iqueryable<t> , standard query operators cannot used on provider's data source. ienumerable artifact of times when .net did not have generics ( don't mean deprecated, of course ). has lived on backward compatibility, after generics , hence ienumerable<t> introduced. iqueryable keeps consistency. basically, given there generics now, , given advantages, makes useful implement these extensions on generic interfaces. non-generic ones can converted generic ones using cast<t>

border - NextGEN Gallery - album showing too much space with Chrome -

i have problem nextgen gallery albums on site ( tornaia.com/bilder/ ) in chrome. borders around album-thumbnail big, have scroll way down next album. in firefox , ie shows here have schreenshot of how in chrome: ( http://tornaia.com/wp-content/uploads/2013/07/chrome.jpg ) and here how in firefox (how should looking): ( http://tornaia.com/wp-content/uploads/2013/07/firefox.jpg ) any idea why happens? or better: how fix it? thank you! never mind, solved myself :) i put .ngg-album { height:130px; } in style.css file. works ie, firefox , chrome. other browsers :

Mixing Javascript and jQuery? -

main question: possible use javascript conditional , use jquery code? here non-working example: <script> //<![cdata[ if (location.pathname == "/searchresults.asp" || location.pathname.indexof("-s/") != -1 || location.pathname.indexof("_s/") != -1) $('.colors_productname span').css("background-color", "#f7f7f7"); //]]> </script> the javascript conditional provided ecommerce platform (volusion) target category pages (the jquery doing). asked them if javascript code still work given urls dont include "/searchresults.asp" (one of them "/meats-s/3393.htm"), assured me should still work. secondary question: "location.pathname.indexof" lines do? jquery , javascript not separate languages. jquery library written in javascript, valid jquery statement valid javascript statement. q2: location.pathname path of url after domain name. e.g http://www.google.com/s/g...

Java SimpleDateFormat timezone parsing -

i'm curious how java's simpledateformat decides when increment/decrement passed in time based on timezone it's set to. let's have date 06/04/2013. set timezone 1 far away me(i'm in gmt-5). let's use gmt+8. i call simpledateformat df = new simpledateformat( "m/d/yy" ); df.settimezone( timezone.gettimezone( "gmt+8" ) ); df.parse( enddate ) // returns 06/**03**/2013 //enddate string it returns 06/03/2013. why decrement it? edit: i'm asking reference point java uses knock date 6/3 if set gmt+8. there's logic says hey i'm not on current timezone let's change it. since i'm passing in string don't see be. i assume default if don't provide timezone in string default gmt. you're in gmt-5, , you're parsing string representing moment in gmt+8 time zone. so, date 06/04/2013 in fact 06/04/2013 00:00 gmt+8 . date @ gmt, have subtract 8 hours: 06/03/2013 16:00 gmt . , date @ gmt-5, have subtra...

Converting "yield from" statement to Python 2.7 code -

i had code below in python 3.2 , wanted run in python 2.7. did convert (have put code of missing_elements in both versions) not sure if efficient way it. happens if there 2 yield from calls below in upper half , lower half in missing_element function? entries 2 halves (upper , lower) appended each other in 1 list parent recursion function yield from call , use both halves together? def missing_elements(l, start, end): # python 3.2 if end - start <= 1: if l[end] - l[start] > 1: yield range(l[start] + 1, l[end]) return index = start + (end - start) // 2 # lower half consecutive? consecutive_low = l[index] == l[start] + (index - start) if not consecutive_low: yield missing_elements(l, start, index) # upper part consecutive? consecutive_high = l[index] == l[end] - (end - index) if not consecutive_high: yield missing_elements(l, index, end) def main(): l = [10, 11, 13, 14, 15, 16, 17, 18, 20] print(list(missing_elements...

How to pass along a string in HTML PHP -

#!/usr/local/bin/php <!doctype html> <html> <head> <script> function sendinfotochart() { document.getelementbyid("firstn").innerhtml=document.getelementbyid("firstname").innerhtml; } </script> </head> <body> <form action=""> first name: <input type="text" name="firstname" id="firstname"><br> <button onclick="sendinfotochart()"> submit </button> </form> <br><br> <table border="1" cellpadding="4" style="font-style:italic;"> <tr><td><p id="firstn"></p></td><td>middlename</td><td>last name</td></tr> </body> </html> i trying pass word type in text field , pass table when click button. cant figure out how pass along... ahead of time! you have use `value property of text box text , prev...

php - APC cache shared between different directories? -

i'm working on php project in team. team members have own working directory on centos/apache server, this. /home/user1/public_html/project/xxxxx.php /home/user2/public_html/project/xxxxx.php and on. write , upload php files there , test our work accessing server browser. the problem apc caches php files without distinguishing directories. so, after accessing user1/project/xxxxx.php, cached, accessing user2/project/xxxxx.php produces result user1's php. i think because apc shares cache between different processes and/or paths. there way turn feature off? reason cannot turn off apc, need it. thank in advance. try clearing apc cache. can use php's built-in function apc_clear_cache( clear system cache. there's apc_clear_cache('user') . calling clear user cache. hope helps!