Search Results

Search found 2532 results on 102 pages for 'chad green'.

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

  • Unhandled Exception error message

    - by Joshua Green
    Does anyone know why including a term such as: t = PL_new_term_ref(); would cause an Unhandled Exception error message: 0xC0000005: Access violation reading location 0x0000000c. (Visual Studio 2008) I have a header file: class UserTaskProlog : public ArAction { public: UserTaskProlog( const char* name = " sth " ); ~UserTaskProlog( ); AREXPORT virtual ArActionDesired *fire( ArActionDesired currentDesired ); private: term_t t; }; and a cpp file: UserTaskProlog::UserTaskProlog( const char* name ) : ArAction( name, " sth " ) { char** argv; argv[ 0 ] = "libpl.dll"; PL_initialise( 1, argv ); PlCall( "consult( 'myProg.pl' )" ); } UserTaskProlog::~UserTaskProlog( ) { } ArActionDesired *UserTaskProlog::fire( ArActionDesired currentDesired ) { cout << " something " << endl; t = PL_new_term_ref( ); } Without t=PL_new_term_ref() everything works fine, but when I start adding my Prolog code (declarations first, such as t=PL_new_term_ref), I get this Access Violation error message. I'd appreciate any help. Thanks,

    Read the article

  • Getting Path (context root) to the Application in Restlet

    - by Chad Gorshing
    I am needing to get the application root within a Restlet resource class (it extends ServerResource). My end goal is trying to return a full explicit path to another Resource. I am currently using getRequest().getResourceRef().getPath() and this almost gets me what I need. This does not return the full URL (like http://example.com/app), it returns to me /resourceName. So two problems I'm having with that, one is it is missing the schema (the http or https part) and server name, the other is it does not return where the application has been mounted to. So given a person resource at 'http://dev.example.com/app_name/person', I would like to find a way to get back 'http://dev.example.com/app_name'. I am using Restlet 2.0 RC3 and deploying it to GAE.

    Read the article

  • NullPointerException when trying to run an applet of multiple classes

    - by Chad
    I'm trying to display an applet in an html page. I've had success doing this in the past, but now that I have more than one class in the applet, I seem to get an error every time I try to load the applet in an html page. For a bit, I was writing the html page by hand, but then I realized the applet viewer in netbeans (the IDE I'm coding in) created an html page for you, which is the same as the one I was coding. The application runs error-free when in the applet viewer, but the following message is displayed when I try to run it in the html page: java.lang.NullPointerException at sun.plugin2.applet.Plugin2Manager.findAppletJDKLevel(Unknown Source) at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception: java.lang.NullPointerException I tested another small, one class applet and it ran fine in the html page under the same conditions. Any ideas what may be wrong?

    Read the article

  • C/C++ enum and char * array

    - by Eric M
    Ran accross the following code in an article and didn't think it was standard C/C++ syntax for the char* array. As a test, both Visual C++ (visual studio 2005) and C++ Builder Rad XE both reject the 2nd line. Without using #defines, anyone have any tricks/tips for keeping enums and a string array sort of in sync without resorting to STL ? More of a curiosity question. enum TCOLOR { RED, GREEN, BLUE }; char *TNCOLOR[] = { [RED]="Red", [GREEN]="Green", [BLUE]="Blue" }; as an aside, the article this came from is quite old and I believe this might work under GCC but have not tested.

    Read the article

  • Loop colours from variables for graphics.py [Python 3.2]

    - by user1056548
    I am creating a graphics program that draws 100 x 100 squares next to each other depending on the user-specified grid size. The user also inputs 4 colours for the squares to be coloured (e.g. if they enter red,green,blue,yellow the squares will be coloured in that order, repeating the colours). Is it possible to loop the colours from the variables the user has given? Here is what I have so far: def main(): print ("Please enter four comma seperated colours e.g.: 'red,green,blue,yellow'\n\ Allowed colours are: red, green, blue, yellow and cyan") col1, col2, col3, col4 = input("Enter your four colours: ").split(',') win = GraphWin ("Squares", 500, 500) colours = [col1, col2, col3, col4] drawSquare (win, col1, col2, col3, col4, colours) win.getMouse() win.close() def drawSquare(win, col1, col2, col3, col4, colours): for i in range (4): for j in range (len(colours)): colour = colours[j] x = 50 + (i * 50) circle = Circle (Point (x,50), 20) circle.setFill(colour) circle.draw(win) I think I should be using a list in some way, but can't work out exactly how to do it. Can anybody help?

    Read the article

  • jQuery UI datepicker customization

    - by Chad
    I have the jQuery datepicker working, but I need to be able to select more than just dates. I need to be able to select between some strings as well "Yesterday" and "Today" to be precise. So, the underlying input can contain any date as well as the strings "Yesterday" or "Today". Is there some way I can do this by tweaking the existing jQuery UI datepicker?

    Read the article

  • Git: changes not reflecting on other checkouts - huh?

    - by Chad Johnson
    Okay, so, I have my branches (git branch -a): * chat master remotes/origin/HEAD -> origin/master remotes/origin/chat I make changes (still with the 'chat' branch checkout out), commit, and push. I go to my server, on which I have a clone of the repository, and I do a fetch: git getch then I switch to the chat branch: git checkout --track -b chat origin/chat and I event do a pull, just to make sure everything is up to date: git pull and my changes from my other computer are NOT. THERE. What the heck am I doing wrong? If I had hair, I would have pulled it out. Thankfully I am bald. When I try a 'git commit' again, I get this # On branch chat # Changed but not updated: # (use "git add/rm <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # modified: app/controllers/chat_controller.rb # modified: app/views/dashboard/index.html.erb # modified: app/views/dashboard/layout.js.erb # modified: app/views/layouts/dashboard.html.erb # deleted: app/views/project/.tmp_edit.html.erb.55742~ # deleted: app/views/project/.tmp_edit.html.erb.83482~ # modified: public/stylesheets/dashboard/layout.css # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # .loadpath # .project # config/database.yml # config/environments/development.yml # config/environments/production.yml # config/environments/test.yml # log/ no changes added to commit (use "git add" and/or "git commit -a")

    Read the article

  • Color blindness: Are you aware of it? Do you design for it?

    - by User
    I'm curious whether many of us who do design or take design decisions have ever heard of this problem. I'm aware there are dangerous color combinations, like green + red. This is probably one of the most popular cases of color blindness. If you have green text on a red background and vice versa some people won't see anything. I've also seen in practice that green text on a blue background was not seen by one guy. What other color compositions should be avoided, and how often these cases are to be expected? Let us make some ranging by encounter probability who has the numbers. Addition: I've just remembered one very bad example that causes problems to just about everyone - blue text on a black background. It's unreadable for all intents and purposes. Never could understand what could possibly compel a web master to use this color combination...

    Read the article

  • What is there so useful in the Decorator Pattern? My example doesn't work

    - by Green
    The book says: The decorator pattern can be used to extend (decorate) the functionality of a certain object I have a rabbit animal. And I want my rabbit to have, for example, reptile skin. Just want to decorate a common rabbit with reptile skin. I have the code. First I have abstract class Animal with everythig that is common to any animal: abstract class Animal { abstract public function setSleep($hours); abstract public function setEat($food); abstract public function getSkinType(); /* and more methods which for sure will be implemented in any concrete animal */ } I create class for my rabbit: class Rabbit extends Animal { private $rest; private $stomach; private $skinType = "hair"; public function setSleep($hours) { $this->rest = $hours; } public function setFood($food) { $this->stomach = $food; } public function getSkinType() { return $this->$skinType; } } Up to now everything is OK. Then I create abstract AnimalDecorator class which extends Animal: abstract class AnimalDecorator extends Animal { protected $animal; public function __construct(Animal $animal) { $this->animal = $animal; } } And here the problem comes. Pay attention that AnimalDecorator also gets all the abstract methods from the Animal class (in this example just two but in real can have many more). Then I create concrete ReptileSkinDecorator class which extends AnimalDecorator. It also has those the same two abstract methods from Animal: class ReptileSkinDecorator extends AnimalDecorator { public function getSkinColor() { $skin = $this->animal->getSkinType(); $skin = "reptile"; return $skin; } } And finaly I want to decorate my rabbit with reptile skin: $reptileSkinRabbit = ReptileSkinDecorator(new Rabbit()); But I can't do this because I have two abstract methods in ReptileSkinDecorator class. They are: abstract public function setSleep($hours); abstract public function setEat($food); So, instead of just re-decorating only skin I also have to re-decorate setSleep() and setEat(); methods. But I don't need to. In all the book examples there is always ONLY ONE abstract method in Animal class. And of course it works then. But here I just made very simple real life example and tried to use the Decorator pattern and it doesn't work without implementing those abstract methods in ReptileSkinDecorator class. It means that if I want to use my example I have to create a brand new rabbit and implement for it its own setSleep() and setEat() methods. OK, let it be. But then this brand new rabbit has the instance of commont Rabbit I passed to ReptileSkinDecorator: $reptileSkinRabbit = ReptileSkinDecorator(new Rabbit()); I have one common rabbit instance with its own methods in the reptileSkinRabbit instance which in its turn has its own reptileSkinRabbit methods. I have rabbit in rabbit. But I think I don't have to have such possibility. I don't understand the Decarator pattern right way. Kindly ask you to point on any mistakes in my example, in my understanding of this pattern. Thank you.

    Read the article

  • By-name repeated parameters

    - by Green Hyena
    How to pass by-name repeated parameters in Scala? The following code fails to work: scala> def foo(s: (=> String)*) = { <console>:1: error: no by-name parameter type allowed here def foo(s: (=> String)*) = { ^ Is there any other way I could pass a variable number of by name parameters to the method?

    Read the article

  • In ASP.NET MVC (3.0/Razor), do you prefer multiple views, or conditionals within views? Why?

    - by Chad
    For my new web app, I'm debating on using multiple views, or conditionals within views. An example scenario would be showing different info to users who are authenticated vs non-authenticated. This could be handled a couple ways. In the controller, check IsAuthenticated and return a view based on that In the view, check IsAuthenticated and show blocks of info based on that Pros of multiple views: Smaller, less complicated view - next to no logic in the view Pros of single views: less view files to maintain The obvious cons are the opposites of the pros: more files to maintain or more complicated view files. Which do you prefer? Why? Any pros/cons I haven't outlined here? Update: Assume each view uses a layout page and partial views to abstract the obviously repetitive code.

    Read the article

  • JADE (Java) - Changing Agent Container

    - by Chad S
    Is there a way to reassign agents to a different container or will I have to create a new container and then create all new instances of the agents within the new container? I have done a lot of searching and can't seem to find anything on container reassignment. Thanks in advance for any info!

    Read the article

  • Can I override DropLocation target to avoid network latency?

    - by Chad
    In Team Build 2008, the Drop Location for a build is no longer specified in the .proj file, and instead is stored in the database and maintained in the GUI tool. The GUI tool only accepts a network path as a drop location (i.e. \\server\share) and will not accept a local path. Our build server also hosts the dropped files, so it seems that forcing a file copy operation to go through the network share introduces a lot of lag time when copying a large number of files. I would like to override this feature so that I can specify a local directory for drop location, but I can't figure out how.

    Read the article

  • How do I keep my branches up to date with the 'default' branch under Mercurial?

    - by Chad Johnson
    Let's say I have the following workflow with Mercurial: stable (clone on server) default (branch) development (clone on server) default (branch) bugs (branch) developer1 (clone on local machine) developer2 (clone on local machine) developer3 (clone on local machine) feature1 (branch) developer3 (clone on local machine) feature2 (branch) developer1 (clone on local machine) developer2 (clone on local machine) My main line of development which is always in a release ready state is 'default'. So the 'default' branch in the 'development' clone is always release-ready. Now suppose I'm developer1 working on feature2. And let's say also that feature2 takes several months. It's pretty obvious that I'm going to want to keep my 'feature2' branch up to date with the 'default' branch. Does this make sense? How would I go about doing this with Mercurial?

    Read the article

  • Float over two elements

    - by eWolf
    My problem is rather complex to explain, so I'll show you an example: http://ewolf.bplaced.de/misc/float.htm I want to have a floated element (the blue box) to be be placed over two other elements (red and green) and I want the whole thing to be fixed-width and centered (done by the box with the black border) while the background of the red and green box should fill the whole width. I'm actually not quite sure if the way I've done it now is XHTML/CSS valid, but it works - at least in Firefox. In IE6, the green box expands to fit the whole blue box - how can I fix this in IE6 or find another solution to show it correctly in all browsers?

    Read the article

  • MySQL: Count occurrences of known (or enumerated) distinct values

    - by Eilidh
    After looking at how to count the occurrences of distinct values in a field, I am wondering how to count the occurrences of each distinct value if the distinct values are known (or enumerated). For example, if I have a simple table - TrafficLight Colour ------------ ------ 1 Red 2 Amber 3 Red 4 Red 5 Green 6 Green where one column (in this case Colour) has known (or enumerated) distinct values, how could I return the count for each colour as a separate value, rather than as an array, as in the linked example. To return an array with a count of each colour (using the same method as in the linked example), the query would be something like SELECT Colour COUNT(*) AS ColourCount FROM TrafficLights GROUP BY Colour, and return an array - Colour ColourCount ------ ----------- Red 3 Amber 1 Green 2 What I would like to do is to return the count for each Colour AS a separate total (e.g. RedCount). How can I do this?

    Read the article

  • Tracking DB changes with Zend Framework?

    - by Chad Johnson
    I am trying to decide between the Zend Framework and Ruby On Rails for my web application. If I go with ZF, I need the following: A way to incrementally track changes to my database, as with RoR's migration feature (001_something.sql, 002_something_else.sql). A place to put SQL for the next release of my software. At work in our custom PHP solution, we just have release.sql, which gets run, archived, and blanked out upon release. ZF has Zend_Db_Schema_Manager, which does the same thing, but I'm not interested as its not official, complete, or maintained. Is there an official mechanism that ZF provides for doing something similar to what I described? EDIT I ended up going with Rails. Nothing compares.

    Read the article

  • Why use a Rails-like deployment mechanism over 'git pull' for releasing?

    - by Chad Johnson
    To release my centralized webapp, I COULD have a vhost pointed to some directory and then just do a 'git pull' when I want to release, updating the files. But Rails has a different deployment mechanism: it copies files to a subdirectory and then points a symlink ('current') to that new subdirectory. I understand that it probably more acceptable to do a Rails-like deployment because the release is built in some directory, and then the symlink is pointed to that directory, so this is much faster, and it's less likely that users would experience weird issues while a release is happening. Are there any other advantages to the Rails approach? Or, is a 'git pull' approach actually more widely accepted?

    Read the article

  • Share your conky tips / scripts / .conkyrc

    - by Chad Birch
    I've just started tinkering with conky, and I'm hoping the StackOverflow crowd can share some of the cool things they've done with this tool. Scripts and .conkyrc files specifically geared towards developers would be especially good to see. Some good examples of developer-centric functions would be repository-monitors or heck, even something that monitors StackOverflow. Screenshots of what the functionality actually looks like would be appreciated as well.

    Read the article

  • Affordable, Stable, ASP.NET MVC Hosting Exist?

    - by Chad
    I'm using webhost4life shared hosting right now. They have a 99.99% up-time guarantee, but it is definitely not. Their support has been good when I do contact them, but it's just not stable. The site will just go down at random times for 5-10 minutes at a time. I know I'm on shared hosting, but I was hoping it would be more stable than it is. My app isn't at the point where it would need dedicated hosting yet, if the shared was stable enough. Any affordable hosting that you can vouch for (that supports ASP.NET MVC)?

    Read the article

  • Variable collation with MySQL stored function?

    - by Chad Johnson
    I want to do something like this in a stored procedure: IF case_sensitive = FALSE THEN SET search_collation = "utf8_unicode_ci"; ELSE SET search_collation = "utf8_bin"; END IF; INSERT INTO TABLE1 (field1, field2) SELECT * FROM TABLE 2 WHERE some_field LIKE '%rarf%' collate search_collation; However, when I do this, I get ERROR 1273 (HY000): Unknown collation: 'search_collation' Also, if I do what's suggested at http://stackoverflow.com/questions/1680850/mysql-stored-procedures-use-a-variable-as-the-database-name-in-a-cursor-declara/2070021#2070021 I get Dynamic SQL is not allowed in stored function or trigger How can I use a dynamic collation?

    Read the article

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