Search Results

Search found 20484 results on 820 pages for 'small projects'.

Page 60/820 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • How do you make a character jump, both on objects and just normal jump?

    - by haxerflaxer
    Hi, I'm kind of a beginner when it comes to java programming, and I have a project in school where I'm going to create a game much like Icy Tower. And my question is, how am I going to write to make the character stand on the ground and be able to jump up on objects? Here's my code so far: Part one package Sprites; import java.awt.Image; import java.awt.event.KeyEvent; import javax.swing.ImageIcon; public class jumper { private String jump = "oka.png"; private int dx; private int dy; private int x; private int y; private Image image; public jumper() { ImageIcon ii = new ImageIcon(this.getClass().getResource(jump)); image = ii.getImage(); x = 50; y = 100; } public void move() { x += dx; y += dy; } public int getX() { return x; } public int getY() { return y; } public Image getImage() { return image; } public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_LEFT) { dx = -5; ImageIcon ii = new ImageIcon(this.getClass().getResource("oki.png")); image = ii.getImage(); } if (key == KeyEvent.VK_RIGHT){ dx = 5; ImageIcon ii = new ImageIcon(this.getClass().getResource("oka.png")); image = ii.getImage(); } if (key == KeyEvent.VK_SPACE) { dy = -5; } if (key == KeyEvent.VK_DOWN) { dy = 5; } } public void keyReleased(KeyEvent e) { int key = e.getKeyCode(); if (key == KeyEvent.VK_LEFT) { dx = 0; } if (key == KeyEvent.VK_RIGHT){ dx = 0; } if (key == KeyEvent.VK_SPACE) { dy = 0; } if (key == KeyEvent.VK_DOWN) { dy = 0; } } } Part two package Sprites; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JPanel; import javax.swing.Timer; public class board extends JPanel implements ActionListener { private Timer klocka; private jumper jumper; public board() { addKeyListener(new TAdapter()); setFocusable(true); setBackground(Color.WHITE); setDoubleBuffered(true); jumper = new jumper(); klocka = new Timer(5, this); klocka.start(); } public void paint(Graphics g) { super.paint(g); Graphics2D g2d = (Graphics2D)g; g2d.drawImage(jumper.getImage(), jumper.getX(), jumper.getY(), this); Toolkit.getDefaultToolkit().sync(); g.dispose(); } public void actionPerformed(ActionEvent e) { jumper.move(); repaint(); } private class TAdapter extends KeyAdapter { public void keyReleased(KeyEvent e) { jumper.keyReleased(e); } public void keyPressed(KeyEvent e) { jumper.keyPressed(e); } } } Part three package Sprites; import javax.swing.JFrame; public class RType extends JFrame { public RType() { add(new board()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(800, 600); setLocationRelativeTo(null); setTitle("R - type"); setResizable(false); setVisible(true); } public static void main(String[] args) { new RType(); } } I really appreciate all the help I can get!

    Read the article

  • TTPhotoViewController: How to show small images

    - by Sali
    Hi, I posted this question on Three20 google group but did not get any response. So I thought I try this forum. I am using TTPhotoViewController to display photos. I am following sample code given in Three20 sample project: TTCatalog/PhotoTest1Controller.m. In my case some of the images are less than (320,480). The problem which I am facing is that when my image is 200*300 then TTPhotoViewController re-sizes it to full screen on load which distorts the image. I was wondering if there is a way to tell TTPhotoViewController to display image in its actual size and not to resize it. The only thing which I have changed is viewDidLoad function in PhotoTest1Controller.m. (void)viewDidLoad { self.photoSource = [[[MockPhotoSource alloc] initWithType:MockPhotoSourceNormal title:@"Photo 1" photos:[NSArray arrayWithObjects:[[[MockPhoto alloc] initWithURL:@"http://test/test.jpg" smallURL:@"http://test/test.jpg" size:CGSizeMake(200, 300) caption:@"This is a caption."] autorelease], nil] photos2:nil] autorelease]; } I will appreciate your help. Thanks

    Read the article

  • Microsoft Small Business Licensing Kick Start

    - by regex
    I seem to recall hearing at some point (I believe it was MIX09) that Microsoft has a licensing model of some sort where a business can consume licenses for up to two years, free of charge, until they reach a point where they are stable position and can pay their licensing at the end of two years. However, I can't find information regarding it online. I want to say that possibly stackoverflow used this licensing model to kick start their site. Is anyone familiar with this?

    Read the article

  • Visaul Studio 2010, TlbImp generates .net 4.0 interops in 2.0 projects

    - by DJScrib
    In a C# project we add a reference to a COM object via the Add References setup pointing to a COM object which results in the IDE auto-generating the interop assembly. So this is fine and good, but we are building based on .net 3.5 SP1 aka CLR 2.0, and the generated interops are using the 4.0 CLR making them incompatiable. Is there a way to prevent this? I assume the other option is in our build script to try using tlbimp.exe with the /references parameter? to point to mscorlib v2.0? Anyhow, I'm hoping there's a flag somewhere to allow this.

    Read the article

  • VS: Separating headers from source files?

    - by jco
    I know this is completely subjective, but I'm curious: do you use separate filters for headers and source files in your Visual Studio solutions? Visual Studio creates "Header Files" and "Source Files" filters by default. To me, this dichotomy causes more annoyance than anything else. What's your take on this?

    Read the article

  • How easy would it be to refactor a small JSP/Servlet/JDBC project to SpringMVC/Hibernate

    - by John
    With reference to this post, I am considering starting a new web-based Java project. Since I don't know Spring/Hibernate I was concerned if it's a bad plan to start learning them while creating a new project, especially since it will slow down the early development. One idea I had was to write a prototype using tech I do know, namely JSP/Servlets/JDBC, since I can get this running much quicker with my current knowledge. I could then throw the whole thing away and start over with Spring, etc, but I'd like to consider how easy it would be to refactor a smallish project from JSP/Servlets/JDB to SpringMVC/Hibernate? My DB could of course be re-used but what about other code... would I expect to save most of it plugged into an MVC framework, or is the paradigm shift big enough this would cause more trouble than it avoids? Please use the other question for more general advice on choosing technologies

    Read the article

  • How to autodoc .Net Google code projects?

    - by Remus Rusanu
    I know how to generate html documentation using Sandcastle and similar tools. But if I want to host the project on Google code, how can I easily publish the documentation straight into the Google project Wiki pages? I can see the SVN repository has a wiki folder which I assume maps to the project Wiki pages and I guess I can make a build step to build the documentation from the autodoc tags. But is there some tool that generates wiki compatible format from the code documentation tags?

    Read the article

  • how to use cpp source for 2 projects

    - by joels
    I'm not sure if I am going about this the right way. I am making some c++ classes to use in 2 apps. I am going to have to compile them to be used in a Cocoa app and later be compiled for use with fastcgi. Should I create a dynamic library?

    Read the article

  • Trouble Upgrading Rails 2 Routes for a Redmine Plugin

    - by user1858628
    I am trying to get a Redmine plugin designed for Rails 2 to work with Rails 3. https://github.com/dalyons/redmine-todos-scrum-plugin I've pretty much fixed most parts, but having no success whatsoever in getting the routes to work. The original routes for Rails 2 are as follows: map.resources :todos, :name_prefix => 'project_', :path_prefix => '/projects/:project_id', :member => {:toggle_complete => :post }, :collection => {:sort => :post} map.resources :todos, :name_prefix => 'user_', :path_prefix => '/users/:user_id', :controller => :mytodos, :member => {:toggle_complete => :post }, :collection => {:sort => :post} map.my_todos 'my/todos', :controller => :mytodos, :action => :index map.connect 'projects/:project_id/todos/show/:id', :controller => "todos", :action => "show" rake routes outputs the following: sort_project_todos POST /projects/:project_id/todos/sort(.:format) {:controller=>"todos", :action=>"sort"} project_todos GET /projects/:project_id/todos(.:format) {:controller=>"todos", :action=>"index"} POST /projects/:project_id/todos(.:format) {:controller=>"todos", :action=>"create"} new_project_todo GET /projects/:project_id/todos/new(.:format) {:controller=>"todos", :action=>"new"} toggle_complete_project_todo POST /projects/:project_id/todos/:id/toggle_complete(.:format) {:controller=>"todos", :action=>"toggle_complete"} edit_project_todo GET /projects/:project_id/todos/:id/edit(.:format) {:controller=>"todos", :action=>"edit"} project_todo GET /projects/:project_id/todos/:id(.:format) {:controller=>"todos", :action=>"show"} PUT /projects/:project_id/todos/:id(.:format) {:controller=>"todos", :action=>"update"} DELETE /projects/:project_id/todos/:id(.:format) {:controller=>"todos", :action=>"destroy"} sort_user_todos POST /users/:user_id/todos/sort(.:format) {:controller=>"mytodos", :action=>"sort"} user_todos GET /users/:user_id/todos(.:format) {:controller=>"mytodos", :action=>"index"} POST /users/:user_id/todos(.:format) {:controller=>"mytodos", :action=>"create"} new_user_todo GET /users/:user_id/todos/new(.:format) {:controller=>"mytodos", :action=>"new"} toggle_complete_user_todo POST /users/:user_id/todos/:id/toggle_complete(.:format) {:controller=>"mytodos", :action=>"toggle_complete"} edit_user_todo GET /users/:user_id/todos/:id/edit(.:format) {:controller=>"mytodos", :action=>"edit"} user_todo GET /users/:user_id/todos/:id(.:format) {:controller=>"mytodos", :action=>"show"} PUT /users/:user_id/todos/:id(.:format) {:controller=>"mytodos", :action=>"update"} DELETE /users/:user_id/todos/:id(.:format) {:controller=>"mytodos", :action=>"destroy"} my_todos /my/todos {:controller=>"mytodos", :action=>"index"} /projects/:project_id/todos/show/:id {:controller=>"todos", :action=>"show"} The nearest I have got for Rails 3 is follows: scope '/projects/:project_id', :name_prefix => 'project_' do resources :todos, :controller => 'todos' do member do post :toggle_complete end collection do post :sort end end end scope '/users/:user_id', :name_prefix => 'user_' do resources :todos, :controller => 'mytodos' do member do post :toggle_complete end collection do post :sort end end end match 'my/todos' => 'mytodos#index', :as => :my_todos match 'projects/:project_id/todos/show/:id' => 'todos#show' rake routes outputs the following: toggle_complete_todo POST /projects/:project_id/todos/:id/toggle_complete(.:format) todos#toggle_complete {:name_prefix=>"project_"} sort_todos POST /projects/:project_id/todos/sort(.:format) todos#sort {:name_prefix=>"project_"} todos GET /projects/:project_id/todos(.:format) todos#index {:name_prefix=>"project_"} POST /projects/:project_id/todos(.:format) todos#create {:name_prefix=>"project_"} new_todo GET /projects/:project_id/todos/new(.:format) todos#new {:name_prefix=>"project_"} edit_todo GET /projects/:project_id/todos/:id/edit(.:format) todos#edit {:name_prefix=>"project_"} todo GET /projects/:project_id/todos/:id(.:format) todos#show {:name_prefix=>"project_"} PUT /projects/:project_id/todos/:id(.:format) todos#update {:name_prefix=>"project_"} DELETE /projects/:project_id/todos/:id(.:format) todos#destroy {:name_prefix=>"project_"} POST /users/:user_id/todos/:id/toggle_complete(.:format) mytodos#toggle_complete {:name_prefix=>"user_"} POST /users/:user_id/todos/sort(.:format) mytodos#sort {:name_prefix=>"user_"} GET /users/:user_id/todos(.:format) mytodos#index {:name_prefix=>"user_"} POST /users/:user_id/todos(.:format) mytodos#create {:name_prefix=>"user_"} GET /users/:user_id/todos/new(.:format) mytodos#new {:name_prefix=>"user_"} GET /users/:user_id/todos/:id/edit(.:format) mytodos#edit {:name_prefix=>"user_"} GET /users/:user_id/todos/:id(.:format) mytodos#show {:name_prefix=>"user_"} PUT /users/:user_id/todos/:id(.:format) mytodos#update {:name_prefix=>"user_"} DELETE /users/:user_id/todos/:id(.:format) mytodos#destroy {:name_prefix=>"user_"} my_todos /my/todos(.:format) mytodos#index /projects/:project_id/todos/show/:id(.:format) todos#show I am guessing that I am not using :name_prefix correctly, resulting in duplicate paths which are then omitted. Any help would be greatly appreciated.

    Read the article

  • VS 2008 - Procedure to ship C#/WPF solution to ensure compatibility

    - by Bill
    I am attempting to collaborate on a C#/WPF project with another developer remotely via e-mail; and although the code compiles perfectly when it leaves, my collaborator has not been able to compile the code on his side. We are both using VS 2008 Version 9. This is the first time trying to work with someone else on an application and I was hoping that someone would advise me if there are any suggestions to obtain and ensure compatibility between the two of us? Additionally, is there a recommended procedure to prepare the solution for shipment (ie. just zip up the solution folder? export the application? etc.)? Thanks very much.

    Read the article

  • Mercurial Workflow for small team

    - by Tarski
    I'm working in a team of 3 developers and we have recently switched from CVS to Mercurial. We are using Mercurial by having local repositories on each of our workstations and pulling/pushing to a development server. I'm not sure this is the best workflow, as it is easy to forget to Push after a Commit, and 3 way merge conflicts can cause a real headache. Is there a better workflow we could use, as I think the complexity of distributed VC is outweighing the benefits at the moment. Thanks

    Read the article

  • version control projects in eclipse

    - by Stan
    Say I have eclipse installed in office and home. Both eclipse are 3.5 but may have slightly difference, like plugins version. I'd like to commit the code to online repo when get off work and then checkout at home. What would be a possible solution? github? sourceforge? Are they free? Would those slightly difference in eclipse cause any problem? Since I might commit whole project folder which consist some configurations. Can the community explain a bit or suggest some keyword? I will look up more online. Thanks.

    Read the article

  • Small line-height cross-browser difference

    - by AESM
    So basicly my problem is that the line-heights in Firefox are a little bittle "larger" than in other browsers even though they're all fixed line-heights. For example, you have a block element which has a height from 100px and the line-height is set to 102px. Now, in Firefox the vertical alignment of text is perfect. But in the latest Chrome and Safari 4, the text stands 2px or so higher. Isn't there any way to fix this? Thanks.

    Read the article

  • How do I correlate build configurations in dependant vcproj files with different names?

    - by Tim
    I have a solution file that requires a third party library (open source). The containing solution uses the typical configuration names of "Debug" and "release". The 3rd party one has debug and release configs for both DLL and static libs - their names are not "Debug" and "Release". How do I tell the solution to build the dependency first and how do I correlate which config to the dependant config? i.e. MyProject:Debug should build either 3rdParty:debug_shared or 3rdParty:debug_static

    Read the article

  • Implementing a server side push for a small number of clients

    - by Helper Method
    For an web application I am working on I have the following requirements: Clients need to be able to log in via a web brower. After logging in, they will be able to change configurations (normal request/response) will be able to receive alarms sent by the server (a server side push) Now, the question is how to implement the alarms. I first thought of using some long polling approach (Comet), but as the amount of clients will definitely belimited to 5-10, I'm now thinking to go with a simpler approach. What are the options I have? Would it be okay to just let the clients poll the server? Important aspects are: Alarms should be delivered in (nearly) real-time. Alarms must not get lost (a lost alarm could cause harm to real people).

    Read the article

  • joining programming projects for free

    - by josephj1989
    Hi All Not sure if this is an appropriate question for the forum. I an experienced software developer with over 15 years in design and development of systems -mostly using Oracle software and ERP solutions using Oracle Apps. But due to some personal reasons I had to stay away from work for a period of 5 years.Now I am finding it hard to get back in. I have trained myself thoroughly in microsoft technologies C#,.NET,SQL SERVER,ASP .NET and also certified in these areas.Now I want to gain some practical experience with these technologies.I am very willing to take up some project work for free so that I can gain some experience and also add to my portfolio. Is any of you in a position to give me some voluntary work. I did try to find open source work but none is available. I can do the following very well. Analysis/Design Oracle Database PLSQL/SQL SQL Server TSQL C# .NET and .NET Platform ASP.NET I can also do Web Development HTML,CSS, JAVASCRIPT,JQUERY Unix Shell Scripting Java Swing Development Thanks

    Read the article

  • Maintaining property lists for xCode projects

    - by William Jockusch
    My project currently contains two largish property lists. One is currently 20KB; another is 8KB. So far, I have been maintaining them with xCode's property list editor. This is manageable but also a bit clunky. I am wondering if other people have better ways of doing this? So far, my lists consist of nested arrays of strings. The depth is not uniform.

    Read the article

  • Syntax error. Help with one small JS snippet :(

    - by Bogdan
    Hey guys. I don't know much JS, but I wanted to do some quick work with jQuery. But I've been staring at this for about an hour and I don't understand what I missed: <script type="text/javascript"> $('#qty_6035').change(function () { var substractedQty, stockQty, remQty; substractedQty = (int) $('#qty_6035').val(); // missing ; before statement stockQty = (int) $('#orig_qty_6035').val(); $('#rem_qty_6035').html(stockQty-substractedQty); }); </script> jQuery library is included at the beggining of the document. Thanks.

    Read the article

  • I Need Help Fixing My Small Time Sheet Table - Relational DB - SQL Server

    - by user327387
    I have a TimeSheet table as: CREATE TABLE TimeSheet ( timeSheetID employeeID setDate timeIn outToLunch returnFromLunch timeOut ); Employee will set his/her time sheet daily, i want to ensure that he/she doesn't cheat. What should i do? Should i create a column that gets date/time of the system when insertion/update happens to the table and then compare the created date/time with the time employee's specified - If so in this case i will have to create date/time column for timeIn, outToLunch, returnFromLunch and timeOut. I don't know, what do you suggest? Note: i'm concerned about tracking these 4 columns timeIn, outToLunch, returnFromLunch and timeOut

    Read the article

  • Stupid automatic assembly copy problem in Visual Studio 2008 - WTH am I doing wrong?

    - by Dave
    My lazier side has apparently gotten the best of me. When I started to develop with .NET under VS2008 recently, I was very happy to see that all of the dependencies automagically got copied to my application's bin/debug folder upon compilation. This is fantastic. I never even bothered to look into how / why this is done. Yesterday, I decided to make another plugin very similar to an existing one, so I literally copied the folder and all of project files, then renamed the folder and manually edited the project files and file references. I also changed the assembly's GUID. Everything builds fine, but this particular assembly is never copied into my application's bin/debug folder. It is marked as a dependency of my app as well. What did I miss here?

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >