Posts

uiimageview - Asynchronous images loading again and again in the Uitableview cells -

having trouble asynchronous images don't know why having weird problem. applying asynchronous images load technique images not freezing once loaded on scrolling again loading. - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath{ static nsstring *cellidentifier = @"cell"; uitableviewcell *cell = [tableview dequeuereusablecellwithidentifier:cellidentifier]; if (cell == nil) { cell=[self getcellcontentview:cellidentifier]; } [cell setbackgroundcolor:[uicolor redcolor]]; nslog(@"%i",[discussionarray count]); nsdictionary *dict=[discussionarray objectatindex:indexpath.row]; uilabel *textlabel1 = (uilabel *)[cell viewwithtag:1]; uilabel *textlabel2 = (uilabel *)[cell viewwithtag:2]; uilabel *textlabel3 = (uilabel *)[cell viewwithtag:3]; uiimageview *avatarimage = (uiimageview *)[cell viewwithtag:4]; uiimageview *new_oldimage = (uiimageview *)[cell vieww...

compiler errors - Java Lang nullpointer exception in animation example? -

import java.awt.*; import javax.swing.imageicon; import javax.swing.jframe; public class images extends jframe { public static void main(string[] args) { displaymode dm = new displaymode(800,600,32, displaymode.refresh_rate_unknown); images = new images(); i.run(dm); } private screen s; private image bg; private image pic; private boolean nloaded; animation a; public void run(displaymode dm) { nloaded = false; s = new screen(); try{ s.setfullscreen(dm, this); loadpics(); movieloop(); try{ thread.sleep(50000); }catch(exception ex){} }finally{ s.restorescreen(); } } public void movieloop(){ long startingtime = system.currenttimemillis(); long cumtime = startingtime; while(cumtime-startingtime < 5000) { long timepassed = system.currenttimemillis() - ...

ember.js - Ember-data transactions and resubmitting forms -

Image
i'm using ember(+data) , have built simple signup form, i'm having trouble getting form (and ember-data transaction) work after server-side validation error. i'm following https://github.com/dgeb/ember_data_example guide how use transactions, , works happy path, after server-side validation error, can't ember-data resubmit api request when click submit. i did digging around, , think i'm missing step related resetting transaction after model becomes invalid or that... github , app you can try app , reproduce problem @ http://emb.herokuapp.com/ you can examine full source code @ https://github.com/justinfaulkner/ember-data-resubmit repro you can trigger fake server-side error completing form in app using e-mail address @ @example.com . rails api respond 422 , errors object keyed username/email field. the field should highlighted in red error -- edit email address should valid, , click submit again. developer tools open in chrome, don't see...

matlab - Removing outliers from a grey-scale image -

Image
question i have images sequence representing depth information i'd clean. there outliers (values intensity below 25, 0-255 range) filled acceptable alternative (an average value localised specific area guess). can see simple way this? i've tried use median filter (filter size of 10) substituting undesired values nan, did worsen situation, improves instead substituting them general average value. p.s. has suggested me use fast wavelet reconstruction , not know start... implemented solution (so far) the solution implemented (before reading inpaint_nans suggested tmpearce ) is: duplicate original image; filling invalid pixels general average value; use circular disk of ray 10 blurring it; replacing invalid values in original image got point 3. run median filter of size 10. img2 = img; img2(img < .005) = mean(img(:)); h = fspecial('disk',10); img3 = imfilter(img2...

c# - What data type should an MVC model class use to back/represent a database column of type Image? -

in playing along "programming razor," i've run conundrum. if have table these columns: id int title nvarchar body ntext photo image ...how should corresponding mvc model class declared? have: public class blogpost { public long id { get; set; } public string title { get; set; } public string body { get; set; } public byte[] fauxtoe { get; set; } } ...but byte array image (probably jpg or png) guess, @ best. it may not perfect answer i'm trying help. according programming entity framework dbcontect j.lerman should used store images... [column(typename = "image")] public byte[] photo { get; set; } however, it's code first, after db generated type of columns was... varbinary(max). and here other book programing entity framework: code first, schema created. the parameter provided column annotation specific database mapping to. want store photo in sql server image field. long it’s possible coerce...

java - Identify specific class when multiple classes of same name -

i have 2 projects included genxml project, framework1 , framework2 . framework2 updated version of framework1 , both have class abstractscreentest.class . there anyway in code below can specify project want interact with? classpathscanningcandidatecomponentprovider provider = new classpathscanningcandidatecomponentprovider(true); provider.addincludefilter(new assignabletypefilter(abstractscreentest.class)); set<beandefinition> components = provider.findcandidatecomponents(candiatepackage); (beandefinition component : components){ cls = class.forname(component.getbeanclassname()); classlist.add(cls.getname().tostring()); } you add @deprecated annotation old (out-dated) class , verify component not contain deprecated annotation. for (beandefinition component : components){ cls = class.forname(component.getbeanclassname()); if (!cls.isannotationpresent(deprecated.class) { classlist.add(cls.getname().tostring()); } } of course, assumes th...

access vba - .findfirst vba access2010 unbound form runtime error -

i have following vba code populate unbound fields in unbound form in access 2010 : private sub combo0_afterupdate() dim d database dim rsexp recordset dim criteria string set d = currentdb set rsexp = d.openrecordset("expasset", db_open_dynaset) criteria = "[serial_number]=" & [combo0] rsexp.findfirst criteria me!name = rsexp("user") me!type = rsexp("type") me!model = rsexp("model") me!notes = rsexp("notes") me!department = rsexp("department") me!status = rsexp("status") rsexp.close end sub i getting error on line rsexp.findfirst criteria runtime error 3077 syntax error (missing operator) in expression. i have changed code criteria = "[serial_number]=" & str([combo0]) runtime error 13 type mismatch. give opportunity examine criteria you're asking .findfirst use. may not expect. dim strcriteria string 'strcriteria = "[serial_number]=" & ...