Posts

c++ - Lifecycle of an OpenGLAppComponent in Juce -

i can't seem grasp on how these openglappcomponents come , go. can please correct thinking if wrong? object created inheirts openglappcomponents , timer. object exists in audioprocessoreditor. call initialise() (this attach openglcontext? timer started.) addandmakevisible(&my_gl_appcomponent); called editor, telling drawn. my_gl_appcomponent.setbounds(...) called specifying size , location of gl component. the timer callback calls repaint() repeatedly, updating display. when editor closed, call shutdown(), detach openglcontext. delete my_gl_component, calling shutdownopengl() in destructor we free open editor again, goto 2. am missing anything? have things? i've been trying find cause of gl_invalid_framebuffer_operation error second day in row , i'm getting pretty frustrated.

how create windows global variables in c# winform -

(at first use c# winform , .net framework4) is there way create class library (dll) static variables , variable programs concurrent (and static variables not reset each program). more explain: for example create dll static variables , install on gac add reference of tow program. now want set variables in program1 , variables on program2. how can that? basically can accomplish storing value in storage accessible different programs using process process comunication mechanism (ipc mentioned @slaks) storages comes mind are: database, windows registry, settings file process process communication may wcf, or system.io.pipes, or others: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365574(v=vs.85).aspx it depends on needs. performace critical? need infrom other process value has changed, or other process request value? how many processes access value @ same time?

Play Framework Java 2.3.8 - JSon -

im trying json object mock. when compile got error : error: package org.json not exist in c:\workspace\tutorial\app\controllers\application.java:18 15import models.device; 16import models.task; 17 18import org(.)json.jsonarray; --> error 19import org.json.jsonexception; 20 21import play.data.form; 22import play.db.ebean.model; 23import play.mvc.controller; this code: public static result index() throws jsonexception, ioexception { jsonarray json = readjsonfromurl("http://htejera.ukelelestudio.com/mock/dmamock/devices/android"); return ok(index.render(json.tostring())); } private static string readall(reader rd) throws ioexception { stringbuilder sb = new stringbuilder(); int cp; while ((cp = rd.read()) != -1) { sb.append((char) cp); } return sb.tostring(); } public static jsonarray readjsonfromurl(string url) throws ioexception, jsonexception { inputstream = new url(url).openstream(); try { ...

asp.net - Why my DevExpress v14.1 doesn't have the GridViewEdittingMode component? -

according official document of devexpress : https://documentation.devexpress.com/#aspnet/devexpresswebgridvieweditingmodeenumtopic , assembly contains gridvieweditingmode component should devexpress.web.v14.1.dll. however, tried add reference, still said gridvieweditingmode not exist. hash code of devexpress.web.v14.1.dll sha256 cfde95612ba9d4a771dd0236d95a8a1881be983dc72985205e36134ca37d1075. worse still, don't have project converter in computer, nor devexpress provide v14.1 trial anymore. is there 1 knows how make gridvieweditingmode component available in devexpress v14.1 based project? looks faced breaking change ( some classes related devexpress asp.net controls have been moved devexpress.web namespace ). so, namespace gridvieweditingmode enumeration implemented changed devexpress.web.aspxgridview devexpress.web. following code should work you. var grid = html.devexpress().gridview(settings => { settings.name = "gridview"; // code s...

java - Hibernate: Unable to load class -

caused by: org.hibernate.boot.registry.classloading.spi.classloadingexception: unable load class [com.mysql.jdbc.driver] http://www.tutorialspoint.com/hibernate/hibernate_quick_guide.htm i'm following hibernate guide , i'm getting error knows why? thanks help. you need grab mysql connector jar here , add classpath. perhaps /lib folder if using maven, try including <dependency> <groupid>mysql</groupid> <artifactid>mysql-connector-java</artifactid> <version>5.1.6</version> </dependency> in pom.xml

python - Storing MD5 digest in Postgres -

i'm generating md5 digests python so: import hashlib m = hashlib.m5() md5 = m.update('some_string') return md5.digest() now, looking @ a similar question , see should use bytea type. however, plan using above snippet generate these digests, although i'm open modifying it. there should aware of being sending off db assuming have field of type bytea? proper way of storing digests? might redundant question, wanted sure. i'm storing md5s of files , planning on using hash unique identifier; nothing mission critical.

linux - docker container started in Detached mode stopped after process execution -

i create docker container in detached mode following command: docker run [options] --name="my_image" -d container_name /bin/bash -c "/opt/init.sh" so need "/opt/init.sh" executed @ container created. saw container stopped after scripts finish executed. how keep container started in detached script/services execution @ container creation ? there 2 modes of running docker container detached mode - mode execute command , terminate container after command done foreground mode - mode run bash shell, terminate container after exit shell what need background mode. not given in parameters there many ways this. run infinite command in detached mode command never ends , container never stops. use "tail -f /dev/null" because quite light weight , /dev/null present in linux images docker run -d --name=name container tail -f /dev/null then can bash in running container this: docker exec -it name /bin/bash -l if...