Posts

How do I hide .java files from the Open Resource dialog in Eclipse? -

in ideal world should able filter pattern or @ least file extension. never want open .java files in open resource, there's separate window called open type that. i saw this, it's not general solution: how hide .class files open resource dialog in eclipse? cannot mark .java files derived, because they're not! go project -> properties -> resource -> resource filters -> add there select: exclude all, folders, children (recursive) name matches: .java that should trick. regards, kayz

c# - Using an SQL View from an Entity Framework Code First version 5 -

i developing contact log in website using vs 2010, mvc3 , ef 5 - entities created using code first. data stored in sql server 2008 r2 set of databases. want display summary of contact log , have created view. create view dbo.contactlogsummaries select cle.contactlogentryid, cle.caseid, 'test' contactname, eu.username officeuser, cle.dateandtimeofcontact, clc.category, cle.contactdetails contactlogentries cle join contactlogcategories clc on cle.contactlogcategoryid = clc.contactlogcategoryid join control.dbo.endusers eu on cle.userid = eu.enduserid there 2 entities in contact log database ( contactlogentries , contactlogcategories ) , database first entity control.dbo.endusers in database. contact log contain large number of records. want able display records specific case. my question in 2 parts: can use sql view directly display summary on web page (perhaps reading class) can create code first object e...

ios - UIView emanate rings matching shape of border -

i have been trying create custom view in ios emanates rings border. have drawn ellipse using core graphics , want periodically emanate. i have been looking use both caemitterlayer , core animation achieve have no idea how achieve effect want. ideally ellipse emanate ring 10 pixels in thickness edge of shape , gently fade grows , moves further away. for initial attempt had ellipse grow , fade every 3 seconds using core animation want if ellipse stay stationary , have layer animates. any suggestions great. my code has moved on initial attempt. have atm is: #import "thumbview.h" #import <quartzcore/quartzcore.h> @implementation thumbview - (void)drawlayer:(calayer *)layer incontext:(cgcontextref)ctx { [super drawlayer:layer incontext:ctx]; // create emitter layer , make same size view. caemitterlayer *emitterlayer = [caemitterlayer layer]; emitterlayer.frame = self.frame; // apply attributes emitter. emitterlayer.emittershape = k...

reporting - Cognos: How to round an average of a data item result -

i'm using cognos report studio. i'm pretty new software. anyway, i've created query meant count number of days between 2 dates. there multiple records , need average of days. i'm able of this. result 6.57254211... want number rounded. can't seem figure out how this. achieved average applying aggregate function. though round applied same way. there no round in rollup aggregate function option. tried use _round() in data item code, returned error. plus, i'm pretty sure rounds each individual number get, not average of of them. know how this? i able round average creating query calculation , doing _round([weekdays]) code. [weekdays] being average need rounded.

javascript - How do I pass a view to another Backbone view? -

i trying create base table class in backbone. each subclass row have different look. want pass in view of row. trying add attribute set in child class, keep getting , error typeerror: cannot read property '_listenerid' of undefined . here parent class: var basetableview = baseview.extend({ template: null, rowview: null, initialize: function() { ... } }); here child class set row view up: var peoplecollectionview = basetableview.extend({ initialize: function() { this.collection = new peoplecollection(); this.template = peopletemplate; this.itemview = personview; basetableview.prototype.initialize.apply(this, arguments); } }); when go use personview in super class, use this: var view = new this.rowview({ model: item }); that when above stated error typeerror: cannot read property '_listenerid' of undefined . how can fix this, or if should set hierarchy different, how should done? help...

javascript - how to pass ruby instance variable as params to js function in a rjs page -

i have instance variable @foo in create controller action , rendering create.rjs template. in rjs template need call js function (with page.call) , pass @foo params. how possible.. it's been years since i've used rjs, might work: page.call "your_function(#{ escape_javascript(@some_instance_var) })"

python - Data Abstraction Layer between tastypie and Django ORM -

i have been entrusted creating api large existing codebase , have decided use tasypie. problem app structure. we have database on top of djnago orm runs. app doesn't work directly orm though through set of methods (the data abstraction layer) handle things creating orm objects, validating them etc. i hook tastypie said methods benefits of throttling, authentication etc. have no idea how that. i've attempted write custom data source tastypie (like riak example have in docs) i'm thoroughly confused need override , each method does. so, sum up: how go adding data abstraction layer between tastypie , orm? is using custom data source right way? how go creating such custom data source? thanks. yup, tasypie that. simple hook api calls directly django orm functionality. you'd use classes related django models subclasses of tasypie's modelresource, , ithandles things work fast out of box. people want more customized interface data abstarction lay...