Posts

flash - Error #2025 AS3 -

i'm trying build game chicken invaders , eror : argumenterror: error #2025: supplied displayobject must child of caller. @ flash.display::displayobjectcontainer/removechild() @ superstudent7_fla::maintimeline/movebullet() this problem occurs when space ship shoots. to solve , need know 2 things: my bullets defined movieclip s ,and not on stage.. brought them stage this: function shooting(e:event):void { var bullet:bullets = new bullets(); // bullets class name of movieclip ... ... ... addchild(bullet); bullet.addeventlistener(event.enter_frame,movebullet); }//end of shooting i need know if ok add bullet stage this? or there way? here code makes bullet move: function movebullet(e:event):void { e.target.y -=10; for(var i=0;i<enemy.numchildren;i++) { if(e.target.hittestobject(enemy.getchildat(i))) { counthits[i]=counthits[i]+1; e.target.removeeventlistener(event.enter_frame,movebullet);...

c# - TotalSummary of GroupSummaries in Devexpress -

Image
i have aspxgridview this: is there way calculate total of groupsummary totalsummary without grouping . groupsummary's summerytype="average" for example: mus_k_isim groupsummary[risk_eur] 2m lojİstİk 123.456 aba lojİstik 234.567 then want totalsummary of risk_eur column 123.456 + 234.567 = 358023 . note : want calculation normal gridview. not doing grouping. another example: customer_no customer_name price 123 aaa 50 123 aaa 100 123 aaa 60 124 bbb 60 125 ccc 20 125 ccc 40 i want grid: what avarage of 123 number customer = 50 + 100 + 60 = 210/3= 70 avarage of 124 number customer = 60/1=60 avarage of 125 number customer = 20 + 40 = 60/2= 30 and totalsummary of price = 70 + 60 + 30 = 160 how can that? or code about? function should use? i see 2 different solutions: 1) implement data management manually: a) sort dat...

Facebook: Get when user clicks like button on fan page -

i have created app used tab on company facebook fan page. have new requirement capture when user clicks button on facebook fan page , hide portion of app page (within iframe) when event fires. although button on facebook's page, there way capture click event of button (ie: javascript sdk) within app iframe can hide appropriate elements? like .... http://www.facebook.com/redbull thanks , advice, b i found answer... how detect facebook button pressed , trigger event? i checked incoming request fb_sig_is_fan.

c++ - Why is it a compile error to assign the address of an array to a pointer "my_pointer = &my_array"? -

int my_array[5] = {0}; int *my_pointer = 0; my_pointer = &my_array // compiler error my_pointer = my_array // ok if my_array address of array &my_array gives me? my_array name of array of 5 integers. compiler happily convert pointer single integer. &my_array pointer array of 5 integers. compiler not treat array of integers single integer, refuses make conversion.

Entity Framework code first: update SetInitializer throws exception -

i've been looking strange error hours haven't found anything. have simple entity: public class company { public guid id { get; set; } public string name { get; set; } } and here context: public class mydbcontext : dbcontext { public dbset<company> companies { get; set; } } when running first time, works fine. but, when change entity (for example, put [key] attribute id), expected "model has changed" or error. so, enter in global.asax application_start: database.setinitializer<mydbcontext> (new dropcreatedatabaseifmodelchanges< mydbcontext >()); this stuck. there no compile error, compiles without errors / warnings. but, when run project, following error: description: unhandled exception occurred during execution of current web request. please review stack trace more information error , originated in code. exception details: system.typeloadexception: genericarguments[0], 'mydb.data.mydbcontext', on 'system...

Working WIth Color options in Magento -

i developing site appliance retailer on magento, , wondering if can suggest how should implement following: there multiple colors each appliance. each related color has it's own sku, , price variations. i'd have following happen: when users browse catalog should see 1 product, have list -- related skus, color , prices in list , , should able navigate indivual item i don't want of related colors show individual items, because users see same products number of times. i'd create link within product page show related colors, , prices. any ideas? (i thinking of creating attribute contain comma-separated list of related skus, , loop through them, deal 1 , 3, i'm still not sure how deal 2) look 'simple configurable products'. cool extension want achieve including image , price options. free.

sql server - Dropping tables using dynamic SQL -

i having trouble sql stored procedure, passing in varchar() table name using it. my code (not working) is: create procedure deleteuser @username varchar(50) begin --drop surf table if exists (select 1 sysobjects xtype='u' , name=@username + '_table') drop table @username + '_table' end go however, on execution errors @ drop table @username + '_table' line. what doing incorrectly? i using ms sql server 2008 if matters, called c#. the drop table statement can't parametrised trying. need dynamic sql. declare @dynsql nvarchar(max) = 'drop table ' + quotename(@username + '_table'); exec(@dynsql);