Killer_Typo 82 Master Poster

Come up with an idea
Map out that idea
Decide the target market for said idea
Develop against that target market.

If you want to make a PC Game to hit the steam powered network:
DirectX & OpenGL are two very viable libraries.

If you want to hit the iPhone then you need to know Objective-C

If you want to hit the droid market then you need to know Java.
...etc

Want to end up on the XBOX check out the XNA stuff from microsoft.


There are so many available game engines (Free too!) that picking your starting point is more of what you are comfortable with and what platform you want to end up on.

:) happy coding and cheers!

Killer_Typo 82 Master Poster

If you end up having a lot of items to search over you may want to look at an Inverted Index which is specifically designed for high speed searching of large collections (:

(very-basic) you create an index of all words from your documents, with each word is a table that defines where you will find the word (what document) and the position of the word in the document.

Example from the wiki:

"a": {(2, 2)}
"banana": {(2, 3)}
"is": {(0, 1), (0, 4), (1, 1), (2, 1)}
"it": {(0, 0), (0, 3), (1, 2), (2, 0)}
"what": {(0, 2), (1, 0)
If we run a phrase search for "what is it" we get hits for all the words in both document 0 and 1. But the terms occur consecutively only in document 1.

Using Mapping and Reducing you can create a means by which you can return the most pertinent information first. AKA for each word search you distribute the work load across several asynchronous threads which comb through the inverted index looking for the words and locations.

You can then compile the output and determine exactly where a word is and in which places all of the words appear together or at least a large portion of them :)

Killer_Typo 82 Master Poster

I think it means the author of the book was tired and miss-typed :)

Killer_Typo 82 Master Poster

yes when you call any accessing elements of an image the image is loaded at that time.

If you were to say create a new Image on "/myImage.jpg" and then call image.getWidth() it will return -1 until the image has been loaded.

Try this out in debug, call image.getWidth() and debug that line, if you call it again after a second or so (probably less, but it's a decent enough buffer) the image will finally be loaded.

It's an asynchronous process so that you don't go new Image("some massssssive image") and end up waiting a long time for it to display.

Using ImageBuffers and MediaTrackers are great alternatives since you can get the images immediately. These also allow for smarter handling of the images, which is really what most people want.

Killer_Typo 82 Master Poster

Then it is not a primary rule for basic bean specification? I have not learned getter and setter methods in object oriented programming.. Now only i am hearing.

In Spring (beans) the primary purpose of a bean is to abstract you away from the class and encapsulate the code and allow it to be populated via another means. You can load your class variables up using a spring bean file. The underlying code is usually a class of basic getters/setters with some implementation.

As for getters/setters

Getters and setters allow you to wrap data elements with meaningful code that the callers of said method would never need to know.

For Example

public class foo { 
  public int width;
  public int height;
  public Image image;

  public foo() { } 

}

By exposing those elements directly your user has no inclining into the manner in which they should be connected together. Is that width and height for something else, is that width and height of the image?

By exposing your code via getters and setters you can write impl code that will allow callers to use the methods without worry of the underlying happenings of the class.

public class foo { 
  private int width;
  private int height;
  private Image image;

  public foo() { } 

  public void setImage(Image i) { 
    image = i;
    width = image.getWidth(null);
    height = image.getHeight(null);
  }
  public int getWidth() { 
    return width;
  }
  public int getHeight() {
    return height;
  }
  // Here we …
Killer_Typo 82 Master Poster

Using a MediaTracker is definitely a good idea: a MediaTracker will allow you to pre-load images on a loading screen and bypass any issues you may encounter with loading images on the fly - such as awkward display issues and not being able to get dimensional information on the image until after it has been drawn to the canvas.

Killer_Typo 82 Master Poster

Programming is not just something you do, it is a passion. If programming is not a passion you are not going to find a magic pill or answer that will get you on track.

In 10 years if you feel you haven't gained much then you should assess why you are doing it in the first place.

Part of the problem with coding is that it's easy to lose focus and never finish a product. A lot goes into creating the perfect application, that one sweet bit o code that when all compiled together makes your pants fit just a little bit tighter.

Spend some time researching what you want to do and dedicate yourself to it. Get yourself hyped up and psyched out. You want to be passionate about whatever you are creating or it will show in the work (lack luster results). You need a clear plan of attack, from what the program is, down to how it will work.

You need to think about:
User Experience
User Interface
What the program does
How the program does it

Component-ize your work, set clear goals and meet them. Don't just say, "I want to create a video game" and get frustrated when you don't meet the goal, that goal is too generic and doesn't really allow you to feel the fruits of your labor.

Example:
"I want to create a side scroller like mario"
What should the …

Gribouillis commented: great +13
Killer_Typo 82 Master Poster

turns out I need to force python to run in 32bit mode, just needed to set the flag in python (can be found in man python for the *nix users).

Once that was set all went well, still can't run the app that was created, but I think I need to force the app to run in 32bit mode as well. :)

Killer_Typo 82 Master Poster

Trying to build a simple python script on my mac, but the mac is 64 bit and apparently does not want to play nice. Does anyone know of any workarounds or if I am missing something?

command i am running is python setup.py py2app -A

output is:

error: argv-emulation is not supported for 64-bit executables

thanks!

Killer_Typo 82 Master Poster

http://en.wikipedia.org/wiki/Wake-on-LAN <-- check that out, you'll need a system that supports WoL (wake on lan) requests.

If you check out http://www.jibble.org/wake-on-lan/ you can find a java example of doing exactly what you are asking (or similar).

By the way, that link above was the first result from google when searching: "java wake on lan" ;)

Killer_Typo 82 Master Poster

really need to know what the line is and what error you are seeing.

Let it blow up and then post the logs here.

Killer_Typo 82 Master Poster

quick question - when it starts up the new emulator do you make sure to unlock the emulator? It starts up as a new phone so you have to actually slide to unlock to get into the phones interface.

Sometimes if you wait to long before unlocking or closing out an already running instance of your activity you can get strange errors like that.

Also post the contents of your logcat, if there is any contents, there may be more issues that you cannot see.

Killer_Typo 82 Master Poster

what is the specific setup of your application?

I've worked on development where the front end was C++ and the back-end was Java. We used RPC calls between the two systems to communicate which amounts to defining an HTTPServlet and using the post methods to pass back and forth serialized packets of information.

If one of the pieces if already compiled into DLL's you will probably want to go the JNI route then.

Killer_Typo 82 Master Poster

my guess would be the manner in which they transfer messages and or the protocols / policies the technologies refer to.

We use an XMPP server for our instant messaging at work and it runs great.

I have not had any direct contact or use with JMS; although, from reading up on it, it sounds like a very solid piece of technology. I guess it comes down to personal preference and maybe reading up a bit on each of the technologies and finding the solution that works best for your situation.

Killer_Typo 82 Master Poster

is this on the android platform or windows me platform or...?

the java platform (or runtime environment) itself is not enough information to go on. Normally you would want to setup a test loop and press the key in question, trying to capture whatever code was passed as part of the key event.

Killer_Typo 82 Master Poster

EDIT:

Sorry - this is assuming you are talking about the android platform which it seems you may be with those method names and specific buttons in question. Really though - it would really help to know what platform or api level you are on.


if you look at your onKey(Up/Down/LongPress) event there is a KeyEvent event parameter.

Look at the event - or simply call the KeyEvent class.

there is:

KeyEvent.KEYCODE_VOLUME_DOWN
KeyEvent.KEYCODE_VOLUME_UP
KeyEvent.KEYCODE_CAMERA

you will probably need to override the up and down events for these keys anywhere in your application where an activity needs to override them.

Killer_Typo 82 Master Poster

In the android environment all files are created in MODE_PRIVATE!

Each application is run by its own user: any files created by an application can only be accessed by that particular application. Setting MODE_PRIVATE to the file is simply an option available as you can set files to be public-accessible.

However, if a user has root access to their phone they can CHMOD or simply pull the file off of the device. From an applications perspective, this is unlikely to happen as they would have to know the package namespace (com.google.etc.yourapplication) of another application as well as have the proper system access to change file permissions for which it does not have access - which is a permission reserved for ROOT and I believe applications are run as regular users and not root users.

Killer_Typo 82 Master Poster

yes - also, make sure you (depending on your IDE if you are using one) do a clean / build of your code to ensure that there are not any old files from a previous build being packed into the JAR.

Killer_Typo 82 Master Poster

I have quite a few ideas, but more importantly - what are yours and how much effort have you put into this?

Do you know the math for finding means and medians? That is the place to start ;)

Killer_Typo 82 Master Poster

I got bored and started some scripting the other day in PHP, this is just a sample that i wrote, just uncomment the part of script that you would like to see. IE remove the /* and */ around a certain area. i know its not great, but some beginners might find this a little helpful.

Killer_Typo 82 Master Poster

http://www.eapps.com/

I've used them for quite some time, good pricing and a TON of control over the server. Great service and a ton of FAQ documentation to cover some of the various tasks one would setup: Tomcat, Glassfish, SSH, SFTP...etc

Killer_Typo 82 Master Poster

when I graduated from college I wrote a multi-threaded database administration tool. Has lots of use if you cover more than just a SQL entry pane. If you include functionality like, creating, removing, updating, adjusting tables...etc

Killer_Typo 82 Master Poster

Ending up being able to solve this one. Debugged the servlet used for the connection to the JUnit window. Found it was using the wrong port (for some reason it was placing it a single digit below the correct port) and stepped through each iteration of the servlet doConnect() method adjusting the port each time.

Once I did that JUnit testing began to work as normal; hopefully however, it will continue to do so next time I start up eclipse :P

Killer_Typo 82 Master Poster
Could not connect to:  : 50404			
java.net.ConnectException: Connection refused: connect
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
	at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
	at java.net.Socket.connect(Socket.java:520)
	at java.net.Socket.connect(Socket.java:470)
	at java.net.Socket.<init>(Socket.java:367)
	at java.net.Socket.<init>(Socket.java:180)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.connect(RemoteTestRunner.java:560)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:377)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

has anyone run into this issue and or find a fix? I've not been able to get much from google. I have been running unit tests no problem them wham it poops out :P.

I've tried restarting, disconnecting the network cable, starting up a new instance of eclipse, disabling the windows firewall...etc

However if I run a "mvn test" on the project from the command line all goes well as expected >_<

Killer_Typo 82 Master Poster

I think there were some issues with tb_create, mostly I hadn't gotten it working at the time lol.

but you are more than welcome to have at it. This is a pretty old thread so you should count your lucky stars I even found the source for this!!

<?php
$host = "localhost"; //location of the mysql
$name = ""; //user name for logging into mysql
$pass = ""; //password for logging into mysql

$TBname = "$_POST[TBname]"; //name of the table for Creation
$DBname = "$_POST[DBname]"; //name of the database for working in


    $connect = mysql_connect($host, $name, $pass) or die(mysql_error());
    mysql_select_db($DBname) or die(mysql_error());
    
    $sql = "CREATE TABLE $TBname ("; //creates the table

    for ($count = 0; $count < count($_POST[field]); $count++)
       {
        $sql .= $_POST[field][$count] . " " . $_POST[type][$count];
            
            if ($_POST[auto_increment][$count]  == "y")
              {
               $additional = "NOT NULL AUTO_INCREMENT";
              }
            else
                {
                 $additional = "";
                }
            if ($_POST[primary][$count] == "y")
              {
               $additional .= ", primary key (" . $_POST[field][$count] . ")";
              }
            else
                {
                 $additional = "";
                }
            if ($_POST[length][$count] != "")
              {
               $sql .= " (" .$_POST[length][$count] . ") $additional ,";
              }
            else
                {
                 $sql .= " $additional ,";
                }
       }
// clean up the end of the string
$sql .= ")";

$result = mysql_query($sql, $connect) or die(mysql_error()); // execute the query

if ($result)
  {
   $msg = "<p>" . $TBname . "has been created</p>";
  }
echo "Adding $TBname to $DBname ....Done<br />";
echo "Creating fields in $TBname ....Done<br />";
echo $msg . "<br />"; 
echo "<a href=\"http://localhost/dbadmin/db_management.php\">Return …
Killer_Typo 82 Master Poster

^ No, he's saying only to print out the character the first time it is seen.

RealThinkers, what you should do is make an array of 26 booleans, one for each letter in the alphabet. True means it has been seen, false means it hasn't. Then when you see a character, if it is a letter, check the corresponding index to see whether or not it has been seen yet. Make sure to set it to 'seen'/true after you see the char for the first time.

hah I had missed his

it count character only once

Killer_Typo 82 Master Poster

While you do not need to use the DOM API to handle the XML, it is recommened. Just going through and deleting the last line and appending what you think is right can result in poorly formed XML documents.

If you are having troubles understanding the DOM API please feel free to post your code and ask questions, there are plenty of us here to help.

The basic idea of working with DOM is to:

Get your Document
Load your XML into it
Manipulate/create the tree
Save the document

Adding / removing nodes is very easy and you can build a tree as deep as you need.

Killer_Typo 82 Master Poster

only the alpha characters?

so H3ll0 Wor7D would print out:

H
l
l
W
o
r
D


that's easy enough to do using regular expressions.

the [a-zA-Z] searches for all characters within the range of a-zA-Z. You can then use the regexp to output the matches...etc

Killer_Typo 82 Master Poster

a quick search of the forums produced:

http://sourceforge.net/projects/jzjkit

which points to:
http://developer.k-int.com/projects.php?page=jzkit2


where I am sure you can find all of the answers to your questions :)

Killer_Typo 82 Master Poster

>I found the best book to be google
Yes but sometimes you need a flow to what you are reading which is hard to get given the fact that you are looking up different articles written by different authors scattered all over the internet.
Also when you read different articles by different authors you would sometimes find them contradicting each other a bit, because every author has hos own style, his beliefs his own "best practices" etc,
I am not saying that this isn't a good way, yes it is, but for a beginner not a preferred way to begin with.

as a beginner my first C++ book was a C++ primer that covered basic loops and pointers, I know pretty much dig through google for the rest. WHile many articles can seem to contradict eachother it evens itself out in the end. Nothing wrong with a large amount of code exposure. In my experience I have found pocket references and super thin primer style books to be the best. Heck - even a Java Spark CHart rocks, it's straight to the point and easy to follow. It's only 2 pages :P

I may be an exception to the rule, but I find books to be better suited as a backup. The books I prefer to keep in my library are cook books and pocket references who knows, maybe I am just a bit weird ;)

>Given a good compiler (NetBeans or Eclipse)
These …