Need some pointers please :)

Hi,
I've been given an application which I have to modify to edit a 'raw' image, so far I have been able to implement the loading of the image, but I am stuck with editing it.
The there are 3 classes to the application, rawimage, skelappipcanvas and skelappipframe.
So far as to my understanding, the rawimage class loads the raw image into a pixel array and then converts it into an image which is then displayed on the canvas. The frame contains the menu.
What I have to do is edit the picture, by manipulating the array, adding 5 to all values in the array for example. I understand that the best way to do that is to create a function and call that function when I select the menu option.
My problem is that im not sure how to implement the editing of the array..any pointers would be greatly appreciated. I have posted the code below..sorry for the amount of text.
RawImage Class:
import java.awt.*;
import java.awt.image.*;
import java.awt.event.*;
import java.util.*;
import java.io.*;
public class RawImage
public int imWidth = 640; // default image width
public int imHeight = 480; // default image height
public int imDepth = 256; // default image depth
public short rawPixelArray2D[][]; // array of image pixels
// (to contain grey-scale bitmap)
private Image dispIm; // display image
private int imConvBuf[]; // buffer for converting between raw image bitmap and display image object
// buffer entries are pixel colour values computed using colour model
private ColorModel colMod = ColorModel.getRGBdefault(); //colour model of display image
* Constructs and initialises a grey-scale image object
* @param filename name of input file.
* @since JDK1.1
public RawImage(String filename)
rawPixelArray2D = new short[imHeight][imWidth]; // create pixel array
imConvBuf = new int[imHeight * imWidth];
load(filename); // read data from file into raw bitmap array
arrayToDispImage(); // convert raw bitmap into display image object
* Constructs and initialises a grey-scale image object
* @param rawGreyBitMap 2D array containing raw bitmap.
* @param width width of 2D array.
* @param height height of 2D array.
* @since JDK1.1
public RawImage(short rawGreyBitMap[][], int width, int height)
rawPixelArray2D = rawGreyBitMap;
imWidth = width;
imHeight = height;
imConvBuf = new int[imHeight * imWidth];
arrayToDispImage(); // convert raw bitmap into display image object
* Displays image
* @param none.
* @since JDK1.1
public void display(Graphics gc)
gc.drawImage(dispIm, 0, 0, null);
* Loads image from file
* @param filename name of input file.
* @since JDK1.1
public void load(String filename)
// load pixel array from file
try
DataInputStream inputStream =
new DataInputStream(new FileInputStream(filename));
try
// read each byte from binary file into raw bitmap
for (int row = 0; row < imHeight; ++row)
for (int col = 0; col < imWidth; ++col)
rawPixelArray2D[row][col] = (short) inputStream.readUnsignedByte();
catch(EOFException e)
System.out.println("File shorter than expected. End of reading from file " + filename);
inputStream.close();
catch(FileNotFoundException e)
System.out.println("Cannot find file " + filename);
catch(IOException e2)
System.out.println("Error reading input from file " + filename);
* Saves image to file
* @param filename name of input file.
* @since JDK1.1
public void save(String filename)
// save pixel array to file
try
DataOutputStream outputStream =
new DataOutputStream(new FileOutputStream(filename));
// write each byte from raw bitmap into binary file
for (int row = 0; row < imHeight; ++row)
for (int col = 0; col < imWidth; ++col)
outputStream.writeByte( (int) rawPixelArray2D[row][col] );
outputStream.close();
catch(IOException e)
System.out.println("Error writing output to file " + filename);
* Converts raw grey pixel array into display Image object
* @param none.
* @since JDK1.1
private void arrayToDispImage()
for (int row = 0; row < imHeight; row++)
int colOffset = row * imWidth;
for (int col = 0; col < imWidth; col++)
imConvBuf[col + colOffset] =
0xFF000000 | (rawPixelArray2D[row][col] << 16)
| (rawPixelArray2D[row][col] << 8)
| rawPixelArray2D[row][col];
MemoryImageSource MemSource = new MemoryImageSource(imWidth, imHeight, colMod,
imConvBuf, 0, imWidth);
dispIm = Toolkit.getDefaultToolkit().createImage(MemSource);
SkelAppIPCanvas class:
import java.awt.*;
import java.awt.event.*;
import java.util.*;
public class SkelAppIPCanvas extends Canvas
private int xCanvasCentre = 0; // coordinates of centre of canvas
private int yCanvasCentre = 0;
private RawImage image = null; // image
* Constructs and initialises a canvas object
* @param none.
* @since JDK1.1
public SkelAppIPCanvas()
super(); // call parent's constructor
addListenersToCanvas(); // add event listeners
* Adds listeners to canvas
* @param none.
* @since JDK1.1
public void addListenersToCanvas()
// add mouse listener
addMouseListener( // use argument which is an object of an anonymous subclass of MouseAdapter
new MouseAdapter()
public void mousePressed(MouseEvent event)
serviceMouseEvent(MouseEvent.MOUSE_PRESSED, event.getX(), event.getY());
public void mouseClicked(MouseEvent event)
serviceMouseEvent(MouseEvent.MOUSE_CLICKED, event.getX(), event.getY());
public void mouseReleased(MouseEvent event)
serviceMouseEvent(MouseEvent.MOUSE_RELEASED, event.getX(), event.getY());
// add mouse motion listener
addMouseMotionListener( // use argument which is an object of an anonymous subclass of MouseMotionAdapter
new MouseMotionAdapter()
public void mouseDragged(MouseEvent event)
serviceMouseEvent(MouseEvent.MOUSE_DRAGGED, event.getX(), event.getY());
public void mouseMoved(MouseEvent event)
serviceMouseEvent(MouseEvent.MOUSE_MOVED, event.getX(), event.getY());
// add key listener
addKeyListener( // use argument which is an object of an anonymous subclass of KeyAdapter
new KeyAdapter()
public void keyPressed(KeyEvent event)
// service keyboard event
serviceKeyEvent(event);
* Gets the coordinates of the centre of the canvas.
* @param none.
* @since JDK1.1
public Point getCanvasCentre()
updateCanvasCentre();
return new Point(xCanvasCentre, yCanvasCentre);
* Updates the coordinates of the centre of the canvas.
* @param none.
* @since JDK1.1
public void updateCanvasCentre()
Dimension canvasDimensions = getSize();
xCanvasCentre = canvasDimensions.width / 2;
yCanvasCentre = canvasDimensions.height / 2;
* |
* PAINT MESSAGE SERVICING |
* |
// CUSTOMISE THE "TO DO" COMMENTS AS APPROPRIATE
* Updates canvas area.
* @param graphicsContext a Graphics object.
* @since JDK1.1
public void paint(Graphics graphicsContext)
// Display currently loaded image
if (image != null)
image.display(graphicsContext);
* |
* "ARROW KEYS" SERVICING |
* |
// CUSTOMISE THE "TO DO" COMMENTS AS APPROPRIATE
* Services "arrow keys" events (NOTE: for some reason the key listener gets
* decoupled from the canvas object after the window has been minimised.)
* @param event a key-event object.
* @since JDK1.1
public void serviceKeyEvent(KeyEvent event)
switch(event.getKeyCode())
case KeyEvent.VK_UP:
// TO DO: service up-key as approriate
break;
case KeyEvent.VK_LEFT:
// TO DO: service left-key as approriate
break;
case KeyEvent.VK_DOWN:
// TO DO: service down-key as approriate
break;
case KeyEvent.VK_RIGHT:
// TO DO: service right-key as approriate
break;
default:
// TO DO: service "all-other-keys" as approriate
break;
* |
* MOUSE SERVICING |
* |
// CUSTOMISE THE "TO DO" COMMENTS AS APPROPRIATE
* Services mouse events.
* @param eventID ID of mouse event.
* @param xMousePosition x coordinate of cursor at occurence mouse event.
* @param yMousePosition y coordinate of cursor at occurence mouse event.
* @since JDK1.1
public void serviceMouseEvent(int eventID, int xMousePosition, int yMousePosition)
switch(eventID)
case MouseEvent.MOUSE_CLICKED:
// TO DO: service MOUSE_CLICKED as approriate
break;
case MouseEvent.MOUSE_DRAGGED:
// TO DO: service MOUSE_DRAGGED as approriate
break;
case MouseEvent.MOUSE_PRESSED:
// TO DO: service MOUSE_PRESSED as approriate
break;
case MouseEvent.MOUSE_RELEASED:
// TO DO: service MOUSE_RELEASED as approriate
break;
case MouseEvent.MOUSE_MOVED:
// TO DO: service MOUSE_MOVED as approriate
break;
default:
// TO DO: service "all-other-mouse-states" as approriate
break;
* Loads image from file.
* @param filename name of the file.
* @since JDK1.1
public void loadRawImage(String filename)
image = new RawImage(filename); // load raw image from file
repaint(); // trigger a screen refresh for displaying image just loaded
* Saves image to file.
* @param filename name of the file.
* @since JDK1.1
public void saveRawImage(String filename)
// save raw image to file
image.save(filename);
SkelAppIPFrame class:
import java.awt.*;
import java.awt.event.*;
public class SkelAppIPFrame extends Frame
// drawing area
private SkelAppIPCanvas displayCanvas;
// menu items
private MenuItem fileOpen, saveAs, exitApp,
/* VARIABLES FOR STUDENT MENUS */
studentMenu1_1, studentMenu1_2, studentMenu1_3, studentMenu1_4,
studentMenu2_1_1, studentMenu2_1_2, studentMenu2_1_3,
studentMenu2_2_1, studentMenu2_2_2;
/* END OF VARIABLES FOR STUDENT MENUS */
//image
private RawImage image = null;
* Creates a window
* @param commandArgs command line arguments for application.
* @since JDK1.1
public static void main(String [] commandArgs)
new SkelAppIPFrame();
* Constructs a window (frame + canvas + menu)
* @param none.
* @since JDK1.1
public SkelAppIPFrame()
// set frame title
super("IP Programming Framework");
// add window listener
addWindowListenerToFrame();
// add menu
addMenu();
// set frame size
Dimension screenDimensions = getToolkit().getScreenSize();
setSize(screenDimensions.width, screenDimensions.height);
// add canvas in centre of frame
displayCanvas = new SkelAppIPCanvas();
add("Center", displayCanvas);
// show frame
show();
* Gets the name of the input file entered by the user.
* @param none.
* @since JDK1.0
private String getInputFileName()
return getFileName("File Open", FileDialog.LOAD);
* Gets the name of the output file entered by the user.
* @param none.
* @since JDK1.0
private String getOutputFileName()
return getFileName("File Save", FileDialog.SAVE);
* Gets the name of the input or output file entered by the user.
* @param title a string specifying the title of the dialog box.
* @param mode an integer specifying the mode (file open or save dialog box).
* @since JDK1.0
private String getFileName(String title, int mode)
FileDialog fileDlg = new FileDialog(this, title, mode);
fileDlg.setDirectory("");
fileDlg.setFile("");
fileDlg.show();
String folderName = fileDlg.getDirectory();
String fileNameBuffer = fileDlg.getFile();
String fileName = null;
// get file name if it has been specified by user
if (fileNameBuffer != null)
fileName = folderName + fileNameBuffer;
return fileName;
* Adds a window listener to the window frame
* @param none.
* @since JDK1.1
public void addWindowListenerToFrame()
addWindowListener( // use argument which is an object of an anonymous subclass of WindowAdapter
new WindowAdapter()
public void windowClosing(WindowEvent e)
System.exit(0);
* Adds a menu to the window frame
* @param none.
* @since JDK1.1
public void addMenu()
// create and set menu bar
MenuBar frameMenuBar = new MenuBar();
setMenuBar(frameMenuBar);
// create pull-down menu and attach to menu bar
Menu fileMenu = new Menu("File");
frameMenuBar.add(fileMenu);
// create menu items for "File" pull-down menu
fileOpen = new MenuItem( "Open ...", new MenuShortcut(KeyEvent.VK_O) );
saveAs = new MenuItem( "Save As ...", new MenuShortcut(KeyEvent.VK_S) );
exitApp = new MenuItem( "Exit", new MenuShortcut(KeyEvent.VK_X) );
// attach menu items to pull-down menu
fileMenu.add(fileOpen);
fileMenu.addSeparator();
fileMenu.add(saveAs);
fileMenu.addSeparator();
fileMenu.add(exitApp);
// create menu-action listener, and add it to each menu item
SkelApp2DGMenuDispatcher menuListener = new SkelApp2DGMenuDispatcher();
fileOpen.addActionListener(menuListener);
saveAs.addActionListener(menuListener);
exitApp.addActionListener(menuListener);
* |
* MENUS |
* |
// STRINGS THAT WILL APPEAR ON THE MENU
// TODO: CUSTOMISE THE TEXT BETWEEN DOUBLE QUOTES AS APPROPRIATE
String studentMenu1Label = "Menu 1",
studentMenu1_1Label = "lighten",
studentMenu1_2Label = "Your Menu 1.2",
studentMenu1_3Label = "Your Menu 1.3",
studentMenu1_4Label = "Your Menu 1.4",
studentMenu2Label = "Student Menu 2",
studentMenu2_1Label = "Your Menu 2.1",
studentMenu2_1_1Label = "Your Menu 2.1.1",
studentMenu2_1_2Label = "Your Menu 2.1.2",
studentMenu2_1_3Label = "Your Menu 2.1.3",
studentMenu2_2Label = "Your Menu 2.2",
studentMenu2_2_1Label = "Your Menu 2.2.1",
studentMenu2_2_2Label = "Your Menu 2.2.2";
// END OF MENU STRINGS
// create pull-down menus and attach to menu bar
Menu studentMenu1 = new Menu(studentMenu1Label);
Menu studentMenu2 = new Menu(studentMenu2Label);
frameMenuBar.add(studentMenu1);
frameMenuBar.add(studentMenu2);
// create menu items for <studentMenu1> pull-down menu
studentMenu1_1 = new MenuItem( studentMenu1_1Label, new MenuShortcut(KeyEvent.VK_U) );
studentMenu1_2 = new MenuItem( studentMenu1_2Label, new MenuShortcut(KeyEvent.VK_V) );
studentMenu1_3 = new MenuItem( studentMenu1_3Label, new MenuShortcut(KeyEvent.VK_W) );
studentMenu1_4 = new MenuItem( studentMenu1_4Label, new MenuShortcut(KeyEvent.VK_X) );
// create cascading menus for <studentMenu2> pull-down menu
Menu studentMenu2_1 = new Menu(studentMenu2_1Label);
Menu studentMenu2_2 = new Menu(studentMenu2_2Label);
// create menu items for <studentMenu2 | studentMenu2_1> cascaded menu
studentMenu2_1_1 = new MenuItem( studentMenu2_1_1Label, new MenuShortcut(KeyEvent.VK_R) );
studentMenu2_1_2 = new MenuItem( studentMenu2_1_2Label, new MenuShortcut(KeyEvent.VK_S) );
studentMenu2_1_3 = new MenuItem( studentMenu2_1_3Label, new MenuShortcut(KeyEvent.VK_T) );
// attach menu items to <studentMenu2 | studentMenu2_1> cascaded menu
studentMenu2_1.add(studentMenu2_1_1);
studentMenu2_1.add(studentMenu2_1_2);
studentMenu2_1.add(studentMenu2_1_3);
// create cascading menus for <studentMenu2 | studentMenu2_2> cascaded menu
studentMenu2_2_1 = new MenuItem( studentMenu2_2_1Label, new MenuShortcut(KeyEvent.VK_H) );
studentMenu2_2_2 = new MenuItem( studentMenu2_2_2Label, new MenuShortcut(KeyEvent.VK_N) );
// attach menu items to <studentMenu2 | studentMenu2_2> cascaded menu
studentMenu2_2.add(studentMenu2_2_1);
studentMenu2_2.add(studentMenu2_2_2);
// attach menu items and cascaded menus to pull-down menus
studentMenu1.add(studentMenu1_1);
studentMenu1.add(studentMenu1_2);
studentMenu1.add(studentMenu1_3);
studentMenu1.add(studentMenu1_4);
studentMenu2.add(studentMenu2_1);
studentMenu2.add(studentMenu2_2);
// add action listener for menu items
studentMenu1_1.addActionListener(menuListener);
studentMenu1_2.addActionListener(menuListener);
studentMenu1_3.addActionListener(menuListener);
studentMenu1_4.addActionListener(menuListener);
studentMenu2_1_1.addActionListener(menuListener);
studentMenu2_1_2.addActionListener(menuListener);
studentMenu2_1_3.addActionListener(menuListener);
studentMenu2_2_1.addActionListener(menuListener);
studentMenu2_2_2.addActionListener(menuListener);
* Defines menu dispatcher (as an inner class)
* @since JDK1.1
class SkelApp2DGMenuDispatcher implements ActionListener
* Receives menu-selection events and forwards them for servicing.
* @param event an event.
* @since JDK1.1
public void actionPerformed(ActionEvent event)
if ( event.getSource() instanceof MenuItem )
MenuItem menuItemObject = (MenuItem) event.getSource();
serviceMenuEvent(menuItemObject);
* Services menu-selection event.
* @param menuItemObject a MenuItem object.
* @since JDK1.1
public void serviceMenuEvent(MenuItem menuItemObject)
* |
* MENU SERVICING |
* |
// CUSTOMISE THE "TO DO" COMMENTS AS APPROPRIATE
if (menuItemObject == fileOpen)
String fileName = null;
// launch file-open dialog box and load file if file name has been specified
if ( ( fileName = getInputFileName() ) != null )
// load image from file
displayCanvas.loadRawImage(fileName);
else if (menuItemObject == saveAs)
String fileName = null;
// launch file-save dialog box and save file if file name has been specified
if ( ( fileName = getOutputFileName() ) != null )
// save image to file
displayCanvas.saveRawImage(fileName);
else if (menuItemObject == exitApp)
System.exit(0); // confirmation message box not implemented
else if (menuItemObject == studentMenu1_1)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu1_1>
System.out.println("test");
else if (menuItemObject == studentMenu1_2)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu1_2>
else if (menuItemObject == studentMenu1_3)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu1_3>
else if (menuItemObject == studentMenu1_4)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu1_4>
else if (menuItemObject == studentMenu2_1_1)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu2_1_1>
else if (menuItemObject == studentMenu2_1_2)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu2_1_2>
else if (menuItemObject == studentMenu2_1_3)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu2_1_3>
else if (menuItemObject == studentMenu2_2_1)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu2_2_1>
else if (menuItemObject == studentMenu2_2_2)
// TO DO: ADD RELEVANT MENU SERVICING CODE HERE
// FOR <studentMenu2_2_2>
}

Recommendations include:
* Use code tags when posting code. No one likes to look at unformatted code. To do this, either highlight your code block and press the "code" button at the top above the message block or place the tag &#91;code&#93; at the top of your block of code and the tag &#91;/code&#93; at the bottom, like so:
&#91;code&#93;
   // your code block goes here
&#91;/code&#93;* Post a much smaller amount of code. I seriously doubt that anyone will look at your code given its length.
* But still if possible, have your posted code be compilable and able to demonstrate your problem. This is called an SSCCE and you can read up on it here:
http://homepage1.nifty.com/algafield/sscce.html
Question: Why are you using AWT components and not Swing?

Similar Messages

  • Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute then turn on wifi on iMac before it can reconnect. Need some help please.

    Remote App on iPad connects but drops after about  20 mins. Need to turn  off wait about 1 minute, then turn on wifi on iMac before it can reconnect. Need some help please.
    Already gone through troubleshooting guide a zillion times. Thanks.

    This worked for me... A little time consuming but once you get rolling it goes GREAT... Thanks....
    I got my artwork and saved it to my Desktop
    Opened up Microsoft Paint and clicked on "File" and "Open" and found it to get it on the screen to resize it
    Clicked "resize" and a box for changing it opened up
    Checked the box "Pixels" and "Unchecked maintain aspect ratio"
    Set Horizontal for 640 and Vertical for 480
    Clicked on "OK" and went back to "File" and did a "Save As" and chose JPEG Picture
    It came up "File Already Existed" and clicked "OK" (really did not care about the original artwork I found because wrong size)
    Went to iTunes and on the movie right clicked on "Get Info", clicked on "Details", then "Artwork"
    Go to the little box on the top left that shows your old artwork and click on it to get the little blue border to appear around it and hit "Delete" to make it gone
    Click on "Add Artwork" and find it where you put the one from above on your Desktop and hit "Open" and OK and your new artwork is now there and all good.
    Sounds like a lot of steps to follow but after around 5 or so you will fly through it. This worked perfect on my iPhone 6 Plus and I have artwork on my Home Videos now.

  • Hi! I got movies on my external hard drive that are AVI kind and won't play on my macbook pro? need some help please!!

    Hi! I got Movies on my external hard drive that are AVI kind and won't play on my macbook pro? When I start playing the movie a message pops up and says "a required codec is not available". I tried flip4mac, xvid, divx already and still not playing my video. need some help please!! thanks.

    Although vlc mentioned above is a much more powerful and better player you could try installing Perian if you insist on using the quicktime player.  It may supply the codec it needs.
    Not sure why you wouldn't be able to play straight avi files though in quicktime.

  • HD Workflow - Need Some Clarification Please

    Apologies for asking another question so soon, but I need some help with my import/export workflow please.
    So I've just upgraded to AE CS4 from 6.5 Pro.
    I'm doing a show where I'm using XDCAM EX footage with cgi shots and elements, all comped in AE.  The shots will be handed to the editor, who uses FCP, as Quicktime files, I think.  This is where I need some help.
    I have read and re-read (several times)  the 'Color Management Workflow in Adobe After Effects CS4' pdf, specifically the 'High Definition Video Workflow' section. I am using a calibrated monitor (regularly calibrated and checked with a Spyder 3 Elite).
    I get setting up the AE project to be colour managed to the HDTV (Rec. 709) working space, and I likewise understand using Interpret Footage to colour manage assets that are imported.
    Where I'm falling down is outputting the finished shots to QT movies, specifically on two points: the apparent gamma of the output (as I see it in the QT Player), and the data-rate.
    I understand setting the output to have the same profile in the Output Module of the Render Queue.  But from there I'm stumped, because the QT outputs don't visually match the AE comp, with almost any codec I try.  I understand there are QT codec issues when outputting from AE - I was reading about those the other day when I was hitting the same problem in AE 6.5.  When I open the QT movie on the desktop (Windows XP Pro) it's invariably alot lighter, lower contrast.  Along with the other issue that the data-rate of the QT output from AE is anything up to 8 times greater than I need.
    I tried rendering Animation and PNG movies from AE, then feeding those through the Media Encoder, outputting via H.264 to get an MP4 with the data-rate around 50mbits/sec.  That works on that, but again the movie is pretty washed out and low contrast.
    I guess this is pretty fundamental stuff, but I've hit a brick wall over what to do.  I'd appreciate any advice on the workflow to output the finished comps to hand to the editor, as a movie file, QT or whatever.  And obviously knowing that what I see in my AE comp is what he will see on his FCP suite.
    Julian.

    Thanks for the additional comments and ideas.
    In terms of profile, as I mentioned, the intermediates will be going off to the editor (off-site) for editing on his FCP suite.  I'll stick to working in the prescribed HDTV (Rec. 709) space, and I've given him all the detail I can of how I'm working, but crucially I haven't stood at his edit-suite to see how the stuff looks.
    But, he's no newbie, so I'm hoping it'll be OK.
    Blasted shame about the H.264 BluRay not being compatible with QT - I thought I had this whole issue beat until that came along.  It's not a matter of disk space here, but the editor is mithering that the intermediates we are testing, in either PNG, or Animation, and a couple of others, are choking his playback.
    I'm not sure what to say about that, other than to go down this road of trying to squish these intermediates as low as possible without wrecking the look, hence finding that the DNxHD is providing the best solution.  If it had been a SD project, I might well have tried the native H.264, even over our normal PNG workflow.
    So what will play the native H.264 BluRay compressed output?
    Julian.

  • Ok I got my iPod from my brothers friend and my IPod says "iPod is disabled connect to iTunes" then my computer says cannot get onto iPod because I need the iPod passcode and of course I cannot put it in so I need some help please

    Ok i got my iPod from my brothers friend and my IPod says "iPod is disabled connect to iTunes" then my computer says cannot get onto iPod because I need the iPod passcode and of course I cannot put it in so I need some help please

    Try placing in DFU mode and then restoreing.
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • I am new to LR and needs some advice please

    I have been using Raw shooter and have been shy of going over to LR.I am not a hugely knowledgeable user nor that technically minded. I purchased Scott Kelbys, and Martin Evenings book on LR and am learning as I go, I have been reading several threads on this site and I am concerned about all the negativity I am reading about LR being buggy, with problems?
    and how it seems that Adobe are not doing enough with LR to address any such issues? I am a canon user and issues relating to Canon raw are a particular worry. I am about to put my entire collection from Raw shooter ( On External LAcie drives) into the hands of LR in the future. Is this a wise decision? Please help.
    Also I want to get started if it is the right thing to do, my PC is getting on abit, with 4 yr old tech inside and only 1gb ram. I will soon get somthing more powerful with 2-4 gb ram. my second question is this. I will be running my libraries on external drives only ( LAcie F.A. Porsche).
    If I have imported my images without moving folders, with LR 1.2 loaded on my pc. If later I remove LR from it and reload onto a new PC will it see all my libraries again and know all my settings again without issue and without having to re-do everything. If that is the case then I had better wait until i upgrade the Pc, before I start any work with LR, which will be frustrating.??
    Apologies for a long question, but I am technically challenged. If anyone can assist me in these areas I would be grateful
    Paul Apps

    LR is not buggy and it converts Canon RAW files just fine. I run LR on a PC without any significant issues except speed. LR is too slow in some areas (importing images, browsing thumbs and previews, in particular) compared to other programs such as Photo Mechanic and ACDSee, but it is very stable on a clean computer. Many features need improvement but hopefully that will come in time. Meantime LR is quite good and I bet you will like it. There is nothing better overall.
    You should never risk your images to any software or anything else. Keep a backup copy of your originals separate from the copy you use for LR or other software. Plus LR is a non-destructive editor (pixels are not changed) so your images will be quite safe.
    As Tomrock said you can transfer your database to a new computer without difficulty. I do recommend a new computer, a 4 year old machine with 1gb RAM will probably be frustrating. Other folks say that a quad core processor and at least 2GB RAM is the way to go. My 2 year old dual core Pentium with 4GB RAM is definitely too slow for LR. You might also consider switching to internal hard drives in your new computer and use your external drives for backups. Internal drives for your images and catalog file will be much faster.
    Also Tom's advice about importing a few images at a time and then testing how things work is very good. It is definitely a mistake to import a huge volume of images until your are familiar with LR. It is very easy to delete a small catalog file and start over since a few hundred images imports quickly.
    Good luck.

  • I need some light please!

    Hi everyone!
    I guess this is the first time I'm actually opening a topic here, but I've actually been around for a little while :)
    So, I'm working on this case for one of my classes. I have most of it already written, but there are a few things I'm trying to figure out and need help with. I'm supposed to write a class called ChatModel to hold ChatMessage Beans, such that:
    Http://img267.imageshack.us/img267/8639/case2uml.jpg
    Now here is the Bean I wrote. Nothing fancy :P
    [code=java]
    import java.util.*;
    public class ChatMessage {
         private String from, to, message;
         private Date sent;
         public ChatMessage() {
              from = null;
              to = null;
              message = null;
              sent = null;
         public ChatMessage(String from, String to, String message, Date sent) {
              this.from = from;
              this.to = to;
              this.message = message;
              this.sent = sent;
         @Override
         public int hashCode() {
              final int prime = 31;
              int result = 1;
              result = prime * result + ((from == null) ? 0 : from.hashCode());
              result = prime * result + ((message == null) ? 0 : message.hashCode());
              result = prime * result + ((sent == null) ? 0 : sent.hashCode());
              result = prime * result + ((to == null) ? 0 : to.hashCode());
              return result;
         @Override
         public boolean equals(Object obj) {
              if (this == obj)
                   return true;
              if (obj == null)
                   return false;
              if (getClass() != obj.getClass())
                   return false;
              ChatMessage other = (ChatMessage) obj;
              if (from == null) {
                   if (other.from != null)
                        return false;
              } else if (!from.equals(other.from))
                   return false;
              if (message == null) {
                   if (other.message != null)
                        return false;
              } else if (!message.equals(other.message))
                   return false;
              if (sent == null) {
                   if (other.sent != null)
                        return false;
              } else if (!sent.equals(other.sent))
                   return false;
              if (to == null) {
                   if (other.to != null)
                        return false;
              } else if (!to.equals(other.to))
                   return false;
              return true;
         public String getFrom() {
              return from;
         public void setFrom(String from) {
              this.from = from;
         public String getTo() {
              return to;
         public void setTo(String to) {
              this.to = to;
         public String getMessage() {
              return message;
         public void setMessage(String message) {
              this.message = message;
         public Date getSent() {
              return sent;
         public void setSent(Date sent) {
              this.sent = sent;
    The ChatMessage class works as intended. Now here is what I have for the ChatModel class.
    [code=java]
    import java.util.*;
    public class ChatModel {
    private HashMap<String, TreeMap<String, ChatMessage>> messages;
         public ChatModel(){
              messages = new HashMap<String, TreeMap<String, ChatMessage>>();
         //adds the ChatMessage Object to messages
         public void addMessage(ChatMessage aMessage){
              //Checks if the key is already in the map, then adds the ChatMessage object accordingly
              if(messages.containsKey(aMessage.getTo()) == false){
                   messages.put(aMessage.getTo(), new TreeMap<String, ChatMessage>());
              messages.get(aMessage.getTo()).put(aMessage.getSent().toString(), aMessage);                    
         public ArrayList<ChatMessage> getMessagesFor(String name){
              ArrayList<ChatMessage> listOfMessages = new ArrayList<ChatMessage>();
              if(messages.containsKey(name)){ //if the String is contained in the HashMap
                   Iterator<ChatMessage> iterator = messages.get(name).values().iterator();
                   while(iterator.hasNext()){
                        listOfMessages.add(iterator.next());
                   for(Map.Entry<String, ChatMessage> entry : messages.get(name).entrySet()){
                        listOfMessages.add(??);
              else {
                   //throws an exception if the key is no in the list.
                   System.out.println("not found.");
              return listOfMessages;
    when I run this in the main method of ChatModel (just to test it)
    [code=java]
    public static void main(String[] args){
              ChatModel testModel = new ChatModel();
              ChatMessage message1 = new ChatMessage("Ben", "Bob", "Hello World!", new Date());          
              ChatMessage message2 = new ChatMessage("Bob", "Ben", "Hey There!", new Date());
              ChatMessage message3 = new ChatMessage("Ben", "Bob", "How are you?", new Date());
              ChatMessage message4 = new ChatMessage("Jack", "Bob", "What's up", new Date());
              ChatMessage message5 = new ChatMessage("Bob", "Jack", "Not much, What's up with you?", new Date());
              ChatMessage message6 = new ChatMessage("Jack", "Bob", "nothing", new Date());
              ChatMessage message7 = new ChatMessage("Lucas", "Ben", "Are you there?", new Date());
              ChatMessage message8 = new ChatMessage("Ben", "Lucas", "Yep, sup?", new Date());
              ChatMessage message9 = new ChatMessage("Lucas", "Ben", "can I have your siser's number?", new Date());
              testModel.addMessage(message1);
              testModel.addMessage(message2);
              testModel.addMessage(message3);
              testModel.addMessage(message4);
              testModel.addMessage(message5);
              testModel.addMessage(message6);
              testModel.addMessage(message7);
              testModel.addMessage(message8);
              testModel.addMessage(message9);
              System.out.print("is Ben in testModel? ");
              System.out.println(testModel.messages.containsKey("Ben"));
              System.out.print("is Lucas in testModel? ");
              System.out.println(testModel.messages.containsKey("Lucas"));
              System.out.print("is Jack in testModel? ");
              System.out.println(testModel.messages.containsKey("Jack"));
              System.out.print("is Bob in testModel? ");
              System.out.println(testModel.messages.containsKey("Bob"));
              System.out.print("is message1 in testModel --> { Bob } ? ");
              System.out.println(testModel.messages.get("Bob").containsKey(message1.getSent().toString()));
              System.out.print("is message2 in testModel --> { Ben } ? ");
              System.out.println(testModel.messages.get("Ben").containsKey(message1.getSent().toString()));
              System.out.print("is message3 in testModel --> { Bob } ? ");
              System.out.println(testModel.messages.get("Bob").containsKey(message1.getSent().toString()));
              System.out.print("is message4 in testModel --> { Jack } ? ");
              System.out.println(testModel.messages.get("Jack").containsKey(message1.getSent().toString()));
              System.out.print("is message5 in testModel --> { Bob } ? ");
              System.out.println(testModel.messages.get("Bob").containsKey(message1.getSent().toString()));
              System.out.print("is message6 in testModel --> { Jack } ? ");
              System.out.println(testModel.messages.get("Jack").containsKey(message1.getSent().toString()));
              System.out.print("is message7 in testModel --> { Ben } ? ");
              System.out.println(testModel.messages.get("Ben").containsKey(message1.getSent().toString()));
              System.out.print("is message8 in testModel --> { Lucas } ? ");
              System.out.println(testModel.messages.get("Lucas").containsKey(message1.getSent().toString()));
              System.out.print("is message9 in testModel --> { Ben } ? ");
              System.out.println(testModel.messages.get("Ben").containsKey(message1.getSent().toString()));
              ArrayList<ChatMessage> messagesTest = testModel.getMessagesFor("Bob");
              for(ChatMessage m : messagesTest){
                   System.out.println("Receiver: " + m.getTo());
                   System.out.println("Messsage: " + m.getMessage());
    This is what I get on the console:
    is Ben in testModel? true
    is Lucas in testModel? true
    is Jack in testModel? true
    is Bob in testModel? true
    is message1 in testModel --> { Bob } ? true
    is message2 in testModel --> { Ben } ? true
    is message3 in testModel --> { Bob } ? true
    is message4 in testModel --> { Jack } ? true
    is message5 in testModel --> { Bob } ? true
    is message6 in testModel --> { Jack } ? true
    is message7 in testModel --> { Ben } ? true
    is message8 in testModel --> { Lucas } ? true
    is message9 in testModel --> { Ben } ? true
    Receiver: Bob
    Messsage: nothing
    I'm puzzled :( all the tests come true, but the ArrayList I'm getting from getMessagesFor() apparently has only one ChatMessage object for "Bob" when it should have 3. When I add breakpoints to the code on Eclipse and watch it stepping through the code, it seems "message" is getting all the entries correctly, hence the containsKey() tests all came true. But when I look the ArrayList returned by getMessagesFor() there is only one entry when there should be more. Another thing I noticed is that the message entry seems to always be the last one added to the treemap.
    By the way, I apologize for the inelegant and noobish code I wrote. Please feel free to point out style tips and anything whatsoever you might be thinking of. I welcome you advice! :P
    Anyway, Java gurus out there, please share some of your knowledge with me!
    Thanks in advance!
    -Ben

    Maybe because every line in your test:
    System.out.println(testModel.messages.get("Ben").containsKey(message1.getSent().toString()));references message1.getSent and doesn't reference any of the other messages 2 - 9.
    Did you maybe cut & paste this line and forget to change the message number to retrieve?
    Also, the way you posted your code means we can't copy your code to test it since each class should be in its own file and you took the main method out the class it belongs it. There are also references from one class to the private variables of the other class when the getter methods need to be used.

  • Need some Ideas, please

    I would appreciate any suggestions or ideas as to any additional features I could possibly implement in my program. This is part of my final year degree project.
    The program is intended to be an OO Documentation Tool and its main function is to convert Java source code to UML Class diagrams.
    The UML Class diagram will include Inheritance and Associations.
    Other features that I have decided to implement are:
    - Facility to generate custom HTML documentation ( tables listing the variables, methods (including parameter details, visibility etc) etc for each class). I have also managed to convert the java source code into HTML, with colored keywords etc.
    - facility to view the source code of each java class in the main program, alongside the diagram.
    - facility to save the uml class diagram as a GIF and JPEG image file.
    That's just about it at the moment, I'm scratching my head trying to think of other possible ideas.
    One idea I have thought about is possibly extending the system to cater for C++ classes but I think that might turn out to be a little over ambitious.
    Please please give me some ideas, I need them.. :)
    PS. Can someone suggest me a good name for this program?
    I was thinking of calling it VisualJ or ModelJ but I notice there are already existing programs with this name.
    The best nomination for the program name will get a star prize. :) 10 DD points.

    design pattern identification.. hmm, I'll have to read up on that.
    jUMbLe , that sounds good..
    Please keep the ideas coming, folks. :)
    Much appreciated,
    Regards,
    Tony.

  • New to Mac and to video editing...need some guidance, please

    I've decided to make the switch and ordered a new 3Ghz 24" iMac. I chose a 1TB HD and 4G of RAM.
    I want to do some photo and video editing (nothing professional, simply vacation photos and video). I'll be purchasing an HD camcorder later this year to replace my current one (non-HD). I currently have about 5000 photos and about 50 hours of unedited DV on DV tapes to begin to work with.
    Any suggestions on the following would be much appreciated:
    1. Back-up: Should I use a 1GB Time Capsule or a 1 GB GTECH drive with Time Machine? I should mention that I plan on purchasing a MB or MBP later this year. Can I use a GTech HD as a NAS-like drive for both the iMac and the notebook?
    2. Should I partition the internal HD?
    3. Should I use a 'scratch disk' for video editing? If so, any suggestions for a particular size or model?
    4. Any suggestions for ease of transfer of my data from my PC (photos, iTunes library, mail, IE favorites, etc.)?
    5. Anything else you would suggest for a new Mac user?
    Thanks very much for the help!!!

    Hi there.
    First, a couple of websites to help you on your way (and Welcome to the Mac!)
    http://www.apple.com/support/mac101/
    And also
    http://www.apple.com/support/leopard/
    Now, as for your questions, these are just IMHO:
    Backup - get BOTH the capsule and a separate HD. If you can only get one, personally I would get the non-TB disk so that I can drag the video files that I want onto it. the Capsule might backup other stuff (and slowly compared to the straight drive; get a FW 800 drive if you can, if not then FW 400 at least). I also think you meant TB not GB! Just make sure the DISK is from a good vendor (Seagate, Hitachi or Western Digital).
    Partition - Nope; wastes space; you need contiguous space from my experience. Only do that if you really need to run Windows via Boot Camp (not recommended to run Windows at all!)
    Scratch disk is absolutely recommended. Get the largest size one you can afford and separate out this from your backup disk. (Worst case, use a bit of the scratch disk as your backup, but also keep the same work files on your main hard disk so you at least have a physical duplicate somewhere). Yup, hard disks are gonna add up!
    The above websites have some tips on transferring content from PCs; generally you can just burn stuff onto DVD and import them onto the Mac. That's pretty straight forward.
    Suggestions IMHO - forget the Mighty Mouse and get another quality two button mouse. Also consider a Kensington Trackball. Get AppleCare warranty for all your hardware (for peace of mind). Triple check that your camcorder will be supported by iMovie '08. It might not be by Final Cut but at least you can get the files from iMovie into Final Cut. But Final Cut does support quite a lot of them already.
    Introduce 10 other Windows people to the Mac. (This is what we do).
    Cheers!

  • I am the biggest "Newb" on this site,  and I really need some help please..

    Ok, the short of it.... I started training on Database programming about 2 weeks ago. I still don't really know a thing, or even understand the concepts. Now, my boss wants me to fix a bug in Oracle, and I haven't a clue. The ONLY help I've gotten was a link to this forum, and a speech about how I need to help myself. I told him I have the same chance of fixing anything, as monkeys typing hamlet. Anyone up for a challenge?
    When I go to Application System, then Application Entry and enter the password a dialog box appears.... "FRM-40039: Cannot attatch library Empower while opening from APPUSRAPP."
    That's what I have to fix. I have no clue. I don't even really know how to click around in this program. Please help, someone.
    UPDATE: I've been told that everyone's pretty much going to be a jerk to me for asking this, and I'm currently searching old threads and can't find a way to delete this one I posted. So, you could just ignore the post, or jump in and be the internet tough-guy and tell me what I already know.... I'm a newb.
    Edited by: user11033020 on Apr 14, 2009 11:41 AM

    As this appears to be a Forms error (the error begins with FRM) you might get a better response by posting this in the Forms forum:
    Forms
    The Community Feedback forum isn't meant for product-related questions (as it says in the title).
    Still, you should consider searching Metalink as well. If you've paid for support, you have every right to use it.

  • My first java programming - Need some help please!!!

    I have to create a simple java program which i am not good at i am ok in C but my java is quite bad. The program need to define a class called Student and with a string called StudentNAme, a integer StudentID(key), An array of 8 integers called Marks that holds the students marks for 8 modules. It also says Include appropriate accessors, mutators and constructor(s) as well as a method to update the student�s marks. Anybody please help me in this question. I prefer an simple example of this program so I can learn faster, I dont even know how to declare a class.. So sorry but please help me out and thanks in advance

    I would also suggest you try using an IDE like
    eclipse (free)
    www.eclipse.org
    This will help you get a working program much faster.But please do also tell them that if they have troubles using it, they're supposed to read the IDE manual instead of posting here.

  • Hello! I need some help please.

    Hi there! My problem is the following. As i want to turn the internet sharing on combined with a security password a little window comes up and says : system preferences wants to make changes, put your password in order to do so. The thing is that i have absolutely no idea which password is that i have to put! So now my system preferences is locked! If i want to make changes i have to unlock it! Please, it would be great if someone helped!
    Sorry for my english btw.

    No, it's quite easy to do. If you're running Lion or Mountain Lion, that is. You don't mention which version of OS X you're running. If using Lion or Mountain Lion, simply reboot and hold down the Command and R keys at startup. This will take you to your Recovery Partition.
    From the Utilities menu, select Terminal and type
    resetpassword
    A small app will open allowing you to reset the password for any user that you choose. Type in the password twice and remember to give yourself a 'hint'.
    You need an admin password to do just about anything. Maybe write it down somewhere so you won't forget it.
    Clinton

  • Really needs some help please

    Hello everyone,
    I have a line (a little white line) down the screen on my satellite laptop. It appear a little while after installing 2gs of memory. Could someone explain to me what could have cause it and if it is covered by my extended warrenty. I also  wants to know if it is covered by the warrenty if Toshiba allows me to take it to a local repair shop that is not their as i am in the caribbean and none of their repair centres are close to my island.
    Thank you in advance.

    What is the complete model number of the laptop and the complete part number of the new ram?
    As for the warranty issues, you'll need to contact Toshiba Warranty Support about that.  This is User's helping other Users and none of us would have that information.
    If you don't post your COMPLETE model number it's very difficult to assist you. Please try to post in complete sentences with punctuation, capitals, and correct spelling. Toshiba does NOT provide any direct support in these forums. All support is User to User in their spare time.

  • Problems with 10.7.X - need some help please

    Where to begin???
    New mac mini with 10.7.x
    Double clicking the top of the window won't collapse window like in previous versions.
    Double clicking on a folder that is on the desktop opens behind the hard drive window.
    When restarting or logging back in, all my icons are in a different place (scattered) than where they were when logging out or shutting down. This is in reference to my hard drive window. I have everything there on icon view. All other sub folders are list view, no problems with those. How do I get 10.7.x to remember the window view?
    I imported all my mail and mailboxes and sorted them where I wanted them from a mac mini running 10.4.11 and at the next restart they were all back where  they were before I sorted them. I even threw out mailboxes that I didn't need anymore and they reappeared.
    I am so confused. I almost feel like a bought a pc with a MS operating system.
    And God forbid I need to reinstall the system, there is no way to do that because there is no dvd, let alone a dvd drive. And no I didn't sign up for icloud.
    I know I sound kind of pi$$y, but I am frustrated and don't have a lot of time to devote to getting this straightened out.
    I would really appreciate some assistance.

    dnorth12 wrote:
    And God forbid I need to reinstall the system, there is no way to do that because there is no dvd, let alone a dvd drive.
    But there is a Recovery HD for just that purpose. 
    For some other things you may stumble over, see:  Changes in Lion from Snow Leopard.

  • I need some pointers debugging my website

    Hi,
    I've nearly finished my first website (yippee). However, I
    uploaded it and found that when I click on some of my links,
    whether it's some of my images or links to PDF files, they jump out
    of the way or refuse to open! I would really appreciate some help
    with this, since I'm a bit of a novice!
    http://www.barryallanscott.com/new/
    I'm not sure, but I don't think it's anything I've done
    wrong. I was reading a manual for some help. Oh, it's Dreamweaver
    8.0.2 I'm using.
    Any pointers you could give me would be helpful, whether it's
    the overall design or fixing the issues I mentioned. The site works
    best in safari right now, but I'd obviously like to optimize it for
    as many browsers as possible!
    Thank you for your time!

    You have a second DOCTYPE declaration just below your
    imagemap
    "barrybadfingers" <[email protected]> wrote
    in message
    news:f1b1ln$esv$[email protected]..
    > Hi,
    >
    > I've nearly finished my first website (yippee). However,
    I uploaded it
    > and
    > found that when I click on some of my links, whether
    it's some of my
    > images or
    > links to PDF files, they jump out of the way or refuse
    to open! I would
    > really appreciate some help with this, since I'm a bit
    of a novice!
    >
    >
    http://www.barryallanscott.com/new/
    >
    > I'm not sure, but I don't think it's anything I've done
    wrong. I was
    > reading
    > a manual for some help. Oh, it's Dreamweaver 8.0.2 I'm
    using.
    >
    > Any pointers you could give me would be helpful, whether
    it's the overall
    > design or fixing the issues I mentioned. The site works
    best in safari
    > right
    > now, but I'd obviously like to optimize it for as many
    browsers as
    > possible!
    >
    > Thank you for your time!
    >

Maybe you are looking for

  • Sharepoint Workflow : how to get document full path + file name into variable?

    Hi, Anybody knows how to get document full path + file name into a variable in Sharepoint 2010 workflow? Example http://sp1:80/InvoiceQueue/Shared Documents/123.pdf I am using List Workflow which links to a document library.

  • Inactive vendor

    Hello to you all, I am looking for a Function which can locate Inactive vendor for certain years. Other option I had thought about is to use index within BSIK + BSAK tables that include vendor, company code and year and to locate vendors without line

  • How to change writing language in E61i?

    I use both Arabic and English languages in my new E61i device. To change writing language while writing text, I can use the Writing Language option from the Options menu. But this option is not available in all cases in built-in applications, and doe

  • If I restore my iPad will I lose my data plan?

    I am planning to back up my iPad and restore it to lend to a friend for a week. I'm gonna buy a data plan for him, but when I restore from the backup will I lose my data plan

  • When is the revel service shutting down?

    the photoshop elements page in youtube has a video stating that the revel service with photoshop elements will be shutting down. is this true? when? will elements be added to creative cloud?