Search Results

Search found 30167 results on 1207 pages for 'spark view engine'.

Page 54/1207 | < Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >

  • Grails Warnings/Errors during run-app

    - by Taylor L
    I'm currently seeing the warnings below when trying to run my Google App Engine/Grails test app in Eclipse. Warning, target causing name overwriting of name startLogging Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring not found. Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf not found. Warning: C:\Users\Some Person.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate not found. Here is the output from the console: Base Directory: C:\Users\Some Person\workspace\test-grails Resolving dependencies... Dependencies resolved in 1160ms. Running script C:\grails-1.2.0\scripts\RunApp.groovy Environment set to development Warning, target causing name overwriting of name startLogging [groovyc] Compiling 1 source file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF\classes [copy] Copying 1 file to C:\Users\Some Person\.grails\1.2.0\projects\test-grails [copy] Copying 1 file to C:\Users\Some Person\workspace\test-grails\web-app\WEB-INF Configuring persistence for AppEngine [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\spring not found. [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf not found. [copy] Warning: C:\Users\Some Person\.grails\1.2.0\projects\test-grails\plugins\app-engine-0.8.8\grails-app\conf\hibernate not found. I get this error after creating a Grails project with Spring Tools Suite (STS) and then installing the app-engine plugin "grails install-plugin app-engine". Before, I install the app-engine plugin the Grails project runs correctly. Any ideas how to resolve these warnings?

    Read the article

  • How can I disable a view behind my SlidingDrawer in Android?

    - by Sara
    I have a SlidingDrawer that pops up from the bottom of the screen and fills the screen about 80%. Even though the SlidingDrawer view is in focus, it is still possible to click on items, buttons and other elements in the view that is behind the SlidingDrawer. When SlidingDrawer is active/pulled up/in focus, I want to disable the entire view behind it so it will not be able to recieve clicks and touches. Is there a good way to disable an entire view? I have tried setEnable(false) and setClickable(false) but neither of them work. Help?

    Read the article

  • How does the overall view hierarchy change when using UIKit view manipulations?

    - by executor21
    I've been trying to figure out what happens in the view hierarchy when methods like pushViewController:animated, presentModalViewController:animated, and tab switches in UITabBarViewController are used, as well as UIAlertView and UIActionSheet. (Side note: I'm doing this because I need to know whether a specific UIView of my creation is visible on screen when I do not know anything about how it or its superview may have been added to the view hierarchy. If someone knows a good way to determine this, I'd welcome the knowledge.) To figure it out, I've been logging out the hierarchy of [[UIApplication sharedApplication] keyWindow] subviews in different circumstances. Is the following correct: When a new viewController is pushed onto the stack of a UINavigationController, the old viewController's view is no longer in the view hierarchy. That is, only the top view controller's view is a subview of UINavigationController's view (according to logs, it's actually several private classes such as UILayoutContainerView). Are the views of view controllers below the top controller of the stack actually removed from the window? A very similar thing happens when a new viewController is presented via presentModalViewController:animated. The new viewController's view is the only subview of the kew window. Is this correct? The easiest thing to understand: a UIAlertView creates its own window and makes it key. The strangest thing I encountered: a UIActionSheet is shown via showInView: method, the actionSheet isn't in the view hierarchy at all. It's not a subview of the view passed as an argument to showInView:, it isn't added as a subview of the key window, and it doesn't create its own window. How does it appear, then? I haven't tried this yet, so I'd like to know what happens in the keyWindow hierarchy when tabs in a UITabBarController are switched. Is the view of the selected UIViewController moved to the top, or does it work like with pushViewController:animated and presentModalViewController:animated, where only the displayed view is in the window hierarchy?

    Read the article

  • How to formulate a SQL Server indexed view that aggregates distinct values?

    - by Jeremy Lew
    I have a schema that includes tables like the following (pseudo schema): TABLE ItemCollection { ItemCollectionId ...etc... } TABLE Item { ItemId, ItemCollectionId, ContributorId } I need to aggregate the number of distinct contributors per ItemCollectionId. This is possible with a query like: SELECT ItemCollectionId, COUNT(DISTINCT ContributorId) FROM Item GROUP BY ItemCollectionId I further want to pre-calculate this aggregation using an indexed (materialized) view. The DISTINCT prevents an index being placed on this view. Is there any way to reformulate this which will not violate SQL Server's indexed view constraints?

    Read the article

  • Google Street View API v3 : how can I avoid having "fish-eye" effect on Firefox?

    - by Benj
    I'm using google maps API V3 and I'm having trouble displaying correctly the street view within Firefox. I always get the "fish-eye" view (does not happen with Google chrome). So I assumed that the problem came from Firefox. I took a look to the street view options but found nothing. I would like to know if there is an option to have a flatten street view or if it is because Firefox does not support this kind of feature. If someone could explain it to me, I would be grateful. Below, what it looks in Firefox : And what it looks in Chrome :

    Read the article

  • google app engine (python): ImportError no module named django.

    - by Phil
    So I'm trying to use the django 1.1 template engine with the google app engine web app framework, from here. This is on Ubuntu Jaunty, I've made sure that the PYTHONPATH contains the location of Django-1.1.1 yet I'm getting this 'ImportError: No module named django' error when it tries to execute the use_library() line below. Again, could somebody help me? I'm stumped. import os os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from google.appengine.dist import use_library use_library('django', '1.1')

    Read the article

  • How do you determine an acceptable response time for App Engine DB requests?

    - by qiq
    According to this discussion of Google App Engine on Hacker News, A DB (read) request takes over 100ms on the datastore. That's insane and unusable for about 90% of applications. How do you determine what is an acceptable response time for a DB read request? I have been using App Engine without noticing any issues with DB responsiveness. But, on the other hand, I'm not sure I would even know what to look for in that regard :)

    Read the article

  • How do I authenticate in Google App Engine with SVNKit?

    - by corgrath
    Creating a default authication manager with SVNKit requires access to the file system. SVNURL svnurl = SVNURL.parseURIEncoded(url); SVNRepository repository = SVNRepositoryFactory.create(svnurl); // Authentication ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(name, password); repository.setAuthenticationManager(authManager); In Google App Engine, you can't create/write files. How do I authenticate myself in Google App Engine?

    Read the article

  • How can I use a prefix for the fields in my strongly typed View?

    - by deadtime
    Hi, I have an EditProfile action in my PersonController, that finds a Person object by ID and does return View(person). The EditProfile view has a bunch of fields that should be filled in with the information from the Person object. One of the fields is named "Person.FirstName", and is not filled in automatically when the View is rendered. However, if I rename the textbox to "FirstName", it gets filled in. My question is: How can I specify to the view that it should use the "Person" prefix when filling in the information from the Person object? The reason I want to do this is because of consistency - in some of my views I allow the user to edit more than one object at the same time, and use prefixes in order to bind these correctly.

    Read the article

  • Navigation Controller not Pushing/Popping View Controllers

    - by senfo
    I'm working on a view-based iPhone app that has the following flow: search - (list | map) - details To accomplish the transitions between views, I have a UINavigationController, with the search view controller being the root. After a user performs a search, I transition to a view with a segmented control, which acts as a tab to switch between the list and map functionality (per a suggestion from a related question I had). This view contains a UIViewController, which allows me to switch between the list/map view when a user taps the segmented control. I'm fine up until this point. As you can see from the above mentioned flow, I would like to provide the ability to transition into a details view. Each row of my table in the list view contains a details disclosure button for allowing the user to drill down into a details view. The problem is, when I try to push the details view onto the navigation stack, nothing happens. Below is the delegate method (from my list view controller) to handle the details disclosure button being tapped. I've set up break points, so I know the code is running. The navigation controller simply doesn't want to push the detailsController onto the stack (my guess is that I don't have a pointer to the correct UINavigationController). - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath { if (detailController == nil) { detailController = [[DetailsViewController alloc] init]; } [self.navigationController pushViewController:detailController animated:YES]; } Assuming I was probably missing a pointer to the navigation controller, I exposed a UINavigation property on my list and map views (navigationController is readonly) and initialized them with a pointer to the navigation controller from my SwitchViewController (the view responsible for switching between list/map views when a user changes the value of the segmented control). Unfortunately, this did not solve the problem. Am I on the right track? If so, how do I see to it that my view has a pointer to the correct navigation controller? Should I add a delegate, which allows me to call a function in the SwitchViewController that transitions into the details view (this seems messy)?

    Read the article

  • How to write a Web Service for Google App Engine?

    - by Martin
    Hello all, I am simply wondering how to write a Web Service (XML - SOAP) for Google App Engine? I am really new with Python and I have been looking for example for a while, but no chance. Does anybody could point me out any article or simply could give me an example of a Web Service in Python with Google App Engine? Thanks!

    Read the article

  • What is a good strategy for binding view objects to model objects in C++?

    - by B.J.
    Imagine I have a rich data model that is represented by a hierarchy of objects. I also have a view hierarchy with views that can extract required data from model objects and display the data (and allow the user to manipulate the data). Actually, there could be multiple view hierarchies that can represent and manipulate the model (e.g. an overview-detail view and a direct manipulation view). My current approach for this is for the controller layer to store a reference to the underlying model object in the View object. The view object can then get the current data from the model for display, and can send the model object messages to update the data. View objects are effectively observers of the model objects and the model objects broadcast notifications when properties change. This approach allows all the views to update simultaneously when any view changes the model. Implemented carefully, this all works. However, it does require a lot of work to ensure that no view or model objects hold any stale references to model objects. The user can delete model objects or sub-hierarchies of the model at any time. Ensuring that all the view objects that hold references to the model objects that have been deleted is time-consuming and difficult. It feels like the approach I have been taking is not especially clean; while I don't want to have to have explicit code in the controller layer for mediating the communication between the views and the model, it seems like there must be a better (implicit) approach for establishing bindings between the view and the model and between related model objects. In particular, I am looking for an approach (in C++) that understands two key points: There is a many to one relationship between view and model objects If the underlying model object is destroyed, all the dependent view objects must be cleaned up so that no stale references exist While shared_ptr and weak_ptr can be used to manage the lifetimes of the underlying model objects and allows for weak references from the view to the model, they don't provide for notification of the destruction of the underlying object (they do in the sense that the use of a stale weak_ptr allows for notification), but I need an approach that notifies the dependent objects that their weak reference is going away. Can anyone suggest a good strategy to manage this?

    Read the article

  • how to use appcfg.py for google-app-engine projects created using google's eclipse plugin?

    - by Aadith
    I have created a google-app-engine java project in Eclipse using Google's Eclipse plugin. My previous attempt to deploy failed. Now, when I retry, I get the following message: Unable to update app: Error posting to URL : http://appengine.google.com/api/appversion/create?app_id=mybdaywisherversion=1 409 conflict Another transaction for this user is already in progress for this app and major version. That user can undo the transaction with appcfg.py's "rollback" command. Now, I have always used the google-app-engine features from inside Eclipse only and have not a clue how to run the appcfg.py command. Could not get much help from documentation available over the internet. The only thing I could make out was for mac (I'm on mac), the command to be used is appcfg.sh. Inside Eclipse, I looked where App-Engine SDK is located on my machine and went to that location. Even found appcfg.sh there. But when I try to run it, it only reports the error "command not found". Tried various alternatives to run it (like tried running it with sudo, tried running it as ./appcfg.sh by going to whether its located) but no success Can someone please tell me the step I will have to follow to run the apcfg command?

    Read the article

  • How to get debugging of an App Engine application working?

    - by Chris Lacy
    I've got 10+ years in C/C++, and it appears Visual Studio has spoilt me during that time. In Visual Studio, debbuging issimple: I just add a breakpoint to a line of code, and as soon as that code is executed, my breakpoint triggers, at which point I can view a callstack, local/member variables, etc. I'm trying to achieve this functionality under App Engine. I assume that is possible? All the searching I've done to this point has led me to using Pydev in Eclipse. As best I can tell, I am successfully launching my simple 'hello world' program in Debug mode. But the IDE doesn't even seem to have an option to set a breakpoint? I must be missing something. I've googled long and hard about this, but am having no luck. Most results trace back to the same old threads that don't deal directly with my issue. Can anyone shed some light on how you get basic debugging setup using Pydev/Eclipse with App Engine? Alternatively, if there's an easier way to debug App Engine than using Pydev/Eclipse, I'd love to hear about it. Thanks in advance.

    Read the article

  • How to parse large xml files on google app engine?

    - by Alon Carmel
    Hey, I have fairly large xml file 1mb in size that i host on s3. I need to parse that xml file into my app engine datastore entirely. I have written a simple DOM parser that works fine locally but online it reaches the 30sec error and stops. I tried lowering the xml parsing by downloading the xml file into a BLOB at first before the parser then parse the xml file from blob. problem is that blobs are limited to 1mb. so it fails. I have multiple inserts to the datastore which cause it to fail on 30 sec. i saw somewhere that they recommend using the Mapper class and save some exception where the process stopped but as i am a python n00b i cant figure out how to implement it on a DOM parser or an SAX one (please provide an example?) on how to use it. i'm pretty much doing a bad thing right now and i parse the xml using php outside the app engine and push the data via HTTP post to the app engine using a proprietary API which works fine but is stupid and makes me maintain two codes. can you please help me out?

    Read the article

  • How do I configure multiple Ubuntu Python installations to avoid App Engine's SSL error?

    - by Linc
    I have Karmic Koala which has Python 2.6 installed by default. However I can't run any Python App Engine projects because they require Python 2.5 and python ssl. To install ssl I installed python2.5-dev first while following some instructions I found elsewhere. sudo apt-get install libssl-dev sudo apt-get install python-setuptools sudo apt-get install python2.5-dev sudo easy_install-2.5 pyopenssl However, I am afraid this is not good for my Ubuntu installation since Ubuntu expects to see version 2.6 of Python when you type 'python' on the command line. Instead, it says '2.5.5'. I tried to revert to the original default version of Python by doing this: sudo apt-get remove python2.5-dev But that didn't seem to do anything either - when I type 'python' on the command line it still say 2.5.5. And App Engine still doesn't work after all this. I continue to get an SSL-related error whenever I try to run my Python app: AttributeError: 'module' object has no attribute 'HTTPSHandler' UPDATE: Just checked whether SSL actually installed as a result of those commands by typing this: $ python2.5 Python 2.5.5 (r255:77872, Apr 29 2010, 23:59:20) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named ssl >>> As you can see, SSL is still not installed, which explains the continuing App Engine error. If anyone knows how I can dig myself out of this hole, I would appreciate it.

    Read the article

  • NLP - Queries using semantic wildcards in full text searching, maybe with Lucene?

    - by Zsolt
    Let's say I have a big corpus (for example in english or an arbitrary language), and I want to perform some semantic search on it. For example I have the query: "Be careful: [art] armada of [sg] is coming to [do sg]!" And the corpus contains the following sentence: "Be careful: an armada of alien ships is coming to destroy our planet!" It can be seen that my query string could contain "semantic placeholders", such as: [art] - some placeholder for articles (for example a / an in English) [sg], [do sg] - some placeholders for NPs and VPs (subjects and predicates) I would like to develop a library which would be capable to handle these queries efficiently. I suspect that some kind of POS-tagging would be necessary for parsing the text, but because I don't want to fully reimplement an already existing full-text search engine to make it work, I'm considering that how could I integrate this behaviour into a search engine like Lucene? I know there are SpanQueries which could behave similarly in some cases, but as I can see, Lucene doesn't do any semantic stuff with stored texts. It is possible to implement a behavior like this? Or do I have to write an own search engine?

    Read the article

  • alot questings since i wanted to make a new SSB game or mario game(that use 3d models) [closed]

    - by user20465
    i have just started to study programming and i know already ppl will say why make a so big project like as a SSB game for a noob game development? cuz i always wanted a SSB engine like as Mugen is a fighter game engine but is not like as SSB´s gameplay + is not using 3d models too so i will call it SSBmugen(until i find a better title for it i got afew ideas for titles) also i wanted to make this game so it can use SSBbrawl files(models+animations mainly) the moveset+Stage coding files i wanted to redo cuz so anything can be possible like make a teleporter or a pipe teleporter(like as Super mario bros game) on a stag e or make some stuff there is impossible in SSBbrawl for moveset coding but is not in SSBmugen like make so a char. summon a Clone and the clone will do a attack and then is gone or some attacks/moves also i will make a moveset/stage Coding editor so it will be really easy to make moveset/stages coding for yours 3d models/animations moveset+stage Coding i mean: hitboxes/hurtboxes/moving Stuff/moving bones like cape or hair bones that is moving by wind effects or falling or other stuff like that/other stuff that needed to be coded i have planed to make a editor(for moveset/char. coding) or add the editor in brawlbox for my game so other ppl can easy make moveset/stages Coding to they´s models/animations so it will be easy so even kids can make a custom movesets/stages why using SSBbrawl files?: cuz ppl have made alot of models or textures/custom movesets/custom stages like goku/other anime/not brawl stuff for super smash bros brawl hacking(a.k.a modding) so ppl dont have to redo anything if they wanted to have the custom models or textures/custom movesets/custom stages from SSBbrawl to SSBmugen +there is the program named brawlbox that can open brawl files like model/animations and can edit models or animations and import models from 3ds max to be the right model format for SSBbrawl and i also wanted it so easy to add(a.k.a installer) Recolours or alt. models(like as oneslot doctor mario model over mario´s boneset) or textures/Movesets/new char. slots/new stages so easy so you only needing to download themplace them in right foldername them the right nameStart the gameRecolours or alt. models or textures/Movesets/new char. slots/new stages works an loading right so you wont needing to edit any files for add something so kids/not so smart ppl can easy use the mods other ppl is making/uploading for this game here is the file format i wanted to know if they can be readed/opened if making a game that use these files: .mld0(brawl model file) .chr0(model animation for moving/scale/rota the bones) .srt0(animations for texture like moving eyes or blinking) .vis0(Animations for get polygons to hide/show with visibilitybones on the model there is also some polygons there ) .brres(a file format where stuff like model files or textures or animations is inside) .pac(a file format where the .brres is inside to keep model+textures+model for the shadow in 1 file) .wav (for SoundFX effects or voices to char. or stages) i am sure that one is possible the .wav files is inside a other file format for brawl but that file can´t you add more .wav files inside only replace so i wanted the .wav files outside so its easy to add/replace/remove SoundFX effects or voices to char. or stages .brstm(brawl music file so the music is looped perfect so it loop in middel of the music and not start over again then the music is done) afew more file formats (mainly for the Graphics effects like fire/aura/hit effects if not needing to redo them)so only coding in the editor i will make is needed to be done for port a SSBB hack(a.k.a mod)(moveset/stage coding) to this game wanted the game to be able to load these files and load them right like if loading wait1.chr0(idle animation) it will also load at same time wait1.srt0/wait1.vis0 and all kinda of animations is inside the same .brres file i am needing since it to be able to load the file format i wanted cuz: -the animations can´t be converted to any other animation file format and i dont think ppl want to redo these animations(inc. me for Goku to SSBbrawl) -models can be converted but then they lose all the shader/materials stuff like a shine effect or lighting on the model -.brstm can be converted to .wav but then there will be no loop so i prefer it can load this file format too for the music to stage/menu -brawlbox is really easy to use for make animation for the char. and import models from 3ds max so even around "not too stupid" 10 year kids can make SSBB mods(not try to be rude but to say how easy it is) also i wanted the folder setup for characters/stages/moveset/other stuff to be like this: https://www.dropbox.com/s/2oolm5z5ri234tz/SSBmugen%20Folder%20setup.txt just uploaded a txt file since it is a wall of text and this post is already a wall of test so it easy to place stuff (if not i do a program for to that so it auto place the stuff on right place) not 100% sure what to use of game engine to make this possible but i got a dll file from that brawlbox program that can open/read/edit these file formats if that helps i also got open source of brawlbox i have kinda learned programming(since its kinda the same thing but still not 100% same) from Super smash bros modding/hacking like coding a moveset for the new animations/models + have readed alittle about it but i am soon starting for real to study it for ppl who is alittle confuse for what i am asking for here is the list: -what game engine should i use to make a SSB clone? but at same time to make all this stuff i just said possible so ppl can make they own mods and share them and use the already made mods from SSBbrawl? and easy to use aswell so noob programmors can use it? -where to learning programming on internet to be even more ready to make a game like this? and dont wanted to start in the small like making small boring 2d games that no one care about anyway ps. i am also planing a other project like as SSBmugen but it will be Super mario bros open (again tittle unsure but open means open source) i will make a Mario game engine that also use 3d models and can have 2d or 3d gameplay with any mario powerups/gameplay(from any mario platform games) there is ever made multiplayer like as in New super mario bros wii maybe multiplay over lan or online but for now over 1 PC also alittle planed for that to my SSBmugen a Level/world map editor for it too(easy to use so even kids can use it and make levels for it) so it just place the objects/enemies and options for them enemies since they are not 100% same AI in all mario game like to choose a goomba have AI from SM64 the Editor will be able to change the gameplay on a level while have a other gameplay on a other level like this: 1 level have Super mario bros 3 gameplay (then it will be a 3d model remake) a other level have super mario galaxy gameplay but in a Super mario 3d land level yet a other level have super mario 64 gameplay but with powerups from a other mario game like powerups from mario 3d land or can ride on Yoshi so you can easy remake your fav. level from a old mario game in this mario engine/editor or just make a custom one with yours fav. mario gameplay/powerups so it will be like turn off/on: walljump/triple jump/other kinda or jumps/2x punch and 1 kick+Air kick/SMG spin attack/Fludd/other stuff like that so you can make the gameplay from the first mario game to the newest or make custom gameplay on a level also the star(from 64/sunshine/galaxy) will be replaced with the flag from new super mario bros/mario 3d land since the game is not so much about getting stars its more about making/download the levels you wanted and share them to other ppl and play these level so after have killed like the boss from SM64 bomb omb field(if one have made that) you will get the flag instead of star since i wanted it to be simple to make levels in the editor to make the bosses/new enemies/new powerups/custom char. idk what to do to make that simple yet also thinking the mario game will use brawl files since it almost already got all needed animations/models for this since i dont wanted to redo animations/models and if needing more animations i can just make them easy in brawlbox since thats the program i am most used to make animations but that will be after my SSBmugen project if not this game will be easyer then SSBmugen to make since i am planing then 1 of them is done i use the that game as base to make the other (since both is kinda platfrom games and possible using same file format for both) also wanted to ask what is best to start with out of these 2 games? also will maybe make a DLC site(or ingame) for both of these games if they get done so it wont end up like as Mugen where you needing to look all over the internet to find the stuff you wanted but for my game all the mods for my game is on same place not sure about online mode for SSBmugen or super mario bros open but i can always add that then i get better at programming both games also need to have options on controls/if using joystick also that i have planed these game for a long time and got even more ideas for them but first i wanted to get them to work so i can add the other stuff later(like DLC or online mode or some other stuff later) right now i know 0,0001% to programming(in my option) maybe i know more then that since i have been study it alittle but i learning while making stuff like this that was also my plan for make these game learn while making them and get better to programming so again i say it i kinda dont want to hear dont do these projects cuz i already know it will be hard so dont wanted so much to heard stuff like: you can´t do it since you just started learning programming or this project will fail since somewhere i needing to get started with programming and this is where i want to start to make my dream games(possible other´s dream games too) and i dont think this project will fail if i work hard on it (as i possible will) and ppl will maybe help i think this was all my questing/ideas for now (sorry for it sounds more like ideas then questings) but i needing to say my ideas so you ppl can see what i needing to use for make this possible

    Read the article

  • I am looking to make a spaceship tilt as it corners but I cant get it to return

    - by bobthemac
    I am using the TL game engine I am not allowed to use a physics engine but I need to make the spaceship lean as it corners, I can make it lean but cannot make it return to its starting position. I have looked at implementing some kind of spring physics but I don't understand it. Here is my code so far if(myEngine->KeyHeld(Key_A)) { car->RotateY(carSteer * frameTime); if(carSteer >= -carMaxSteer) { carSteer -= carSteerIncrement; car->RotateLocalZ(-(carSteer * frameTime)); } } if(!myEngine->KeyHeld(Key_A)) { if(carSteer < 0) { carSteer = 0; } } if(myEngine->KeyHeld(Key_D)) { car->RotateY(carSteer * frameTime); if(carSteer <= carMaxSteer) { carSteer += carSteerIncrement; car->RotateLocalZ(-(carSteer * frameTime)); } } if(!myEngine->KeyHeld(Key_D)) { if(carSteer > 0) { carSteer = 0; } } All the functions I am calling are built into the engine and I did not write them. Any Help Would Be Appreciated Thanks.

    Read the article

  • Model-View-Controller in JavaScript

    - by Casey Hope
    tl;dr: How does one implement MVC in JavaScript in a clean way? I'm trying to implement MVC in JavaScript. I have googled and reorganized with my code countless times but have not found a suitable solution. (The code just doesn't "feel right".) Here's how I'm going about it right now. It's incredibly complicated and is a pain to work with (but still better than the pile of code I had before). It has ugly workarounds that sort of defeat the purpose of MVC. And behold, the mess, if you're really brave: // Create a "main model" var main = Model0(); function Model0() { // Create an associated view and store its methods in "view" var view = View0(); // Create a submodel and pass it a function // that will "subviewify" the submodel's view var model1 = Model1(function (subview) { view.subviewify(subview); }); // Return model methods that can be used by // the controller (the onchange handlers) return { 'updateModel1': function (newValue) { model1.update(newValue); } }; } function Model1(makeSubView) { var info = ''; // Make an associated view and attach the view // to the parent view using the passed function var view = View1(); makeSubView(view.__view); // Dirty dirty // Return model methods that can be used by // the parent model (and so the controller) return { 'update': function (newValue) { info = newValue; // Notify the view of the new information view.events.value(info); } }; } function View0() { var thing = document.getElementById('theDiv'); var input = document.getElementById('theInput'); // This is the "controller", bear with me input.onchange = function () { // Ugly, uses a global to contact the model main.updateModel1(this.value); }; return { 'events': {}, // Adds a subview to this view. 'subviewify': function (subview) { thing.appendChild(subview); } }; } // This is a subview. function View1() { var element = document.createElement('div'); return { 'events': { // When the value changes this is // called so the view can be updated 'value': function (newValue) { element.innerHTML = newValue; } }, // ..Expose the DOM representation of the subview // so it can be attached to a parent view '__view': element }; } How does one implement MVC in JavaScript in a cleaner way? How can I improve this system? Or is this the completely wrong way to go, should I follow another pattern?

    Read the article

< Previous Page | 50 51 52 53 54 55 56 57 58 59 60 61  | Next Page >