Daily Archives

Articles indexed Thursday March 25 2010

Page 21/127 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • How to read in text from the visual studio debug output window

    - by Jeremy Bell
    I've read several articles that tell you how to add text to the output window in visual studio from within an Add-On (specifically, a visual studio 2008 integration package, via the visual studio 2008 SDK 1.1), but no examples of how to read text from the output window. My goal is to parse text from the debug output window while debugging a certain application (TRACE output and possibly stdin/stdout). The IVsOutputWindowPane interface has no methods for reading in text from the output window. The documentation seems to imply that it is possible, but it doesn't provide an example: http://msdn.microsoft.com/en-us/library/bb166236(VS.80).aspx Quote: In addition, the OutputWindow and OutputWindowPane objects add some higher-level functionality to make it easier to enumerate the Output window panes and to retrieve text from the panes. Preferably I'd like to be able to subscribe to an event that fires when a new line of text arrives, similar to a StreamReader's asynchronous reads.

    Read the article

  • breaking out of for loop when running a function inside a for loop

    - by andrewj
    I'm embarrassed that I'm asking this question, but here I go: Suppose you have the following function foo. When I'm running a for loop, I'd like it to skip the remainder of foo when foo initially returns the value of 0. However, break doesn't work when it's inside a function. As it's currently written, I get an error message, no loop to break from, jumping to top level. Any suggestions? foo <- function(x) { y <- x-2 if (y==0) {break} # how do I tell the for loop to skip this z <- y + 100 z } for (i in 1:3) { print(foo(i)) }

    Read the article

  • IMAP Idle Timeout

    - by Paul
    Lets say I am using IMAP IDLE to monitor changes in a mail folder. The IMAP spec says that IDLE connections should only stay alive for 30 minutes max, but it is recommended that a lower number of minutes is selected - say 20 minutes, then cancel the idle and restart. I am wondering what would happen if the mail contents changed between the idle canceling, and the new idle being created. An email could potentially be missed. Given that RECENT is a bit vague, this could lead to getting a message list before the old idle ends, and a new idle starts. But this is almost the same as polling every 20 minutes, and defeats some of the benefit of idle. Alternatively, a new idle session could be started prior to terminating the expiring one. But in any case, I think this problem has already been solved so here I am asking for recommendations. Thanks, Paul

    Read the article

  • Unable to execute a function usnig reflection

    - by Steven
    hi, i am developing a eclipse plugin . In this plugin i am using reflection to execute a function in a class present in another project which is a hibernate project.Whenever the invoke is used i.e mymethod.invoke(myobj); it is giving this exception java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at packagesearch.DummyExecution.execution(DummyExecution.java:154) at packagesearch.HelloWorldAction.run(HelloWorldAction.java:48) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:599) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) Caused by: java.lang.NoClassDefFoundError: org.dom4j.DocumentException at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:72) at java.lang.J9VMInternals.initialize(J9VMInternals.java:134) at test.Example.demo1(Example.java:38) ... 36 more Caused by: java.lang.ClassNotFoundException: org.dom4j.DocumentException at java.net.URLClassLoader.findClass(URLClassLoader.java:419) at java.lang.ClassLoader.loadClass(ClassLoader.java:643) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:345) at java.lang.ClassLoader.loadClass(ClassLoader.java:609) ... 40 more what is the exact problem . i have used loader to load the class.Help

    Read the article

  • Android Eclipse test projects cannot be used with a project being built in an Android build tree

    - by orospakr
    An Android Java project placed in a git repository and built in an Android tree in /packages/apps needs to have the project files located at the root of the git repository. This is problematic for creating a complementary Test project, which should ideally be included in the same git repository so commits are atomic for both code and tests. Eclipse gets very unhappy if you include the Test project as a subdirectory. Is there an appropriate approach for dealing with this other than creating a second repository?

    Read the article

  • Symfony/Doctrine: Unserialize in action vs template

    - by Tom
    Hi, Can anyone tell me why calling "unserialize" works fine in an action but gives an offset error in a template? It's basically possible to unserialize a database text result into a variable in an action and pass it to template, in which case it displays fine: $this->clean = unserialize($this->raw); <?php echo $clean ?> But not if called directly in a template: <?php echo unserialize($raw) ?> Would be interested in knowing why this is so and whether there's some workaround. Thanks.

    Read the article

  • Secure Webservice (WCF) without storing credentials on consumer application

    - by Pai Gaudêncio
    Howdy folks, I have a customer that sells a lottery analysis application. In this application, he consumes a webservice (my service, I mean, belongs to the company I work for now) to get statistical data about lottery results, bets made, amounts, etc., from all across the globe. The access to this webservice is paid, and each consult costs X credits. Some people have disassembled this lottery application and found the api key/auth key used to access the paid webservice, and started to use it. I would like to prevent this from happening again, but I can't find a way to authenticate on the webservice without storing the auth. keys on the application. Does anyone have any ideas on how to accomplish such task? ps1.Can't ask for the users to input any kind of credentials. Has to be transparent for them (they shouldn't know what is happening). ps2. Can't use digital certificates for the same reason above, not to mention it's easy to retrieve them and we would fall into the original problem. Thanks in advance.

    Read the article

  • 500 internal server error in joomla ckeditor

    - by testadmin
    First of all thanks. I have installed ckeditor and it's working fine, except the uploading section. I got an error message 500 internal server errors while I am trying to upload a document. Also get this error message in the image uploading section. Does any one have an idea?

    Read the article

  • Automatically running thread stopped after the application idling for more than 1 hour

    - by U Liyanage
    I have a web application which runs on IIS 6.0 and it has a thread that runs on the applicaion startup. That thread will run continously after the application startup with a sleep time of 10 seconds (This will update the application cache from getting the data from DB). But once the application is idle for more than 1 hour this thread is no longer running. Please give me a solution for continously run this thread.

    Read the article

  • Memory allocated with malloc does not persist outside function scope?

    - by PM
    Hi, I'm a bit new to C's malloc function, but from what I know it should store the value in the heap, so you can reference it with a pointer from outside the original scope. I created a test program that is supposed to do this but I keep getting the value 0, after running the program. What am I doing wrong? int f1(int * b) { b = malloc(sizeof(int)); *b = 5; } int main() { int * a; f1(a); printf("%d\n", a); return 0; }

    Read the article

  • simple webservice code ?

    - by Surya sasidhar
    hi, i write a simple webservice code in asp.net when i build the service and run the service it is working fine. when i try to access the webservice it is giving some problem , problem means i am not getting that method (webservice method). After completing writing the webserivce i take a asp.net page (.aspx) and in solution explorer i add a webservices and it is added successfully. but when i adding namespace it is not getting the service name ( i not able to add the namespace of websercice

    Read the article

  • Using glRotate and glTranslate with collision detection.

    - by Cetra
    Hey guys, Say I use glRotate to translate the current view based on some arbitrary user input (i.e, if key left is pressed then rtri+=2.5f) glRotatef(rtri,0.0f,1.0f,0.0f); Then I draw the triangle in the rotated position: glBegin(GL_TRIANGLES); // Drawing Using Triangles glVertex3f( 0.0f, 1.0f, 0.0f); // Top glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right glEnd(); // Finished Drawing The Triangle How do I get the resulting translated vertexes for use in collision detection? Or will I have to manually apply the transform myself and thus doubling up the work? The reason I ask is that I wouldn't mind implementing display lists.

    Read the article

  • Test multiple domains using ASP.NET development server

    - by Pete Lunenfeld
    I am developing a single web application that will dynamically change its content depending on which domain name is used to reach the site. Multiple domains will point to the same application. I wish to use the following code (or something close) to detect the domain name and perform the customizations: string theDomainName = Request.Url.Host; switch (theDomainName) { case "www.clientone.com": // do stuff break; case "www.clienttwo.com": // do other stuff break; } I would like to test the functionality of the above using the ASP.NET development server. I created mappings in the local HOSTS file to map www.clientone.com to 127.0.0.1, and www.clienttwo.com to 127.0.0.1. I then browse to the application with the browser using www.clinetone.com (etc). When I try to test this code using the ASP.net development server the URL always says localhost. It does NOT capture the host entered in the browser, only localhost. Is there a way to test the URL detection functionality using the development server? Thanks.

    Read the article

  • Problem on Last node of the treeview

    - by Domnic
    im using Treeview in my master page...and every node except last node get selected if i click on it and can be redirect to respond treenode page...but when i click last node of the treeview the selectednode changed event doesnt fired it just stop page load event itself(breakpoint)..... how can i solve this problem?

    Read the article

  • Running a Comet server implementation on a Hosted website?

    - by Shishya
    Is it possible to use any of the many implementations of comet like streamhub..etc with a hosted web account from providers like GoDaddy i.e. get a domain and web hosting account from them. I want to host a iphone web application on go daddy, but i need to have comet i.e. data/ notifications pushed to my application. Any other alteranative will also be helpful?

    Read the article

  • Replacing latex with unicode symbols

    - by Elazar Leibovich
    Often, during a conversation or an email, or at a forum, I would like to type some math, but I don't need full equation support. Unicode symbols should suffice. What I need is an easy way to type math related unicode symbols. Since I already know latex, it makes sense to use the latex symbol mnemonics to type the math symbols. What I currently did is to write an AutoHotKey script which automatically replaces \latexSymbol with the corresponding unicode symbol, using the "hotstrings" AutoHotKey feautres. However, the AutoHotKey hotstrings proved unstable for many strings. Having a couple of tens lines would cause AHK to fail recognizing the strings from time to time. Any other solution? (No, Alt+unicode number isn't convenient enough) Attached is my AHK script. The PutUni function is taken from here. ::\infty:: PutUni("e2889e") return ::\sum:: PutUni("e28891") return ::\int:: PutUni("e288ab") return ::\pm:: PutUni("c2b1") return ::\alpha:: PutUni("c991") return ::\beta:: PutUni("c992") return ::\phi:: PutUni("c9b8") return ::\delta:: PutUni("ceb4") return ::\pi:: PutUni("cf80") return ::\omega:: PutUni("cf89") return ::\in:: PutUni("e28888") return ::\notin:: PutUni("e28889") return ::\iff:: PutUni("e28794") return ::\leq:: PutUni("e289a4") return ::\geq:: PutUni("e289a5") return ::\sqrt:: PutUni("e2889a") return ::\neq:: PutUni("e289a0") return ::\subset:: PutUni("e28a82") return ::\nsubset:: PutUni("e28a84") return ::\nsubseteq:: PutUni("e28a88") return ::\subseteq:: PutUni("e28a86") return ::\prod:: PutUni("e2888f") return ::\N:: PutUni("e28495") return

    Read the article

  • MFC Combo-Box Control is not showing the full list of items when I click the drop-down menu...

    - by shan23
    I'm coding an app in MSVS 2008, which has a ComboBox control which I initialize thru the code as below: static char* OptionString[4] = {"Opt1", "Opt2", "Opt3", "Opt4"}; BOOL CMyAppDlg::OnInitDialog() { CDialog::OnInitDialog(); // Set the icon for this dialog. The framework does this automatically // when the application's main window is not a dialog SetIcon(m_hIcon, TRUE); // Set big icon SetIcon(m_hIcon, FALSE); // Set small icon // TODO: Add extra initialization here m_Option.AddString(OptionString[0]); m_Option.AddString(OptionString[1]); m_Option.AddString(OptionString[2]); m_Option.AddString(OptionString[3]); m_Option.SetCurSel(0); return TRUE; // return TRUE unless you set the focus to a control } Now, when I build the app and click the down-arrow, the drop-down box shows the first option ONLY(since I've selected that thru my code). But, if i press down-arrow key on keyboard, it cycles thru the options in the order I've inserted, but never does it show more than 1 option in the box. So, In case an user wants to select option3, he has to cycle through options 1 and 2 !! Though once I select any option using the keyboard, the appropriate event handlers are fired, I'm miffed by this behaviour , as is understandable. I'm listing the properties of the combo-box control as well - only the properties that are true(rest are set to false): Type - Dropdown Vertical Scrollbar Visible Tabstop This has bugged me for weeks now. Can anyone pls enlighten me ?

    Read the article

  • Problems with tk85.dll when shutting down an application that embeds the Python interpreter.

    - by George Edison
    My C++ application embeds the Python interpreter, but seems to be having some trouble when it shuts down. Right after the main window closes, I get a segmentation fault (this is Windows, but we'll call it a segmentation fault anyway). The stack trace is below: #0 102AD580 tk85!Tk_MainWindow() (C:\Users\Nathan\Documents\Projects\PowerPad 1.3\bin\Debug\lib\tk85.dll:??) #1 103082DD tk85!XSetStipple() (C:\Users\Nathan\Documents\Projects\PowerPad 1.3\bin\Debug\lib\tk85.dll:??) #2 102214A3 ??() (C:\Users\Nathan\Documents\Projects\PowerPad 1.3\bin\Debug\lib\tk85.dll:??) #3 10220000 ??() (??:??) #4 00000000 ??() (??:??) Where would I even begin to debug this problem?

    Read the article

  • why my print doesn't work?

    - by udaya
    hi In this below program i am printing the contents of the div when i click the print button i am receiving an alert message printer error not available why it is so <html> <head> <script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script> <script type="text/javascript"> function PrintElem(elem) { Popup($(elem).text()); } function Popup(data) { var mywindow = window.open('', 'my div', 'height=400,width=600'); mywindow.document.write('<html><head><title>my div</title>'); /*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />'); mywindow.document.write('</head><body >'); mywindow.document.write(data); mywindow.document.write('</body></html>'); mywindow.document.close(); mywindow.print(); return true; } </script> </head> <body> <div id="mydiv"> This will be printed. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque a quam at nibh adipiscing interdum. Nulla vitae accumsan ante. </div> <input type="button" value="Print Div" onclick="PrintElem('#mydiv')" /> </body> </html>

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >