Posts

How can I filter out profanity in base36 IDs? -

i want use base36 in web application developing... id visible users url, want filter out profanity. has solved this? or real problem? does make sense skip numbers in database sequence? well, rather try amass swear words possible, filter out vowels. that'll leave plenty of permutations in space. admittedly, you've cut down base 36 base 31, base 31 numbers valid base 36 numbers assuming same symbol set (a-z0-9). if bothers you, replace 5 vowels other non-magic 7-bit ascii !,@,$,% , (. granted, may end sh1t , fck, profanity in mind of reader. -oisin

jquery - Simplemodal Scroll Bar and Close Image Issue -

i have simplemodal jquery popup has have overflow set auto because resulting list can long. scroll bars show fine, close image gets shoved behind vertical scroll bars , simplemodal border. if comment out the overflow: 'auto', line close image shows fine on top of border. have tried setting z-index image high , did nothing. makes horizontal scroll bars show because close image behind vertical scroll bars. my jquery code jquery('#custlookupresults').modal({ containercss: { padding: 0, overflow: 'auto', maxheight: 800 }, onshow: function (dlg) { $(dlg.container).css('width', 650); $(dlg.container).css('height', 'auto'); }, overlayclose: true, opacity...

asp.net mvc - Set up staging and production environmets and minimizing downtime on simple hosting -

i have asp.net mvc 3 application, wouldbebetter.com , hosted on windows azure. have introductory special subscription package free several months surprised @ how expensive has turned out (€150 p/m on average!) have started paying it. way money site not going generate money time i've decided move regular hosting provider (discountasp.net). one of things i'll miss though, separated staging , production environments azure provides, along zero-downtime environment swap. my question is, how go "simulating" staging environment while hosting on traditional provider? , best shot @ minimizing downtime on new deployments? thanks. update: chose answer chose not because consider best method, because makes sense me @ point. i use discountasp myself. it's pretty basic hosting sure, little behind times. have found creating subdirectory , publishing beta/test/whatever versions there works pretty well. it's not fancy or pretty, job done. in order need...

java - spring mvc forward to jsp -

i have web.xml configured catch 404s , send them spring controller perform search given original url request. the functionality there far catch , search go, trouble begins arise when try return view. <bean class="org.springframework.web.servlet.view.contentnegotiatingviewresolver" p:order="1"> <property name="mediatypes"> <map> <entry key="json" value="application/json" /> <entry key="jsp" value="text/html" /> </map> </property> <property name="defaultcontenttype" value="application/json" /> <property name="favorpathextension" value="true" /> <property name="viewresolvers"> <list> <bean class="org.springframework.web.servlet.view.beannameviewresolver" /> <bean id="viewresolver...

asp.net - Custom validator only fired on first button click? -

i have custom validator , other validators on page. whenever click submit button first time fires custom validator , when click button second time it's validating rest of validators. please let me know if have solution. thanks check page_load make sure not hiding or enabling after second call. had similar problem before , confused heck out of me until realized manipulating panel in page_load contained validator. other that, need post code (your page_load , click event).

debugging - PHP Dates: Syntax Debug on PHP if conditional -

in following code $start start date manually entered datepicker , $end separate key also, entered via datepicker. these being compared against date('ymd'), today. early in code plugin have code (where same argument returns true): //parse end date if($end): $end = explode('-', $end); $end = mktime($hour, $_post['_date_minute'], 0, $end[0], $end[1], $end[2]); if ((date('ymd',$start) < date('ymd',$end)) && (date('ymd',$end) >= date('ymd'))) { $compare = date('ymd'); //overwrite start date $compare } else { $compare = date('ymd', $start); } endif; later in code, same argument returns false here: function event_list_date($start_or_end, $format, $echo = true){ global $post; // check end date, if it's greater today , start date less or equal today, round off it's today , doesn't event past // origi...

android - Error inflating class <unknown> -

i trying work way in ui. trying set statelistdrawable list entries. trying change color of list item's layout when item pressed, , while list item pressed want change color of text well. i getting following error stack: e/androidruntime( 360): fatal exception: main e/androidruntime( 360): android.view.inflateexception: binary xml file line #8: error inflating class <unknown> e/androidruntime( 360): @ android.view.layoutinflater.createview(layoutinflater.java:513) e/androidruntime( 360): @ com.android.internal.policy.impl.phonelayoutinflater.oncreateview(phonelayoutinflater.java:56) e/androidruntime( 360): @ android.view.layoutinflater.createviewfromtag(layoutinflater.java:563) e/androidruntime( 360): @ android.view.layoutinflater.rinflate(layoutinflater.java:618) e/androidruntime( 360): @ android.view.layoutinflater.inflate(layoutinflater.java:407) e/androidruntime( 360): @ android.view.layoutinflater.inflate(layoutinflater.java:320) e/androi...