Posts

Previous Row data Using KendoUi MVC Grid - Razor-C# -

i have grid (razor-c#) containing multiple columns/rows , there column named profit/loss .for every row need check previous row data profit/loss column , make calculation put values in current row profit/loss column update html.kendo().grid(model.accounthistory).name("history").columns(c => { c.bound(p => p.datetimecalculated).format("{0:dd-mm-yyyy}"); c.bound("").clienttemplate("#= purchasecriteria(data) #").title(" "); c.bound(p => p.numcontracts).clienttemplate("#= moneyformat(numcontdfracts) #"); c.bound(p => p.entityid); c.bound(p => p.leagueid); c.bound("") .clienttemplate("#= setseasonyear(data) #") .sortable(false) .title("year"); c.bound("") .clienttemplate("#= setseason(data) #") .sortable(false) .title("season"); c.bound(p => p.contra...

php - javascript: allow user to login after session times out -

i want write javascript program html webpage forces user after leaving session idle x minutes (no mouse movement or keys pressed) reenter password resume session. note, not talking destroying session/closing session time goes out, forcing user log out. i'm trying "pause" session having pop box user must type username , password resume work. thanks you use var timeoutholder=settimeout(pausesession,60000*nminutes); and reset time each time user press key window.addeventlistener("keydown", function(e){ cleartimeout(timeoutholder); var timeoutholder=settimeout(pausesession,60000*nminutes); }); you can create similar event detecting mouse movement. finally, define pausesession function shows popup. some thoughts security: should take account measure executed in client easy circumvent , therefore should use if not imply security risk. a more sophisticated version send message server , keep track of timer there, user can't alte...

ios - Why do I receive an error that says 'Unable to simultaneously satisfy constraints.' for auto layout? -

Image
i trying pin button on 4 sides fix button object @ exact location arbitrarily placed at, getting following error when run it. insight or appreciated. unable simultaneously satisfy constraints. @ least 1 of constraints in following list 1 don't want. try this: (1) @ each constraint , try figure out don't expect; (2) find code added unwanted constraint or constraints , fix it. (note: if you're seeing nsautoresizingmasklayoutconstraints don't understand, refer documentation uiview property translatesautoresizingmaskintoconstraints) ( "<_uilayoutsupportconstraint:0x9f494b0 v:[_uilayoutguide:0x9f40370(20)]>", "<_uilayoutsupportconstraint:0x9f3b6c0 v:|-(0)-[_uilayoutguide:0x9f40370] (names: '|':uiview:0x9f3feb0 )>", "<_uilayoutsupportconstraint:0x9f418e0 v:[_uilayoutguide:0x9f407c0(0)]>", "<_uilayoutsupportconstraint:0x9f18010 _uilayoutguide:0x9f407c0.bottom == uiview:0x9f3feb0.bottom>", ...

java - How to get previous revision CL in perforce -

i writing program, have cl ,from need access previoius revision cl of each file. how can ? code have written till is: ichangelist cl = server.getchangelist(clid); list<ifilespec> files = cl.getfiles(true); for(int = 0; < files.size() ; i++) { ifilespec filespec=files.get(i); } revision specifiers can here (see 'p4 revisions'). in particular, previous revision of each of files file of previous changelist. so, since clid changelist care about, compute change clprev = (clid - 1) , , 'file@clprev'.

Message Type ID for subtitles in RTMP packet -

i looking messagetype id subtitles in rtmp packet. i tried looking up, didnt find info this. http://wiki.multimedia.cx/?title=rtmp https://en.wikipedia.org/wiki/real_time_messaging_protocol there no messagetype subtitles. can send them in script tag, or sei nalu in avc es.

Generate and print a PDF with specific size in Android -

i'm working in android application, , want generate , print pdf. i'm having trouble. need generate pdf 80mm of width , , height may vary. i'm trying this: public class pdfgenerator implements runnable { private context ctx; private view view; private intent mshareintent; private outputstream os; public pdfgenerator(context ctx, view view) { this.ctx = ctx; this.view = view; makeandsharepdf(); } public void makeandsharepdf() { new thread(this).start(); } @targetapi(build.version_codes.kitkat) public void run() { printattributes printattrs = new printattributes.builder(). setcolormode(printattributes.color_mode_monochrome). setmediasize(printattributes.mediasize.iso_c7). setresolution(new printattributes.resolution("zooey", ctx.print_service, 500, 500)). setminmargins(printattributes.margins.no_margins). ...

objective c - get UDID of IOS device programmatically? -

this question has answer here: uidevice uniqueidentifier deprecated - now? 33 answers i want udid of ios device programmatically. using following code udid of ios device. nsuuid *uuid = [nsuuid uuid]; nsstring *uuidstring = uuid.uuidstring; but output different actual udid of device. nsstring* identifier = [[[uidevice currentdevice] identifierforvendor] uuidstring]; // ios 6+ nslog(@"output : %@", identifier); swift 2.x (here x denote above version 2.0) let identifier: string = uidevice.currentdevice().identifierforvendor().uuidstring() nslog("output : %@", identifier) swift3 let identifier = uidevice.current.identifierforvendor?.uuidstring nslog("output : %@", identifier! string) additional reference apple apparently starting remove access udid (unique device identifier) in ios5. in event, best can id...