Search Results

Search found 3484 results on 140 pages for 'chris dwyer'.

Page 113/140 | < Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >

  • OpenGL gluLookAt issues

    - by Chris D
    I am trying to switch my space invaders game to a first person view, i.e. a view of the world from the ship. I am getting a bit confused about what point I should be looking at. I am currently using these parameters in gluLookAt: GL11.glMatrixMode(GL11.GL_MODELVIEW); GL11.glLoadIdentity(); GLU.gluLookAt(ship3dPos.x, ship3dPos.y, ship3dPos.z,400.0f, 600.0f,-50.0f, 0.0f, 1.0f,-0.0f); Where ship3dPos is a Vector3f. I'm not sure what I'm supposed to set parameters 4,5 and 6 to, to get a view of the whole world(window is 800/600). I want to have a view of say 100.0 wide from the ships perspective, with this view moving along the x-axis as the player moves the ship. Thanks

    Read the article

  • How to programmatically register a component that depends on a list of already registered components

    - by Chris Carter
    I'm programmatically registering a group of services that all implement the same interface, IRule. I have another service that looks like this: public class MyService { private IEnumerable<IRule> _rules; public MyService(IEnumerable<IRule> rules){ _rules = rules; } } Hammett posted something that looked like what I wanted, http://hammett.castleproject.org/?p=257. I changed the signature to IRule[] and tried the ArrayResolver trick in the post but that didn't work for me(note, it didn't break anything either). Anyone know how to programmatically register a component like the code I posted above?

    Read the article

  • Core Data combined Query

    - by Chris Summer
    Hey, i have question related to CoreData. My iphone project has 2 Entities, Organisation and Brand with a 1 to many "BrandsToOrg" relationship and inverse. So my project has a Mapview, where you can see all the Organisations and a little subview when you click on those Organisations.At the subview there is a "show Brands" Button, which should init a new TableView who only shows the brands belong to the seleceted organisation. Any ideas how i can code that? thx NSPredicate *predicate = [NSPredicate predicateWithFormat: @"(TitleMedium == %@)",@"Rock Antenne"];???? NSFetchRequest *request = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:self.entityName inManagedObjectContext:managedObjectContext]; [request setEntity:entity]; // If a predicate was passed, pass it to the query if(predicate != nil) { [request setPredicate:predicate]; } // If a sort key was passed, use it for sorting. NSString *sortKey=@"TitleMedium"; BOOL sortAscending=YES; if(sortKey != nil) { NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:sortKey ascending:sortAscending]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [request setSortDescriptors:sortDescriptors]; [sortDescriptors release]; [sortDescriptor release]; } NSError *error; NSMutableArray *mutableFetchResults = [[managedObjectContext executeFetchRequest:request error:&error] mutableCopy]; [request release]; [self setEntityArray:mutableFetchResults];

    Read the article

  • Casting a Calculated Column in a MySQL view.

    - by Chris Brent
    I have a view that contains a calculated column. Is there are a way to cast it as a CHAR or VARCHAR rather than a VARBINARY ? Obviously, I have tried using CAST(... as CHAR) but it gives an error. Here is a simple replicable example. CREATE VIEW view_example AS SELECT concat_ws('_', lpad(9, 3,'0'), lpad(1,3,'0'), date_format(now(),'%Y%m%d%H%i%S')) AS calculated_field_id; This is how my view is created: describe view_example; +---------------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------------+---------------+------+-----+---------+-------+ | calculated_field_id | varbinary(27) | YES | | NULL | | +---------------------+---------------+------+-----+---------+-------+ select version(); +-----------------------+ | version() | +-----------------------+ | 5.0.51a-community-log | +-----------------------+

    Read the article

  • PHPMailer echo's from successful sent email

    - by Chris
    Hello I finally got PHPMailer to work with Google but now I am finding out that I am getting this output to the screen after the message has been sent. SMTP -> FROM SERVER:220 mx.google.com ESMTP f34sm21891943qco.35 SMTP -> FROM SERVER: 250-mx.google.com at your service, [76.28.109.170] 250-SIZE 35651584 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH 250 ENHANCEDSTATUSCODES SMTP -> FROM SERVER:250 2.1.0 OK f34sm21891943qco.35 SMTP -> FROM SERVER:250 2.1.5 OK f34sm21891943qco.35 SMTP -> FROM SERVER:354 Go ahead f34sm21891943qco.35 SMTP -> FROM SERVER:250 2.0.0 OK 1276700936 f34sm21891943qco.35 I was wondering if there was any way to remove this output so the users don't see it?

    Read the article

  • gprof and execl() - is it possible?

    - by Chris
    Background: I have a game (an old-school-esque MUD) which I've been attempting to profile with gprof. The documentation of gprof (on Linux 2.6) states that The profiled program must call "exit"(2) or return normally for the profiling information to be saved in the gmon.out file. Now, if I kill the server with the shutdown command, the application "returns normally" (i.e., main() returns) and I get a gmon.out to analyze. However, it's far more common to reboot the server. The reboot command does the following: Writes usernames and socket FD numbers to disc. Makes a call to execl(). The new process looks for the stored data, picks up the FDs, and moves on. I see the following error on the command line, as the whole process fails: Profiling timer expired ./program Question: Is it possible to get a gmon.out file from the execl()-calling process? Perhaps some environmental parameter to execl(), or else perhaps a different, gprof-friendly, system call to achieve the same effect (beginning a new process while preserving file descriptors)?

    Read the article

  • Array Indexing Properties of A Class

    - by Chris
    I have a class that has several properties: class Person { string Name; int Age; DateTime BirthDate; } Then I have a sort of wrapper class with a List<Person>. Within this wrapper class I want to be able to do something like Wrapper["Name"] that returns a new List<string> using .Select(x=>x.Name). How do I create a wrapper class around an IEnumerable that supports mapping a string to the Property name? Something like the pseudo code below, but obviously it doesn't work. I'm 99.9% sure the solution will have to use Reflection and thats fine. class Wrapper { List<Person> PersonList; List<dynamic> this[string Column] { return PersonList.Select(x => x.[Column]).ToList(); } } This may not seem like a good design, but its a fix to eventually enable the correct design from .NET 2.0 days. As I have it right now, the data is stored in Columns, so there is actually a List of Lists within my class right now. Using the above example there would be three ILists (with a string Title) Name, Age, and Birthdate. Everything is currently predicated on addressing the columns by their "string" name. I'm trying to convert the data structure to row based with an IEnumberable interface to allow Linq eventually while still maintaining the functionality of my current code. Is converting the code to a Row based IEnumberable a good idea?

    Read the article

  • Orverride Problem for Custom Design on Product - Magneto

    - by Chris
    I am running several sites in several different languages off of single instance of magneto. There are two main styles Site 1 Site 2 Each site has some cusomtimizations based on language So each shop view has an some templates defined Site 2 - DE Site 2 - UK Now the problem is that when I apply a product level design, it forget's about the language level definition and skips back to the main definition. I want it to work like this Site 2 Site 2 DE Product Style But Instead it seems to work like this Site 2 Site 2 DE Product Style Where Site 2 DE is not ignored because a custom product style has been defined. How can I get the first hierarchy to work? So that my product styles do not override the language styles completely.

    Read the article

  • Start Windows GUI Application Development With C++

    - by Chris
    I'm looking into creating a GUI program for Windows in C++, I have a good knowledge of C++ in the command line and also in game creation. But I'm not sure where to start with GUI application development. I have Visual Studio 2010 and have created new projects with a GUI but these templates are complex and leaves me not understanding whats happening and how to modify it. So I'm asking where do I start? Preferably good websites that you can recommend or tutorials, rather than books being a poor student :)

    Read the article

  • Correct CSS inheritance behavior for properties that aren't inherited?

    - by Chris
    So say we you have a CSS property that is not inherited by default. We'll call it "foo" and its default value is "black". Then we make the following html. <div id="div1" style="foo: red;"> <div id="div2"> <div id="div3" style="foo: inherit;"> </div> </div> </div> Since this property does not inherit by default, you'd think that in div2, "foo" must be "black" - the default value because it does not inherit by default. But ... in div3 should the value for "foo" inherit "black" from its parent that did not inherit foo, or should it inherit "red" from its grandparent because its parent did not specify foo? I need to know because I'm trying to implement something exactly to the spec.

    Read the article

  • Functioning of Intent.action_pick_activity??

    - by chris
    Hello everybody!! Here is I would like to set up in my application, the function of sharing (facebook, twitter, e-mail) as that of YouTube for example but I get lost little. By looking I saw that apparently it would be necessary to use Intent.action_pick_activity but I do not manage to see how using it on my case. What is that somebody has already implemented this kind of thing? Either what is what somebody knows where I can find examples?? Thanks to all!

    Read the article

  • Why would I use Scala/Lift over Java/Spring?

    - by Chris J
    Hi, I know this question is a bit open but I have been looking at Scala/Lift as an alternative to Java/Spring and I am wonder what are the real advantages that Scala/Lift has over it. From my perspective and experience, Java Annotations and Spring really minimizes the amount of coding that you have to do for an application. Does Scala/Lift improve upon that?

    Read the article

  • Using a message class static method taking in an action to wrap Try/Catch

    - by Chris Marisic
    I have a Result object that lets me pass around a List of event messages and I can check whether an action was successful or not. I've realized I've written this code in alot of places Result result; try { //Do Something ... //New result is automatically a success for not having any errors in it result = new Result(); } catch (Exception exception) { //Extension method that returns a Result from the exception result = exception.ToResult(); } if(result.Success) .... What I'm considering is replacing this usage with public static Result CatchException(Action action) { try { action(); return new Result(); } catch (Exception exception) { return exception.ToResult(); } } And then use it like var result = Result.CatchException(() => _model.Save(something)); Does anyone feel there's anything wrong with this or that I'm trading reusability for obscurity?

    Read the article

  • What's the most minimal Java web MVC framework?

    - by Chris Collins
    I'm looking for a Java web framework that requires the most minimal amount of configuration for a very small app. Spring & Struts are definitely overkill here. This is an app that could be written without any framework at all but I would prefer to use a minimal MVC framework if I can find one.

    Read the article

  • Including full LaTeX documents within others.

    - by Chris Clarke
    I'm currently finishing off my dissertation, and would like to be able to include some documents within my LaTeX document. The files I'd like to include are weekly reports done in LaTeX to my supervisor. Obviously all documents are page numbered seperately. I would like them to be included in the final document. I could concatenate all the final PDFs using GhostScript or some other tool, but I would like to have consistent numbering throughout the document. I have tried including the LaTeX from each document in the main document, but the preamble etc causes problems and the small title I have in each report takes a whole page... In summary, I'm looking for a way of including a number of 1 or 2 page self-complete LaTeX files in a large report, keeping their original layouts, but changing the page numbering.

    Read the article

  • Best practices: displaying text that was input via multi-line text box

    - by chris
    I have a multi-line text box. When users simply type away, the text box wraps the text, and it's saved as a single line. It's also possible that users may enter line breaks, for example when entering a "bulleted" lists like: Here are some suggestions: - fix this - remove that - and another thing Now, the problem occurs when I try to display the value of this field. In order to preserve the formatting, I currently wrap the presentation in <pre> - this works to preserve user-supplied breaks, but when there's a lot of text saved as a single line, it displays the whole text block as single line, resulting in horizontal scrolling being needed to see everything. Is there a graceful way to handle both of these cases?

    Read the article

  • How do you hide an image tag based on an ajax response?

    - by Chris
    What is the correct jquery statement to replace the "//Needed magic" comments below so that the image tags are hidden or unhidden based on the AJAX responses? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>JQuery</title> <style type="text/css"> .isSolvedImage{ width: 68px; height: 47px; border: 1px solid red; cursor: pointer; } </style> <script src="_js/jquery-1.4.2.min.js" type="text/javascript"> </script> </head> <body> <div id='true1.txt' class='isSolvedImage'> <img src="_images/solved.png"> </div> <div id='false1.txt' class='isSolvedImage'> <img src="_images/solved.png"> </div> <div id='true2.txt' class='isSolvedImage'> <img src="_images/solved.png"> </div> <div id='false2.txt' class='isSolvedImage'> <img src="_images/solved.png"> </div> <script type="text/javascript"> $(function(){ var getDivs = 0; //iterate div with class isSolvedImage $("div.isSolvedImage").each(function() { alert('div id--'+this.id); // send ajax requrest $.get(this.id, function(data) { // check if ajax response is 1 alert('div id--'+this.url+'--ajax response--'+data); if(data == 1){ alert('div id--'+this.url+'--Unhiding image--'); //Needed magic //Show image if data==1 } else{ alert('div id--'+this.url+'--Hiding image--'); //Needed magic //Hide image if data!=1 } }); }); }); </script> </body> </html>

    Read the article

  • SSAS Reporting Services - Set specific language / translation

    - by Chris
    Hi all, in the data warehouse there's a default language for the measures, and I added a translation for German captions. In a Visual Studio Report Server project, when creating a query with my German OS, the cube and its measures are displayed in German language. When dragging measures to the mdx query windows, the default measure name is used. That's what I want and what I expect, since when writing MDX queries I would like to use the default measure names. But when executing the query, the columns created for each measure is translated to German again. This resuls in having German columns names within my dataset, which I dont want. I'd like to have the english column names. I already tried to change the connection string to: Data Source=server;Initial Catalog=DataWarehouse;LocaleIdentifier=1033 But that doesn't help, I still see German translations. Anyone knows how to set a specific translation?

    Read the article

  • Is there a nice way of having static generic parameters is Java?

    - by Chris
    Hello, recently I'm writing some functions that I take from Haskell and translate into Java. One of the main problems I have is I cannot easily create a static property with a generic type. Let me explain by a little example... // An interface to implement functions public interface Func<P, R> { public R apply(P p); } // What I want to do... (incorrect in Java) public class ... { public static <T> Func<T, T> identity = new Func<T, T>() { public T apply(T p) { return p; } } } // What I do right now public class ... { private static Func<Object, Object> identity = new Func<Object, Object>() { public Object apply(Object p) { return p; } } @SuppressWarnings("unchecked") public static <T> Func<T, T> getIdentity() { return (Func<T, T>)identity; } } Are there any easier ways to do something like that? What kind of problems might arise if the syntax I used would be valid?

    Read the article

  • How to design model for multi-tiered data?

    - by Chris
    Say I have three types of object: Area, Subarea and Topic. I want to be able to display an Area, which is just a list of Subareas and the Topics contained in those Subareas. I never want to be able to display Subareas separately - they're just for breaking up the Topics. Topics can, however, appear in multiple Areas (but probably under the same Subarea). How would I design a model for this? I could use ForeignKey from Topic to Subarea and from Subarea to Area, but it seems unnecessarily complex given that I never want to interact with subareas themselves. Also, none of these objects are ever altered or added to by the user. They're just for me to represent information. Maybe there is a better way to represent it all?

    Read the article

  • Disable mousewheel scroll on swf files?

    - by Chris
    I am using the scroll in a swf file.. is there anyway to disable the scroll mousewheel on all browsers.. I get it working for IE and FF but Webkit is not working: $(document).ready(function() { $("#ebook").hover( function () { document.onmousewheel = function(){ return false }; console.log('On'); }, function () { console.log('Out'); document.onmousewheel = function() { return true; } } ); });

    Read the article

  • Rails: How to to download a file from a http and save it into database

    - by Chris
    Hi, i would like to create a Rails controller that download a serie of jpg files from the web and directly write them into database as binary (I am not trying to do an upload form) Any clue on the way to do that ? Thank you Edit : Here is some code I already wrote using attachment-fu gem : http = Net::HTTP.new('awebsite', 443) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE http.start() { |http| req = Net::HTTP::Get.new("image.jpg") req.basic_auth login, password response = http.request(req) attachment = Attachment.new(:uploaded_data => response.body) attachement.save } And I get an "undefined method `content_type' for #" error

    Read the article

< Previous Page | 109 110 111 112 113 114 115 116 117 118 119 120  | Next Page >