Posts

opengl es 2.0 - Multisampling on iOS can't get depth texture? -

i have set rendering framebuffer color , depth textures on ios, works ok. tried add multisampling via apple extensions (i used code rendering texture on ios opengl es—works on simulator, not on device ) there's catch apparently. after resolving multisampled buffer original framebuffer (which use post processing effects), have color buffer resolved. glresolvemultisampleframebufferapple() apparently not touch depth texture @ all, if use multisampling have give on depth texture effects. there no way depth texture if use multisampling ? know how multisampling works, want depth texture alongside color texture. spec on apple_framebuffer_multisample tells glresolvemultisampleframebufferapple resolves color attachment, means have write depth color renderbuffer in additional render pass , resolve depth information.

hibernate - When using Access from within an Excel spreadsheet, the PC won't go to sleep -

i've stumbled accross problem unable solve :( neither google nor stackoverflow have given me usable answers, i'm turning you. the problem this: i've created spreadsheet loads data access database stored on network drive. data-loading part done once, i.e. when opening file. i open connection this: dim con adodb.connection dim rs new adodb.recordset dim sql string set con = getconstring() rs.open "select id, somevalue sometable", con where connection string this "provider=microsoft.jet.oledb.4.0;data source='" & (network path file) & "'" then dump information in spreadsheet , terminate connection this: rs.close con.close however, when try hibernate pc while excel spreadsheet still open, error message. translates along lines of "excel has prevented computer going sleep". this seems happen when using constellation... have idea on how prevent behavior? i'd pc go sleep, when tell - though excel spr...

java - Layout using the transformed bounds -

Image
i have scaled node in pane. layout of pane take account bounds without transformation. want take account transformed bounds. for example : and code : import javafx.application.application; import javafx.geometry.pos; import javafx.scene.scene; import javafx.scene.control.label; import javafx.scene.layout.hbox; import javafx.scene.layout.vbox; import javafx.scene.shape.circle; import javafx.scene.transform.scale; import javafx.scene.transform.translate; import javafx.stage.stage; public class hboxapp extends application { public static void main(string[] args) { launch(args); } @override public void start(stage stage) throws exception { double scale = 0.75; hbox box1 = createbox(); box1.getchildren().add(new circle(20)); box1.getchildren().add(new label("test without scale")); hbox box2 = createbox(); circle c2 = new circle(20); c2.setscalex(scale); ...

asp.net mvc - Why does Chrome DevTools hit my Login page? -

Image
i noticed login action being called every page load in chrome when have devtools open, how find out calling it? happens when load page , after little while press f12 open dev tools - login action receives hit! i added breakpoint , checked locals referrer null. looking @ chrome network tab looks like happens @ seemingly random time, during image load. if open images in new tabs start download expected , breakpoint not hit. disabled of extensions - can next?

ruby on rails - Mock a class's local method -

i trying write test case in rpec class this class abc def method_1( arg ) #does , return value based on arg end def initialize @service = method_1( arg ) end def getsomething_1 return @service.get_seomthing_1 end def getsomething_2 return @service.get_seomthing_2 end end now want initiate @service instance variable mocked object can use mocked object return values against can validate unit tests. i tried like describe abc before(:each) myobject = double() myobject.stub(:get_something_1).and_return("somevalue") abc.any_instance.stub(:method_1).and_return(myobject) end "checks correctness of getsomething_1 method of class abc" @abc = abc.new @abc.getsomething_1.should eql("somevalue") end end now when trying run test @service not getting initialized object want to. seems method_1 not getting mocked behaviour defined. can how assign @service...

serialization - How should C++ objects be serialized? -

we doing project on high performance computing, using mpi parallel computing framework. there few algorithms implemented on legacy platform. rewriten original serial algorithm parallel version based on mpi. i encounter performance problem: when running parallel algorithm based on mpi, there lot of comunication overhead between multiple process. inter-process comunication consist of 3 steps: process serialize c++ objects binary format. process send binary format data process b mpi. process b deserialize binary format data c++ objects. we found these comunication steps, serialize/deserialize steps, cost huge amount of time. how hand performance issue? by way, in our c++ code, use lot of stl, more complex c-like struct. p.s. doing this(serialization) written code traversing fields of objects , copy them sequentially byte array. to demonstrate doing, there code snippet. note single feature construction process: sic::geometryfeature *ptfeature = (geometryfeature *)...

c# - Moq simple example required- database connection and file handling -

i quite new unit testing. though can simple unit test, finding difficult understand dependency injection part. have 2 scenarios not create test database connection log file handling though searched internet , not find simple example follow , implement these mocking. can moq supports concrete class or should need change implementation virtual unit testing. example code or link sample code appreciated first of all, moq not support mocking concrete classes. abstract classes , interfaces can mocked. however, not hard sounds. let's take log file handling example. say start following concrete logging class: public class log { public void writetolog(string message) { ... } } we have classes uses log class logging: public class loggenerator { public void foo() { ... var log = new log(); log.writetolog("my log message"); } } the problem unit testing foo method have no control on creation of...