Posts

c# - Redirecting to a page using mvc -

i have first method below contained in dll. decided extend can have control on page redirect to. @ moment when pass returnurl nothing happens. page returns view entered values. ? want able redirect page resides in path /views/rental/index how can achieve that? [httppost] public virtual actionresult createaccount(createnewaccountinfo createnewaccountinfo, website website, string returnurl) { if (this._accountmanager.usernamealreadyexists(createnewaccountinfo.username)) this.modelstate.addmodelerror("createnewaccountinfo", errormessageprovider.createnewaccountinfo_username_alreadyexists); if (this.modelstate.isvalid) { this._accountmanager.createnewaccount(createnewaccountinfo); return this.redirecttoreturnurl(returnurl); ...

java - BigInteger/SecureRandom in jar very slow when called from Coldfusion -

i have class creates random string based on biginteger. works fine , efficient when run standalone (windows, 22ms). private securerandom random = new securerandom(); public string testme() { return new biginteger(130, random).tostring(30) } when code put library (jar) , called coldfusion (9.0.2), code hangs 1 1.5 minutes (on server, linux). code called cfc: <cfset mytest = createobject("java", "com.acme.mytest")> <cffunction name="runtest" access="public"> <cfset var value = mytest.testme()/> </cffunction> what missing? i astonished difference not noticable on windows box. there different securerandom strategies. on window using random seed based on host name, windows can wander off dns reverse lookup first time. can time out request after minute or so. i ensure have recent update of java because believe problem fixed in update of java 6. (not securerandom, first network operation ...

css - Scrollable dynamic content -

i building custom lightbox jquery , wondering when need scroll form responsive site. on screen sizes form grows below fold when go scroll page site behind scrolls instead. how put focus on new dynamic content scrollability? www.evoke.me click contact button after scrolling down page bit. here code working with. $('#contact').on( 'click', function(e){ e.preventdefault(); $('#modal').remove(); $('body').append('<div id="modal"></div>'); $("#modal").load('/forms/contact-form.html').hide().fadein(1000); }); #modal{ position:absolute; overflow:auto; top:0; z-index:5000; width:100%; height:100%; background:rgba(255, 255, 255, .95) url(../images/diag-pattern.png) repeat 0 0; } the problem not getting focus on dynamic content. problem content not scrollable because used position: fixed without overflow: auto . make contact form sc...

jquery mobile - mmenu fixed header opens good, but closes without animation -

i'm working jquery mobile , mmenu.js jquery plugin. , i'm trying set header fixed. i've tried in 2 different ways: 1) jquery mobile option: <div data-role="header" data-theme="a" data-position="fixed"> 2) css: <div data-role="header" data-theme="a" style="position: fixed; width: 100%;"> in both cases, can open menu correctly, header animation. when close it, close without animation, header appear. thanks help!

objective c - NSDateFormatter issue involving week numbers -

on machine (regional settings united states), default "short" date format set "1/5/13" (month/day/year). in system preferences, have appended week number, "1/5/13 1". my problem code, try convert string date: nsdateformatter *dateformatter = [[nsdateformatter alloc] init]; [dateformatter setdatestyle:nsdateformattershortstyle]; nsdate *date = [dateformatter datefromstring:@"1/5/13 1"]; nslog(@"date: %@", date); on machine, prints: date: 2000-01-01 05:00:00 +0000 that's 2000 , not close 2013 . what causing problem? i'm late discussion, , have seen number of solutions offered, see wrong them 2 incompatible date format elements being used together. original approach failed because string you're attempting date doesn't match nsdateformattershortstyle provides for. if you're going evaluate week of year, you've got use capitalized form of year; provides "week of year" kind of cal...

jquery - Javascript else if statement not working -

i have following: html <div class="tab-pane" id="message"> <textarea rows="4" cols="50" id="send_message" placeholder="enter text ..."> </textarea> <a href="#message" class="btn btn-large btn-info" data-toggle="tab">ok</a> <a href="#message" class="btn btn-large btn-info" data-toggle="tab">cancel</a> javascript $('#message').click(function(){ if($("a", this).is(":contains(ok)")) { console.log("im in ok!!"); } else if($("a", this).is(":contains(cancel)")) { console.log("im in cancel!!"); } }); this works fine when hit ok button , executes expected, when hit cancel code in ok executed only. cancel code never executes! doing wrong? this element event bound to. it's always #message , t...

facebook - How To Print Out A <List>Reference object in java? -

i using spring social api create facebook application. using list<reference> friends = facebook.friendoperations().getfriends(); list of friends. want print out list when prints out [org.springframework.social.facebook.api.reference@7606931d, i have tried using @override public string tostring() { return tostringbuilder.reflectiontostring(this); } but still prints out references. there anyway print out need? loop through list of references, , print each of them individually, this: for (reference friend : friends) { system.out.println(friend.getname()); }