Help with a Uni project

Im in the middle of a project for university. in its simplest form it is simply reading data from sensors and then controlling the movement of 2 dc motors. i'm having trouble however understanding what to do in labview. Im using version 9 with a Crio and an NI-9505 and NI-9205
My intial though was to create a new vi and target it that to the fpga.
in this VI i would use a flat sequence to intialise the motors, then measure the data multiply by various gains etc, to get my voltage out for my motors, then use this to set the duty cycle on a square wave to turn the motors
can any one offer any on this, or point me in the direction of a example which may help

What's the problem?  Have you implemented this code?  What's not working/not doing what you want it to do?
There are heaps of examples on ni.com.  Try searching for them.  Also, try searching the LV help for examples.  Open the context help for each of your VIs and see if there are any examples included for them.
Have you thought about doing some ni training or getting a training manual?

Similar Messages

  • Need help with lost iMovie project.

    I was creating an iMovie project for school and needed to save it on a USB, so I clicked on 'Export Movie' from the 'Share' options menu in iMovie. I chose the type I wanted it saved in (viewing for computers) and then a smaller screen in iMovie popped up saying it was exporting the movie, or something like that. It took about a good 30 minutes and my project was a 7 minute movie with film clips, music, transitions, ect. I exported this project to my USB but when it finished it wasn't on there and when I finally found it on the Mac somewhere, I went to drag it into my USB but it said it was full. I then dragged the project onto my desktop and tried to open it to see if it worked. When I did the iMovie icon jumped once and stopped. I clicked on iMovie and it was still there in the projects screen. I then decided to close iMovie and open the project again from my desktop to see if it would play like a normal movie but once I clicked it the iMovie icon jumped again, opened but my project that I was trying to open was not there anymore and wouldn't open from my desktop file. I cannot open it at all and view it, it has been lost from my iMovie. Is there a way that I can get it back? Really need some help with this.

    What version of iMovie are you using?
    Matt

  • Help with Rendering/Finalizing Project Please?

    Hi,
    I am so new to this entire Adobe and video making that I've spent the last few hours pulling hair literally.  I am hoping that some of you experts can take some time to give this novice some much needed guidance.  Okay, I'm begging!
    I recorded a wedding on a XHA1 MiniDV camera in 1080p 24fps.  Captured the clips to PP CS4 which in turn makes them MPEG, I believe.  Included in my project are addition clips imported from a Canon HF S21 also in 1080p 24fps and a Rebel T2i in ?? format.  Didn't use too many clips from the rebel. 
    Anyhow, my project settings in PP are:
    Video -  Display format = Frames
    Audio - Display format = Audio Samples
    Capture Format = HDV
    All Scratch disks are saved on to my desktop with 284 GB
    Here is a picture of the sequence settings:
    Again, sorry for the ignorance and stupiditiy.  I am wondering what would help.
    I am trying to burn it all with chapter markers and additional features to a DVD.
    - What would be the BEST settings for exporting to Encore? 
    - Should I separate each section into a different sequence - would that help?  For example, the pre-ceremony to one sequence.  The ceremony to another.  The reception to another.    Or should I make new projects for each? 
    - How can I make my computer faster?  Is it the memory, ram, etc?  What should I do?
    Right now, it has failed over and over in rendering in After Effects.  It stops encoding when I export to AME.  It says 158 hours for rendering in PP.
    HELP!
    I am using an iMac and here are computer specs (again, I am not even sure what to post to help you all help me):
      Model Name: iMac
      Model Identifier: iMac11,3
      Processor Name: Intel Core i7
      Processor Speed: 2.93 GHz
      Number Of Processors: 1
      Total Number Of Cores: 4
      L2 Cache (per core): 256 KB
      L3 Cache: 8 MB
      Memory: 8 GB
      Processor Interconnect Speed: 4.8 GT/s
      Boot ROM Version: IM112.0057.B00
      SMC Version (system): 1.59f2
    Here is a pic of what I'm working on.  I know the pic-in-pic feature probably doesn't help with rendering time either but 158 hours is killing me.  In fact, when I go to sleep, I wake up to an error message where PP has closed.

    leevang,
           Your computer looks great.  I wouldn't be too worried about the time PP shows for encoding etc.
    I have found that right when I first start to encode a project, 73 hours or 12 hours is normal. Rendering is not necessary for encoding.  However  when I look back later, the time has dropped greatly.
    Down to 2 or 3 hours.  that's when I follow Jeff B.'s suggestions when I do a  2X scan.......

  • PE4 with MF6 + trial version, help with Blu-Ray project

    Is there a work flow I can read up on to accomplish this. I have a Canon HV20 HDV media. Use HD Split import M2T files into PE4 preset 1080i 30, render than save to desktop as same. The file is 1440x1080. I'm trying to make a high definition disk to playback on our Pioneer Blu-Ray player. Using Movie Factory 6+ trial version. Thank you.

    Thanks for the reply Paul I appreciate that. Let me go back over what I've done so far as my last post was incorrect. Moved M2T clips from HDsplit into PE4 with a new project setting of NTSC-HDV 1080i 30. Saved to computer with a select MPEG pre-set HD 1080i 30. The short clip plays fine with WMP and properties is at 1920x1080. Using MF6+ I would like to burn my high definition movie clips to a standard DVD to be played back in our Blu-Ray player. Are these the right steps so far to import the clip into MF6+? I just recently downloaded the trial version but last night I found a help/info section in MF6+ so I plan on reading through that to get acquainted with their terminology.
    Will I be burning a data disk to make this work? Maybe a couple of cliff notes to get me started so I can better understand how to do this. Your advice and suggestions are welcome.
    Jake

  • Help with final Graduation Project

    I've done with the majority of it, however I need help with the remove method for a B tree. when removing from a non-leaf node, your remove must replace the removed item with the smallest item in the right subtree.
    The code:
    import java.util.Stack;
    public class BTreeG<E extends Comparable< ? super E>> {
        // Each Btree object is a B-tree header.
        // This B-tree is represented as follows: order is the maximum number
        // of children per node, and root is a link to its root node.
        // Each B-tree node is represented as follows: size contains its size; a
        // subarray items[0...size-1] contains its elements; and a subarray
        // childs[0...size] contains links to its child nodes. For each element
        // items, childs[i] is a link to its left child, and childs[i+1] is a
    // link to its right child. In a leaf node, all child links are null.
    // Moreover, for every element x in the left subtree of element y:
    // x.compareTo(y) < 0
    // and for every element z in the right subtree of element y:
    // z.compareTo(y) > 0.
    private final int order;
    private Node root;
    public BTreeG () {
         // Construct an empty B-tree of order 5.
    this(5);
    public BTreeG (int k) {
    // Construct an empty B-tree of order k.
    root = null;
    order = k;
    public E get(E item){
    if (root == null)
    return null;
    Node node = root;
    while (true) {
    int pos = node.searchInNode(item);
    if (item.equals(node.items[pos]))
    return (E)node.items[pos];
    else if (node.isLeaf())
    return null;
    else
    node = node.childs[pos];
    public void insert (E item) {
    // Insert element item into this B-tree.
    if (root == null) {
    root = new Node( item);
    return;
    Stack ancestors = new Stack();
    Node curr = root;
    while (true) {
    int currPos = curr.searchInNode(item);
    if (item.equals(curr.items[currPos]))
    return;
    else if (curr.isLeaf()) {
    curr.insertInNode(item, null, null, currPos);
    if (curr.size == order) // curr has overflowed
    splitNode(curr, ancestors);
    return;
    } else {
    ancestors.push(new Integer(currPos));
    ancestors.push(curr);
    curr = curr.childs[currPos];
    private void splitNode (Node node,
    Stack ancestors) {
    // Split the overflowed node in this B-tree. The stack ancestors contains
    // all ancestors of node, together with the known insertion position
    // in each of these ancestors.
    int medPos = node.size/2;
    E med = (E)node.items[medPos];
    Node leftSib = new Node(
    node.items, node.childs, 0, medPos);
    Node rightSib = new Node(
    node.items, node.childs, medPos+1, node.size);
    if (node == root)
    root = new Node( med, leftSib,
    rightSib);
    else {
    Node parent =
    (Node) ancestors.pop();
    int parentIns = ((Integer)
    ancestors.pop()).intValue();
    parent.insertInNode(med, leftSib, rightSib,
    parentIns);
    if (parent.size == order) // parent has overflowed
    splitNode(parent, ancestors);
    public void remove (E item) {
         // your code goes here
    public void print () {
    // Print a textual representation of this B-tree.
    printSubtree(root, "");
    private void printSubtree (Node top, String indent) {
    // Print a textual representation of the subtree of this B-tree whose
    // topmost node is top, indented by the string of spaces indent.
    if (top == null)
    System.out.println(indent + "o");
    else {
    System.out.println(indent + "o-->");
    boolean isLeaf = top.isLeaf();
    String childIndent = indent + " ";
    for (int i = 0; i < top.size; i++) {
    if (! isLeaf) printSubtree(top.childs[i], childIndent);
    System.out.println(childIndent + top.items[i]);
    if (! isLeaf) printSubtree(top.childs[top.size], childIndent);
    //////////// Inner class ////////////
    private class Node<E extends Comparable< ? super E>>
    // Each Node object is a B-tree node.
    private int size;
    private E[] items;
    private Node[] childs;
         private Node (E item) {
         this (item, null, null);
    private Node (E item, Node left, Node right) {
    // Construct a B-tree node of order k, initially with one element, item,
    // and two children, left and right.
    items = (E[])new Comparable[order];
    childs = new Node[order+1];
    // ... Each array has one extra component, to allow for possible
    // overflow.
    this.size = 1;
    this.items[0] = item;
    this.childs[0] = left;
    this.childs[1] = right;
    private Node ( E[] items, Node[] childs, int l, int r) {
    // Construct a B-tree node of order k, with its elements taken from the
    // subarray items[l...r-1] and its children from the subarray
    // childs[l...r].
    this.items = (E[])new Comparable[order];
    this.childs = new Node[order+1];
    this.size = 0;
    for (int j = l; j < r; j++) {
    this.items[this.size] = items[j];
    this.childs[this.size] = childs[j];
    this.size++;
    this.childs[this.size] = childs[r];
    private boolean isLeaf () {
    // Return true if and only if this node is a leaf.
    return (childs[0] == null);
    private int searchInNode (E item) {
    // Return the index of the leftmost element in this node that is
    // not less than item.
    int l = 0, r = size-1;
    while (l <= r) {
    int m = (l + r)/2;
    int comp = item.compareTo((E)items[m]);
    if (comp == 0)
    return m;
    else if (comp < 0)
    r = m - 1;
    else
    l = m + 1;
    return l;
    private void insertInNode (E item, Node leftChild,
    Node<E> rightChild, int ins) {
    // Insert element item, with children leftChild and rightChild, at
    // position ins in this node.
    for (int i = size; i > ins; i--) {
    items[i] = items[i-1];
    childs[i+1] = childs[i];
    size++;
    items[ins] = item;
    childs[ins] = leftChild;
    childs[ins+1] = rightChild;

    I've done with the majority of it, however I need
    help with the remove method for a B tree. when
    removing from a non-leaf node, your remove must
    replace the removed item with the smallest item in
    the right subtree. It's hard to implement a B tree. That's why you rather use a standard implementation. If not you're basically on your own. Don't expect others to do it for you. Why should they bother? Please tell us when you're finished and where we can download you B-tree implementation -:)

  • Help with a Flash project im attempting

    need a little help with the direction of where i want to go
    with a flash app im trying to make. What it is that im doing is an
    prototype application for a treasure hunt. (The prototype is so
    that it can be used on a hand held PDA) the specification are
    below:
    A Treasure Hunt provides participants with clues which leads
    them to discover a route and requires them to answer questions
    along the way. Answers are scored as follows:
    Correct answers 10 points
    After 1 hint 5 points
    After 2 hints 2 points
    Incorrect answers -2 points
    The 2nd hint gives the exact position on the map so that the
    participant can keep to the route and not get lost.
    I am going to design a Flash application (for the Flash 6
    player only) which will run on a mobile device (PDA) with Windows
    Mobile 2003 as the operating environment with a small screen
    240x320 pixel resolution either portrait or landscape and 65K
    colour depth. The device has a pointing device (stylus),
    microphone, speaker and earphone socket. It is WiFi enabled to take
    advantage of WiMax which will enable mobile devices to access the
    internet over a wide geographic area such as a town.
    I have considered providing the following functionality:
    · Setup options eg: choose the Treasure Hunt from
    alternatives, language options, accessibility options such as voice
    output (could simulate voice command input)
    · Present clues as either text or image (could simulate
    voice output)
    · Provide access to the internet eg: Google for
    searching for information
    · Keep a record of the score and allow participant to
    keep track
    · Present progress along the route on the map
    –needs zoom in/out and/or scroll
    · Save progress if a pause is needed
    · Total time taken
    · Provision for one or more sponsoring
    organisation’s advert/logo (doesn’t have to be on
    screen all the time)
    Now ive been trying to think for the last couple of days what
    the best way to create this is, but im having a really big mental
    block on it. Now im not the best at flash, so it need only be a
    basic application. I know how im going to do the map and then
    language changes but thats about it at the moment.
    So can anyone give me any advice on how to go about creating
    this sort of thing, if you could give me any information, and where
    would be the best place to start - i'd appreciate it greatly!

    Thinking about it, (its late) because its only a prototype
    that i have to create, it doesn't necessarily have to work, im only
    just showing examples of what it can do so all of those features do
    not have to work correctly. That sounds about right doesn't it? lol
    jees im tired :D

  • I need help with my hangman project

    I'm working on a project where we are developing a text based version of the game hangman. For every project we add a new piece to the game. Well for my project i have to test for a loser and winner for the game and take away a piece of the game when the user guesses incorrectly. these are the instrcutions given by my professor:
    This semester we will develop a text based version of the Game Hangman. In each project we will add a new a piece to the game. In project 4 you will declare the 'figure', 'disp', and 'soln' arrays to be attributes of the class P4. However do not create the space for the arrays until main (declaration and creation on separate lines). If the user enters an incorrect guess, remove a piece of the figure, starting with the right leg (looking at the figure on the screen, the backslash is the right leg) and following this order: the left leg (forward slash), the right arm (the dash or minus sign), the left arm (the dash or minus sign), the body (vertical bar), and finally the head (capital O).
    Not only will you need to check for a winner, but now you will also check to see if all the parts of the figure have been removed, checking to see if the user has lost. If the user has lost, print an error message and end the program. You are required to complete the following operations using for loops:
    intializing appropriate (possible) variables, testing to see if the user has guessed the correct solution, testing to see if the user has guessed a correct letter in the solution, and determining / removing the next appropriate part of the figure. All other parts of the program will work as before.
    Declare figure, disp, and soln arrays as attributes of the class
    Creation of the arrays will remain inside of main
    Delete figure parts
    Check for loss (all parts removed)
    Implement for loops
    Init of appropriate arrays
    Test for winner
    Test if guess is part of the solution
    Removal of correct position from figure
    Output must be
    C:\jdk1.3.1\bin>java P3
    |
    |
    O
    -|-
    Enter a letter: t
    |
    |
    O
    -|-
    t _ _ t
    Enter a letter: a
    |
    |
    O
    -|-
    t _ _ t
    Enter a letter: e
    |
    |
    O
    -|-
    t e _ t
    Enter a letter: l
    |
    |
    O
    -|-
    t e _ t
    Enter a letter: s
    |
    |
    O
    -|-
    t e s t
    YOU WIN!
    C:\jdk1.3.1\bin>java P3
    Pete Dobbins
    Period 5, 7, & 8
    |
    |
    O
    -|-
    Enter a letter: a
    |
    |
    O
    -|-
    Enter a letter: b
    |
    |
    O
    -|-
    Enter a letter: c
    |
    |
    O
    -|
    Enter a letter: d
    |
    |
    O
    |
    Enter a letter: e
    |
    |
    O
    |
    _ e _ _
    Enter a letter: f
    |
    |
    O
    _ e _ _
    Enter a letter: g
    |
    |
    _ e _ _
    YOU LOSE!
    Well i have worked on this and come up with this so far and am having great dificulty as to i am struggling with this class. the beginning is just what i was suppose to comment out. We are suppose to jave for loops for anything that can be put into a for loop also.
    /* Anita Desai
    Period 5
    P4 description:
    1.Declare figure, disp, and soln arrays as attributes of the class
    2.Creation of the arrays will remain inside of main
    3.Delete figure parts
    4.Check for loss (all parts removed)
    5.Implement for loops
    A.Init of appropriate arrays
    B.Test for winner
    C.Test if guess is part of the solution
    D.Removal of correct position from figure
    //bringing the java Input / Output package
    import java.io.*;
    //declaring the program's class name
    class P4
    //declaring arrays as attributes of the class
    public static char figure[];
    public static char disp[];
    public static char soln[];
    // declaring the main method within the class P4
    public static void main(String[] args)
    //print out name and period
    System.out.println("Anita Desai");
    System.out.println("Period 5");
    //creating the arrays
    figure = new char[6];
    soln = new char[4];
    disp = new char[4];
    figure[0] = 'O';
    figure[1] = '-';
    figure[2] = '|';
    figure[3] = '-';
    figure[4] = '<';
    figure[5] = '>';
    soln[0] = 't';
    soln[1] = 'e';
    soln[2] = 's';
    soln[3] = 't';
    //for loop for disp variables
    int i;
    for(i=0;i<4;i++)
    disp='_';
    //Using a while loop to control program flow
    while(true)
    //drawing the board again!
    System.out.println("-----------");
    System.out.println(" |");
    System.out.println(" |");
    System.out.println(" " + figure[0]);
    System.out.println(" " + figure[1] + figure[2] + figure[3]);
    System.out.println(" " + figure[4] + " " + figure[5]);
    System.out.println("\n " + disp[0] + " " + disp[1] + " " + disp[2] + " " + disp[3]);
    //getting input
    System.out.print("Enter a letter: ");
    //declaring a string variable
    String data = " ";
    // call the readString method
    data = readString();
    //retrieves the character at position zero
    char temp;
    temp=data.charAt(0);
    int h;
    for(h=0;h<4;h++)
    if(temp==soln[h])
    disp[h]=soln[h];
    return;
    if(disp[h]==soln[h])
    System.out.println("You Win");
    else
    for(h=0;h<6;h++)
    if(temp!=soln[h])
    figure[h] = ' ';
    return;
    if(disp[h]!=soln[h])
    System.out.println("You Lose");
    ///Test if statements to replace user input with soln if correct
    int j;
    for(j=0;j<4;j++)
    if(temp==soln[j])
    disp[j]=soln[j];
    //declared the readString method, we specified that it would
    //be returning a string
    public static String readString()
    //make connection to the command line
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    //declaring a string variable
    String s = " ";
    //try to do something that might cause an error
    try
    //reading in a line from the user
    s = br.readLine();
    catch(IOException ex)
    //if the error occurs, we will handle it in a special way
    //give back to the place that called us
    //the string we read in
    return s;
    If anyone cann please help me i would greatly appreciate it. I have an exam coming up on wednesday also so i really need to understand this material and see where my mistakes are. If anyoone knows how to delete the parts of the hangman figure one by one each time user guessesincorrectly i would appreciate it greatly. Any other help in solving this program would be great help. thanks.

    Hi thanks for responding. Well to answer some of your questions. The professors instructions are the first 2 paragraphs of my post up until the ende of the output which is You lose!. I have to have the same output as the professor stated which is testing for a winner and loser. Yes the program under the output is what i have written so far. This is the 3rd project and in each we add a little piece to the game. I have no errors when i run the program my problem is when it runs it just prints the hangman figure, disp and then asks user ot enter a letter. Well once i enter a letter it just prints that letter to the screen and the prgram ends.
    As far as the removal of the parts. the solution is TEST. When the user enters a letter lets say Tthen the figure should display again with the disp and filled in solution with T. Then ask for a letter again till user has won and TEST has been guessed correctly. Well then we have to test for a loser. So lets the user enters a R, well then the right leg of the hangman figure should be blank indicating a D the other leg will be blank until the parts are removed and then You lose will be printed to the screen.
    For the program i am suppose to use a FOR LOOPto test for a winner, to remove the parts one at a time, and to see if the parts have been removed if the user guesses incorrectly.
    so as u can see in what i have come up with so far i have done this to test for a winner and loser:
    //declaring a string variable
    String data = " ";
    // call the readString method
    data = readString();
    //retrieves the character at position zero
    char temp;
    temp=data.charAt(0);
    int h;
    for(h=0;h<4;h++)
    if(temp==soln[h])
    disp[h]=soln[h];
    return;
    if(disp[h]==soln[h])
    System.out.println("You Win");
    else
    for(h=0;h<6;h++)
    if(temp!=soln[h])
    figure[h] = ' ';
    return;
    if(disp[h]!=soln[h])
    System.out.println("You Lose");
    Obviously i have not writtern the for loops to do what is been asked to have the proper output. the first for loop i am trying to say if the user input is equal to the soln thencontinue till all 4 disp are guessed correctly and if all the disp=soln then the scrren prints you win.
    then for the incorrect guesses i figured if the user input does not equal the soln then to leave a blank for the right leg and so on so i have a blank space for the figure as stated
    :for(h=0;h<6;h++)
    if(temp!=soln[h])
    figure[h] = ' ';
    well this doesnt work and im not getting the output i wanted and am very confused about what to do. I tried reading my book and have been trying to figure this out all night but i am unable to. I'm going to try for another hr then head to bed lol its 4am. thanks for your help. Sorry about posting in two different message boards. I wont' do it again. thanks again, anita

  • Help with photos in project???!!

    Hello,
    I just bought an iMac about a month ago so that I could edit home movies and create DVD's of family vacations/events to share with my family. I have done this in the past on the PC with Pinnacle Movie Studio Software but it was buggy and more of a pain than it was worth.
    So far pretty impressed with the iMac and FCE seems like it has potential. However I keep having problems with still photos in my video.
    Here is what I have done - created a new project using the NTSC 48k template (not at my desktop now so I'm working off memory as far as naming). I captured all of my Sony Mini DV footage to the PC and dropped it into my timeline and edited it. Went smoothly. At the end of my movie I want to insert a "recap of the trip" using the still photos that I took with my digital camera and use the ken burns effect and transitions with music playing. My plan is to render and burn to DVD with iDVD for playback on a 1080p 60 inch plasma.
    My photos are jpegs saved on my hard drive. I cropped them and adjusted color, etc in CS2. I didn't do anything as far as re-sizing them etc in photo shop as this is a little new to me and I didn't want to mess them up. Do I need to resize them for FCE? Seems like the program does this? If I need to resize them what size should I make them? Remember I want to be able to zoom in by creating the burns effect.
    I have taken the photos and imported them into FCE. I drop them on the timeline and push play and everything looks great. When I start adding transitions with and applying the ken burns effect with key points the image plays fine by itself in the viewer window. However, when I watch the project play back in the canvas the stills appear very jumpy - not like a frame is missing in the render - the still literally looks like it jumps up and then settles back down. This is driving me nuts! FCE has to be able to do this smoothly. Can anyone provide me with a simple step by step on what settings I should be using for my sequences, etc to make this work. The settings really mess me up and I must be missing something.
    I do have Tom's book but I can't find anything to help me with this issue. It is driving me nuts. Thank you in adavnce!

    Thank you for the link. I went there and read the information. I still have questions:
    Assuming I am using just still photos (let's keep it easy at first and assume no video) - what settings do I use for FCE under easy set up and for the sequence? Photos are jpg images shot with a digital camera that have been saved on my computer for a few years. I want to output my contents to DVD using iDVD and play back on a 1080p plasma tv.
    Do I have to edit or resize the photos in photoshop first? It sounds like I can just import them into FCE and that it should work. I am not working with advanced photoshop images - just simple jpg images - no layers. The chart on page 2 of the link above says for 1080i - rectangular size N/A and square size 1920x1080. What does this mean? Is this telling me to resize my images to 1920x1080 before I import into FCE? If I want to use the Ken Burns effect and zoom should I double this to 3840x2160?
    If someone can tell me step by step what they would do with the settings for FCE if they wanted to create a still photo slideshow with music, transitions and pan and zoom I would appreciate it. Again - source material is jpg images and I want to output to DVD using iDVD to display on a 1080p plasma tv. Also assuming that you had a standard landscape photo shot with a 4 megapixel camera what steps would you go through to prep it for FCE in Photoshop - if any?
    Sorry that I am asking for a detailed example but I learn much better that way - after I am able to get one photo into an acceptable format for FCE the rest will be easy.
    Has anyone actually created a successful slide show in FCE using transitions and the Ken Burns effect or do they get jitters in their photos as well - the image doesn't appear to flow smoothly.

  • Help with Starting My Project [Project AM]

    I apologize in advance if this is not in the correct forum.
    //The next two paragraphs are a rundown of why I am doing this project and my previous experience with Java//
    Here's where my story starts, I've just started out a new year of school and I've been placed in a Computer Science (Higher Level) class, and it so happens that I am to be coding/programming in Java. I've worked with C++ in the past, and I've noticed that Java is quite similar, thankfully.
    This Computer Science class is a two-year course, at the end of the two years I will have an external assessment (IB dossier) due. This gives me tons of time to work on this project, if you haven't noticed by now it will be an on-going project.
    I know this project is going to take some time that's why I would like to start now.
    //End of Rundown//
    My project is called "AM" and in the end it will be an "instant messenger" (with your help of course).
    The first thing I would like to establish in this project is creating a server program to accept connections and a client to connect to the server (text based). I would like multiclient connections to the one server program.
    Now here's the question, what should I look into before starting this project, what Java technologies? What resources should I grab from the library or from the book store? Basically I'm asking where I should begin?
    If anyone has any suggestions or even some personal experience with writing a program like this please contact me. I would really appreciate it. Also source code would really help in learning this, but I can probably search that on my own, thanks.
    Message was edited by:
    am.aerebia

    The easiest way to go about this is to use Sockets. You could also look into using RMI

  • Help with binary conversion project

    hey my assignment was to make a program that would say the binary representation of an int. i got my program working and im pretty sure it works for all negatives and 0. my question is can you guys help me with a way to do the same steps with for( or while( ? it seems like i went the long way doing this project and even tho it works theres probably a much simpler way of going about it. theres no interface or anything we just change the value of N and recompile it and run from command prompt so far in our class. thanks for the help
    class binary {
    public static void main(String[]args){
         int N = -264;
         int M = N*-1;
         int A;
         int A1;
         int B;
         int B1;
         int C;
         int C1;
         int D;
         int D1;
         int E;
         int E1;
         int F;
         int F1;
         int G;
         int G1;
         int H;
         int H1;
         int I;
         int I1;
         if(N==0) {
              System.out.println("The Binary reresentation of "+N+" is = 0");
         if(N<0) {
              A=M/2;
              A1=M%2;
              B = A/2;
              B1 = A%2;
              C = B/2;
              C1 = B%2;
              D = C/2;
              D1 = C%2;
              E = D/2;
              E1 = D%2;
              F = E/2;
              F1 = E%2;
              G = F/2;
              G1 = F%2;
              H = G/2;
              H1 = G%2;
              I = H/2;
              I1 = H%2;
         else {
              A= N/2;
              A1 = N%2;
              B = A/2;
              B1 = A%2;
              C = B/2;
              C1 = B%2;
              D = C/2;
              D1 = C%2;
              E = D/2;
              E1 = D%2;
              F = E/2;
              F1 = E%2;
              G = F/2;
              G1 = F%2;
              H = G/2;
              H1 = G%2;
              I = H/2;
              I1 = H%2;
         if(A1==1 && N<0){
         B1=B1-1;
         C1=C1-1;
         D1=D1-1;
         E1=E1-1;
         F1=F1-1;
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==1 && N<0){
         C1=C1-1;
         D1=D1-1;
         E1=E1-1;
         F1=F1-1;
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==1 && N<0){
         D1=D1-1;
         E1=E1-1;
         F1=F1-1;
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==0 && D1==1 && N<0){
         E1=E1-1;
         F1=F1-1;
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==0 && D1==0 && E1==1 && N<0){
         F1=F1-1;
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==0 && D1==0 && E1==0 && F1==1 && N<0){
         G1=G1-1;
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==0 && D1==0 && E1==0 && F1==0 && G1==1 && N<0){
         H1=H1-1;
         I1=I1-1;
         if(A1==0 && B1==0 && C1==0 && D1==0 && E1==0 && F1==0 && G1==0 && H1==1 && N<0){
         I1=I1-1;
         if(A1==-1){
         A1=A1*-1;
         if(B1==-1){
         B1=B1*-1;
         if(C1==-1){
         C1=C1*-1;
         if(D1==-1){
         D1=D1*-1;
         if(E1==-1){
         E1=E1*-1;
         if(F1==-1){
         F1=F1*-1;
         if(G1==-1){
         G1=G1*-1;
         if(H1==-1){
         H1=H1*-1;
         if(I1==-1){
         I1=I1*-1;
         if(A==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+A1);
         else if(B==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+B1+A1);
         else if(C==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+C1+B1+A1);
         else if(D==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+D1+C1+B1+A1);
         else if(E==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+E1+D1+C1+B1+A1);
         else if(F==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+F1+E1+D1+C1+B1+A1);
         else if(G==0 && N<0){
              System.out.println("The Binary reresentation of "+N+" is = 1"+G1+F1+E1+D1+C1+B1+A1);
         else if(H==0 && N<0){     
              System.out.println("The Binary reresentation of "+N+" is = 1"+H1+G1+F1+E1+D1+C1+B1+A1);
         else if(I==0 && N<0){     
              System.out.println("The Binary reresentation of "+N+" is = 1"+I1+H1+G1+F1+E1+D1+C1+B1+A1);
         if(A==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+A1);
         else if(B==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+B1+A1);
         else if(C==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+C1+B1+A1);
         else if(D==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+D1+C1+B1+A1);
         else if(E==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+E1+D1+C1+B1+A1);
         else if(F==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+F1+E1+D1+C1+B1+A1);
         else if(G==0 && N>0){
              System.out.println("The Binary reresentation of "+N+" is = 0"+G1+F1+E1+D1+C1+B1+A1);
         else if(H==0 && N>0){     
              System.out.println("The Binary reresentation of "+N+" is = 0"+H1+G1+F1+E1+D1+C1+B1+A1);
         else if(I==0 && N>0){     
              System.out.println("The Binary reresentation of "+N+" is = 0"+I1+H1+G1+F1+E1+D1+C1+B1+A1);
    }

    String intAsBinaryString(int n){
      String res = "";
      for(int i = 1; i!=0; i *=2){
        res = ((n & i != 0)?"1":"0") + res;
      return res;
    }Pete is right, in order to understand this you need to know how integers are stored.

  • Please help with my my project mac

    hi, im buying a B&W G3 for use with a legacy soundcard only, and wish to know a few details about it that i wasnt able to find in a search. simple stuff really.
    whats the max ram and what spec? more ram will obviously make for a more pleasurable computing experience?
    whats the latest os9 version that it will run? does this model require a special set of disks like some later macs?
    im usually a pc guy, what is the equivalent speed in your opinion? what sort of performance should i expect?
    what is the video output format? will it work on a kvm with some other xp based systems?
    is there any way to get this whole idea into a smaller box? any mod sites? id love to put it into a 1 or 2 unit rack. i know that sounds like a project for sure, but im curious whats possible.
    thanks for your help!

    The revision 1 Blue & White G3 has a tragic flaw -- when used with a Hard Drive substantially faster or larger than its original 4, 6, or 8 GB drive, its IDE/DMA Controller falls apart and produces random data corruption. This results in unrepeatable, seemingly random crashes, freezes, and data corruption problems. The "litmus test" is in this article, under "3. Revised IDE Controller Chip":
    http://www.xlr8yourmac.com/G3-ZONE/yosemite/newfeatures.html
    All Rev 1 machines have a solid, three-drive shelf that must be completely removed to install additional drives. They support only one IDE drive.
    Most later Rev 2 machines use the individual flat metal sleds common through most of the rest of the G4 desktop cases. (I am not sure what is in a MDD G4). They feature a two-drive IDE cable and a "stacking bracket" for two drives in the rearmost drive position. This article show the "stacking bracket":
    58193- Power Macintosh G3 (Blue and White): Additional Hard Drive Installation Options
    Message was edited by: Grant Bennet-Alder

  • Help with burning large project on dual layer DVD

    Hi need help please.
    I am busy with a SD 16x9 project 215 minutes long so I am trying to use dual layer DVD's. The project has a serious menu setup (well I think so), it starts with a intro and go's into the main menu with sub menu's and so on. my problems is the following:
    if I burn a image all works well if I burn a disc from the image or using encore the menu once using a DVD player is very slow (the last half of the links on the time line) and some links get mixed up (if I press play dvd on the 3rd sub menu it somtimes starts in the correct place and somtimes it starts one link later).
    is this caused by the break in the layer and what can I do to correct it or to get it better.
    thanks
    Darren

    Are you using any motion menus? Have you exceeded the 1 gig limit for menus etc?
    I assumed 16:9 and forgot to look before I started posting: it does not look like it, but be sure you don't have more than 18 buttons per menu (if it is 16:9).
    With lots of short clips, break position should not be an issue. You can export to a folder and use imgburn which gives more control over layer breaks.
    Even though complex, it all looks straight forward, and, even though I can't see the image detail, it looks okay. The most likely issue in such a project is that Encore got lost as you made changes/corrections. Sometimes they can be fixed. Other times, the solution is a do over. Newer versions for Encore appear more robust (fewer problems and more likely to fix problems), but no versions appear to be free of such issues.

  • I cannot install, I have taken all the suggested steps, but it still keeps saying error, I need this to help with a college project and I cannot afford to buy anything new. Is there anything I can do to install it properly?

    I have had Photoshop for several days now and for the few days I have tried I just can not install anything what-so-ever. I have taken all of the suggested steps and it didn't do anything to help, it still had some sort of error. I have contacted Adobe, but haven't heard anything.
    I really need this Photoshop for a project that needs to be completed before February. I do not have time or money to buy or exchange for new one.
    I really need help I just don't understand what is going wrong and I really need help!

    I think i know what the problem is here.  You have downloaded the Apple MAC version and trying to install on a Windows system.  If this is so then you will get this error message.
    Try to download the Windows version and then see if it works this time.  Windows and Apple MACS are two different types of operating systems.  Windows is widely used in the market place because of Microsoft's Marketing expertise while Apple MACs is used in the printing industry.
    <http://trials3.adobe.com/AdobeProducts/PSE/13_0_esd/win64/PhotoshopElements_13_Trial_LS25_ win64.exe>
    Good luck.

  • Help with my summer project

    I have three summer projects to do for my AP computer science clas next year and I'm already stuck on the first one. My first problem is that in the Quadratic Equation you write -b and then plus or minus (the root of b^2ac,etc) and I do not know how to write plus or minus in code. I tried doing (+||-) but that didn't work... I didn't learn much from my Java 1 and 2 teacher so I'm totally lost and VERY frustrated and any help would be extremely appreciated.
    P.S. This is what the project is---
    "Write a program that prints all real solutions to the quadratic equation ax(squared) + bx + c = 0. Read in a, b, c and use the quadratic formula. If the discriminate b(squared)-4ac is negative, display a message stating that there is no real solution.
    Implement a class QuadraticEquation whose construction receives the coefficients a, b, c of the quadratic equation. Supply methods getSolution1 and getSolution2 that get the solutions using the quadratic formula.
    Supply a method Boolean hasSolution() that returns false if the discriminate is negative.

    Sorry, I couldn't log back in for some reason so i made a new name. THis is what I have so far. It's nothing but it's all i can do.
    import java.io.*;
    public class QuadraticEquation {
         public static void main(String[]args) {}
         EasyReader reader = new EasyReader();
              double a;
              double b;
              double c;
              public void getSolution1() {
              System.out.print("Please Work");
              String line=reader.readLine();
              int acoeff=reader.readInt();
              QuadraticEquation.getSolution1();
              public void getSolution2() {
              boolean hasSolution() {
              //     int discriminate = -4;
                   //if(discriminate<0) {
                   return false;
    }

  • Help with Java programming project

    Hi,
    I need help in writing this Java program. The purpose of this program is to read a variable-length stream of 0, 1 characters from an input text file (call it input.txt) one character at a time, and generate the corresponding B8ZS output stream consisting of the +, - , and 0 characters (with appropriate substitutions) one-character-at-a-time into a text file (called output.txt).
    The program must use a class called AMIConverter with an object called AMI . Class AMIConverter must have a method called convert which converts an individual input character 0 or 1 into the appropriate character 0 or + or - of AMI.
    It first copy the line to file output.txt. Then read the line one character at a time and pass only valid characters (0 or 1) to AMI.convert, which assumes only valid characters. The first 1 in each new 'Example' should be converted to a +.
    This is what is read in, but this is just a test case.
    0101<1000
    1100a1000b00
    1201g101
    should now produce two lines of output for each 'Example', as shown below:
    This should be the output of the output.txt file
    Example 1
    in :0101<1000
    out:0+0-+000
    Example 2
    in :1100a1000b00
    out:+-00+00000
    Example 3
    in :1201g101
    out:+0-+0-
    To elaborate more, only 1 and 0 are passed to "convert" method. All others are ignored. 0 become 0 and 1 become either + or - and the first "1" in each new example should be a +.
    This is what I have so far. So far I am not able to get the "in" part, the characters (e.g. : 0101<1000 ) out to the output.txt file. I am only able to get the "out" part. And I also can't get it to display a + for the first "1" in each new examples.
    import java.io.*;
    public class AMIConverter
         public static void main (String [] args) throws IOException
              AMI ami = new AMI();
              try
                   int ch = ' ';
                   int lineNum = 1;
         int THE_CHAR_0 = '0';
         int THE_CHAR_1 = '1';
                   BufferedReader infile = new BufferedReader(new FileReader("input.txt"));
         PrintWriter outfile = new PrintWriter("output.txt");
         outfile.write("Example " + lineNum);//prints Example 1
         outfile.println();
         outfile.write("in :");
    outfile.println();
    outfile.write("out:");
         while ((ch = infile.read()) != -1)
         if (ch == '\r' || ch == '\n')
              lineNum++;
              outfile.println();
              outfile.println();
              outfile.write("Example " + lineNum);
              outfile.println();
              outfile.write("in :");
              outfile.println();
              outfile.write("out:");
         else
         if (ch == THE_CHAR_0)
              int output = ami.convert(ch);
              outfile.write(output);
         else     
         if (ch == THE_CHAR_1)
              int output = ami.convert(ch);
              outfile.write(output);          
    }//end while
         infile.close();
         outfile.close();
         }catch (IOException ex) {}
    }//main method
    }//class AMIConverter
    This is my AMI class
    import java.io.*;
    public class AMI
         int THE_CHAR_0 = '0';
    int THE_CHAR_1 = '1';
    int total = '+';
    int minus = '-';
    int count = 0;
    public int convert(int ch)
         try
              PrintWriter outfile = new PrintWriter("output.txt");
              if (ch == THE_CHAR_0)
         return ch;
         else
         if (ch == THE_CHAR_1)
         count++;
         if (count%2 == 1)
              ch = total;
              return (ch);
         else
                             ch = minus;     
                             return (ch);      
    }catch (FileNotFoundException e) {}      
         return ch;
    }//method convert
    }//class AMI
    Any help would be appreicated.
    Thanks!

    Hi,
    I need help in writing this Java program. The purpose of this program is to read a variable-length stream of 0, 1 characters from an input text file (call it input.txt) one character at a time, and generate the corresponding B8ZS output stream consisting of the +, - , and 0 characters (with appropriate substitutions) one-character-at-a-time into a text file (called output.txt).
    The program must use a class called AMIConverter with an object called AMI . Class AMIConverter must have a method called convert which converts an individual input character 0 or 1 into the appropriate character 0 or + or - of AMI.
    It first copy the line to file output.txt. Then read the line one character at a time and pass only valid characters (0 or 1) to AMI.convert, which assumes only valid characters. The first 1 in each new 'Example' should be converted to a +.
    This is what is read in, but this is just a test case.
    0101<1000
    1100a1000b00
    1201g101
    should now produce two lines of output for each 'Example', as shown below:
    This should be the output of the output.txt file
    Example 1
    in :0101<1000
    out:0+0-+000
    Example 2
    in :1100a1000b00
    out:+-00+00000
    Example 3
    in :1201g101
    out:+0-+0-
    To elaborate more, only 1 and 0 are passed to "convert" method. All others are ignored. 0 become 0 and 1 become either + or - and the first "1" in each new example should be a +.
    This is what I have so far. So far I am not able to get the "in" part, the characters (e.g. : 0101<1000 ) out to the output.txt file. I am only able to get the "out" part. And I also can't get it to display a + for the first "1" in each new examples.
    import java.io.*;
    public class AMIConverter
    public static void main (String [] args) throws IOException
    AMI ami = new AMI();
    try
    int ch = ' ';
    int lineNum = 1;
    int THE_CHAR_0 = '0';
    int THE_CHAR_1 = '1';
    BufferedReader infile = new BufferedReader(new FileReader("input.txt"));
    PrintWriter outfile = new PrintWriter("output.txt");
    outfile.write("Example " + lineNum);//prints Example 1
    outfile.println();
    outfile.write("in :");
    outfile.println();
    outfile.write("out:");
    while ((ch = infile.read()) != -1)
    if (ch == '\r' || ch == '\n')
    lineNum++;
    outfile.println();
    outfile.println();
    outfile.write("Example " + lineNum);
    outfile.println();
    outfile.write("in :");
    outfile.println();
    outfile.write("out:");
    else
    if (ch == THE_CHAR_0)
    int output = ami.convert(ch);
    outfile.write(output);
    else
    if (ch == THE_CHAR_1)
    int output = ami.convert(ch);
    outfile.write(output);
    }//end while
    infile.close();
    outfile.close();
    }catch (IOException ex) {}
    }//main method
    }//class AMIConverterThis is my AMI class
    import java.io.*;
    public class AMI
    int THE_CHAR_0 = '0';
    int THE_CHAR_1 = '1';
    int total = '+';
    int minus = '-';
    int count = 0;
    public int convert(int ch)
    try
    PrintWriter outfile = new PrintWriter("output.txt");
    if (ch == THE_CHAR_0)
    return ch;
    else
    if (ch == THE_CHAR_1)
    count++;
    if (count%2 == 1)
    ch = total;
    return (ch);
    else
    ch = minus;
    return (ch);
    }catch (FileNotFoundException e) {}
    return ch;
    }//method convert
    }//class AMIAny help would be appreicated.
    Thanks!

Maybe you are looking for

  • Fast square root algorithm

    Does anyone here know where I can find an algorithm for a faster square root method than the one provided in java.lang.Math? I've tried Google, but can't come up with anything useful... Thanks in advance!

  • Automating album creation for a new project?

    I have several projects (such as specific event shoots) with the same basic set of albums for that project (some regular albums, some smart albums). I'll have albums for specific subsets of the events (for my sports shots, there's Individuals, Action

  • My MacBook Pro will not start up. Is there anything that I can do to see if I can start it up before I need to go in for an appointment?

    My MacBook will not start up. The only response I can get out of it is the battery light on the side which shows it as being full. Is there any wizardry that will magic it back to life by a sequence of buttons or something?

  • Express with mac and dell laptop?

    Hi - I am a newbie to wireless internet access. I have an eMac with an airport extreme card installed, and an airport express hooked up to my DSL line. I am a teacher and would like to plan lessons on a basic notebook to bring in and share with the c

  • Getting rid of ? from the dock after upgrading to ML

    After upgrading to Mountain Lion the old ichat, ical and address book icons are now "?" and I can't get them off the dock.  Dragging them off doesn't work, dragging to the trash doesn't work, and right clicking on it doesn't work.  Any ideas?