Search Results

Search found 2672 results on 107 pages for 'michael baldry'.

Page 87/107 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • C++ Problem: Class Promotion using derived class

    - by Michael Fitzpatrick
    I have a class for Float32 that is derived from Float32_base class Float32_base { public: // Constructors Float32_base(float x) : value(x) {}; Float32_base(void) : value(0) {}; operator float32(void) {return value;}; Float32_base operator =(float x) {value = x; return *this;}; Float32_base operator +(float x) const { return value + x;}; protected: float value; } class Float32 : public Float32_base { public: float Tad() { return value + .01; } } int main() { Float32 x, y, z; x = 1; y = 2; // WILL NOT COMPILE! z = (x + y).Tad(); // COMPILES OK z = ((Float32)(x + y)).Tad(); } The issue is that the + operator returns a Float32_base and Tad() is not in that class. But 'x' and 'y' are Float32's. Is there a way that I can get the code in the first line to compile without having to resort to a typecast like I did on the next line?

    Read the article

  • Oauth2 External Browser Request - App Launches, Credentials received, Browser Not Updated

    - by Michael Drozdowski
    I'm using an external browser request to authenticate myself with the SoundCloudAPI in OSX. My app launches, and has a button that opens an external browser window to authenticate against SoundCloud. When I click "connect" in the new window, I get a "External Protocol Request" that is consistent with my custom launch URI scheme. Clicking this loads the app, and it gets the correct credentials. The trouble is, the browser window never changes - it simply says that it's connecting forever. There is no "connection confirmed" alert coming from SoundCloud. I know I'm logged in because I can make the correct calls to the API to get things such as my username. Why isn't the browser confirming the connection or dismissing? The same thing happens if I load the authentication in an internal WebView in the app.

    Read the article

  • How to only show simpleTip if certain conditions are true?

    - by Michael
    I'm working on my first jquery project and have a question regarding the simpletip plugin. I basically have a calendar where the user can click different meeting titles and the corresponding dates get shaded in with a certain color. I am then using the simpletip to display more detailed information about the meeting when the user hovers over that date. What I want is for the simpletip to only display if the cell is colored in, or "on". When the calendar is blank and no meetings are activated, I don't want all the simpletips to show. I have tried using an if statement with a .mouseover() - this works at first, when the cells are off, no simpletip. After the meeting is turned on and colored in, the first mouseover does nothing, then the second mouseover shows the simpletip, and then the simpletip remains active even after the cell is turned off. Hope this makes sense... please help! Thank you in advance

    Read the article

  • Combobox how to get the selected item to show a theme

    - by Michael Quiles
    I'm doing a tic tac toe game and I am trying to add a combo box that will change the applications background based on what the person selects right now I have summer, spring, fall, winter and the images are in the bin/debug folder how can I get this to work I don't know where to start and the tutorials are a bit confusing. Could you please help me

    Read the article

  • Does a syntax for this exist? In any language?

    - by Michael
    It seems pretty common to me to have an argument, in a dynamically typed language that is either an Object or a key to lookup that object. For instance when I'm working with a database I might have a method getMyRelatedStuff(person) All I really need to lookup the related stuff is the id of the person so my method could look like this in python: def getMyRelatedStuff(person_or_id): id = person_or_id.id if isinstance(person,User) else person_or_id #do some lookup Or going the other direction: def someFileStuff(file_or_name): file = file_or_name if hasattr(file,'write') else open(file_or_name)

    Read the article

  • Make an animation using a loop

    - by Michael Quiles
    I need help making this loop to move a label move smoothly across the screen using count for the animation (its required). The labels location is currently in location 0,0 I'd like to make it go in a square right - down - left - back to its original position how can I accomplish this ? please give me an example using my code below. Thank You in advance. private void xAnimeTimer_Tick(object sender, EventArgs e) { int count; this.xAnimTimer.Stop(); for (count = 0; count <= 100; count++) { this.xAnimLabel.Left = count; } for (count = 0; count <= 150; count++) { this.xAnimLabel.Top = count; }

    Read the article

  • Best loose way to get objects with common base class

    - by Michael Teper
    I struggled to come up with a good title for this question, so suggestions are welcome. Let's say we have an abstract base class ActionBase that looks something like this: public abstract class ActionBase { public abstract string Name { get; } public abstract string Description { get; } // rest of declaration follows } And we have a bunch of different actions defined, like a MoveFileAction, WriteToRegistryAction, etc. These actions get attached to Worker objects: public class Worker { private IList<ActionBase> _actions = new List<ActionBase>(); public IList<ActionBase> Actions { get { return _actions; } } // worker stuff ... } So far, pretty straight-forward. Now, I'd like to have a UI for setting up Workers, assigning Actions, setting properties, and so on. In this UI, I want to present a list of all available actions, along with their properties, and for that I'd want to first gather up all the names and descriptions of available actions (plus the type) into a collection of the following type of item: public class ActionDescriptor { public string Name { get; } public string Description { get; } poblic Type Type { get; } } Certainly, I can use reflection to do this, but is there a better way? Having Name and Description be instance properties of ActionBase (as opposed to statics on derived classes) smells a bit, but there isn't an abstract static in C#. Thank you!

    Read the article

  • How to add padding for background image

    - by michael
    Hi, I have a linear layout which has a background image (a 9 patched png file). How can I add padding to left and right so that the background image does not take up the whole width? I have tried 'android:paddingLeft' and 'android:paddingRight', but that does not change anything. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingLeft="25dip" android:paddingRight="25dip" android:background="@drawable/background"> The whole background still stretches the whole screen width. Thank you for any help.

    Read the article

  • How to enable Apache internal debug log (Win32)

    - by Michael
    On Win32 I'm getting intermittent output like this at page header: order allow,deny deny from allorder allow,deny deny from all I'm running php script which has number of .htaccess files in each subfolder. I need to understand why sometimes apache is just dumping me a content of this files. So just wondering if there is any way to enable debug log. I've tried ErrorLog "e:/wamp/logs/apache_error.log" LogLevel debug However can't see any debug output neither in error nor in access logs. Thanks

    Read the article

  • What is the equivalent of Java's .length for arrays in C#?

    - by Michael Loftus
    I'm new to C#, and I'm trying to convert this code from java into C#. static public double euclidean_2(double[] x, double[] y) { if (x.length != y.length) throw new RuntimeException("Arguments must have same number of dimensions."); double cumssq = 0.0; for (int i = 0; i < x.length; i++) cumssq += (x[i] - y[i]) * (x[i] - y[i]); return cumssq; } I know java uses .length but what is the equivalent in C# since I keep getting an error Thanks

    Read the article

  • Can an ActiveRecord before_save filter halt the save without halting the transaction?

    - by Michael Boutros
    Is there any way for a before_save filter to halt the entire save without halting the transaction? What I'm trying to do is have a "sample" version of my model that the user can interact with and save but the changes themselves are never actually saved. The following will halt the transaction and (naturally) return false when I call @model.update_attributes: before_filter :ignore_changes_if_sample def ignore_changes_if_sample if self.sample? return false end end Thanks!

    Read the article

  • Problem with thread after SCREEN_OFF in Android

    - by michael
    I’m doing an application that listens to the android.intent.action.SCREEN_OFF in a Service (if that matter) and then it is supposed to wait a few seconds and launch an action, I’ve tried a timer schedule method, thread and handler postDelay method but all of them seems to fail, they are never executed on a device, it seems like it’s being freezed/killed after phone is locked. It works on emulator and on device attached to USB, but never with device working on battery only, which actually is a main scenario. Do you know any solutions to this?

    Read the article

  • Script-Based Configuration in .net?

    - by Michael Stum
    One of the downsides of web.config/app.config is that it's just Magic Strings everywhere, since it's just an XML file. Interpreted languages like PHP or Ruby have the advantage that the configuration is just code that is executed. In .net, doing stuff in code requires a redeployment, which defeats the purpose. Now, before I build my own web.config replacement based on Boo or PowerShell I wanted to know if there is an existing one?

    Read the article

  • how to get Horizontal menu go to left when it's too big

    - by Michael
    Hello all, I've got a horizontal menu on my website: http://www.alcmariavictrix.nl When i browse it in small browsers (IPhone), the horizontal menu on top is screwed. What i want to perform is get that horizontal menu to the left when the browser can't display it all in one line. Does anyone know how to do this? example:

    Read the article

  • How to get horizontal menu to go to left when it's too big

    - by Michael
    Hello all, I've got a horizontal menu on my website: http://www.alcmariavictrix.nl When i browse it in small browsers (IPhone), the horizontal menu on top is screwed. What i want to perform is get that horizontal menu to the left when the browser can't display it all in one line. Does anyone know how to do this? example: The right way to do it This is the think i don't want This is how it should be done when it's wrong

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >