Search Results

Search found 20 results on 1 pages for 'moons'.

Page 1/1 | 1 

  • adapting a Unity gravitational script to allow moons

    - by PartyMix
    I'm using this script: http://wiki.unity3d.com/index.php/Simple_planetary_orbits to get a solar system going in Unity, but it doesn't seem to support creating bodies that orbit other moving bodies (or I am using it incorrectly). Any idea about how to modify it so that it does (or just use it correctly)? I've been beating my head against this problem for a couple hours, and I really don't feel like I have any idea what I'm doing. Thanks in advance.

    Read the article

  • How to load object after saving with encodeWithCoder?

    - by fuzzygoat
    EDIT_002: Further rewrite: if I save using the method below how would the method to load it back in look? (moons is an NSMutableArray of NSNumbers) // ------------------------------------------------------------------- ** // METHOD_002 // ------------------------------------------------------------------- ** -(void)saveMoons:(NSString *)savePath { NSMutableData *data = [[NSMutableData alloc] init]; NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; [moons encodeWithCoder:archiver]; [archiver finishEncoding]; [data writeToFile:savePath atomically:YES]; [archiver release]; [data release]; } EDIT_003: Found it, my problem was that I was using ... [moons encodeWithCoder:archiver]; where I should have been using ... [archiver encodeObject:moons]; Hence the loader would look like: -(void)loadMoons_V3:(NSString *)loadPath { NSData *data = [[NSData alloc] initWithContentsOfFile:loadPath]; NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; [self setMoons:[unarchiver decodeObject]]; [unarchiver finishDecoding]; [unarchiver release]; [data release]; } gary

    Read the article

  • Microsoft turning into a toothless tiger?

    <b>Technology & Life Integrationt:</b> "Many moons ago ( and I am not talking about those drunken moons at passing cars :), while the IT jungle was still fresh and green. There was a big blue king of the jungle. This top monkey position was usurped by an up and coming tiger that, while the tigers name seemed small and soft, it wasn't afraid to show its teeth."

    Read the article

  • Using NFS for scalable PHP/MySQL web application

    - by Jeroen Moons
    Here's the situation: I have a PHP/MySQL web application that accepts user uploads (pdf files). From these pdf files' pages a preview image is made on the fly and presented to the web app's users. Some pdfs might be on the large side, most will be under 50 MB but some extreme cases could be as large as a few hundred MB. A little waiting for the preview image for large pdf files is acceptable but no more than a minute let's say. Everything is running on one server for now, but soon the app will hit the server's limit on both storage and processing power. My idea to solve the problem: To deal with this situation I had the idea of having one or more pdf processing servers as needed, and one or more file storage servers. These two types of servers are mounted to the server on which the actual app runs using NFS. The app could then use GearMan to delegate pdf processing tasks to these processing servers. The processing server can mount the storage server and read the file stored there, process it and write its output to that server. The servers I'm talking about will be amazon ec2 instances. The web app returns a link to the resulting pdf preview image on the storage server that was used which can then be used on the front end to show the image to the user. My question: I have zero experience with apps that use multiple servers, is this idea viable or is there a better way to do it? Is an NFS setup fast and reliable enough for this situation?

    Read the article

  • how to calculate intersection time and place of multiple moving arcs

    - by user20733
    I have rocks orbiting moons, moons orbiting planets, planets orbiting suns, and suns orbiting black holes, and the current system could have many many layers of orbitage. the position of any object is a function of time and relative to the object it orbits. (so far so good). now I want to know for a given 2 objects(A,B), a start time and a speed, how can I work out the when and where to go. I can work out where A and B is given a time. so i just need. 1: direction to travel in from A to B(remember B is moving(not in a straight line)) 2: Time to get to b in a straight line. travel must be in a straight line with the shortest possible distance. as an extension to this question, how will i know if its better to wait, EG is it faster to stay on object A and wait for a hour when the objects may be closer, than to set off from A to B at the start. Cheers, it hurt my brain.

    Read the article

  • How to receive/send files with a java Webservice

    - by Moons
    Hi! So i'm writing a WebService in Java that should receive a file as an input, and then the WebService does some processing on that file, and finally it should send a new file to the client. My question is : How do I send a file to the client? (and how can I tell them to upload one). Thanks for the help

    Read the article

  • gcc does not resolve extern global variables, with or without -c option

    - by Moons
    Hello everyone! So i have this issue : i am declaring some extern global variables in my C program. If I don't use the -c option for gcc, i get undefined references errors. But with that -c option, the linking is not done, which means that i don't have an executable generated. So how do I solve this? Here is my makefile. As I am not good with writing makefiles, I took one from another project then I changed a few things. So maybe I'm missing something here. # Makefile calculPi INCL = -I$(INCL_DIR) DEFS = -D_DEBUG_ CXX_FLAGS =-g -c -lpthread -lm CXX = gcc $(CXX_FLAGS) $(INCL) $(DEFS) LINK_CXX = gcc OBJ = approx.o producteur.o sequentialApproximation.o main.o LINKOBJ = approx.o producteur.o sequentialApproximation.o main.o BIN = calculPi.exe RM = rm -fv all: calculPi.exe clean: ${RM} *\~ \#*\# $(OBJ) clean_all: clean ${RM} $(BIN) cleanall: clean ${RM} $(BIN) $(BIN): $(OBJ) $(CXX) $(LINKOBJ) -o "calculPi.exe" main.o: main.c $(CXX) main.c -o main.o $(CXX_FLAGS) approx.o: approx.c approx.h $(CXX) -c approx.c -o approx.o $(CXX_FLAGS); producteur.o: producteur.c producteur.h $(CXX) -c producteur.c -o producteur.o $(CXX_FLAGS); sequentialApproximation.o : sequentialApproximation.c sequentialApproximation.h $(CXX) -c sequentialApproximation.c -o sequentialApproximation.o $(CXX_FLAGS);

    Read the article

  • The linking is not done (gcc compilation)

    - by Moons
    Hello everyone! So i have this issue : i am declaring some extern global variables in my C program. If I don't use the -c option for gcc, i get undefined references errors. But with that -c option, the linking is not done, which means that i don't have an executable generated. So how do I solve this? Here is my makefile. As I am not good with writing makefiles, I took one from another project then I changed a few things. So maybe I'm missing something here. # Makefile calculPi INCL = -I$(INCL_DIR) DEFS = -D_DEBUG_ CXX_FLAGS =-g -c -lpthread -lm CXX = gcc $(CXX_FLAGS) $(INCL) $(DEFS) LINK_CXX = gcc OBJ = approx.o producteur.o sequentialApproximation.o main.o LINKOBJ = approx.o producteur.o sequentialApproximation.o main.o BIN = calculPi.exe RM = rm -fv all: calculPi.exe clean: ${RM} *\~ \#*\# $(OBJ) clean_all: clean ${RM} $(BIN) cleanall: clean ${RM} $(BIN) $(BIN): $(OBJ) $(CXX) $(LINKOBJ) -o "calculPi.exe" main.o: main.c $(CXX) main.c -o main.o $(CXX_FLAGS) approx.o: approx.c approx.h $(CXX) -c approx.c -o approx.o $(CXX_FLAGS); producteur.o: producteur.c producteur.h $(CXX) -c producteur.c -o producteur.o $(CXX_FLAGS); sequentialApproximation.o : sequentialApproximation.c sequentialApproximation.h $(CXX) -c sequentialApproximation.c -o sequentialApproximation.o $(CXX_FLAGS);

    Read the article

  • Is it easy to develop a simple Firefox plugin (JS injection)

    - by Moons
    Hello everyone! So I was just wondering if it was easy to develop a very simple Firefox plugin where you could click a button, and it would execute some Javascript code! Please note that I have never developed any kind of plugin for firefox, I just want to know if that is an easy task to do (like less than an hour)

    Read the article

  • Loading from archive?

    - by fuzzygoat
    Can anyone point me in the right direction, I have two sets of load/save methods below that I am playing with to save an array of objects out to disk and then load them back in. I am getting a little confused after calling "saveMoons" how I should go about loading that data back in ... any pointers would be great. -(void)saveMoons:(NSString *)savePath { NSMutableData *data = [[NSMutableData alloc] init]; NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data]; [moons encodeWithCoder:archiver]; [archiver finishEncoding]; [data writeToFile:savePath atomically:YES]; [data release]; [archiver release]; } -(void)loadMoons:(NSString *)loadPath { NSMutableData *data = [[NSMutableData alloc] initWithContentsOfFile:loadPath]; NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; // [self setMoons:[unarchiver ??????]]; } . // ------------------------------------------------------------------- ** // SIMPLER // ------------------------------------------------------------------- ** -(void)saveMoons_SIMPLE:(NSString *)savePath { NSData *data = [NSKeyedArchiver archivedDataWithRootObject:moons]; [data writeToFile:savePath atomically:YES]; } -(void)loadMoons_SIMPLE:(NSString *)loadPath { [self setMoons:[NSKeyedUnarchiver unarchiveObjectWithFile:loadPath]]; } // ------------------------------------------------------------------- ** // // ------------------------------------------------------------------- ** gary

    Read the article

  • Physics engine that can handle multiple attractors?

    - by brice
    I'm putting together a game that will be played mostly with three dimensional gravity. By that I mean multiple planets/stars/moons behaving realistically, and path plotting and path prediction in the gravity field. I have looked at a variety of physics engines, such as Bullet, tokamak or Newton, but none of them seem to be suitable, as I'd essentially have to re-write the gravity engine in their framework. Do you know of a physics engine that is capable of dealing with multiple bodies all attracted to one another? I don't need scenegraph management, or rendering, just core physics. (collision detection would be a bonus, as would rigid body dynamics). My background is in physics, so I would be able to write an engine that uses Verlet integration or RK4 (or even Euler integration, if I had to) but I'd much rather adapt an off the shelf solution. [edit]: There are some great resources for physics simulation of n-body problems online, and on stackoverflow

    Read the article

  • Desktop Fun: Moonlit Nights Wallpaper Collection

    - by Asian Angel
    Whether it is our own moon or ones featured in fiction and fantasy artwork, moons can be romantic, mysterious, and inspirational. Now you can add a unique touch of style and flair to your desktop with our Moonlit Nights Wallpaper collection. Note: Click on the picture to see the full-size image—these wallpapers vary in size so you may need to crop, stretch, or place them on a colored background in order to best match them to your screen’s resolution. HTG Explains: What Are Character Encodings and How Do They Differ?How To Make Disposable Sleeves for Your In-Ear MonitorsMacs Don’t Make You Creative! So Why Do Artists Really Love Apple?

    Read the article

  • Trying to make a universe [on hold]

    - by caters
    I am wanting to program a universe so that it starts with a big bang and atoms form and then molecules form and stars start to form and planets start to form and then moons around those planets. I have a few questions. If 400 IPMUs(In Program Mass Units) = 1 solar mass than how would I calculate the number of IPMUs for a spectral class of star given the range of solar masses for a main sequence star in that spectral class? How can I have planets not look like stars? Since whether it is a subdwarf, main sequence star, subgiant, giant, bright giant, supergiant, or hypergiant is mainly dependent on the radius and luminosity how can I have the radius and luminosity independent of the mass?

    Read the article

  • Sun & Moon Movement

    - by Thomas Mosey
    I'm creating a 2D HTML5 Canvas Game and am stuck on how to go about animating my Sun & Moon. The current setup is basically setting the moon at -1024 on the X-axis and the sun at 0 and animating them at 1 pixel a second. My canvas width is 1024 pixels and whenever the sun/moons X position crosses over the width of the canvas, it's X position is then set to -1024 to repeat the animation. What I am trying to do is get it to sync up with my day/night cycles. Each day is 10000 ticks long (A tick being added every frame) with Day/Night being 50% each (5000 ticks each). What I am trying to calculate is what I'll need to add to the X position of each per frame to get the sun from an X of 0 to 1024 after 5000 ticks/frames. Any help is appreciated.

    Read the article

  • C programming in 2011

    - by Duncan Bayne
    Many moons ago I cut C code for a living, primarily while maintaining a POP3 server that supported a wide range of OSs (Linux, *BSD, HPUX, VMS ...). I'm planning to polish the rust off my C skills and learn a bit about language implementation by coding a simple FORTH in C. But I'm wondering how (or whether?) have things changed in the C world since 2000. When I think C, I think ... comp.lang.c ANSI C wherever possible (but C89 as C99 isn't that widely supported) gcc -Wall -ansi -pedantic in lieu of static analysis tools Emacs Ctags Autoconf + make (and see point 2 for VMS, HP-UX etc. goodness) Can anyone who's been writing in C for the past eleven years let me know what (if anything ;-) ) has changed over the years? (In other news, holy crap, I've been doing this for more than a decade).

    Read the article

  • Turn Your Browser Pane into a Game of Katamari Damacy

    - by Jason Fitzpatrick
    If you’re a fan of Katamari Damacy, a quirky and fun Japanese puzzle game made popular on the PlayStation, you’ll love this Javas script hack that turns your browser pane and its contents into a giant HTML-collecting game of Katamari Damacy. Katamari Damacy, for the unfamiliar, is a addictive game based on the premise that a galactic prince is on a mission to rebuild stars, constellations, and moons accidentally destroyed by his father. You roll around and collect objects (making yourself an increasingly larger ball in the process). This script hack puts a ball on your web browser pane (works best in Chrome) that you can roll around collecting elements from the web page. At first you can only grab links but as you grow you can grab increasingly large objects like photo elements off the page. It doesn’t have the sophisticated graphics of the Playstation version, of course, nor the detailed back story, but it’s a clever little hack that is sure to delight fans of Katamari Damacy. Katamari Hack [KatHack] Internet Explorer 9 Released: Here’s What You Need To KnowHTG Explains: How Does Email Work?How To Make a Youtube Video Into an Animated GIF

    Read the article

  • Moon / Lunar Phase Algorithm

    - by Scott Bailey
    Does anyone know an algorithm to either calculate the moon phase or age on a given date or find the dates for new/full moons in a given year? Googling tells me the answer is in some Astronomy book, but I don't really want to buy a whole book when I only need a single page.

    Read the article

  • Which is more secure: Tomcat standalone or Tomcat behind Apache?

    - by NoozNooz42
    This question is not about performance, nor about load-balancing, etc. Which would be more secure: running Tomcat in standalone mode or running Tomcat behind apache? The thing is, Tomcat is written in Java and hence it is pretty much immune to buffer overrun/overflow (unless a buffer overrun in a C-written lib used by Tomcat can be triggered, but they're rare [the last I remember was in zlib, many many moons ago] and one heck of a hack to actually exploit), which gets rid of a lot of potential exploits. This page: http://wiki.apache.org/tomcat/FAQ/Security has this to say: There have been no public cases of damage done to a company, organization, or individual due to a Tomcat security issue... there have been only theoretical vulnerabilities found. All of those were addressed even though there were no documented cases of actual exploitation of these vulnerabilities. This, combined with the fact that buffer overrun/overflow are pretty much non-existent in Java, makes me believe that Tomcat in standalone mode is pretty secure. In addition to that, I can install both Java and Tomcat on Linux without needing to be root. The only moment I need to be root is to set up a transparent port 8080 to port 80 forwarding (and 8443 to 443). Two iptables line as root, that's all root is needed for. (I don't know for Apache). Apache is much more used than Tomcat and definitely does not have a security track record as good as Tomcat. What would make Tomcat + Apache more secure? What would make Tomcat + Apache less secure? In short: which is more secure, Tomcat standalone or Tomcat with Apache? (remembering that performance aren't an issue here)

    Read the article

1