Posts

java - Spring AOP proxy doesn't work as expected -

actually i'am confused behavior of spring proxies. think know main difference between proxy mechanisms of j2ee, cglib , aspectj. have aspectj auto proxy enabled in configuration class , aspectj included in class path. my configuration @configuration @enableaspectjautoproxy(proxytargetclass = true) public class applicationconfiguration { ... } aspectj dependency <dependency> <groupid>org.aspectj</groupid> <artifactid>aspectjrt</artifactid> <version>1.8.5</version> </dependency> by using simple setup i've assumed bean injection work intended. instead application results in illegalargumentexception s messages "can not set [...] field [...] com.sun.proxy.$proxy30". means spring uses j2ee proxy service, aspectj proxy enabled. finally i've figured out interfaces on service causes behavior. seems spring decides use j2ee proxy when service implements interface. if remove them, works. failure...

jquery - How can I keep all html in session with webservice? -

i want keep full html in page in session using webservice set session step throw exception. object reference not set instance of object. my functions [webmethod(description = "gsetsession")] [scriptmethod(usehttpget = false)] public void setsession(string html) { httpcontext.current.session["html"] = html; } [webmethod(description = "getsession")] [scriptmethod(usehttpget = false)] public string getsession() { if (httpcontext.current.session["html"] != null) { return httpcontext.current.session["html"].tostring(); } else { return ""; } } in web methods, make sure enable session [ webmethod(description="get session",enablesession=true)] reference

knockout.js - Add class through knockout if viewmodel property is not null -

i have view model property so var customproperties = json.parse(this.model.get('customproperties')); viewmodel.clickeventaction = customproperties.clickeventaction; //returns string such "here" or "there" and trying see if exists in html , if assign class element. have click happen if not null cut down on click events called. i have tried several different ways nothing seems work. like... data-bind="class: {thisisclass: clickeventaction()} data-bind="class: {thisisclass: clickeventaction} data-bind="attr: {class: clickeventaction()} data-bind="css: {thisisclass: clickeventaction() < 0} and i've tried several other ways, nothing seems want work. since property not observable not function. can evaluate directly without "()". data-bind="css: clickeventaction == null ? 'class-name' : '';" where "class-name" class want assign dom object.

javascript - Does calling stop() on a source node trigger an ended event? -

according web audio api specs http://webaudio.github.io/web-audio-api/ i can assign event handler runs when source node done playing (the onended attribute of source node). however, if call stop(0) on audio source node, event triggered? specs don't seem clear on that. i can try out on various browsers, want know proper standard behavior this. ended event fire when source node proactively stop ped? or ended event fire if audio finishes playing? yes does. onended event gets fired when audio finished playing or when stop() has been called. example mdn audiocontext docs var audioctx = new(window.audiocontext || window.webkitaudiocontext)(); var button = document.queryselector('button'); var stop = document.queryselector('#stop'); var source; // stereo var channels = 2; // create empty 2 second stereo buffer @ // sample rate of audiocontext var framecount = audioctx.samplerate * 2.0; var myarraybuffer = audioctx.createbuffer(2,...

office365 - How to update mailbox properties of exchange online by scripting? -

how use script/power shell update these properties of office 365 mailbox, such street, city, state, zipcode, workphone, office, webpage etc.? you can use set-user see https://technet.microsoft.com/en-us/library/aa998221%28v=exchg.150%29.aspx , https://technet.microsoft.com/en-us/library/jj984289%28v=exchg.150%29.aspx cheers glen

PHP/MySQL - Rank on Inner Join -

Image
my query @ moment: select * posts p inner join users u on p.author = u.uid inner join usergroups ug on u.usergroup = ug.gid tid_parent = ? this query, example provide following data: i'd rank beside these (using @currank := @currank + 1 rank maybe). when looping out table keep count , print count value rank $c=1; foreach($results $result){ //all table row html echo $c; //all rest of table row html $c++; }

ios - NSURLSession background upload - need to enable background modes? -

i instantiating nsurlsession several background uploads this: sessionconfiguration = [nsurlsessionconfiguration backgroundsessionconfigurationwithidentifier:myidentifier]; everything seems work ok part, wondering if need add in p.list background fetch key if doing background uploads , not downloads?. not able find documentation saying should or should not. on xcode 5 +, know if under capabilities>background modes, should enable or not background fetch, if doing background uploads, note read response after upload complete, considered "download". the official guide background execution declare 3 type of background executions: executing finite-length tasks - using uiapplication method beginbackgroundtaskwithname:expirationhandler: execute finite time task. downloading content in background - using nsurlsession download content. nsurlsession provided app run on separate system level daemon , when done, gets app completion handler. (your abov...