Search Results

Search found 476 results on 20 pages for 'stefan hubert'.

Page 15/20 | < Previous Page | 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • commons-exec: hanging when I call executor.execute(commandLine);

    - by Stefan Kendall
    I have no idea why this is hanging. I'm trying to capture output from a process run through commons-exec, and I continue to hang. I've provided an example program to demonstrate this behavior below. import java.io.DataInputStream; import java.io.IOException; import java.io.PipedInputStream; import java.io.PipedOutputStream; import org.apache.commons.exec.CommandLine; import org.apache.commons.exec.DefaultExecutor; import org.apache.commons.exec.ExecuteException; import org.apache.commons.exec.PumpStreamHandler; public class test { public static void main(String[] args) { String command = "java"; PipedOutputStream output = new PipedOutputStream(); PumpStreamHandler psh = new PumpStreamHandler(output); CommandLine cl = CommandLine.parse(command); DefaultExecutor exec = new DefaultExecutor(); DataInputStream is = null; try { is = new DataInputStream(new PipedInputStream(output)); exec.setStreamHandler(psh); exec.execute(cl); } catch (ExecuteException ex) { } catch (IOException ex) { } System.out.println("huh?"); } }

    Read the article

  • iPhone: Interface Builder leaks memory?

    - by Stefan Klumpp
    I have been working on an iPhone project, where we created all the user interface programmatically in code. Now I'm going to start a new iPhone project and thinking of using Interface Builder instead, because it has been recommended to me as being a very useful tool, creating less headache than writing everything in code and in general much faster (regarding development time). However, my team members have some concerns due to previous problems with using Interface Builder and resulting memory leaks. Therefor they suggest building everything in code again. I don't know where these concerns come from, but maybe someone with more experience than we have can give some insight on that topic. Doing a simple Google search doesn't really provide any information proofing that there are any problems with memory leaks created by the Interface Builder itself.

    Read the article

  • Best way to manage a header navigation menu from within a template?

    - by Stefan Kendall
    I'm looking to put navigation in my GSP template, and I would like to set the active class on the navigation elements for each respective page. What's the best way to do this? I have several .gsp views merging with a single template that looks like this: <div id="bd" role="main"> <div role="navigation" class="yui-g"> <ul id="nav"><a href="index.gsp"><li class="active">Home</li></a><a href = "products.gsp"><li>Products</li></a><a href = "contacts.gsp"><li>Contact</li></a></ul> </div> <g:layoutBody/> </div>

    Read the article

  • Function pointers in Objective-C

    - by Stefan Klumpp
    I have the following scenario: Class_A - method_U - method_V - method_X - method_Y Class_B - method_M - method_N HttpClass - startRequest - didReceiveResponse // is a callback Now I want to realize these three flows (actually there are many more, but these are enough to demonstrate my question): Class_A :: method_X -> HttpClass :: startRequest:params -> ... wait, wait, wait ... -> HttpClass :: didReceiveResponse -> Class_A :: method_Y:result and: Class_A :: method_U -> HttpClass :: startRequest:params -> ... wait, wait, wait ... -> HttpClass :: didReceiveResponse -> Class_A :: method_V:result and the last one: Class_B :: method_M -> HttpClass :: startRequest:params -> ... wait, wait, wait ... -> HttpClass :: didReceiveResponse -> Class_B :: method_N:result Please note, that the methods in Class_A and Class_B have different names and functionality, they just make us of the same HttpClass. My solution now would be to pass a C function pointer to startRequest, store it in the HttpClass and when didReceiveResponse gets called I invoke the function pointer and pass the result (which will always be a JSON Dictionary). Now I'm wondering if there can be any problems using plain C or if there are better solutions doing it in a more Objective-C way. Any ideas?

    Read the article

  • Unit tests - The benefit from unit tests with contract changes?

    - by Stefan Hendriks
    Recently I had an interesting discussion with a colleague about unit tests. We where discussing when maintaining unit tests became less productive, when your contracts change. Perhaps anyone can enlight me how to approach this problem. Let me elaborate: So lets say there is a class which does some nifty calculations. The contract says that it should calculate a number, or it returns -1 when it fails for some reason. I have contract tests who test that. And in all my other tests I stub this nifty calculator thingy. So now I change the contract, whenever it cannot calculate it will throw a CannotCalculateException. My contract tests will fail, and I will fix them accordingly. But, all my mocked/stubbed objects will still use the old contract rules. These tests will succeed, while they should not! The question that rises, is that with this faith in unit testing, how much faith can be placed in such changes... The unit tests succeed, but bugs will occur when testing the application. The tests using this calculator will need to be fixed, which costs time and may even be stubbed/mocked a lot of times... How do you think about this case? I never thought about it thourougly. In my opinion, these changes to unit tests would be acceptable. If I do not use unit tests, I would also see such bugs arise within test phase (by testers). Yet I am not confident enough to point out what will cost more time (or less). Any thoughts?

    Read the article

  • Benchmarking Java programs

    - by stefan-ock
    For university, I perform bytecode modifications and analyze their influence on performance of Java programs. Therefore, I need Java programs---in best case used in production---and appropriate benchmarks. For instance, I already got HyperSQL and measure its performance by the benchmark program PolePosition. The Java programs running on a JVM without JIT compiler. Thanks for your help! P.S.: I cannot use programs to benchmark the performance of the JVM or of the Java language itself (such as Wide Finder).

    Read the article

  • C#: Drag & Drop with right mouse button

    - by stefan.at.wpf
    Hello, I'd like to do Drag & Drop with the right mouse button instead with the left one. However calling DragDrop.DoDragDrop() from MouseRightButtonDown instead of MouseLeftButtonDown doesn't do the job - DragDrop.DoDragDrop looks for mouse movements while holding down the left mouse button. Any idea how to realise Drag & Drop using the right mouse button? Thanks for any hint!

    Read the article

  • php/html add link to table <TD>

    - by Stefan
    How can i add a link to my td tag from a table? onclick doesnt work for me :S, or maybe a good example :P my td tag: $world .= ('<td background="images/world/Heli.jpg" border="1"></td>'); link: <a href="?site=world&action=showvillage&id=' . getVillageID(($xm2), ($ym2)) . '"></a> thnx :D

    Read the article

  • Grails gdoc editor support (esp IntelliJ)

    - by Stefan
    Since Grails 1.2 there's a documentation engine included: gdoc. The documentation's syntax is based on the Textile format. Is there some editor support for this? My first choice would be a plugin for IntelliJ, second option on for vim or gedit. Any hints welcome. I am totally a aware that the format is very simple by itself but having code coloring and content assist would be really nice.

    Read the article

  • Disposing ActiveX resources owned by another thread

    - by Stefan Teitge
    I've got a problem problem with threading and disposing resources. I've got a C# Windows Forms application which runs expensive operation in a thread. This thread instantiates an ActiveX control (AxControl). This control must be disposed as it uses a high amount of memory. So I implemented a Dispose() method and even a destructor. After the thread ends the destructor is called. This is sadly called by the UI thread. So invoking activexControl.Dispose(); fails with the message "COM object that has been separated from its underlying RCW", as the object belongs to another thread. How to do this correctly or is it just a bad design I use? (I stripped the code down to the minimum including removing any safety concerns.) class Program { [STAThread] static void Main() { // do stuff here, e.g. open a form new Thread(new ThreadStart(RunStuff); // do more stuff } private void RunStuff() { DoStuff stuff = new DoStuff(); stuff.PerformStuff(); } } class DoStuff : IDisposable { private AxControl activexControl; DoStuff() { activexControl = new AxControl(); activexControl.CreateControl(); // force instance } ~DoStuff() { Dispose(); } public void Dispose() { activexControl.Dispose(); } public void PerformStuff() { // invent perpetuum mobile here, takes time } }

    Read the article

  • Is VisualAssistX's autorenaming reliable?

    - by Stefan Monov
    I'm using the VS addon called VisualAssistX. Using it for C++ only. In particular i'm using the feature "rename this entity projectwide", mainly for class names and function names. My question is: does this use fuzzy heuristics, or does it actually reliably implement C++ semantics so there's no false negatives/false positives? Has it ever renamed something wrong for you?

    Read the article

  • WiX COM+ error code

    - by Stefan
    I'm trying to register COM+ with WiX. I get the following error. Where can I find the meaning of error code -2146368486? RegisterComPlusAssemblies: DLL: <file name> ComPlusInstallExecute: ErrorInfo: Name='<file name>', ErrorCode='-2146368486', MajorRef='<name>', MinorRef='<invalid>' ComPlusInstallExecute: ErrorInfo: Name='<name>', ErrorCode='-2146368486', MajorRef='<guid>', MinorRef='<invalid>' ComPlusInstallExecute: ErrorInfo: Name='<name>', ErrorCode='-2146368486', MajorRef='<guid>', MinorRef='<invalid>' ComPlusInstallExecute: Error 0x80110401: Failed to install components ComPlusInstallExecute: Error 0x80110401: Failed to register native assembly ComPlusInstallExecute: Error 0x80110401: Failed to register assembly, key: <assembly> ComPlusInstallExecute: Error 0x80110401: Failed to register assemblies

    Read the article

  • Download and Archive Web Pages on the iPhone

    - by Stefan
    Hi, how do I download and archive full web pages (HTML, CSS, JS, images) on the iPhone? I know how to download the single files. But is there any existing approach to get all files (e.g. all included javascripts), which are linked with a particular web page?

    Read the article

  • executable parameter c++

    - by stefan
    if i got a c++ executable file like this: executable.exe and i want to add some parameters like: executable.exe +username = pino how do i get in c++ that i filled in pino as my username?

    Read the article

  • How to log C++ exception if running outside debugger, otherwise rethrow

    - by Stefan Monov
    I wanna do something like this: int main() { try { runApp(); } catch(std::exception const& ex) { if(runningInDebugger()) throw; // let the IDE show me what went wrong else displayMsgBox("Something went wrong! " + ex.what()); } } Needs to work at least in VS2008 but the more debuggers it supports, the better. I want it to check for a debugger at runtime. I don't want to do "#ifdef NDEBUG", because I prefer not to do release builds at all (can't be bothered). So what should I use as a "runningInDebugger()" check?

    Read the article

  • iPhone: cached profile images from the web - how to find out that remote image changed?

    - by Stefan Klumpp
    I'm loading profile pictures from Facebook, cache them on disk and load them into cells of a UITableView. Now I'm wondering, how I can find out when someone has changed his/her profile picture on Facebook that I have to load the new image from the web instead of using the one cached disk. The url of the image is always the same. Is there a lightweight way of doing this without downloading the image and comparing it to the local file?

    Read the article

  • Do I need a view controller for MVVM-light in Silverlight?

    - by Stefan de Vogelaere
    I have the following question regarding MVVM light: what "drives" the UI? I see I can have a ViewModel per View I am showing; the ViewLocator handles all the ViewModels (for caching as I understand). But what is driving the UI? If I have a Command defined in my ViewModel that says "ShowDetail"; do I have to write the code for displaying this View inside the ViewModel? Are there any examples of this? Thanks!

    Read the article

  • c++ address string -> long

    - by stefan
    I got an adress example: 0x003533 , its a string but to use it i need it to be a LONG but i dont know how to do it :S has anybody a solution? so string: "0x003533" to long 0x003533 ??

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20  | Next Page >