Daily Archives

Articles indexed Monday April 12 2010

Page 18/116 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • Use super class's address/pointer in initialization list

    - by JQ
    context 1: class D : public B1, public B2{}; context 2: B2 takes B1 to initialize: B2( B1 * ) //B2's constructor my question is in D's initialization list: D::D() : B1(), B2( ? )... What should be in ? I don't want to put " (B1*)this " in the ? place, because it's no good to use "this" in initialization list. And since B1 part has been initialized, it makes sense to use it. What should I do ?

    Read the article

  • Scheduling Swingworker threads

    - by Simonw
    Hi, I have a 2 processes to perform in my swing application, one to fill a list, and one to do operations on each element on the list. I've just moved the 2 processes into Swingworker threads to stop the GUI locking up while the tasks are performed, and because I will need to do this set of operations to several lists, so concurrency wouldn't be a bad idea in the first place. However, when I just ran fillList.execute();doStuffToList.execute(); the doStuffToList thread to ran on the empty list (duh...). How do I tell the second process to wait until the first one is done? I suppose I could just nest the second process at the end of the first one, but i dunno, it seems like bad practice.

    Read the article

  • WPF Visual States and the transitions between them

    - by Mark
    I'm trying to define many different states in my app (around 7 in my case) and I have defined each one of them with a "Default Transition" of zero seconds, but the animation that accompanies each state goes for 1 second. When I fire up my app I have a button than goes through the states one by one, when I go "State1" - "State2" it looks perfect, but when I tell my app (which should be in State2 now) to go to "State3" it reverts all the objects in my scene back to their base state, and then animates to "State3", why doesnt it go from "State2" to "State3". I was hoping to only define each state's end position without defining a starting position as this would really take a long time to do. Can this be done? Any examples? Cheers, Mark

    Read the article

  • Innodb setting in xampp doesn't seem locate my.cnf file....

    - by bala3569
    I created a new mysql database and i want to use foreign keys with it... I googled and found out this... InnoDB is one of MySQL storage engines, it supports transactions, row-level locking, and foreign-keys. However, by default, InnoDB is not enabled by XAMPP. To enable it, locate the my.cnf configuration file (normally in C:/xampp/mysql/bin directory) and search for the following lines: # Comment the following if you are using InnoDB tables But the path C:/xampp/mysql/bin directory in my system doesn't seem to have such a file... Look at this image http://img691.imageshack.us/img691/524/mysqln.jpg Where is my.cnf file? Any suggestion...

    Read the article

  • Getting a Method's Return Value in the VS Debugger

    - by Bullines
    Is it possible to get a method's return value in the Visual Studio debugger, even if that value isn't assigned to a local variable? For example, I'm debugging the following code: public string Foo(int valueIn) { if (valueIn > 100) return Proxy.Bar(valueIn); else return "Not enough"; } Since I'm not setting any local variables in Foo, and assuming I'm not setting a break point in whatever's calling Foo, is there a way to see what the return value is if I have a breakpoint inside of Foo (or another way)? I don't have much experience with the Autos or Intermediate windows, so I'm not sure if those are even a valid option or not.

    Read the article

  • Php recursion into multidimensional array

    - by dclowd9901
    I'm trying to write a script that, in its process, would need to be able to write an undefined number of nested arrays, and those arrays need to be able to have custom keys. Essentially, the script is being used to convert an HTML DOM into a multidimensional array. I'm not extremely well versed in recursion, so any pointers would be awesome.

    Read the article

  • std::locale breakage on MacOS 10.6 with LANG=en_US.UTF-8

    - by fixermark
    I have a C++ application that I am porting to MacOSX (specifically, 10.6). The app makes heavy use of the C++ standard library and boost. I recently observed some breakage in the app that I'm having difficulty understanding. Basically, the boost filesystem library throws a runtime exception when the program runs. With a bit of debugging and googling, I've reduced the offending call to the following minimal program: #include <locale> int main ( int argc, char *argv [] ) { std::locale::global(std::locale("")); return 0; } This program fails when I run this through g++ and execute the resulting program in an environment where LANG=en_US.UTF-8 is set (which on my computer is part of the default bash session when I create a new console window). Clearing the environment variable (setenv LANG=) allows the program to run without issues. But I'm surprised I'm seeing this breakage in the default configuration. My questions are: Is this expected behavior for this code on MacOS 10.6? What would a proper workaround be? I can't really re-write the function because the version of the boost libraries we are using executes this statement internally as part of the filesystem library. For completeness, I should point out that the program from which this code was synthesized crashes when launched via the 'open' command (or from the Finder) but not when Xcode runs the program in Debug mode. edit The error given by the above code on 10.6.1 is: $ ./locale terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Abort trap

    Read the article

  • Follow the How-To Geek Writers on Twitter

    - by The Geek
    Ever wonder what the How-To Geek writers are up to? If you’re a Twitter user, you can connect with us directly. We’ve also setup a new @howtogeeknews account if you just want to keep up with the latest articles. So if you want just the latest articles… click the image below and then click the Follow button. Otherwise, if you’d like to connect with the rest of us that actually use Twitter, you can follow each of us separately through  the links below. Note: Let’s try to stick to discussion, and leave the tech support questions for our forum. the How-To Geek (that’s me!) -  @howtogeek Matthew Guay – @maguay Trevor Bekolay – @TrevorBekolay Asian Angel – @asian_angel  Andrew Gehman – @andrewgehman Some of the HTG writers are not currently using Twitter… but I’m gonna list their accounts just in case you wanted to follow them. Mark Virtue – @markvirtue Mysticgeek – @mysticgeek  (He’s far too productive to waste time on Twitter!) Enjoy the conversation! Similar Articles Productive Geek Tips Got Awesome Geek Skills? The How-To Geek is Looking for WritersGot Awesome Skills? Why Not Write for How-To Geek?Integrate Twitter With Microsoft OutlookState of the Geek 2009: Behind the Scenes and Other GeekeryAnnouncing the How-To Geek Blogs TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips DVDFab 6 Revo Uninstaller Pro Registry Mechanic 9 for Windows PC Tools Internet Security Suite 2010 Download Videos from Hulu Pixels invade Manhattan Convert PDF files to ePub to read on your iPad Hide Your Confidential Files Inside Images Get Wildlife Photography Tips at BBC’s PhotoMasterClasses Mashpedia is a Real-time Encyclopedia

    Read the article

  • Présentation de Microsoft Online Services, par Michaël Todorovic

    Présentation de Microsoft Online Services, par Michaël Todorovic Citation: Cet article présente la plateforme Microsoft Online Services au travers de l'offre BPOS (Business Productivity Online Standard). Vous pouvez donner votre avis sur cet article en répondant à cette discussion et lui donner une note en notant la discussion. Si vous rencontrez des problèmes avec la mise en ...

    Read the article

  • Java: design problem with private-final-int-value and empty constructor

    - by HH
    $ javac InitInt.java InitInt.java:7: variable right might not have been initialized InitInt(){} ^ 1 error $ cat InitInt.java import java.util.*; import java.io.*; public class InitInt { private final int right; //DUE to new Klowledge: Design Problem //I think having an empty constructor like this // is an design problem, shall I remove it? What do you think? // When to use an empty constructor? InitInt(){} public static void main(String[] args) { InitInt test = new InitInt(); System.out.println(test.getRight()); } public int getRight(){return right;} } Initialization problem with Constructor InitInt{ // Still the error, "may not be initialized" // How to initialise it? if(snippetBuilder.length()>(charwisePos+25)){ right=charwisePos+25; }else{ right=snippetBuilder.length()-1; } }

    Read the article

  • Improper integral calculation using numerical intergration

    - by Andrei Taptunov
    I'm interested in calculation of Improper Integral for a function. Particularly it's a Gauss Integral. Using a numerical integration does make sense for a definite integrals but how should I deal with improper integrals ? Is there any was to extrapolate the function "around" negative infinity or should I just remove this part and start integration from some particular value because cumulative sum near "negative infinity" is almost non-existent for Gauss integral? Perhaps there are some algorithms that I'm not aware about.

    Read the article

  • How do you land your "side gigs"?

    - by DotNetJayHawk
    I work full time as a .Net programmer in Kansas City. I would like to start picking up some side gigs for extra cash. Anyone else doing this? How are you finding the opportunities? Any tips, suggestions, advice would be greatly appreciated.

    Read the article

  • How do I redirect a page in php

    - by user225269
    I'm having difficulties in the making the logout code for php to work. When I click on the logout button, it will go back to the home page, but when I click on the back button in the browser. I can still access the previous page, wherein the user must be logged on to access it. So I'm thinking of redirecting to the login page when the user clicks on the back button on the browser. This is my code, in the home page(where in no user is logged in yet. This page is being called by a logout link on the user page. <? session_start(); session_destroy(); ?> <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"> <tr> <form name="form1" method="post" action="checklogin.php"> <td> <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td colspan="3"><strong>Member Login </strong></td> </tr> <tr> <td width="78">Username</td> <td width="6">:</td> <td width="294"><input name="myusername" type="text" id="myusername"></td> </tr> <tr> <td>Password</td> <td>:</td> <td><input name="mypassword" type="text" id="mypassword"></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td><input type="submit" name="Submit" value="Login"></td> </tr> </table> </td> </form> </tr> </table>

    Read the article

  • How can I iterate through table styles only?

    - by Vitali Climenco
    I have a procedure that iterates through the styles available to a document: Sub EnumerateStyles() For Each Style in ActiveDocument.Styles `some custom code Next End Sub I do not need all the styles, and just those that are applicable to tables only. How can I programmatically filter the styles? Thank you

    Read the article

  • Framework for iPhone wait screens

    - by 4thSpace
    I ran across a small framework some time back that someone put together for iPhone wait screens. But now I can't find any trace of it. Does anyone have a link to it? It may not be a framework as much as a few code snippets. But the guy had it all pre-made. You just needed to implement and specify the type of wait screen you wanted.

    Read the article

  • Object type to Reader type?

    - by GK
    I have a java.io.Reader as the return type of my method. But i have Object type of an instance which i get from Database. So how can I convert this to Reader type and return? need help thanks.

    Read the article

  • Can I make ungetc unblock a blocking fgetc call?

    - by Paul Beckingham
    I would like to stuff an 'A' character back into stdin using ungetc on receipt of SIGUSR1. Imagine that I have a good reason for doing this. When calling foo(), the blocking read in stdin is not interrupted by the ungetc call on receipt of the signal. While I didn't expect this to work as is, I wonder if there is a way to achieve this - does anyone have suggestions? void handler (int sig) { ungetc ('A', stdin); } void foo () { signal (SIGUSR1, handler); while ((key = fgetc (stdin)) != EOF) { ... } }

    Read the article

  • Forwarding first responder to UIScrollView unsuccessful

    - by Winston
    Hello, I am trying to create an image cropping bpx whereby the underlying image can be zoomed an scrolled while the cropping "maskview" layer stays the same and the corners can be dragged in any direction. To achieve this, the ImageView is added to a UIScrollView, and this is added to the SelectionViewController.view . I then add the cropping "maskview" layer to the SelectionViewController.view. I did this instead of adding to the scrollview so that the cropping maskview won't be expanded when the underlying image expands. @interface SelectionViewController : UIViewController <UIScrollViewDelegate> { UIImageView *photoview; // Added to self.scrollview MaskedView *maskedview; // Added to self.view UIScrollView *scrollview; // Added to self.view } The maskview has first responder status and responds accordingly. However, the only event I am interested in the maskview is if any of the corners are dragged (this works fine). The problem I want to try to solve is two-fold: If it is a pinch or zoom gesture, I am trying to forward the responder to the UIScrollview using: [self.nextResponder touchesMoved:touches withEvent:event]; The scrollview does not seem to respond. I have confirmed that the self.nextResponder after the maskedview is the SelectionViewController's view itself. From there, it doesn't seem like the UIScrollview responds. It does respond fine if I remove the cropping maskedview. If I zoom in on the underlying image and the cropping maskview rectangle is still the same, I want to now crop the actual zoomed image. Let's say for the upper left hand corner of the crop box, how can I find what the coordinates translates to in the underlying UIImageView now that the image has been zoomed? Any insight into either of these questions would be appreciated. Thank you, Winston

    Read the article

  • Cross platform unicode path handling

    - by Matt Joiner
    I'm using boost::filesystem for cross-platform path manipulation, but this breaks down when calls need to be made down into interfaces I don't control that won't accept UTF-8. For example when using the Windows API, I need to convert to UTF-16, and then call the wide-string version of whatever function I was about to call, and then convert any output back to UTF-8. While the wpath, and other w* forms of many of the boost::filesystem functions help keep sanity, are there any suggestions for how best to handle this conversion to wide-string forms where needed, while maintaining consistency in my own code?

    Read the article

  • getting sound on .asf video on Mac OS X

    - by user248237
    When I try to open the following video: http://streaming1.hss-win.rpi.edu/ondemand/cogsci/issues_in_cs/issues_in_cogsci_02_04_2009.asf I can get it but without any sound... I tried it both inside the browser (Firefox) and in QuickTime Media player but still it does not work. Any idea how to get this to work on Mac OS X? Using version 10.6. thank you.

    Read the article

  • Syncing two separate structures to the same master data

    - by Mike Burton
    I've got multiple structures to maintain in my application. All link to the same records, and one of them could be considered the "master" in that it reflects actual relationships held in files on disk. The other structures are used to "call out" elements of the main design for purchase and work orders. I'm struggling to come up with a pattern that deals appropriately with changes to the master data. As an example, the following trees might refer to the same data: A |_ B |_ C |_ D |_ E |_ B |_ C |_ D A |_ B E C |_ D A |_ B C D E These secondary structures follow internal rules, but their overall structure is usually user-determined. In all cases (including the master), any element can be used in multiple locations and in multiple trees. When I add a child to any element in the tree, I want to either automatically build the secondary structure for each instance of the "master" element or at least advertise the situation to the user and allow them to manually generate the data required for the secondary trees. Is there any pattern which might apply to this situation? I've been treating it as a view problem, but it turns out to be more complicated than that when you look at the initial generation of the data.

    Read the article

  • Where can I find free WPF controls and control templates?

    - by Geoffrey Chetwood
    Duplicate: Where can I find free WPF controls and control templates? I am looking for some recommendations on good places to find libraries of controls/templates/styles for WPF. I know about the usual places like Infragistics, but it seems to me that there should be some kind of community effort by now to share nice, clean, well written controls for WPF controls. I am not big on the design side, and it would be nice to fill out my personal libraries with some nice examples from people who are better at design. Any ideas/recommendations?

    Read the article

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