Daily Archives

Articles indexed Sunday June 6 2010

Page 16/76 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • Viewing namespaced global variables in Visual Studio debugger?

    - by Chris
    When debugging a non-managed C++ project in Visual Studio 2008, I occasionally want to see the value of a global variable. We don't have a lot of these but those that are there all declared within a namespace called 'global'. e.g. namespace global { int foo; bool bar; ... } The problem is that when the code is stopped at a breakpoint, the default debugging tooltip (from pointing at the variable name) and quickwatch (shift-f9 on the variable name) don't take the namespace into consideration and hence won't work. So for example I can point at 'foo' and nothing comes up. If I shift-f9 on foo, it will bring up the quickwatch, which then says 'CXX0017: Error: symbol "foo" not found'. I can get around that by manually editing the variable name in the quickwatch window to prefix it with "global::" (which is cumbersome considering you have to do it each time you want to quickwatch), but there is no fix for the tooltip that I can work out. Setting the 'default namespace' of the project properties doesn't help. How can I tell the VS debugger to use the namespace that it already knows the variable is declared in (since it has the declaration right there), or, alternatively, tell it a default namespace to look for variables in if it doesn't find them? My google-fu has failed to find an answer. This report lists the same problem, with MS saying it's "by design", but even so I am hoping there is some way to work around it (perhaps with clever use of autoexp.dat?)

    Read the article

  • Multiple Socket Connections

    - by BSchlinker
    I need to write a server which accepts connections from multiple client machines, maintains track of connected clients and sends individual clients data as necessary. Sometimes, all clients may be contacted at once with the same message, other times, it may be one individual client or a group of clients. Since I need confirmation that the clients received the information and don't want to build an ACK structure for a UDP connection, I decided to use a TCP streaming method. However, I've been struggling to understand how to maintain multiple connections and keep them idle. I seem to have three options. Use a fork for each incoming connection to create a separate child process, use pthread_create to create an entire new thread for each process, or use select() to wait on all open socket IDs for a connection. Recommendations as to how to attack this? I've begun working with pthreads but since performance will likely not be an issue, multicore processing is not necessary and perhaps there is a simpler way.

    Read the article

  • Unable to execute functions on elements loaded with AJAX (jQuery)

    - by Jason
    i am using .prepend() to load data after i POST a form with .ajax(). once the new elements are added, my functions won't work on them. if i link the js file directly in the prepended data, the functions work, but when i POST, i starts multiplying the events. i have a feeling it has something to do with binding, but i am not able to figure out exactly how to handle it. any ideas? thanks!

    Read the article

  • how to access objects in run-time in qtp?

    - by Onnesh
    We have a function which accesses two types of controls like button and list box in standard windows app. The function uses only the control name as arguments, so there is no way qtp could understand what type of control it is. how to resolve this? Write 2 separate functions- 1 for button & another for list box?

    Read the article

  • C# string syntax error

    - by Mesa
    I'm reading in data from a file and trying to write only the word immediately before 'back' in red text. For some reason it is displaying the word and then the word again backwords. Please help. Thank you. private void Form1_Load(object sender, EventArgs e) { Regex r = new Regex(" "); StreamReader sr = new StreamReader("KeyLogger.txt"); string[] tokens = r.Split(sr.ReadToEnd()); int index = 0; for(int i = 0; i <= tokens.Length; i++) { if (tokens[i].Equals("back")) { //richTextBox1.Text+="TRUE"; richTextBox1.SelectionColor = Color.Red; string myText; if (tokens[i - 1].Equals("back")) myText = ""; else myText = tokens[i - 1]; richTextBox1.SelectedText = myText; richTextBox1.Text += myText; } else { //richTextBox1.Text += "NOOOO"; } //index++; //richTextBox1.Text += index; } }

    Read the article

  • Adding a new view to a Window-based app (re: MapKit tutorial)

    - by blackkettle
    I'm trying add a new view in a window-based application but not really getting anywhere. I've been going through a great MapKit tutorial lately, http://mithin.in/2009/06/22/using-iphone-sdk-mapkit-framework-a-tutorial/ and have successfully set it up and added some further buttons and customizations. However I've gotten stuck at what I assume ought to be a brain-dead simple step. I have added a toolbar to the bottom of the app, and a 'settings' style button. Following this I created a SettingsViewController complete with it's own view. Now I'd like to connect them but I've had absolutely no luck trying to figure out how to do this. I've also gone through several other good tutorials lately, http://miketeo.net/wp/index.php/2008/08/31/simple-iphone-tutorial-part-1.html http://blog.webscale.co.in/?p=228 http://www.iphonesdkarticles.com/2009/01/uitableview-searching-table-view.html but I've gotten lost trying to tie these two bits together. I'm sure it is quite trivial to link these two items but I've had no luck.

    Read the article

  • What is the cheapest non-colocation way to serve about 10 static files at a rate of 100 megabits per

    - by Mark Maunder
    I've looked at Amazon S3 and it costs roughly $4746 per month for 100 megabits/s (which translates into 31,640 Gigabytes of data transferred. That's at a rate of $0.15 per gig.) I haven't found a cheaper "cloud" option. I'm curious if there's any other cloud hosting option out there cheaper than S3. Uptime is not an issue because I can build failover for most things into the browser. e.g. I can use javascript to say "if the image didn't load then go to this other URL instead." FYI I'm currently using a colocation facility which is about 30% cheaper than S3 and I'm familiar with colo prices - so this question is really about "cloud" services and by that I mean services where I don't have to worry about the infrastructure.

    Read the article

  • jwysiwyg to php

    - by perses
    I am using this jQuery based jWysiwyg. http://code.google.com/p/jwysiwyg How do I pass the value of $('#wysiwyg').val() to php script. For example to show the value of jwysiwyg in an alert box, I am using <form name="form1" method="post" action="sendmail.php"> <textarea name="wysiwyg" id="wysiwyg" rows="5" cols="103"></textarea> <input type="submit" name="Submit" value="Login"></input> <input type="button" value="Alert HTML" onclick="alert($('#wysiwyg').val());" /> </form> What I need is how to pass value of jwysiwyg's value in submit control and how do I call "logout.php" on pressing of a button?

    Read the article

  • QLineEdit: how to handle up and down arrows?

    - by Eye of Hell
    Hello. I have a console input in my Qt based application, it's a QLineEdit, all Ui is designed via QtDesigner. Is it any easy way way to handle up and down arrows in order to implement input history? The 'go to slot' only show returnProcessed signal, no way i can see to handle up and down arrows :(

    Read the article

  • Fluent NHibernate automap a HasManyToMany using a generic type

    - by zulkamal
    I have a bunch of domain entities that can be keyword tagged (a Tag is also an entity.) I want to do a normal many-to-many (Tag - TagReview <- Review) table relationship but I don't want to have to create a new concrete relationship on both the Entity and Tag every single time I add a new entity. I was hoping to do a generic based Tag and do this: // Tag public class Tag<T> { public virtual int Id { get; private set; } public virtual string Name { get; set; } public virtual IList<T> Entities { get; set; } public Tag() { Entities = new List<T>(); } } // Review public class Review { public virtual string Id { get; private set; } public virtual string Title { get; set; } public virtual string Content { get; set; } public virtual IList<Tag<Review>> Tags { get; set; } public Review() { Tags = new List<Tag<Review>>(); } } Unfortunately I get an exception: ----> System.ArgumentException : Cannot create an instance of FluentNHibernate.Automapping.AutoMapping`1[Example.Entities.Tag`1[T]] because Type.ContainsGenericParameters is true. I anticipate there will be maybe 5-10 entities so mapping normally would be ok but is there a way to do something like this?

    Read the article

  • VB to c++ or c#?

    - by hilzmas
    I am trying to translate this code but I don't understand how to use the GET / PUT part of the code in another language like c++ or c#. This is the code : Private Sub cmd_Click() Dim i As Integer, a As Integer a = 10 For i = 1 To a Dim file As String Open "txt" For Binary As #1 file = Space(LOF(1)) Get #1, , file Close #1 Randomize Open "txtpath" & "\" & i & "txtname" For Binary As #1 Put #1, , file Put #1, , Rnd Close #1 Next i End Sub The code could have bug because I replaced variables with plain text. What I understand is that the code get a file and then save it with some random data added to make it look different than the original. I don't use vb since years and I don't remember anything about it. Can someone help me porting this snippet to c++ or c#?

    Read the article

  • git partial pull

    - by KennyTM
    I am maintaining a repository A. Another contributor has cloned A to another repository B. Later, the other contributor added files F, which is irrelevant to me, into B. Now I want to merge changes in B back to A, but without committing F. How to do so?

    Read the article

  • How do I echo the number of items in an array?

    - by Joel
    A total newbie question I know. I'm sing Zend framework, and sending an array from the controller: $this->view->googleArray = $viewFeedArray; In the view, I have a foreach loop that is populating a table with the array contents. <?php foreach($this->googleArray as $row) { ?> <tr> <td><?php echo $row['when']; ?></td> ... ... </tr> <?php } ?> It all works fine. At the top of the table, I want to list the number of items in the array. Something like (which doesn't work): <?php echo $this->googleArray->totalResults; ?> event(s) found How would I do that? Thanks!

    Read the article

  • How to get root as '/' with Kohana3, base_url and mod rewrite.

    - by Drew
    Hi all! I've only just started using Kohana ( 3 hours ago), and so far it's blown my socks off (and I'm wearing slippers, so that's quite impressive). Right now, I have a controller 'Controller_FrontPage' with associated views and models and I'm trying to get it accesible from the root of my website (eg, http://www.mysite.com/). If I edit the default controller in the bootstrap from: Route::set('default', '(<controller>(/<action>(/<id>)))') ->defaults(array( 'controller' => 'welcome', 'action' => 'index', )); to 'controller' => '', I get an error, could not find controller_ (which makes sense), and if I change it to 'controller' => '/', I get an error, could not find controller_/ (which also makes sense). If I set 'controller' => 'FrontPage', everything works fine, but all my links (html::anchor(...)) point to http://www.mysite.com/FrontPage/*. Is there a way to have all the anchors point to http://www.mysite.com/*?

    Read the article

  • JSF Data transfer between UI to Business Layers

    - by Ram
    Hi, We are using JSF in UI,Spring in Business Layer,Hibernate in Persistance layer.Now my question is how to pass data from my JSF1.1_01 UI to spring Business Layer.Can I directly used my Business object in my Backed Bean or through DTO should I transfer data between the layer? Can one explain me with clear explanation if possible with piece of code and that related websites?

    Read the article

  • xpcom array can transfer in different xul files ?

    - by jin
    Now I am developing a firefox extension, can I define a global array in a js with the main xul . and I found when I use it in another js with another xul , it could not worked , so I searched the document of Firefox development. I found a common array can not be transfered between two js files with different xul files. and then I difined a xpcom mutablearray in a js: var eleList = Components.classes["@mozilla.org/array;1"] .createInstance(Components.interfaces.nsIMutableArray); but when I want to use it in another js : it still not work , why? Thank you very much!

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >