Posts

ios - Custom uicollectionview - pass data -

i have uicollectionview use custom cell: [_collectionview registernib:[uinib nibwithnibname:@"collectionviewcell" bundle:nil] forcellwithreuseidentifier:@"cellidentifier"]; - (uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath { collectionviewcell *cell = (collectionviewcell *)[collectionview dequeuereusablecellwithreuseidentifier:@"cellidentifier" forindexpath:indexpath]; cell.articolo = [_array objectatindex:indexpath.row]; i want pass object articolo cell, create property: @property (strong, nonatomic) nsmutabledictionary *articolo; but if try read property in 1 of method: @implementation collectionviewcell - (id)initwithframe:(cgrect)frame { self = [super initwithframe:frame]; if (self) {nslog(@"articolo: %@",_articolo);} return self; } - (id)initwithcoder:(nscoder*)adecoder { self = [super initwithcoder:adecoder]; if(self) {nsl...

google cast - Android - Unable to add to RemoteMediaPlayer queue by calling queueInsertItems() multiple times -

i using castcompanionlibrary add items remotemediaplayer queue calling queueinsertitems() videocastmanager.java so: queueinsertitems(unique_items, mediaqueueitem.invalid_item_id, customdata); the first few requests go through, after few times, start getting transientnetworkdisconnectionexception , subsequent requests return status code 2103 (replaced) . @ point, can no longer add items media queue until disconnect , reconnect cast device. here copy of logcat: 01-28 00:24:56.750 7185-7185/com.google.sample.cast.myplayer d/ccl_videocastmanager: [v2.7.1] > queueinsertitems returned. status code: 2103 01-28 00:24:56.789 455-469/? i/surfaceflinger: id=5534(5) createsurf 0x41449a94 (1x1),1 flag=4, uoast 01-28 00:24:56.805 463-1700/? d/powermanagerservice: [api] acquire wakelock flags=0x2000000a > tag=windowmanager uid=1000 pid=463 01-28 00:24:56.891 7185-7189/com.google.sample.cast.myplayer d/dalvikvm: gc_concurre> nt freed > 1843k, 28% free 18679k/25856k, p...

javascript - Check if function is fully executed -

how can check if java script function executed without callback function? i scripting adobe illustrator , use "save()" method save active document. when it's done saving want something, after completeley saved. the method doesn't offer callback function need way execute own funciton, after document saved. which sdk use? documentaftersave event need instead? (described dco umentaftersave (yes, typo) in programmers-guide.pdf )

view - ios Controls taking long to get displayed -

not sure if problem facing generic ios issue or there other problem. have main storyboard file , there few screens in xib files. issue controls taking long displayed xib e.g. if have view, after setting hidden property false, takes few seconds display view. has else faced issue earlier? regards, kavita

javascript - How to unbind onbeforeunload event from all elements of the html body -

how unbind beforeunload event elements of html body. kindly tell me , there way unbind beforeunload event every javascript function call . please me , stuck badly on this. i using below code : var j$ = jquery.noconflict(); j$(document).ready(function() { jquery(window).bind("onbeforeunload", function() { return confirm("do want exit?", "true"); }); jquery('a').on('click', function() { jquery(window).unbind('onbeforeunload') }); jquery(window).bind('keydown keyup', function(e) { if (e.which === 116) { jquery(window).unbind('onbeforeunload'); } if (e.which === 82 && e.ctrlkey) { jquery(window).unbind('onbeforeunload'); } }); jquery(window).mousedown(function(e) { if (e.button == 2) { jquery(window).unbind('onbeforeunload'); } else { jquery(window).bind('onbeforeunload'); } ...

How can I programatically modify an XML Document to respect a DTD in java -

i have xml document built programatically , waiting serialisation (as string ). before serialising though, re-arrange nodes match definition of dtd. should mention implementation prevents me know in order tree built. any recommended solutions ? there academic research correct invalid xml: correction of invalid xml documents respect single type tree grammars but don't know if there available library that. so need hand, or better rework generation of document produces valid instance in first place.

javascript - Using touch events in cordova windos app -

i creating application windows using cordova heavily relies on touch events such touchstart , touchmove . these events work fine in android , ios version not fired in windows version. instead browser tries scroll page on touches (note: calling event.preventdefault function on touchstart . event doesn't fire). in case edge browser has same behaviour cordova app. in edge option when u navigate about:flags called enable touch events when flag set always on or only on when touchscreen detected application works perfectly. wondering if plausible set flag in cordova application.