Posts

c# - Reading APK Expansion Files with MonoDroid -

i working on porting xna windows phone 7 game android using monogame , monodroid. ported game, added in multiple resolution support , ended apk 130 mb. discovered google play not support apk files larger 50 mb, , have use apk expansion files. so read through google documentation expansion files. zipped game's textures without compression setting, renamed zip file to: main.1.com.baller.fivesome.obb i placed obb file appropriate place: http://www.ballerindustries.com/images/path.png my code crashing while trying open obb file: using(zipfile zif = new zipfile(sourcepath)) here's contents of sourcepath: http://www.ballerindustries.com/images/sourcepath.png it results in java.io.filenotfoundexception so guess questions are: 1. missing obvious? 2. have placed obb right location? 3. have built obb correctly? 4. need set special permissions? thanks, angus

algorithm - Inverse convolution of image -

Image
i have source , result image. know, convolution matrix has been used on source result. can convolution matrix computed ? or @ least not exact one, similar. in principle, yes. convert both images frequency space using fft , divide fft of result image of source image. apply inverse fft approximation of convolution kernel. to see why works, note convolution in spatial domain corresponds multiplication in frequency domain, , deconvolution corresponds division in frequency domain. in ordinary deconvolution, 1 divide fft of convolved image of kernel recover original image. however, since convolution (like multiplication) commutative operation, roles of kernel , source can arbitrarily exchanged: convolving source kernel same convolving kernel source. as other answers note, however, unlikely yield exact reconstruction of kernel, same reasons ordinary deconvolution won't reconstruct original image: rounding , clipping introduce noise process, , it's possible convol...

asp.net - c# asp - UpdatePanel is causing a full page postback rather than just posting back itself -

i have page generated update panels so: foreach(datarow r in getsteps(id).rows) { updatepanel steppanel = new updatepanel(); steppanel.id = "steppanel_" + r["stepid"].tostring(); steppanel.contenttemplatecontainer.controls.add(generateinnerpanel(r)); stepholder.controls.add(steppanel); } this generates updatepanels , adds placeholder on page: <asp:placeholder id="stepholder" runat="server"></asp:placeholder> inside each updatepanel clickable panel calls javascript function: function stepclick(sender, stepid){ __dopostback(sender.id, stepid); } the javascript posts , check sender , add details clicked update panel on page load. the problem i'm having clicking on 1 of divs in update panel causing full postback rather posting contents of containing update panel. set update panels postback rather full page? maybe not setting, in case how it? many help! set upda...

Link Delphi to SQL Server -

i'm using delphi xe4 & sql server express 12 , locally on c drive. can link delphi access db via ado comp. problem when try linking sql server db - it doesn't see server/db . i'm not sure how should specify server name (user-pc\sqlexpress - name created sqlserver) or db name (c:\program files(x86)\microsoft sql server\mssql11.sqlexpress\mssql\data\testdb.mdf) . no passwords used. tried via adotable (sql server native client 11.0 microsoft ole db provider sql server) , tsqlconnection . (i've been using ms access lately - out of touch external db connection...) i found solution. 32-bit (program) , 64-bit (machine) incompatibility. had define odbc/sql native server under 32-bit, default defined under 64-bit. you need provide server information somehow, can use connectionstring used build connection. connection string looks this: connstring = 'provider=sqloledb.1;persist security info=false;' + 'user id=%s;password=%s;data source=%s;us...

c++ - where does an automatic object live in( with a demo ) -

i want research in memory management of c++ , it's implementations g++, vc++. the first question automatic object(local object) live in?(built-in type, user-defined type, stl...) i think built-in type stored in stack done in compiling step. , what's fact user-defined type? see somewhere before stl data type in heap memory. wrote tiny function, compiled g++, disassembled using objdump, see compiler did. #include <string> void autovar(){ std::string s; } and result of disassembling follows: 00000000 <__z7autovarv>: 0: 55 push %ebp //push old frame pointer 1: 89 e5 mov %esp,%ebp //ebp point old 3: 83 ec 28 sub $0x28,%esp//allocate stack space 6: 8d 45 f4 lea -0xc(%ebp),%eax//param or something?? 9: 89 04 24 mov %eax,(%esp) c: e8 00 00 00 00 call 11 <__z7autovarv+0x11> 11: 8d 45 f4 lea ...

sql - What does this query means? -

there table named employee , it's have employee_id, manager_id, salary columns on it. query select employee_id,salary,last_name employees m exists (select employee_id employees w (w.manager_id = m.employee_id) , w.salary>10000) order employee_id asc what query means? a)all managers whom salaries greater 10000 b)all managers whom have @ least 1 employee making greater 10000 if subquery returns rows @ all, exists subquery true , , not exists subquery false . example: select column1 t1 exists (select * t2); traditionally, exists subquery starts select * , begin select 5 or select column1 or @ all. mysql ignores select list in such subquery , makes no difference. in case option b correct.

symfony - Symfony2 form choice field -

i have product , category entity. category entity adjacency list/materialized-path model. product has relation category has relation product in producttype class selectmenu categories @ specific level grouped parent name. $builder->add('category', 'entity', array( 'label' => 'category', 'class' => 'test\adminbundle\entity\category', 'property' => 'name', 'group_by' => 'parentname', 'query_builder' => function(\doctrine\orm\entityrepository $er) { $qb = $er->createquerybuilder('c'); return $qb->where($qb->expr()->like('c.path', ':path')) ->orderby('c.path', 'asc') ->setparameter('path', '%/%/%'); }, )); category got getparentnam...