Search Results

Search found 626 results on 26 pages for 'aaron simmons'.

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

  • Using member variables inherited from a templated base class (C++)

    - by Aaron Becker
    I'm trying to use member variables of a templated base class in a derived class, as in this example: template <class dtype> struct A { int x; }; template <class dtype> struct B : public A<dtype> { void test() { int id1 = this->x; // always works int id2 = A<dtype>::x; // always works int id3 = B::x; // always works int id4 = x; // fails in gcc & clang, works in icc and xlc } }; gcc and clang are both very picky about using this variable, and require either an explicit scope or the explicit use of "this". With some other compilers (xlc and icc), things work as I would expect. Is this a case of xlc and icc allowing code that's not standard, or a bug in gcc and clang?

    Read the article

  • jQuery for XUL?

    - by Aaron de Windt
    I have read on the internet and found out that jQuery works OK on XUL. My questions are: Are there any jQuery plugins that are specially made to work with XUL? Is there any other jQuery-like library that was specially made for XUL? I have not yet tested jQuery on XUL, I'm just asking these questions for curiosity.

    Read the article

  • 3d / 2.5d game library for iphone and pc

    - by Aaron Qian
    I'm trying to make a 2d shooter game with 3d background. The player and enemies are essentially just quads with textures. The background will be simple 3d polygons with textures and some fog and light. Therefore, I don't need a really powerful 3d library. I tried Unity3D and Torque2D, but I don't like to use their GUI editors. I prefer to work with code. So, is there a cross platform (mainly windows and iPhone) 3d / 2.5d game library, commercial or open source? I assume it will be only limited to c, c++, and object-c due to apple's new ToS.

    Read the article

  • OO and Writing Drupal Modules

    - by Aaron
    Preface: Yes, I've read: http://drupal.org/node/547518 I am writing 'foo' module for Drupal6, where I am organizing the code in an OO fashion. There's a class called Foo that has a bunch of setters and accessors, and it is working quite well at abstracting some pretty nasty code and SQL. The question is is it common practice to expose a class for other modules, or is it better to wrap things in the more typical foo_myfnname()? For example, if I am writing the module's docs, should I tell people to do this: $foo = new Foo(); $something = $foo->get_something(); or tell them to call: foo_get_something(); which under the hood does: function foo_get_something() { $foo = new Foo(); return $foo->get_something(); }

    Read the article

  • Month to Date in SQL Server 2008

    - by Aaron Smith
    Hopefully this will be an easy one to answer. I am working on a table that requires MTD data. One of our SQL guys told me to use MONTH (@monthtodate)= 11 Where @monthtodate is set to GetDate() in the parameter list in SQL Server Management Studio. So in "theory", he says, it should select the month (11) and then get today and return all the requested data in between those two dates. But I'm thinking this isn't correct. In looking at my data I'm starting to think that It's just returning data for the whole month of November instead of just MTD. I guess, technically, anything that has 0 won't be calculated. However that just means it's poorly written code correct? In your opinions, would this be the better way to return MTD data: production_date <= @today and Production_Date >= DATEADD(mm, DATEDIFF(mm, 0, @today), 0) Thanks in advance everyone!

    Read the article

  • php - get content from second pair of quotes in string

    - by Aaron Turecki
    I'm trying to get the contents of the second quotes and only the second quotes from a string. Right now I'm able to get the contents of all three quotes. What am I doing wrong? Is it possible to just print the second value in the output array? Text 2014-06-02 11:48:41.519 -0700 Information 94 NICOLE Client "[WebDirect] (207.230.229.204) [207.230.229.204]" opening database "FMServer_Sample" as "Admin". PHP if (preg_match_all('~(["\'])([^"\']+)\1~', $line, $matches)) $database_names = $matches[2]; print_r($database); Output [WebDirect] (207.230.229.204) [207.230.229.204], FMServer_Sample, Admin

    Read the article

  • How can I highlight the line of text that is closest to the mouse?

    - by Aaron Digulla
    I have a long text and I'd like to offer the user a reading help: The current line should be highlighted. To make it easier, I'll just use the Y coordinate of the mouse (this way, the mouse pointer isn't going to get in the way). I have a big DIV with the id content which fills the whole width and a small DIV with the class content for the text (see here for an example). I'm using jQuery 1.4. How can I highlight the line of text that is closest to the current mouse position?

    Read the article

  • Why do some people prefer "T const&" over "const T&"?

    - by Michael Aaron Safyan
    So, I realize that const T& and T const& are identical and both mean a reference to a const T. In both cases, the reference is also constant (references cannot be reassigned, unlike pointers). I've observed, in my somewhat limited experience, that most C++ programmers use const T&, but I have come across a few people who use T const&. Is this just a personal preference? Why is one chosen over the other?

    Read the article

  • strcmp() but with 0-9 AFTER A-Z? (C/C++)

    - by Aaron
    For reasons I completely disagree with but "The Powers (of Anti-Usability) That Be" continue to decree despite my objections, I have a sorting routine which does basic strcmp() compares to sort by its name. It works great; it's hard to get that one wrong. However, at the 11th hour, it's been decided that entries which begin with a number should come AFTER entries which begin with a letter, contrary to the ASCII ordering. They cite the EBCDIC standard has numbers following letters so the prior assumption isn't a universal truth, and I have no power to win this argument... but I digress. Therein lies my problem. I've replaced all appropriate references to strcmp with a new function call nonstd_strcmp, and now need to implement the modifications to accomplish the sort change. I've used a FreeBSD source as my base: http://freebsd.active-venture.com/FreeBSD-srctree/newsrc/libkern/strncmp.c.html if (n == 0) return (0); do { if (*s1 != *s2++) return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); if (*s1++ == 0) break; } while (--n != 0); return (0); I guess I might need to take some time away to really think about how it should be done, but I'm sure I'm not the only one who's experienced the brain-deadness of just-before-release spec changes.

    Read the article

  • Java Inheritance - Getting a Parameter from Parent Class

    - by Aaron
    I'm trying to take one parameter from the parent class of Car and add it to my array (carsParked), how can i do this? Parent Class public class Car { protected String regNo; //Car registration number protected String owner; //Name of the owner protected String carColor; /** Creates a Car object * @param rNo - registration number * @param own - name of the owner **/ public Car (String rNo, String own, String carColour) { regNo = rNo; owner = own; carColor = carColour; } /** @return The car registration number **/ public String getRegNo() { return regNo; } /** @return A String representation of the car details **/ public String getAsString() { return "Car: " + regNo + "\nColor: " + carColor; } public String getColor() { return carColor; } } Child Class public class Carpark extends Car { private String location; // Location of the Car Park private int capacity; // Capacity of the Car Park - how many cars it can hold private int carsIn; // Number of cars currently in the Car Park private String[] carsParked; /** Constructor for Carparks * @param loc - the Location of the Carpark * @param cap - the Capacity of the Carpark */ public Carpark (String locations, int room) { location = locations; capacity = room; } /** Records entry of a car into the car park */ public void driveIn() { carsIn = carsIn + 1; } /** Records the departure of a car from the car park */ public void driveOut() { carsIn = carsIn - 1; } /** Returns a String representation of information about the carpark */ public String getAsString() { return location + "\nCapacity: " + capacity + " Currently parked: " + carsIn + "\n*************************\n"; } }

    Read the article

  • How should I cleanly track selected item in ASP.NET MVC?

    - by Aaron Anodide
    Is there a better way to track the selected item than how I do it in the code below which implements a row of navigation links. @Html.ActionLink( "PreApproval", "Summary", new { mode = "preapproval" }, new { @class = Model.Mode == "preapproval" ? "selected" : "notselected" }) | @Html.ActionLink( "ActionNeeded", "Summary", new { mode = (string)null }, new { @class = string.IsNullOrWhiteSpace(Model.Mode) ? "selected" : "notselected" }) | ... Should I try to encasulate the functionality of menu navigation or is this a standard approach?

    Read the article

  • Scoping in embedded groovy scripts

    - by Aaron Digulla
    In my app, I use Groovy as a scripting language. To make things easier for my customers, I have a global scope where I define helper classes and constants. Currently, I need to run the script (which builds the global scope) every time a user script is executed: context = setupGroovy(); runScript( context, "global.groovy" ); // Can I avoid doing this step every time? runScript( context, "user.groovy" ); Is there a way to setup this global scope once and just tell the embedded script interpreter: "Look here if you can't find a variable"? That way, I could run the global script once. Note: Security is not an issue here but if you know a way to make sure the user can't modify the global scope, that's an additional plus.

    Read the article

  • actionscript display timer

    - by Aaron
    ok so im using real basic code for a small game and ive got a timer set up on one room and cant get it to display in the endgame room please help? this is the code i used var gameStartTime:uint; var gameTime:uint; var gameTimeField:TextField; gameTimeField = new TextField(); gameTimeField.x = 900; gameTimeField.y = 50; addChild(gameTimeField); gameStartTime = getTimer(); gameTime = 0; addEventListener(Event.ENTER_FRAME,showTime); function showTime(event:Event) {gameTime = getTimer()-gameStartTime; gameTimeField.text = "Time: "+clockTime(gameTime); } function clockTime(ms:int) { var seconds:int = Math.floor(ms/100); var minutes:int = Math.floor(seconds/60); seconds -= minutes*60; var timeString:String = minutes+":"+String(seconds+100).substr(1,2); return timeString; }

    Read the article

  • C++ include .h includes .cpp with same name as well?

    - by aaron
    so I have text.cpp, which 'includes' header.h, and then I have a header.cpp which includes header.h. How is header.cpp compiled as well? I'm walking through a guide here, and thoroughly confused. Also, what is the correct terminology for what I am asking? I know I sound like a moron, and I apologize, but I'm ignorant. Oh, main is in test.cpp. Also, if header.cpp includes , why can't I use iostream function calls in text.cpp if it is included? If I include iostream in text.cpp will it be included in the program twice (in other words, bloat it)?

    Read the article

  • PC reboots spontaenously: debugging tips [closed]

    - by aaron
    I swapped my core 2 duo for a quad core recently, and generally things run fine, but every now and then my computer just restarts. I don't even get a blue screen (Vista 32). Core temp isn't a problem. My thinking is that my power supply is inadequate, but I haven't been able to test that (one idea was to under clock the cpu to see if that helped, but going up in speed was the only simple thing to do in the BIOS) Two cases where I semi-consistanly get problems: - Borderlands windowed after some period of time (and some other games, but Borderlands does it pretty regularly) - watching a video (e.g. quicktime/vlc) and having another video running Another thought is non-cpu heat? Maybe the graphics card? Any thoughts on how to track this down appreciated. Thanks!

    Read the article

  • How do you stop echo of multiple values with 'foreach' in PHP?

    - by Aaron EA
    How do you when using custom fields in Wordpress echo just the first value using foreach? Currently the code is: <?php for(get_field('venue_event') as $post_object): ?> <a href="<?php echo get_permalink($post_object); ?>"><?php echo get_the_title($post_object) ?></a> <?php endforeach; ?> This takes the field from the wordpress page (the field is a link to another page), creates a link to that page using get_permalink but when I want to echo the page title it does it, but then it also echos all other values that are not needed.

    Read the article

  • How to op-en file and view in a rich text box using vb.net?

    - by Aaron Warnke
    Hi I am trying to open and view a files text in a rich text box. Here is what I have please let me know what I am doing wrong? Private Sub loadButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles loadButton.Click ' Displays an OpenFileDialog so the user can select a Cursor. Dim openFileDialog1 As New OpenFileDialog() openFileDialog1.Filter = "Cursor Files|*.txt" openFileDialog1.Title = "Select a Cursor File" If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then ' Assign the cursor in the Stream to the Form's Cursor property. Me.mainRTBox = New Text(openFileDialog1.OpenFile()) End If End Sub

    Read the article

  • SEO for Computer Software Engineering Topics

    - by Michael Aaron Safyan
    I'm currently trying to SEO my development and coding search custom search engine as well my website that has a variety of coding and development resources. I would like to increase the number of links to my website, but I don't want to simply generate spam. What are some places that I should submit my website, where the content would be considered relevant rather than just spam? Thanks.

    Read the article

  • Magento products will not show in category

    - by Aaron
    I've recently been tasked with the build and deployment of a large Ecommerce site. In the past we've had to use the clients legacy X-cart installation for redevelopment (too far integrated with their existing work flow). We'd heard good things about Magento, so I've set up a test install to get to grips with it. After a couple of initial issues, there is a live development site which displays categories on the default theme. The problem we've hit now is that products don't display..! After a lot more in-depth research into this, all I've been able to discover is that quite a number of developers endorse using other solutions entirely, with the other 50% saying after the steep learning curve the platform is as wonderful as we'd initially been led to believe. Now, my test category is showing, so I know this is configured properly. I've set up three test products and associated them with this (all done following the Magento user guide), checked double checked and thrice checked the products are enabled and visible individually, yet still the front end says the category has no products in it. I've cleared the cache repeatedly, reset everything possible many times in index management - no products show up. I have to make a call tomorrow morning on whether we're going ahead with Magento. If I can't even get it to show products I'm going to have to go with something with a more established track record and more community support available. Can anybody advise what could possibly be wrong here?

    Read the article

  • .NET DefaultValue attribute

    - by Aaron
    I've heard people say a few different things about the DefaultValue attribute including: "It sets the value of the property before anything else uses it." "It doesn't work for autoproperties." "It's only for decoration. You must manually set actual default values." Which (if any) is right? Does DefaultValue actually set default values? Are there cases where it doesn't work? Is it best just not to use it?

    Read the article

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