Posts

javascript - JQuery datepicker's button "behind" menu div -

Image
i'm working on mvc website. i have menu div @ top, , on page there text inputs added jquery datepicker, seen in picture: when mouse pointer @ red circle, , click, calender should go previous month. happens however, menu @ gets clicked , not calender (as can see in link on bottom) , causes controller call , page redirect. have tried fooling around z-index on divs not solve problem, indexed fine visually. does know of approach can take on problem?

c# - Item enabled on form load even though it's IsEnabled is bound to a presumably false value -

i expect lastnumberweeks numericupdown disabled on form load isn't. once switch radio selection , forth works properly, not on first load. outside of explicitly setting value in code behind can (i don't want have use code behind because of 1 case). <radiobutton groupname="dayrangegroup" content="last number of usable occurences:" name="lastusableoccurancesradiobutton" ischecked="true" /> <wincontrols:numericupdown x:name="lastusableoccurances" isenabled="{binding elementname=lastusableoccurancesradiobutton, path=ischecked}" /> <radiobutton groupname="dayrangegroup"content="last number of weeks:" name="lastnumberofweeksradiobutton" /> <wincontrols:numericupdown x:name="lastnumberweeks" isenabled="{binding elementname=lastnumberofweeksradiobutton, path=ischecked}" /> i tested xaml textbox instead of...

parsing - In perl, how to loop through file, parse line and then compare values in the lines? -

i'm new perl , trying figure out how parse lines within tab-delimited file , compare values parsed lines value , print line. for example: want print out lines have numbers greater 3. a 5.4 6.9 3.1 b 10.2 3.4 7.6 c 1.9 2.6 2.3 i output a 5.4 6.9 3.1 b 10.2 3.4 7.6 thanks in advance edit: sorry, explanation not clear , test case not good. find lines have numbers greater 3. for example: if change 5.4 of line 2.4, don't want code print line because contains number less 3. the program below you. works reading data filehandle data can incorporated program itself. read data elsewhere have open source , read filehandle instead. each line read $_ system variable , divided fields using split which, default, splits $_ on whitespace. fields put array @data . the grep function returns number of elements of list pass given test. slice @data[1..$#data] of @data array except first element (as array indices start @ zero). the c...

css sprites - Why would someone use pure CSS styled buttons over a bitmap/SpriteSheet technique? -

we have ongoing discussion @ job best way deploy buttons on our websites. art directors ask buttons in pure css, prefer make spritesheets in photoshop. argument- kerning, text-effects drop-shadow , aliasing better coming out of photoshop. argument- lose seo points, translation engines can't change buttons. i'm sure there arguments both sides- missing obvious either of these arguments? well, one, pure css buttons load faster, few lines of code. many things can't done in css/js, have images, , consume bandwidth. can save bandwidth, should. alone killer argument if speed priority project. . about effects looking better out of photoshop... wouldn't neccessarily agree here. don't think browser implementations bad in way, have beat those, first. . also, drawing button image cost more time writing lines of code. same applies changing button. maintainability on css side ;) . i don't think translation argument applies. if "localization eng...

oop - What's it called when people try to overuse Design Patterns? -

there must name when people try overuse design patterns. know terms anti-patterns , code-smell (among others), dont seem apply situation. dont me wrong, think patterns quite useful , powerful, many times see questions , code people seem try force use of pattern used pattern. more not simplicity absolute best way go. i did search , came this: when design patterns problem instead of solution? find interesting, dont agree with. if tag doesnt exist on stack overflow, @ least reserve right create please. not create new tag :) some ideas of called follow: over patternizing over patternized design pattern overdose i'd call overengineering -- doesn't need patterns, either. use kiss principle (as note).

How do you handle Java Singletons when a network connection fails? -

i have created singleton class contains instance of memcachedclient (this object requires making connection server providing concrete example). initialize memcachedclient in static init block. if memcachedclient cannot create instance due connection error, means class worthless because has null memcachedclient instance. my question: best solution type of situation? how other people handling situation? the question (as stated in title) broad, depends of singleton for. in case, obvious question: if initialization fails, can expect issue solved in near future? cost of keep trying (redesign app not crashes downward in weird ways) instead of rebooting app? if not expect error solved easily, crash application (with proper logs/alerts/notifications). if want keep running until issue resolves, steps be: 1) pass initialization constructor of singleton (why put in static block if can control access constructor). 2a) while constructor fails, calls getinstance return null. ...

android webview not functioning on a page with websockets -

i have chat web application on spring mvc. used android webview chat page, using websockets. can see page on android webview when type , click send doesn't respond. page works fine when deploy on browser using jetty. webview= (webview)findviewbyid(r.id.webscreen); webview.setscrollbarstyle(webview.scrollbars_outside_overlay); webview.getsettings().setjavascriptenabled(true); webview.getsettings().setjavascriptcanopenwindowsautomatically(true); webview.getsettings().setsupportmultiplewindows(false); webview.getsettings().setsupportzoom(false); webview.setverticalscrollbarenabled(true); webview.sethorizontalscrollbarenabled(false); webview.setclickable(true); webview.setlongclickable(true); webview.setbackgroundcolor(0); webview.getsettings().setjavascriptcanopenwindowsautomatically(true); webview.getsettings().setlighttouchenabled(true); ...