Search Results

Search found 169 results on 7 pages for 'jonny wright'.

Page 5/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • XNA Track rotated pixel positions

    - by jonny adams
    Hi, Im making a game in xna where a tank has to move over a landscape. I need to be able find the bottom of the tank when it is rotated so I can make it move up and down as the player goes over the landscape. for example if i have a sprite at with its top left corner at 400,300 and i rotate it around its center by 45 degrees around its center, how do i find the new locations of the bottom track. Thanks

    Read the article

  • In Java, does return trump finally?

    - by jonny five
    If I have a try/catch block with returns inside it, will the finally block be called? For example: try { something(); return success; } catch (Exception e) { return failure; } finally { System.out.println "i don't know if this will get printed out." } I know I can just type this in an see what happens (which is what I'm about to do, actually) but when I googled for answers nothing came up, so I figured I'd throw this up as a question. Thanks!

    Read the article

  • generate image of basic figures with perl

    - by jonny
    I am using jalava library as a diagram drawing tool. It displays firgures as images in order to maintain compatibility with majority of browsers. When diagram block is being resized a request is being made and new gif image is generated and send to browser. What I need is generating image of basic blocks, like rounded rectangle, circle, diamond with specified parameters (height, width and color). I want to do all server-side; my server part is written on Perl.

    Read the article

  • Ok to implement backend/shared functionality for iPhone in JavaScript?

    - by John Wright
    Is it ok to use the Webkit Javascript engine to implement cross-platform, non-GUI backend functionality on the iPhone, iPad? In my case, I was interested in re-using Javascript code that I have that works on top of SQLite. I thought I would need to re-implement the logic in Obj-C but perhaps I could just share it and expose some hooks into Obj-C using JSCocoa or straight through JavaScript core. Is this legal per Apple guidelines?

    Read the article

  • Where clause on joined table used for user defined key/value pairs

    - by Steve Wright
    Our application allows administrators to add “User Properties” in order for them to be able to tailor the system to match their own HR systems. For example, if your company has departments, you can define “Departments” in the Properties table and then add values that correspond to “Departments” such as “Jewelry”, “Electronics” etc… You are then able to assign a department to users. Here is the schema: In this schema, a User can have only one UserPropertyValue per Property, but doesn’t have to have a value for the property. I am trying to build a query that will be used in SSRS 2005 and also have it use the PropertyValues as the filter for users. My query looks like this: SELECT UserLogin, FirstName, LastName FROM Users U LEFT OUTER JOIN UserPropertyValues UPV ON U.ID = UPV.UserID WHERE UPV.PropertyValueID IN (1, 5) When I run this, if the user has ANY of the property values, they are returned. What I would like to have is where this query will return users that have values BY PROPERTY. So if PropertyValueID = 1 is of Department (Jewelry), and PropertyValueID = 5 is of EmploymentType (Full Time), I want to return all users that are in Department Jewelry that are EmployeeType of Full Time, can this be done? Here's a full data example: User A has Department(Jewelry value = 1) and EmploymentType(FullTime value = 5)User B has Department(Electronics value = 2) and EmploymentType(FullTime value = 5)User C has Department(Jewelry value = 1) and EmployementType(PartTime value = 6) My query should only return User A using the above query UPDATE: I should state that this query is used as a dataset in SSRS, so the parameter passed to the query will be @PropertyIDs and it is defined as a multi-value parameter in SSRS. WHERE UPV.PropertyValueID IN (@PropertyIDs)

    Read the article

  • How can I get node coordinates from a graph, using Perl?

    - by jonny
    Ok, I have a flowchart definition (basically, array of nodes and edges for each node). Now I want to calculate coordinates for every task in the flow, preferably hierarchycal style. I need something like Graph::Easy::Layout but I have no idea how to get nodes coordinates: I render nodes myself and I only want to retrieve box coordinates/size. Any suggestions? What I need is a CPAN module available even in Debian repository.

    Read the article

  • jQuery arrays - newbie needs a kick start

    - by Jonny Wood
    I've only really started using this site and alredy I am very impressed by the community here! This is my third question in less than three days. Hopefully I'll be able to start answering questions soon instead of just asking them! I'm fairly new to jQuery and can't find a decent tutorial on Arrays. I'd like to be able to create an array that targets several ID's on my page and performs the same effect for each. For example I have tabs set up with the following: $('.tabs div.tab').hide(); $('.tabs div:first').show(); $('.tabs ul li:first a').addClass('current'); $('.tabs ul li a').click(function(){ $('.tabs ul li a').removeClass('current'); $(this).addClass('current'); var currentTab = $(this).attr('href'); $('.tabs div.tab').hide(); $(currentTab).show(); return false; }); I've used the class .tag to target the tabs as there are several sets on the same page, but I've heard jQuery works much faster when targetting ID's How would I add an array to the above code to target 4 different ID's? I've looked at var myArray = new Array('#id1', 'id2', 'id3', 'id4'); And also var myValues = [ '#id1', 'id2', 'id3', 'id4' ]; Which is correct and how do I then use the array in the code for my tabs...?

    Read the article

  • Learn Silverlight or WPF first?

    - by Phil Wright
    It seems that Silverlight/WPF are the long term future for user interface development with .NET. This is great because as I can see the advantage of reusing XAML skills on both the client and web development sides. But looking at WPF/XAML/Silverlight they seem very large technologies and so where is the best place to get start? I would like to hear from anyone who has good knowledge of both and can recommend which is a better starting point and why.

    Read the article

  • Use of 'super' keyword when accessing non-overridden superclass methods

    - by jonny
    I'm trying to get the hang of inheritance in Java and have learnt that when overriding methods (and hiding fields) in sub classes, they can still be accessed from the super class by using the 'super' keyword. What I want to know is, should the 'super' keyword be used for non-overridden methods? Is there any difference (for non-overridden methods / non-hidden fields)? I've put together an example below. public class Vehicle { public int tyreCost; public Vehicle(int tyreCost) { this.tyreCost = tyreCost; } public int getTyreCost() { return tyreCost; } } and public class Car extends Vehicle { public int wheelCount; public Vehicle(int tyreCost, int wheelCount) { super(tyreCost); this.wheelCount = wheelCount; } public int getTotalTyreReplacementCost() { return getTyreCost() * wheelCount; } } Specifically, given that getTyreCost() hasn't been overridden, should getTotalTyreReplacementCost() use getTyreCost(), or super.getTyreCost() ? I'm wondering whether super should be used in all instances where fields or methods of the superclass are accessed (to show in the code that you are accessing the superclass), or only in the overridden/hidden ones (so they stand out).

    Read the article

  • how to prevent myControl.g.cs from overwriting with wrong base class

    - by Jonny Cundall
    I've got two custom cursors for my app, MyCursor and MyOtherCursor, both of which were designed in xaml, and I added some behaviour in the xaml.cs for each of them. This behaviour was the same for both so I had them inherit from a base class to reduce code duplication. public partial class myCursor: CursorBase { public InterchangeCursor() { InitializeComponent(); } } public class CursorBase : UserControl { public virtual void MoveTo(Point pt) { this.SetValue(Canvas.LeftProperty, pt.X); this.SetValue(Canvas.TopProperty, pt.Y); } } my problem is that if I change something in the xaml for MyCursor, the MyCursor.g.cs file is regenerated, and instead of inheriting from CursorBase, the partial class in the g.cs inherits from System.Windows.Controls.UserControl. Since the other side of the partial class in the xaml.cs file still inherits CursorBase, a build error occurs. I'm finding it annoying fixing the g.cs file each time. Does anyone know how to prevent this happening?

    Read the article

  • Image swaping with click on <tr>

    - by Jonny Sooter
    I've edited this piece of code from the Data Tables Plugin witch makes a tr click able and pops open another tr with details from the clicked tr. This piece of code is the event listener for opening and closing. When "details" are open the img should be images/details_close.png and they are closed the img should be images/details_open.png and have a swap occurring when it opens and closes when clicked. What is happening is there is no swap going on when its open or closed I still only get the "details_open.png". I don't knoe if I'm just not selecting the img tag properly or whats going on. Link to project: http://www2.kent.k12.wa.us/ksd/it/www/mobile/elementary.html $('#example tbody').on('click', 'td', function (e) { var myImage = $(this).find("img"); var nTr = $(this).parents('tr')[0]; if ( oTable.fnIsOpen(nTr) ) { /* This row is already open - close it */ myImage.src = "images/details_open.png"; oTable.fnClose( nTr ); } else { /* Open this row */ myImage.src = "images/details_close.png"; oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' ); } } );

    Read the article

  • Conditional value for ActiveRecord create method only

    - by Steve Wright
    I have a form where I have an administrator creating new users. The form uses the User model I created (login, password, first_name, etc...). For the last field on the form, I want to have a checkbox that doesn't need to be stored as part of the User record, but it is needed for the controller. This will control whether or not the newly created user will receive a welcome email or not. def create @user = User.new(params[:user]) if @user.save if @user.send_welcome_email UserMailer.welcome_email(@user).deliver end redirect_to(admin_users_url, :notice => "User #{@user.name} was successfully created.") else render :action => "new" end end In my view (haml) I am trying to access it like this: %p Send Welcome Email? = f.check_box :send_welcome_email I tried to make this an attr_accessible: :send_welcome_email but the controller does not recognize it. I get an undefined method 'send_welcome_email' for #&lt;User:0x00000100d080a8&gt; I would like it to look like this: What is the best way to get this working:

    Read the article

  • Get a list of events owned by a facebook page

    - by Tom Wright
    Does anyone know how I can get a list of events owned (created) by a Facebook page? I seem to be able to use the "graph api" to generate a list of the events an entity is attending. I also looked at FQL, but it seems to require that the 'where' clause is an indexable field (and, naturally, the id is the only indexable field). For bonus points, we'd be able to do this without any authentication. (Though I'm resigned to the fact that I'm likely going to need at least a permanent access_token.) If anyone know how to do this I'd be eternally grateful.

    Read the article

  • jQuery changing css on navigation when div # scrolls into view

    - by Jonny Wood
    I'm looking to recreate the effect used on this site: http://www.brizk.com/ The site uses one large page that scrolls down. As you scroll down and pass different sections the menu navigation on the left changes css class to "current" as the corresponding div comes into view. I presume this can be done with jQuery using $(window).height(); I'm fairly new to jQuery and what I want to write is something like this (in laymans terms): Get height of browser window – if div#content1 is 100px from top and/or 200px from bottom change menu a#link1 to '.current' – else remove .current from all menu a links ... and repeat for 4 different content divs. Can anyone point me in the right direction..? Thanks.

    Read the article

  • Help with database design

    - by Jonny
    Hey im new to database design and having trouble trying to figure this one out. I have two tables Team and Fixtures. Team has rows of football teams and Fixture has 2 of those football teams in each row (home and away team). I want to link team id to home_team and away_team but it doesnt allow me to. Please tell me how i can solve this. Here is an image of my tables/relationships http://i49.tinypic.com/288qwpg.jpg

    Read the article

  • Iphone 3.3 blocks

    - by John Wright
    I am tyring to use Objective C blocks on an iPhone 3.3 app but am getting a linkage error: "_NSConcreteGlobalBlock," referenced from: Any ideas as to whether blocks are supported in the iPhone 3.3 SDK? I found conflicting reports on the internet.

    Read the article

  • Use desktop widget to run corporate web application

    - by jonny
    So the question is simple: is it possible to set windows desktop to corporate application page (anybody remembers that active desktop thing?) and use it instead of browser (sic!). My thoughts: Windows 7: I can create giant full-screen widget that will show my page. Still have no idea if I will be able to navigate inside it though. Windows Vista: ???. I know there is still a side bar gadget that hosts a browser. Windows XP: create static html page with iframe pointing to corporate app home page. Problem: clicking links on page still opens default browser.

    Read the article

  • jquery carousel

    - by Adam Wright
    Hi, I'm looking for a jquery carousel to contain image with the following requirements: must run on auto must not pause must be able to pause on image hover must have external controls that once clicked change the direction of the carousel. must be able to fadeout buttons when the carousel is moving in that direction. I've looked at jcaursel and jcaousellite but both have a pause of in auto mode or you have to specify how many items to slide. I just want it to move continously like a news ticker. Any suggestions on how to achieve this or how to customise jcaurousel or jcarouselite?

    Read the article

  • Bitmap size exceeds VM budget after second load

    - by jonny
    This is driving me crazy. I have a game which has a bitmap as the background, this is big so I scale it down and this works fine. However when I navigate to another activity and then reload the game screen it crashes on drawing the background. I am calling recycle on all the bitmaps and setting them to null on onDestroy() but this doesn't help. Any ideas and if not how can I debug the memory to see at which step its growing. I looked at getting the heap but nothing of any size is on there really. Thanks.

    Read the article

  • rendering html to png (server-side)

    - by jonny
    Hi! I have a workflow model. Internet Explorer doesn't support some features required for model editing functionality (and regular user doesn't need it). I want a read-only preview of my model. Is it possible to server-side render my html to image?

    Read the article

  • jQuery .hasClass method to omit effect

    - by Jonny Wood
    I've created a simple background effect for some tabs on a page but don't want that effect to fire if the tab has the class 'current'. I presume there is a way to do this using .hasClass Here's what I'm using for the effect: $('ul.htabs a').mouseover(function(){ $(this).stop().animate( {backgroundPosition:"(0 -810px)"}, {duration:150}, {easing: 'easeOutCubic'}) }).mouseout(function(){ $(this).stop().animate( {backgroundPosition:"(0 -806px)"}, {duration:150}, {easing: 'easeInCubic'}) });

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >