Beginner I need help

I'm new to LabView and need some help with a program that I must write. For now all I would like to learn is how to light an LED on the front panel using a push button switch. Second, I would like to learn how to generate a wave form graph on the front panel. Any and all help would be greatly appreciated.
Thanks 

Hi B-MuRpH,
what about the 'Getting started' manual that comes with LabView?
What about all those examples, accessible from the start window of LabView?
What about a seminar/course given by (experienced) LabView engineers?
In case you work at a University: what about a course for students?
In short: RTFM!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Beginner Programmer needs help...

    I just have a quick question regarding the get(MINUTE) function in the Calendar class. I am using this to display the current time on a webpage, and every thing seems to work fine except that if the current time has the minutes < 10 (ie, 2:04 or 8:09, etc.) then only that single integer is displayed (2:4, 8:9). I understand why this is happening, but I was wondering if there is a simple way to add a leadign '0' to this int. Here is that section of code...
    int hour = cal.get(Calendar.HOUR);
    int minute = cal.get(Calendar.MINUTE);
    String ampm = (cal.get(Calendar.AM_PM) == 0 ? "AM" : "PM");
    %>
    <p class="body"> Hello <b><%= res.getString("fname") %> <%= res.getString("lname") %></b>.
    It is <b><%= hour+":"+minute+" "+ampm+" on "+mo+"/"+dt+"/"+yr %></b>.</p>
    This page is in JSP. Thanks a lot for the help!

    Replace minute with this. It should format it with a leading zero if needed
    new DecimalFormat("00").format(minute)

  • Beginner! Need help getting started with recording music.

    I am the definition of 'new' at the moment. I want to record my own music at home and I've been told that using an Apple Mac is one of the better ways to go about it at home.
    I have a number of questions, most of which have probably been asked before (apologies!) starting right from the beginning.
    1. What type of Mac would be best suited as a dedicated tool for recording music? Obviously speed and memory are big factors, but are there any other considerations here (available inputs, drivers, sound cards etc)? I'm hoping to keep the cost below AUS$3000 if possible.
    2. Do i need any other hardware for this application? (this is where you can tell how inexperienced I am haha) such as mixers etc? If I should need a mixer, is there a particular type or brand of mixer that works well with Macs?
    3. Will plugging a guitar amp into the mac improve sound quality over plugging the guitar directly into the Mac? I bought a Griggin Garage Band guitar cable a while ago to record some background music for a friend's DVD, and I found it worked well, but I'm looking for the best quality sound now.
    4. What would be the most effective software to use? I've briefly used Garage Band and found that to be simple and useful, but I've heard that there are better software packages available.
    I'm hoping to be able to record guitar, bass and vocals directly on to the Mac, and create drum tracks using samples and loops. I know how to play music but as you can tell I know very little about recording it! Any help or suggestions would be appreciated!
    Thanks..

    I would presume one line level input will suffice?
    Close, you need a Line Level AND Mic Level input since you'll want to record vocals.
    Thanks for the link to your Q&A page, I found some very useful info there.
    It's showing its age, and will hopeful get updated soon, but most of the info is good at least for a background.
    Anyway, I think I might recommend this Presonus INSPIRE over the FireBox, it'll save you about $100 and since PreSonus makes excellent equipment (and we have an active member here that uses the Inspire), I'm confident that it offers great quality.
    I think the firepod that you use looks great, but might be overkill
    I agree, the FirePod would be serious overkill for your needs. Again, an awesome interface, but you'd be paying for all those Mic PREs, and using 1. That wouldn't make sense, and since the FP isn't cheap...
    my talent and engineering knowledge is quite limited
    Then I would strongly suggest GB as the software, and then do lots of reading. The weakest link in music production is your engineering skills. Mixing and Mastering (especially the latter) are art forms. A bad engineer using a $10,000 bit of software and hardware would make a fantastic performance sound like garbage. With good engineering skills you can make a pro recording with GB.
    The learning curve with something like Logic is dramatically increased, and again, without the skills to take advantage of what it offers, your recordings are not going to sound any better. At the very least, start with GB to learn the skills of Recording/Editing/Mixing/Mastering. The "price of admission" is low enough that if in a year you find that you need a feature GB doesn't offer, your money will not have been wasted, it will have been valuable learning time.
    Hope those more specific answers help
    ~~HangTIme [Will Compute for Food] %-)>
    Note: I am an Amazon Associate, if you purchase this item via my link I will get a small commission)

  • JSP with useBean beginner problems need help

    I start to learn JSP and now I am facing a problem which cannot be solved for a whole day.
    I make a simple JSP and want to use a my defined class to make some logic outside JSP file. It can be built by "ant build".
    But there is always an error-message when I see through browser. Also, I have already "ant deploy" to copy all classes in WEB-INF/classes/...
    Besides, my tomcat can run JSP without importing external class or javaBean.
    Please help. I really have no idea. Thanks.
    The simple Converter.class in Test.Beans package
    package Test.Beans;
    import java.math.*;
    public class Converter {
         static BigDecimal yenRate = new BigDecimal("131.7800");
         static BigDecimal euroRate = new BigDecimal("0.0084");
    public BigDecimal dollarToYen(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(yenRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
    public BigDecimal yenToEuro(BigDecimal yen) {
    BigDecimal result = yen.multiply(euroRate);
    return result.setScale(2,BigDecimal.ROUND_UP);
    public Converter() {}
    The simple JSP:
    <%@ page import="java.math.*" %>
    <jsp:useBean id="c" class="Test.Beans.Converter" scope="page"/>
    <html>
    <head>
         <title>Converter</title>
    </head>
    <body bgcolor="white">
         <FONT SIZE=+1>
         <h1><center>Converter</center></h1>
         <hr>
         <p>Enter an amount to convert:</p>
         <form method="get">
         <input type="text" name="amount" size="25">
         <br>
         <p>
         <input type="submit" value="Submit">
         <input type="reset" value="Reset">
         </form>
         <%
         String amount = request.getParameter("amount");
              if ( amount != null && amount.length() > 0 ) {
              BigDecimal d = new BigDecimal (amount);
         %>
         <%= c.yenToEuro(d) %> Euro.
         <%
         %>
         </FONT>
    </body>
    </html>
    Here is the error message:
    org.apache.jasper.JasperException: /main.jsp(2,0) The value for the useBean class attribute Test.Beans.Converter is invalid.
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    org.apache.jasper.JasperException: /main.jsp(2,0) The value for the useBean class attribute Test.Beans.Converter is invalid.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:146)
         org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1174)
         org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         org.apache.jasper.compiler.Generator.generate(Generator.java:3304)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Message was edited by:
    BillyHui

    Works fine for me, copied and pasted exactly.
    Try recompiling your java class again, to make sure it is valid.
    Check that the class file is copied into the correct place by your ant build.
    Should be WEB-INF/classes/Test/Beans/Converter.class

  • Question from a beginner, really need help

    I am starting to do a little programming these days. The question is about the (program file) format to provide to the end users.
    I can use "javac" "java" to compile or run my code in a command prompt window, or use some development tool. But I do not expect the users of my program to install the jdk (or other software) in order to run the program. How to deal with this?
    What is the usual last format of a Java Program?
    Hope I have made my question clear.
    Thanks
    Xiaohua

    It depends, a good solution is to pack it into a jar file and make it executable, but if you are new to Java (I have no idea how experianced you are) it might give you more trouble than it's worth in the beginning.
    You could distribute your .class file (the .java files are only source and can not be executed) and a .bat file which would contain the command to launch the applicaiton. That's how I would do it as a newbie.
    Check out an installer program like Inno Setup ( http://www.jrsoftware.org/isinfo.php ) if you want a neat way to distribute your files. You can specify a .bat file as being the one executed when the applicaiton is started, that way your program could be run from a start menu entry (sorry, I'm assuming that you are using Windows here, to maintain cross-platform abilities this won't work)
    Does this give you an idea? There are many ways to distribute an application. You should also read up on Java Webstart...

  • Need help with inserting frame with scrolling images

    Hi,
        Im a beginner and need help putting a single box/frame with scrolling images in the middle of my layout, so that when viewed in browser, the header and footer remain in place, while the images and info in the frame in the centre of the page can be scrolled down/up?

    You can use an iframe element <iframe src="" width="" height="" scrolling="yes"> though if you're concerned with crawlers you should avoid frames as much as possible. 

  • Really need help (motor control using labview)

    hi all readers,
    im new beginner. really need help for my project. i've been assigned to monitor/control motor using labview 8.5 (using NI DAQmx). the problem is, the techinician told me that i cant use 3phase motor with this card. things that i need to displayed using labview is :
    torque
    power
    current
    voltage
    speed
    really appreciated if readers can help me with this:
    wut type of motor shud i use that compatible with NI DAQmx
    thanks a lot.

    Hi fauziana,
    NI data acquisition devices are primarily designed to take measurements, so it's a good idea to measure the signals that you have mentioned with a DAQ device.
    You also can use DAQ devices for control tasks, but for reliable and deterministic control behavioryou typically need to use a real-time operating system (not Windows!). If you want to learn more about the pros and cons of using DAQ devices for motion control tasks, please refer to these threads. Still for standard motion control tasks it's much more efficient in terms of development time, to use a dedicated motion control device for the motion control part of your application.
    In general the control part is independant from the motor type, as these devices only generate control signals (+/- 10 V). There are many power drives available, that accept this type of control signal and you should select your motor according to the requirements of your application.
    For a more detailed system consulting, please contact your local NI branch. To select the products that fit best to your application requirements a face to face discussion is much more efficient than a discussion forum thread, because there are a lot of parameters that need to be taken into consideration. If you tell me in which country you are living, I can provide appropriate contact data to you.
    Thanks and kind regards,
    Jochen Klier
    National Instruments

  • Re: Beginner needs help using a array of class objects, and quick

    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ? In html, I assume. How did you generate the html code of your three classes ? By help of your IDE ? NetBeans ? References ?
    I already posted my question with six source code classes ... in text mode --> Awful : See "Polymorphism did you say ?"
    Is there a way to discard and replace a post (with html source code) in the Sun forum ?
    Thanks for your help.
    Chavada

    chavada wrote:
    Dear Cynthiaw,
    I just read your Beginner needs help using a array of class objects, and quick of Dec 7, 2006 9:25 PM . I really like your nice example.You think she's still around almost a year later?
    I also want to put a question on the forum and display the source code of my classe in a pretty way as you did : with colors, indentation, ... But how ?Just use [code] and [/code] around it, or use the CODE button
    [code]
    public class Foo() {
      * This is the bar method
      public void bar() {
        // do stuff
    }[/code]

  • Beginner: Need Help : Label Frame

    Beginner: Need Help : Label Frame
    Hi everyone, 
    I am trying to find a way to get my menu bar working. Little info, I am a beginner in Flash just learned the essential DVD from Adobe.
    My menu bar has the following:
    (About Us) (Services) (Quality) (Projects) (Contact Us)
    Each page will have a motion shape tween and slide the page down.
    I have type in this actions :
    stop();
    import flash.events.MouseEvent;
    //---aboutus Button Timeline change---\\
    aboutus_btn.addEventListener(MouseEvent.CLICK, aboutusClick);
    function aboutusClick(event:MouseEvent):void{
    gotoAndPlay("aboutus");
    //---services Button Timeline change---\\
    services_btn.addEventListener(MouseEvent.CLICK, servicesClick);
    function servicesClick(event:MouseEvent):void{
    gotoAndPlay("services");
    //---quality Button Timeline change---\\
    quality_btn.addEventListener(MouseEvent.CLICK, qualityClick);
    function qualityClick(event:MouseEvent):void{
    gotoAndPlay("quality");
    //---projects Button Timeline change---\\
    projects_btn.addEventListener(MouseEvent.CLICK, projectsClick);
    function projectsClick(event:MouseEvent):void{
    gotoAndPlay("projects");
    //---contactus Button Timeline change---\\
    contactus_btn.addEventListener(MouseEvent.CLICK, contactusClick);
    function contactusClick(event:MouseEvent):void{
    gotoAndPlay("contactus");
    This actions only works when I click to the next labels but doesn't work when I want to click back to the previous labels. For example, if I click onto (About Us) to (Services) and (Services) to (Quality) and (Quality) to Projects and (Projects) to (Contact Us)... it all works. If I then click from (Contact Us) back to (Projects) or even any previous buttons... it does NOT work??
    Anyone? Please help!

    This is my timeline structure. The code for the action frame is in hi-lite in yellow.
    Is this clear enough?
    I also tried rewriting the action like below, but still have the same problem.
    stop();
    aboutus_btn.addEventListener(MouseEvent.CLICK, onaboutusClick, false, 0, true);
    services_btn.addEventListener(MouseEvent.CLICK, onservicesClick, false, 0, true);
    quality_btn.addEventListener(MouseEvent.CLICK, onqualityClick, false, 0, true);
    projects_btn.addEventListener(MouseEvent.CLICK, onprojectsClick, false, 0, true);
    contactus_btn.addEventListener(MouseEvent.CLICK, oncontactusClick, false, 0, true);
    function onaboutusClick(evt:MouseEvent):void {
    gotoAndPlay("aboutus");
    function onservicesClick(evt:MouseEvent):void {
    gotoAndPlay("services");
    function onqualityClick(evt:MouseEvent):void {
    gotoAndPlay("quality");
    function onprojectsClick(evt:MouseEvent):void {
    gotoAndPlay("projects");
    function oncontactusClick(evt:MouseEvent):void {
    gotoAndPlay("contactus");

  • I Need Help as I'm a beginner in Creative Cloud

    I can't download Lightroom 5 after purchasing it. I need help, anyone please?

    Vanicci please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install Photoshop Lightroom or any other Adobe Creative applications included with your membership.

  • Beginner needing help

    how do i publish and upload my Flash CS6 slideshow to my website using cpanel? I created the flash slideshow and now i'm trying to publish it so that i can upload it to my file manage in cpanel

    cpanel is normally a feature provided by your web hosting service.  If you need help with it you should contact them and ask.  Normally there will be instructions provided with cpanel so you might try looking thru them to see how to deal with uploading content to the site.
    I cannot speak for what you might have, but in my case, if you are able to log in to your cpanel, look in the Files section for the File Manager and access that.  If you poke around within that you should find the option to upload files.

  • Need help regarding Linked List

    I'm a beginner who just spent ages working on the following code.. but need help on re-implementing the following using a linked list, i.e. no array is allowed for customer records but you still can use arrays for names, address, etc.. Hopefully I've inserted enough comments..
    Help very much appreciated!! Thanks! =]
    import java.util.Scanner;
    import java.io.*;
    public class Bank
    /* Private variables declared so that the data is only accessible to its own
         class, but not to any other class, thus preventing other classes from
         referring to the data directly */
    private static Customer[] customerList = new Customer[30];               
         //Array of 30 objects created for storing information of each customer
    private static int noOfCustomers;                                                       
         //Integer used to store number of customers in customerList
         public static void main(String[] args)
              Scanner sc = new Scanner(System.in);
              menu();
         public static void menu()
              char choice;
              String filename;
              int custId,counter=0;
              double interestRate;
    Scanner sc = new Scanner(System.in);
              do
              //Displaying of Program Menu for user to choose
         System.out.println("ABC Bank Customer Management System Menu");     
         System.out.println("========================================");
         System.out.println("(1) Input Data from File");
         System.out.println("(2) Display Data");
         System.out.println("(3) Output Data to File");
                   System.out.println("(4) Delete Record");
                   System.out.println("(5) Update Record");
         System.out.println("(Q) Quit");
                   System.out.println();
                   System.out.print("Enter your choice: ");
                   String input = sc.next();
                   System.out.println();
                   choice = input.charAt(0);     
              //switch statement used to assign each 'selection' to its 'operation'               
         switch(choice)
         case '1': int noOfRecords;
                                       System.out.print("Enter file name: ");
              sc.nextLine();                                             
              filename = sc.nextLine();
                                       System.out.println();
              noOfRecords = readFile(filename);
    System.out.println(+noOfRecords+" records read.");
              break;
         case '2': displayRecords();
              break;
         case '3': writeFile();
         break;
                        case '4': System.out.print("Enter account ID to be deleted: ");
                                       sc.nextLine();
                                       custId = sc.nextInt();
                                       deleteRecord(custId);
                                       break;
                        case '5': if(counter==0)
              System.out.print("Enter current interest rate for saving account: ");
                                            sc.nextLine();
                                            interestRate = sc.nextDouble();
                                            update(interestRate);
                                            counter++;
                                       else
              System.out.println("Error: Accounts have been updated for the month.");
                                            break;
                   }System.out.println();
         }while(choice!='Q' && choice!='q');
    /* The method readFile() loads the customer list of a Bank from a specified
         text file fileName into customerList to be stored as array of Customer
         objects in customerList in ascending alphabetical order according to the
         customer names */
    public static int readFile(String fileName)
         int custId,i=0;
              String custName,custAddress,custBirthdate,custPhone,custAccType;
              double custBalance,curRate;
              boolean d;
    /* Try block to enclose statements that might throw an exception, followed by
         the catch block to handle the exception */
    try
                   Scanner sc = new Scanner(new File(fileName));
    while(sc.hasNext())          
    /* sc.next() gets rid of "Account", "Id" and "=" */
    sc.next();sc.next();sc.next();
    custId = sc.nextInt();
                        d=checkDuplicate(custId);               
    /* checkDuplicate() is a method created to locate duplicating ids in array */
    if(d==true)
    /* A return value of true indicates duplicating record and the sc.nextLine()
         will get rid of all the following lines to read the next customer's record */
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             sc.nextLine();sc.nextLine();sc.nextLine();
                             continue;     
    /* A return value of false indicates no duplicating record and the following
         lines containing the information of that customer's record is being read
         in */
                        if(d==false)
    /* sc.next() gets rid of "Name" and "=" and name is changed to upper case*/
         sc.next();sc.next();
         custName = sc.nextLine().toUpperCase();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of name is more than 20 characters*/
         if(custName.length()>21)
    System.out.println("Name of custId "+custId+" is more than 20 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Address" and "=" */           
         sc.next();sc.next();
         custAddress = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of address is more than 80 characters*/                         
                             if(custAddress.length()>81)
    System.out.println("Address of custId "+custId+" is more than 80 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "DOB" and "=" */                              
         sc.next();sc.next();
         custBirthdate = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of date of birth is more than 10 characters*/                         
                             if(custBirthdate.length()>11)
    System.out.println("D.O.B of custId "+custId+" is more than 10 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Phone", "Number" and "=" */                              
         sc.next();sc.next();sc.next();
         custPhone = sc.nextLine();
    /* sc.nextLine get rids of the following lines to read the next customer's
         record if length of phone number is more than 8 characters*/                         
                             if(custPhone.length()>9)
    System.out.println("Phone no. of custId "+custId+" is more than 8 characters");
                                  System.out.println();
         sc.nextLine();sc.nextLine();sc.nextLine();sc.nextLine();
         continue;
    /* sc.next() gets rid of "Account", "Balance" and "=" */                              
         sc.next();sc.next();sc.next();
         custBalance = sc.nextDouble();
    /* sc.next() gets rid of "Account", "Type" and "=" */                              
                             sc.next();sc.next();sc.next();
                             custAccType = sc.next();
                             if(custAccType.equals("Saving"))
    customerList[noOfCustomers] = new Account1(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
    sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Checking"))
    customerList[noOfCustomers] = new Account2(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType);
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
    else if(custAccType.equals("Fixed"))
    sc.next();sc.next();sc.next();sc.next();
                                                 curRate = sc.nextDouble();
                                                 Account3 temp = new Account3(custId,custName,custAddress,custBirthdate,custPhone,custBalance,custAccType,curRate);
                                                 customerList[noOfCustomers]=temp;
                                                 sc.nextLine();
                                                 noOfCustomers++;
                                                 i++;
                             else
                                  System.out.println("Account type not defined.");
         if(noOfCustomers==30)
         System.out.println("The customer list has reached its maximum limit of 30 records!");
         System.out.println();
         return noOfCustomers;
    //Exceptions to be caught
    catch (FileNotFoundException e)
    System.out.println("Error opening file");
    System.exit(0);
    catch (IOException e)
    System.out.println("IO error!");
    System.exit(0);
    /* Bubblesort method used to sort the array in ascending alphabetical order
         according to customer's name */
    bubbleSort(customerList);
              return i;
    /* The method displayRecords() displays the data of the customer records on
         screen */
    public static void displayRecords()
    int k;
    /* Displaying text using the printf() method */
         for(k=0;k<noOfCustomers;k++)
         System.out.printf("Name = %s\n", customerList[k].getName());
         System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
         System.out.printf("Account Id = %d\n", customerList[k].getId());
    System.out.printf("Address = %s\n", customerList[k].getAddress());
    System.out.printf("DOB = %s\n", customerList[k].getBirthdate());
    System.out.printf("Phone Number = %s\n", customerList[k].getPhone());
         String type = customerList[k].getAccType();
         System.out.println("Account Type = " +type);
    if(type.equals("Fixed"))
         System.out.println("Fixed daily interest = "+((Account3)customerList[k]).getFixed());
         System.out.println();               
    /* The method writeFile() saves the content from customerList into a
         specified text file. Data is printed on the screen at the same time */
    public static void writeFile()
    /* Try block to enclose statements that might throw an exception, followed by
    the catch block to handle the exception */
    try
    int i;
              int n=0;
    //PrintWriter class used to write contents of studentList to specified file
              FileWriter fwStream = new FileWriter("newCustomers.txt");
              BufferedWriter bwStream = new BufferedWriter(fwStream);
              PrintWriter pwStream = new PrintWriter(bwStream);     
    for(i=0;i<noOfCustomers;i++)
         pwStream.println("Account Id = "+customerList.getId());
              pwStream.println("Name = "+customerList[i].getName());
    pwStream.println("Address = "+customerList[i].getAddress());
    pwStream.println("DOB = "+customerList[i].getBirthdate());
    pwStream.println("Phone Number = "+customerList[i].getPhone());
              pwStream.printf("Account Balance = %.2f\n", customerList[i].getBalance());
              pwStream.println("Account Type = "+customerList[i].getAccType());
                   if(customerList[i].getAccType().equals("Fixed"))
                        pwStream.println("Fixed Daily Interest = "+((Account3)customerList[i]).getFixed());
              pwStream.println();
              n++;
    //Closure of stream
    pwStream.close();
              System.out.println(+n+" records written.");
    catch(IOException e)
    System.out.println("IO error!");     
    System.exit(0);
         //Deletes specified record from list
    public static void deleteRecord(int id)
    int i;
              i=locate(id);
    if(i==200)
    //checking if account to be deleted does not exist
    System.out.println("Error: no account with the id of "+id+" found!");
              //if account exists
    else
                        while(i<noOfCustomers)
                             customerList[i] = customerList[i+1];
                             i++;
                        System.out.println("Account Id: "+id+" has been deleted");
                        --noOfCustomers;
         //Updates the accounts
    public static void update(double interest)
    int i,j,k;
              double custBalance,addition=0;
    for(i=0;i<noOfCustomers;i++)
                        if(customerList[i] instanceof Account1)
                             for(j=0;j<30;j++)
                                  addition=customerList[i].getBalance()*interest;
                                  custBalance=customerList[i].getBalance()+addition;
                                  customerList[i].setBalance(custBalance);
                        else if(customerList[i] instanceof Account2)
                             continue;
                        else if(customerList[i] instanceof Account3)
                             for(j=0;j<30;j++)
    addition=customerList[i].getBalance()*((Account3)customerList[i]).getFixed();
    custBalance=customerList[i].getBalance()+addition;
    customerList[i].setBalance(custBalance);
                        else
                             System.out.println("Account type not defined");
              System.out.println("The updated balances are: \n");
              for(k=0;k<noOfCustomers;k++)
    System.out.printf("Name = %s\n", customerList[k].getName());
    System.out.printf("Account Balance = %.2f\n", customerList[k].getBalance());
    System.out.println();
    /* ================== Additional methods ==================== */     
    /* Bubblesort method to sort the customerList in ascending alphabetical
         order according to customer's name */
    public static void bubbleSort(Customer[] x)
    int pass, index;
    Customer tempValue;      
    for(pass=0; pass<noOfCustomers-1; pass++)          
    for(index=0; index<noOfCustomers-1; index++)
    if(customerList[index].getName().compareToIgnoreCase(customerList[index+1].getName()) > 0)
    tempValue = x[index];
    x[index] = x[index+1];
    x[index+1]= tempValue;
    /* Method used to check for duplicated ids in array */     
         public static boolean checkDuplicate(int id)
              int i;
              for(i=0;i<noOfCustomers;i++)
                   if(id == customerList[i].getId())
    System.out.println("Account Id = "+id+" already exists");
                        System.out.println();
    return true;
              }return false;
    /* Method to seach for account id in array */
         public static int locate(int id)
              int j;
              for(j=0;j<noOfCustomers;j++)
                   if(customerList[j].getId()==id)
                        return j;
              j=200;
              return j;
    import java.util.Scanner;
    public class Customer
    /* The following private variables are declared so that the data is only
         accessible to its own class,but not to any other class, thus preventing
         other classes from referring to the data directly */
         protected int id;               
         protected String name,address,birthdate,phone,accType;                              
         protected double balance;               
    // Null constructor of Customer
         public Customer()
              id = 0;
              name = null;
              address = null;
              birthdate = null;
              phone = null;
              balance = 0;
              accType = null;
    /* The following statements with the keyword this activates the Customer
         (int id, String name String address, String birthdate, String phone, double
         balance) constructor that has six parameters of account id, name, address,
         date of birth, phone number, account balance and assign the values of the
         parameters to the instance variables of the object */     
         public Customer(int id, String name, String address, String birthdate, String phone, double balance, String accType)
    //this is the object reference that stores the receiver object     
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    /* The following get methods getId(), getName(), getAddress(), getBirthdate(),
         getPhone(), getBalance() return the values of the corresponding instance
         properties */     
         public int getId()
              return id;
         public String getName()
              return name;
         public String getAddress()
              return address;
         public String getBirthdate()
              return birthdate;
         public String getPhone()
              return phone;
         public double getBalance()
              return balance;
         public String getAccType()
              return accType;
    /* The following set methods setId(), setName(), setAddress(), setBirthdate(),
         setPhone and setBalance() set the values of the corresponding instance
         properties */
         public void setId (int custId)
              id = custId;
         public void setName(String custName)
              name = custName;
         public void setAddress (String custAddress)
              address = custAddress;
         public void setBirthdate (String custBirthdate)
              birthdate = custBirthdate;
         public void setPhone (String custPhone)
              phone = custPhone;
         public void setBalance (double custBalance)
              balance = custBalance;
         public void setAccType (String custAccType)
              accType = custAccType;
    class Account1 extends Customer
         public Account1(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account2 extends Customer
         public Account2(int id, String name, String address, String birthdate, String phone, double balance, String accType)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
    class Account3 extends Customer
         protected double fixed=0;
         public Account3(int id, String name, String address, String birthdate, String phone, double balance, String accType, double fixed)
              super(id,name,address,birthdate,phone,balance,accType);
              this.id = id;
              this.name = name;                         
              this.address = address;
              this.birthdate = birthdate;
              this.phone = phone;
              this.balance = balance;
              this.accType = accType;
              this.fixed = fixed;
         public double getFixed()
              return fixed;
    Example of a customers.txt
    Account Id = 123
    Name = Matt Damon
    Address = 465 Ripley Boulevard, Oscar Mansion, Singapore 7666322
    DOB = 10-10-1970
    Phone Number = 790-3233
    Account Balance = 405600.00
    Account Type = Fixed
    Fixed Daily Interest = 0.05
    Account Id = 126
    Name = Ben Affleck
    Address = 200 Hunting Street, Singapore 784563
    DOB = 25-10-1968
    Phone Number = 432-4579
    Account Balance = 530045.00
    Account Type = Saving
    Account Id = 65
    Name = Salma Hayek
    Address = 45 Mexican Boulevard, Hotel California, Singapore 467822
    DOB = 06-04-73
    Phone Number = 790-0000
    Account Balance = 2345.00
    Account Type = Checking
    Account Id = 78
    Name = Phua Chu Kang
    Address = 50 PCK Avenue, Singapore 639798
    DOB = 11-08-64
    Phone Number = 345-6780
    Account Balance = 0.00
    Account Type = Checking
    Account Id = 234
    Name = Zoe Tay
    Address = 100 Blue Eyed St, Singapore 456872
    DOB = 15-02-68
    Phone Number = 456-1234
    Account Balance = 600.00
    Account Type = Saving

    1) When you post code, please use[code] and [/code] tags as described in Formatting tips on the message entry page. It makes it much easier to read.
    2) Don't just post a huge pile of code and ask, "How do I make this work?" Ask a specific question, and post just enough code to demonstrate the problem you're having.
    3) Don't just write a huge pile of code and then test it. Write a tiny piece, test it. Then write the piece that will work with or use the first piece. Test that by itself--without the first piece. Then put the two together and test that. Only move on to the next step after the current step produces the correct results. Continue this process until you have a complete, working program.

  • Need help in loading master data.

    Hi everyone,
              I am just a beginner in BI 7.0 . I know Bw 3.5 . I need help in loading master data(flat file) in a step by step manner.
    Before posting this forum i searched and checked out other related forums too, as i am a beginner i am unable to follow them. Lots of the forums gave the help.sap.com link which i used and got a little help but not fully, so please don't send that link.  I need a step by step guideline from somebody, which says everything from the beginning till monitoring say like
    e.g.. 1) create a InfoObject by right clicking on InfoObject catalog.
    something like that.
    please help me get a clear and detail step by step procedure to load a master data (Flat File should be good) which may help me get a start will other things without much help.
    Please help me learn.
    Thanks.
    Ranjani.

    HI,
         Thanks for your reply. This is what i did.
    1) Created a Info Area.
    2) Created Info object catalog & activated
    3) created info object with nothing except some 4 attributes.
    4) Created Application compound in Infosource tab.
    5) Right clicked on Application compound and chose create Infosource in which chose a option with 3.x and chose the flexible update and gave the info object name.
    6) In info provider tab , in the Info Area right clicked and chose the Insert char as data target option.
    Now, i am stuck. I have no idea what to do next.
    I know i have to create a transformation - There are two tabs in Transformation box, what should i do there.
    Please help me from point 6 to cont., to load the data.
    Thanks.

  • Header with 3 backgroud images, need help

    Hi! I'm learning Dreamweaver CC atm, and i am confused in building my header, i need help, if you got time for a beginner.
    First, i made a Wrapper Div, added an header div inside that include 3 more div. Each of those 3 div inside my header have a backgroud image: left side, middle side and right side. They are both relative, left and right have a fixed size. The right one float right of the screen. I have trouble with the middle div: it's a 1px width backgroup that reapeat on x. I cant find the way to make it reapeat up to the right div. How can i do it?
    I want my page width to adjust to the user screen.
    (sorry for my bad english, second language )
    Thx for your time and help!

    Copy & paste this code into a new, blank document.  SaveAs test.html and preview in browsers.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5, Responsive Header</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
    <style>
        /**put this into your CSS Reset**/
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
    #wrapper {width: 98%; margin:0 auto}
    header {
        width: 100%;
        margin: 0 auto;
        min-height: 50px;
        color: #FFF;
        text-align: center;
    #col-1 {
        width: 10%;
        float: left;
        background: #333;
        min-height: 50px;
    #col-2 {
        float: left;
        width: 80%;
        background: #A200A2;
        min-height: 50px;
    #col-3 {
        width: 10%;
        float: left;
        background: #333;
        min-height: 50px;
    .gradient {
    background: #000333;
    background: -moz-linear-gradient(left,  #000333 0%, #a200a2 16%, #a200a2 84%, #000333 100%);
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#000333), color-stop(16%,#a200a2), color-stop(84%,#a200a2), color-stop(100%,#000333));
    background: -webkit-linear-gradient(left,  #000333 0%,#a200a2 16%,#a200a2 84%,#000333 100%);
    background: -o-linear-gradient(left,  #000333 0%,#a200a2 16%,#a200a2 84%,#000333 100%);
    background: -ms-linear-gradient(left,  #000333 0%,#a200a2 16%,#a200a2 84%,#000333 100%);
    background: linear-gradient(to right,  #000333 0%,#a200a2 16%,#a200a2 84%,#000333 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000333', endColorstr='#000333',GradientType=1 );
    </style>
    </head>
    <body>
    <div id="wrapper">
    <h3>WITH FLOATED DIVS</h3>
    <header>
    <div id="col-1">10%</div>
    <div id="col-2">80%</div>
    <div id="col-3">10%</div>
    </header>
    <h3>WITH CSS BACKGROUND GRADIENT</h3>
    <header class="gradient">
    <h3>Heading 3</h3>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.  Mauris vitae libero lacus, vel hendrerit nisi!  Maecenas quis velit nisl, volutpat viverra felis.  Vestibulum luctus mauris sed sem dapibus luctus.</p>
    </header>
    </div>
    </body>
    </html>
    Nancy O.

  • I just got logic and need help i dont know how to make a track at all

    i just got logic and need help i dont know how to make a track at all

    Pancenter wrote:
    There was a time not too long ago when people respected the incredible amount of talent that contributed to this software...Everyone -wanted- to learn about the craft and "art" that goes into being a good engineer, musician, producer...etc.      
    Beginner's did enough reading and experimentation to at the very least, ask an intelligent question.
    pancenter-
    Hey Pancenter there are still lots of us about.
    I wouldn't take the original post too seriously - I may of course be naive but it sounds like it could be a troll to me!
    I learn a lot from reading the posts of the likes of you, Erik, Bee Jay, sampleconstruct, noeqplease etc so I hope you guys don't become too dispondent when you see posts like these.
    By the same token, I hope the Logic team continue to use their talents to develop powerful software that caters for the professional user, while allowing Garageband to continue to do its (excellent) job of providing for its market.

Maybe you are looking for