I need help hopefully one last time, today...:o)

ok I need my check boxes to paint or unpaint my lights, bulbs, star, when the boxes are check. I also need my buyIt button to display a $ amount in Input based on which buttons are checked. Any help is VERY VERY appreciated:o). Thanks

//619-933-5768
import javax.swing.*; // Packages used
import java.awt.*;
import java.awt.event.*;
import java.text.*;
import java.applet.*;
public class DrawingOnPanel extends JFrame
     public DrawingOnPanel(){
          //super(title);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          TreeStore1 ts = new TreeStore1();//inner class object
          getContentPane().add(ts);
          setSize(700,600);
          setVisible(true);
public class TreeStore1 extends JPanel implements ActionListener
     private JLabel prompt1 = new JLabel("Merry Christmas!");
private JLabel prompt2 = new JLabel("What would you like on you tree? ");
private JLabel prompt3 = new JLabel("Your total is: ");
private JButton buyIt = new JButton("Buy It!");
private JPanel myPanel = new JPanel();
int a1,a2,a3,a4,a5, b1, b2,ct;
     private double treePrices=19.95;
     private double lights=20;
     private double bulbs=15;
     private double star=9.99;
     private double total;
     int x,radius,corner,xCorner;
     private JTextField input = new JTextField(13);
     DecimalFormat format=new DecimalFormat("$#,###.00");
     Color greenx = new Color(0,17,0);
Color greeny = new Color(0,34,0);
     //day tree start
Color green1 = new Color(0,51,0);
Color green2 = new Color(0,68,0);
Color green3 = new Color(0,85,0);
Color green4 = new Color(0,102,0);
Color green5 = new Color(0,119,0);
//night tree end
Color green6 = new Color(0,136,0);
Color green7 = new Color(0,153,0);
Color green8 = new Color(0,170,0);
Color green9 = new Color(0,187,0);
Color green10 = new Color(0,204,0);
     Color green11 = new Color(0,221,0);
Color green12 = new Color(0,238,0);
Color green13 = new Color(0,255,0);
//day tree end
Color brown = new Color(102,51,0);
     int xStar[]={392,402,422,402,410,390,365,378,359,382,392};
int yStar[]={118,142,148,160,185,165,182,155,138,140,118};
Polygon starPoly = new Polygon(xStar,yStar,xStar.length);
     JCheckBox treeBox = new JCheckBox("Christmas Tree", true);
     JCheckBox lightsBox = new JCheckBox("Lights", false);
     JCheckBox bulbsBox = new JCheckBox("Bulbs", false);
     JCheckBox starBox = new JCheckBox("Star", false);
     Font bigFont = new Font("ComicSans",Font.BOLD,14);
     Font biggerFont = new Font("ComicSans",Font.BOLD,22);
public TreeStore1 () {
add(prompt1);
add(prompt2);
add(prompt3);
add(treeBox);
add(lightsBox);
add(bulbsBox);
add(starBox);
add(input);
add(buyIt);
lightsBox.setBorderPainted(true);
          lightsBox.setBorderPaintedFlat(true);
          lightsBox.setForeground(new Color(41, 101, 35));
          lightsBox.addItemListener(new ItemListener() {
               public void itemStateChanged(ItemEvent e)
                    lightsBox_itemStateChanged(e);
          treeBox.setBorderPainted(true);
          treeBox.setBorderPaintedFlat(true);
          treeBox.setForeground(new Color(41, 101, 35));
          treeBox.addItemListener(new ItemListener() {
               public void itemStateChanged(ItemEvent e)
                    treeBox_itemStateChanged(e);
          bulbsBox.setBorderPainted(true);
          bulbsBox.setBorderPaintedFlat(true);
          bulbsBox.setForeground(new Color(41, 101, 35));
          bulbsBox.addItemListener(new ItemListener() {
               public void itemStateChanged(ItemEvent e)
                    bulbsBox_itemStateChanged(e);
          starBox.setBorderPainted(true);
          starBox.setBorderPaintedFlat(true);
          starBox.setForeground(new Color(41, 101, 35));
          starBox.addItemListener(new ItemListener() {
               public void itemStateChanged(ItemEvent e)
                    starBox_itemStateChanged(e);
treeBox.setFont(bigFont);
lightsBox.setFont(bigFont);
     bulbsBox.setFont(bigFont);
starBox.setFont(bigFont);
prompt1.setFont(biggerFont);
     input.setEditable( false );
buyIt.addActionListener(this);
     private void initializeComponent()
     private void lightsBox_itemStateChanged(ItemEvent e)
          System.out.println("\nlightsBox_itemStateChanged(ItemEvent e) called.");
          System.out.println(">>" + ((e.getStateChange() == ItemEvent.SELECTED) ? "selected":"unselected"));
          private void treeBox_itemStateChanged(ItemEvent e)
          System.out.println("\ntreeBox_itemStateChanged(ItemEvent e) called.");
          System.out.println(">>" + ((e.getStateChange() == ItemEvent.SELECTED) ? "selected":"unselected"));
     private void bulbsBox_itemStateChanged(ItemEvent e)
          System.out.println("\nbulbsBox_itemStateChanged(ItemEvent e) called.");
          System.out.println(">>" + ((e.getStateChange() == ItemEvent.SELECTED) ? "selected":"unselected"));
     private void starBox_itemStateChanged(ItemEvent e)
          System.out.println("\nstarBox_itemStateChanged(ItemEvent e) called.");
          System.out.println(">>" + ((e.getStateChange() == ItemEvent.SELECTED) ? "selected":"unselected"));
          // TODO: Add any handling code here
     public void paintComponent(Graphics tree){
     super.paintComponent(tree);//     
          prompt1.setLocation(250,5);
          prompt2.setLocation(5,55);
          treeBox.setLocation(5,105);
          lightsBox.setLocation(5,155);
     bulbsBox.setLocation(5,205);
     starBox.setLocation(5,255);
     buyIt.setLocation(320,500);
     prompt3.setLocation(200,455);
          input.setLocation(300,455);
          tree.setColor(brown);
tree.fillRect(375,350,30,40);
          for(int t=230;t<550;t+=1)
     if(t<254)
          tree.setColor(green1);
     else if(t<278)
          tree.setColor(green2);
     else if(t<302)
          tree.setColor(green3);
     else if(t<326)
          tree.setColor(green4);
     else if(t<350)
          tree.setColor(green5);
else if(t<374)
          tree.setColor(green6);
     else if(t<398)
          tree.setColor(green7);
     else if(t<422)
          tree.setColor(green8);
     else if(t<447)
          tree.setColor(green9);
else if(t<472)
          tree.setColor(green10);
     else if(t<498)
          tree.setColor(green11);
     else if(t<522)
          tree.setColor(green12);
else
               tree.setColor(green13);
          tree.drawLine(390,200,t,350);
//second tree
for(int t=250;t<525;t+=1)
     if(t<270)
          tree.setColor(green1);
     else if(t<292)
          tree.setColor(green2);
     else if(t<314)
          tree.setColor(green3);
     else if(t<336)
          tree.setColor(green4);
     else if(t<358)
          tree.setColor(green5);
else if(t<380)
          tree.setColor(green6);
     else if(t<400)
          tree.setColor(green7);
     else if(t<420)
          tree.setColor(green8);
     else if(t<440)
          tree.setColor(green9);
else if(t<460)
          tree.setColor(green10);
     else if(t<480)
          tree.setColor(green11);
     else if(t<500)
          tree.setColor(green12);
else
               tree.setColor(green13);
          tree.drawLine(390,160,t,310);
//third tree
for(int t=265;t<515;t+=1)
     if(t<285)
          tree.setColor(green1);
     else if(t<305)
          tree.setColor(green2);
     else if(t<325)
          tree.setColor(green3);
     else if(t<345)
          tree.setColor(green4);
     else if(t<365)
          tree.setColor(green5);
else if(t<385)
          tree.setColor(green6);
     else if(t<405)
          tree.setColor(green7);
     else if(t<425)
          tree.setColor(green8);
     else if(t<445)
          tree.setColor(green9);
else if(t<465)
          tree.setColor(green10);
     else if(t<485)
          tree.setColor(green11);
     else if(t<505)
          tree.setColor(green12);
else
               tree.setColor(green13);
          tree.drawLine(390,160,t,280);
     //if(/*need code here lights checked*/)
               for(a1=340, a2=350, b1= 235, b2=245, ct=0;ct<5; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.red);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.green);
                                   tree.fillOval(a2,b2,6,6);
                                   //tree lights
                                   for(a1=365, a2=355, b1= 195, b2=205, ct=0;ct<3; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.red);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.green);
                                   tree.fillOval(a2,b2,6,6);
                                   for(a1=385, a2=375, b1= 215, b2=225, ct=0;ct<3; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.red);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.green);
                                   tree.fillOval(a2,b2,6,6);
                                   for(a1=315, a2=295, b1= 260, b2=270, ct=0;ct<7; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.green);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.red);
                                   tree.fillOval(a2,b2,6,6);
                                   for(a1=280, a2=270, b1= 285, b2=295, ct=0;ct<5; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.red);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.green);
                                   tree.fillOval(a2,b2,6,6);
                                   for(a1=270, a2=280, b1= 320, b2=330, ct=0;ct<2; a1+=35, a2+=35,b1+= 10, b2+=10,ct++)
                         tree.setColor(Color.green);
                                   tree.fillOval(a1,b1,6,6);
                         tree.setColor(Color.red);
                                   tree.fillOval(a2,b2,6,6);
                                   //if(starBox==checked)
                                        tree.setColor(Color.yellow);
               tree.fillPolygon(starPoly);
               tree.setColor(Color.black);
               tree.drawPolygon(starPoly);     
                                   //if(bulbBox==checked)
                                        //bulbs
          for(x = 105,corner = 200,xCorner=350 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,0,0);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 230,xCorner=380 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(0,0,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
          for(x = 105,corner = 310,xCorner=350 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,0,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 300,xCorner=410 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(0,x,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
          for(x = 105,corner = 260,xCorner=310 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,x,0);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 310,xCorner=450 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,x,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              //bulbs
          for(x = 105,corner = 320,xCorner=500 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,0,0);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 300,xCorner=300 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(0,0,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
          for(x = 105,corner = 310,xCorner=350 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,0,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 300,xCorner=410 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(0,x,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                    for(x = 105,corner = 260,xCorner=310 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,x,0);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
                              for(x = 105,corner = 310,xCorner=450 ,radius = 30; radius > 0; radius-=2,corner +=1,xCorner+=1,x+=5)
                         Color bulb = new Color(x,x,x);
                         tree.setColor(bulb);
                         tree.fillOval(xCorner,corner,radius,radius);
public void actionPerformed(ActionEvent e) {
// if (e.getSource() == buyIt) {
public static void main(String args[]) {
new DrawingOnPanel();
} // main()
}

Similar Messages

  • TS4268 I need help getting my face time and imessage to work.

    I need help getting my face time and imessage to work. It is saying wating for activation. I just got my iphone 5 2 days ago. I have reset it from the phone and from itunes on the computer, made sure I'm attached to wifi.

    The 3 basic troubleshooting steps are these in order: 1. Restart your iphone  2.  Reset your settings/iphone  3.  Restore your iphone.  Since your iphone is only a couple of days old, you should backup your device before restoring.  If you don't have anything on your iphone that you care to lose, then simply restoring without a backup is fine.  A quick reset of pressing the sleep/wake button (top of iphone) and your home button simultaneously and holding it until the silver Apple logo appears. 

  • I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.

    I need help regarding measurement of "time domain parameters of Heart rate variability" using labview.
    I am using Labview 8 ... I  need to develop a software to accquire the ECG data (simulated enironment ) and compute the time domain parameters of Heart rate variability like "SDNN, SDANN...etc". Can some 1 plllzzzz help me out.Plzz help me if u can.Thanx in advance.

    Hi Andy,
      Thanx for responding.  The input is from a text file. SDNN, SDANN,etc are  the timedomain parameters of heart rate variability.
     SDNN: the standard deviation of the NN or RR interval  i.e. the square root of variance.
    SDANN:the standard deviation of the averageNN interval calculated over short periods, usually 5 min,which is an estimate of the changes in heart rate due tocycles longer than 5 min
    SDNN index, the meanof the 5-min standard deviation of the NN intervalcalculated over 24 h,
     RMSSD: the square root ofthe mean squared differences of successive NN intervals
    NN50: the number of interval differences of successiveNN intervals greater than 50 ms, and
    pNN50 the proportionderived by dividing NN50 by the total numberof NN intervals.
    The problem is dat I am a fresher to the world of Labview. I have jus recently started working on it. Can u please suggest me some some idea as soon as possible.
      As i said  I have the ECG data in the form of text files..I need to create sort of GUI to calculate the time domain parmeters....I need help urgently. Plzzz help me if u can. If u have and .vi example to calculate the RR interval plzz send it to me ASAP.
    Thanku

  • Need Help please with Face Time

    I bout an iPhone 4 with 4.2.1 from Dubai anyhow the face time does not show
    & i traveled to France & i change my SIM Card to France Card & i updated my iPhone firmware again but still Face time does not show even when i go to setting - phone (no face time selection there)
    So please help I need to have my face time back
    With My Best Regard

    i am in bahrain i was given the same answer by the team but when i chang my sim to Zain sevice provider an update downloded for my carrier now it shows 10.1 automaticly from itune when i synk and i could see facetime in my phone but from my batelco sim it was not showing... i think it is somthing to do with Carrier update fro apple it self...

  • Need help Recording SQL Execution Times in Database

    Hello,
    I have an interesting thing I am tiring to do. I want to record how much time (Wall Clock) it took the database to execute any select statement against o one particular view lets call it CUST_ORDERS_V.
    I would like to record who ran it, what the select statement was (SQL Text) and how much time it took and maybe a few other ancillary things if possible.
    Looking at most of my requirements took me right to Oracle Auditing and the SYS.AUD$ table. After setting up auditing with:
    audit_trail=db,extended
    and
    audit select on ME.CUST_ORDERS_V by access;I get every piece of information I need except for the execution time! Wow that would be great if Oracle recorded that!!! So I was thinking if I could. I was considering a trigger on SYS.AUD$ (I know evil thoughts) that would look into some V$ view and get the execution time and write it into some custom table with a link back to SYS.AUD$.
    This might be the complete wrong way to do it. I was wondering if anyone had any ideas on this.
    I am running on 11.2.0.3 EE. I am on EE so I can use Fine Grained Auditing if it is needed. However I DO NOT have the Tuning or Diagnostic Pack.

    >
    Hi again,
    Yes, a complete set of times from end to end would be great. However
    for now I need to stick with what is in my domain of control, the database.
    Maybe after the DB I will look to get the others.But your point about the operators blaming the db brings up the probability
    that after you tell them that the db is not the issue, they'll start to blame
    the app server, the cabling, their OS, the browser, the tea-lady...
    If you have click===> page, they have no more places to hide and have to
    actually work for a living ;)
    I do not think I can access v$active_session_history as I do not have the Tuning Pack.Well, presumably there is a business case for this project. Why not tell management
    that it's required?
    Otherwise, you could go to ashmasters.com - a site run by Kyle Hailey (Oak Table
    member and author). He has an Open Source ASH "substitute" which you might
    like to try - haven't used it myself, but if Kyle Hailey's behind it, then it's at
    least worthy of investigation.
    HTH,
    Paul...

  • I need help with setting up time machine for backup

    I would like help with setting up time machine for backup.

    You will need an external hard drive (formatted for a Mac).
    Then you plug it in and go to system preferences>time machine and select the external HD and turn it on.
    The backups are automatic.
    Barry

  • I need help made a huge mistake today.

    so I decided to tackle my med collections since they are willing to pfd. 4400 bucks worth. This would rid me of 6 of my 9 baddies. Put on credit card and realized after the fact....oh crap this credit card has an interest rate like 20 percent. So I'm curious what my best choice would be? Balance transfer? If so what is the best card for balance transfer? currently have discover it 7500 cl 4400 bal (the one I used today)chase slate 5200 cl 0 balcap1qs10000 cl 2400 bal  any suggestions are appreciated TIA 

    saberkitty wrote:
    so I decided to tackle my med collections since they are willing to pfd. 4400 bucks worth. This would rid me of 6 of my 9 baddies. Put on credit card and realized after the fact....oh crap this credit card has an interest rate like 20 percent. So I'm curious what my best choice would be? Balance transfer? If so what is the best card for balance transfer? currently have discover it 7500 cl 4400 bal (the one I used today)chase slate 5200 cl 0 balcap1qs10000 cl 2400 bal  any suggestions are appreciated TIA Yes BT it. I did that on my high amex balance today. Discover gave me a new `12 month 0 percent on BT., even though im on a promo. 14 months no 0. for purchases and BT. so after that run out. i will still have 8 months of 0. so i really have a year to pay off all my balances. about 3300 in total. 250 a month should about cover it. i just took card out of wallet. no more use for this puppy until 12 months.

  • I have successfully downloaded Photoshop Elements but did not get an e-mail and do not have a registration # and need help getting one/

    I have successfully downloaded Photoshop Elements 13.  I did not receive an e-mail with the registration number but did get verification of email address.  I have been through all the help sights and only reach dead ends.  Help!

    Photoshop Elements is not part of the Cloud, I will move this to that forum
    Photoshop Elements Forum http://forums.adobe.com/community/photoshop_elements
    Select a topic, then click I STILL NEED HELP to activate Photoshop Elements Online chat
    -http://helpx.adobe.com/contact.html?product=photoshop-elements or
    http://helpx.adobe.com/photoshop-elements/kb/troubleshoot-installation-photoshop-elements- premiere.html

  • Need help with date and time calculations please

    Hello there.. Im stuck, and im hoping someone can help..
    Working on a list to manage and track PTO.  User completes PTO request form,
    Fields
    Name
    Start Date (with time)
    End Date (with time)
    Total Number of Days/hours requested: (calculation)
    Full Day: (Yes/No)
    ok business need
    user has the ability to request a certain number of hours as opposed to a full day.
    After searching around on google. I found this calculation to help me figure out how many BUSINESS days being requested.
    =IF(ISERROR(DATEDIF([Start Date],[End Date],"d")),"",(DATEDIF([Start Date],[End Date],"d"))+1-INT(DATEDIF([Start Date],[End Date],"d")/7)*2-IF((WEEKDAY([End Date])-WEEKDAY([Start Date]))<0,2,0)-IF(OR(AND(WEEKDAY([End
    Date])=7,WEEKDAY([Start Date])=7),AND(WEEKDAY([End Date])=1,WEEKDAY([Start Date])=1)),1,0)-IF(AND(WEEKDAY([Start Date])=1,(WEEKDAY([End Date])-WEEKDAY([Start Date]))>0),1,0)-IF(AND(NOT(WEEKDAY([Start Date])=7),WEEKDAY([End Date])=7),1,0))
    This works great as long as its a [Full Day]="YES", displays results in column labeled Number of days
    now if [Full Day]="No", displays results in column labeled Number of Hours
    BUT this is my issue (well part of it) it calcuate the correct number of hours.. but puts a "1" in "Number of Days" why.. dates have not changed.. I think Its something with the above calculation but I could be way off.
    the end result is I need number of days to concat with number of hours 
    i.e 1 full day 4 hours  1.4
        0 full day 5 hours  0.5
        1 full day 0 hours  1.0
    so that the total can be deducted via workflow.. from the remaining balance in a tracker. (seperate list) 
    Any angels out there??

    Posnera-
    Try changing time zones and see if the travel itinerary times change.
    Fred

  • I am disabled and need help with one to one service that I paid for

    Hi there,
        I brought my computer last year in Aug.  I signed up for the one year of one -to - one service.  Here is the issue, I'm disabled, and things didn't go according to plan.  I am housebound.  If I get out once a week, that's pretty much it, and usually, I have a lot of Dr apts and can't do both things in the same day, too much sitting up in awkward positions for my back to handle (with 7 herniated discs, crushed spinal cord, and 3 tumors in my spinal canal).  So, from Aug to today, I have been out of the house a total of 30 times, all for Dr appointments.
    I have yet to be able to use the one-to-one that I paid for.  I talked to a manager and he was very nice and granted me an extra 30 days.  Is there anything that I can do to get a bit more time to use it?  Even if that is just till October, anything?  I feel dumb for getting it, but, had no way to know my back would get worse...
    Thanks
    Dan

    Sorry if I chose the wrong place to put this item, but, I really wasn't sure where to post it.  If the moderator would like to move it to a more appropriate spot, by all means.
    Thanks again
    Dan

  • Need Help using One-Key to make a system back up to DVDs

    I bought U330 in Sept and now that I have some of my own programs installed and running, I want to make a backup to D (I think?) and also make backups to DVDs so I could make backups. 
    I'm no novice, but I cannot figure out the instructions for this. 
    When I pick  Backup, even at Max compression, it says I don't have enough space.   I don't have THAT much on D:---did I need to repartition this before I even started using this computer?  Does this mean I can never use One-Key? 
    When I pick Create Recover Disc (to make DVD backups), what do I do next? 
        The dropdown for "Select Source From" has only two options, I am guessing I have to pick "Select another image", but then I don't know what to pick for the Image path.    How do I pick the whole C drive ???   Or??   
    Please tell me exactly how to do this because I am finding LENOVO's instructions totally inadequate.     
    A couple times I got to the DVD burner--not sure how--but then it just wanted to burn the sample music files.    I'm feeling quite frustrated--this should not be this difficult!!

    I thought you've got error of another type - that error is fixed by simple software update.
    Regarding your case - it's always frightening in first time. Believe me - there's completely nothing to be afraid of.
    Resizing C drive may result killing your DATA on it only in case of energy is down during the process. Process is taking about 15-20 minutes on slow programs and about 3-4 minutes on fast programs. That means that even having problems with electricity you'll be able to finish everything correctly running on battery.
    I'd recommend using Acronis Disk director Suite, but it is not free. One of the best free progs for that are bootable Linux livecds PartedMagic and GParted. They're all intuitive understandable. 
    You will get your NOVO recovery feature lost after C resize, but you can enable it later, replacing that factory backup in hidden partition with your own backup - your NOVO button will restore your system with all your software and settings.
    it will be good for you to start with some basic principles on partitions organization schemes - why, what for and how questions are briefly explained here. After reading this you'll be able to ask right questions to get right answers.
    //help will save the world

  • Need help to populate Calendar/Time Dimension

    Hi,
    I need experts help in populating the calender dimension with the table structure as below. I need to populate this table from year 1900 to 2100. I was able to get the sql queries for some of the columns from web but could not find any help for most columns like 'DAY_IN_QUARTER'. If somebody could help me with a PL/SQL procedure to populate this table, I really appreciate your help. I know this is too much to ask for, but I have a time constraint in completing this!! :-(
    DM_CALENDAR_ID is the primary kay with date in julian format.
    Thanks in advance,
    Ganesh
    Calendar Dimension Table:
    DM_CALENDAR_ID
    DAY_NAME
    DAY_ABBREVIATION
    DAY_IN_WEEK
    DAY_IN_MONTH
    DAY_IN_QUARTER
    DAY_IN_YEAR
    WEEKDAY_IN_WEEK
    WEEKDAY_IN_MONTH
    WEEKDAY_IN_QUARTER
    WEEKDAY_IN_YEAR
    IS_MONTH_START_WEEKDAY
    IS_QUARTER_START_WEEKDAY
    IS_YEAR_START_WEEKDAY
    IS_MONTH_END_WEEKDAY
    IS_QUARTER_END_WEEKDAY
    IS_YEAR_END_WEEKDAY
    IS_MONTH_END
    IS_QUARTER_END
    IS_YEAR_END
    DAYS_TO_GO_IN_MONTH
    DAYS_TO_GO_IN_QUARTER
    DAYS_TO_GO_IN_YEAR
    WEEKDAYS_TO_GO_IN_MONTH
    WEEKDAYS_TO_GO_IN_QUARTER
    WEEKSDAYS_TO_GO_IN_YEAR
    MONTH_ID
    MONTH_LONG
    MONTH_SHORT
    MONTH_NUMBER_IN_YEAR
    MONTH_NUMBER_IN_QUARTER
    DAYS_IN_MONTH
    WEEKDAYS_IN_MONTH
    QUARTER_ID
    QUARTER_NAME
    QUARTER_NUMBER_IN_YEAR
    DAYS_IN_QUARTER
    WEEKDAYS_IN_QUARTER
    YEAR_ID
    DAYS_IN_YEAR
    WEEKDAYS_IN_YEAR
    CREATE_LOAD_DATE
    CREATE_LOAD_USER_NAME

    If somebody could help me with a PL/SQL procedure to populate this tablethis is one kind of proc, you can change according with your requirements...
    CREATE OR REPLACE PROCEDURE TIME_DIM_PROC
    (p_start_year IN NUMBER, p_end_year IN NUMBER) AS
    v_calendar_date DATE ;
    v_calendar_start_date DATE;
    v_calendar_end_date DATE;
    v_year NUMBER;
    v_calendar_day NUMBER;
    v_week_id VARCHAR2(12);
    v_week_start_date DATE;
    v_week_end_date DATE;
    v_week_number NUMBER;
    v_month NUMBER;
    v_month_mm VARCHAR2(5);
    v_month_start_date DATE;
    v_month_end_date DATE;
    v_month_id VARCHAR2(12);
    v_quarter_start_date DATE;
    v_quarter_end_date DATE;
    v_quarter_id VARCHAR2(12);
    v_half_year_start_date DATE;
    v_half_year_end_date DATE;
    v_half_year_id VARCHAR2(12);
    v_year_start_date DATE;
    v_year_end_date DATE;
    v_fiscal_week_id VARCHAR2(12);
    v_fiscal_week_month VARCHAR2(12);
    v_fiscal_month NUMBER;
    v_fiscal_month_start_date DATE;
    v_fiscal_month_end_date DATE;
    v_fiscal_month_id VARCHAR2(12);
    v_fiscal_quarter_start_date DATE;
    v_fiscal_quarter_end_date DATE;
    v_fiscal_quarter NUMBER;
    v_fiscal_quarter_id VARCHAR2(12);
    v_fiscal_half_year_start_date DATE;
    v_fiscal_half_year_end_date DATE;
    v_fiscal_half_year_id VARCHAR2(12);
    v_fiscal_year_start_date DATE;
    v_fiscal_year_end_date DATE;
    v_fiscal_year_id VARCHAR2(12);
    v_fiscal_year NUMBER;
    v_period_name VARCHAR2(12);
    v_year_yy VARCHAR2(12);
    v_year_id VARCHAR2(12);
    v_loop_counter NUMBER;
    v_number_of_days NUMBER;
    v_fiscal_month_name VARCHAR2(10);
    v_fiscal_quarter_name VARCHAR2(10);
    v_fiscal_half_name VARCHAR2(10);
    parameters_exception EXCEPTION;
    BEGIN
    IF p_start_year > p_end_year THEN
    RAISE parameters_exception;
    END IF;
    v_calendar_start_date := to_date( p_start_year || '-01-01','YYYY-MM-DD');
    v_calendar_end_date := to_date( p_end_year || '-12-31','YYYY-MM-DD');
    v_calendar_date := v_calendar_start_date -1;
    SELECT ( (v_calendar_end_date + 1 ) - v_calendar_start_date ) INTO v_number_of_days FROM dual;
    FOR v_loop_counter IN 1..v_number_of_days
    LOOP
    v_calendar_date := v_calendar_date + 1;
    v_year := TO_NUMBER(TO_CHAR(v_calendar_date,'YYYY'));
    v_year_yy := TO_CHAR(v_calendar_date,'YY');
    v_month := TO_NUMBER(TO_CHAR(v_calendar_date,'MM'));
    v_month_mm := TO_CHAR(v_calendar_date,'MM');
    v_calendar_day := TO_NUMBER(TO_CHAR(v_calendar_date,'DD'));
    v_month_start_date := add_months(last_day( v_calendar_date ) +1 ,-1) ;
    v_month_end_date := last_day( v_calendar_date );
    v_week_id :=
    CASE WHEN v_calendar_day BETWEEN 1 AND 7 THEN 'WK1'
    WHEN v_calendar_day BETWEEN 8 AND 14 THEN 'WK2'
    WHEN v_calendar_day BETWEEN 15 AND 21 THEN 'WK3'
    WHEN v_calendar_day BETWEEN 22 AND 28 THEN 'WK4'
    ELSE 'WK5'
    END ;
    v_week_id := v_week_id || '-' || v_month_mm || '-' || v_year_yy;
    v_week_start_date :=
    CASE WHEN v_calendar_day BETWEEN 1 AND 7 THEN add_months(last_day( v_calendar_date ) +1 ,-1)
    WHEN v_calendar_day BETWEEN 8 AND 14 THEN add_months(last_day( v_calendar_date) +1 ,-1) + 7
    WHEN v_calendar_day BETWEEN 15 AND 21 THEN add_months(last_day( v_calendar_date ) +1 ,-1) + 14
    WHEN v_calendar_day BETWEEN 22 AND 28 THEN add_months(last_day( v_calendar_date ) +1 ,-1) + 21
    ELSE add_months(last_day( v_calendar_date) +1 ,-1) + 28
    END ;
    v_week_end_date :=
    CASE WHEN v_calendar_day BETWEEN 1 AND 7 THEN add_months(last_day( v_calendar_date ) +1 ,-1) + 6
    WHEN v_calendar_day BETWEEN 8 AND 14 THEN add_months(last_day( v_calendar_date) +1 ,-1) + 13
    WHEN v_calendar_day BETWEEN 15 AND 21 THEN add_months(last_day( v_calendar_date ) +1 ,-1) + 20
    WHEN v_calendar_day BETWEEN 22 AND 28 THEN add_months(last_day( v_calendar_date ) +1 ,-1) + 27
    ELSE last_day( v_calendar_date )
    END ;
    v_week_number :=
    CASE WHEN v_calendar_day BETWEEN 1 AND 7 THEN 1
    WHEN v_calendar_day BETWEEN 8 AND 14 THEN 2
    WHEN v_calendar_day BETWEEN 15 AND 21 THEN 3
    WHEN v_calendar_day BETWEEN 22 AND 28 THEN 4
    ELSE 5
    END ;
    v_period_name :=
    case when v_month = 1 then 'JAN'
    when v_month = 2 then 'FEB'
    when v_month = 3 then 'MAR'
    when v_month = 4 then 'APR'
    when v_month = 5 then 'MAY'
    when v_month = 6 then 'JUN'
    when v_month = 7 then 'JUL'
    when v_month = 8 then 'AUG'
    when v_month = 9 then 'SEP'
    when v_month = 10 then 'OCT'
    when v_month = 11 then 'NOV'
    else 'DEC'
    end || '-' || v_year_yy;
    v_month_id :=
    case when v_month = 1 then 'M01'
    when v_month = 2 then 'M02'
    when v_month = 3 then 'M03'
    when v_month = 4 then 'M04'
    when v_month = 5 then 'M05'
    when v_month = 6 then 'M06'
    when v_month = 7 then 'M07'
    when v_month = 8 then 'M08'
    when v_month = 9 then 'M09'
    when v_month = 10 then 'M10'
    when v_month = 11 then 'M11'
    else 'M12'
    end || '-' || v_year_yy;
    v_quarter_start_date := case
    when v_month between 1 and 3 then to_date( v_year || '-' || '01-01' , 'YYYY-MM-DD')
    when v_month between 4 and 6 then to_date( v_year || '-' || '04-01' , 'YYYY-MM-DD')
    when v_month between 7 and 9 then to_date( v_year || '-' || '07-01' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '10-01' , 'YYYY-MM-DD')
    end;
    v_quarter_end_date := case
    when v_month between 1 and 3 then to_date( v_year || '-' || '03-31' , 'YYYY-MM-DD')
    when v_month between 4 and 6 then to_date( v_year || '-' || '06-30' , 'YYYY-MM-DD')
    when v_month between 7 and 9 then to_date( v_year || '-' || '09-30' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '12-31' , 'YYYY-MM-DD')
    end;
    v_quarter_id := case
    when v_month between 1 and 3 then 'Q1'
    when v_month between 4 and 6 then 'Q2'
    when v_month between 7 and 9 then 'Q3'
    else 'Q4'
    end || '-' || v_year_yy;
    v_half_year_start_date :=
    case
    when v_month between 1 and 6 then to_date( v_year || '-' || '01-01' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '07-01' , 'YYYY-MM-DD')
    end;
    v_half_year_end_date :=
    case
    when v_month between 1 and 6 then to_date( v_year || '-' || '06-30' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '12-31' , 'YYYY-MM-DD')
    end;
    v_half_year_id :=
    case
    when v_month between 1 and 6 then 'HALF1'
    else 'HALF2'
    end || '-' || v_year_yy ;
    v_year_start_date := to_date( v_year || '-' || '01-01' , 'YYYY-MM-DD') ;
    v_year_end_date := to_date( v_year || '-' || '12-31' , 'YYYY-MM-DD') ;
    v_year_id := 'YR-' || substr(to_char(v_year),3,4) ;
    v_fiscal_month_start_date:=add_months(last_day( v_calendar_date ) +1 ,-1) ;
    v_fiscal_month_end_date:= last_day( v_calendar_date );
    v_fiscal_month :=
    case
    when v_month = 1 then 10
    when v_month = 2 then 11
    when v_month = 3 then 12
    when v_month = 4 then 1
    when v_month = 5 then 2
    when v_month = 6 then 3
    when v_month = 7 then 4
    when v_month = 8 then 5
    when v_month = 9 then 6
    when v_month = 10 then 7
    when v_month = 11 then 8
    else 9
    end ;
    v_fiscal_month_id :=
    case
    when v_month = 1 then 'M10' || '-' || substr(to_char((v_year-1)),3,4)
    when v_month = 2 then 'M11' || '-' || substr(to_char((v_year-1)),3,4)
    when v_month = 3 then 'M12' || '-' || substr(to_char((v_year-1)),3,4)
    when v_month = 4 then 'M01' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 5 then 'M02' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 6 then 'M03' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 7 then 'M04' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 8 then 'M05' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 9 then 'M06' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 10 then 'M07' || '-' || substr(to_char((v_year)),3,4)
    when v_month = 11 then 'M08' || '-' || substr(to_char((v_year)),3,4)
    else 'M09' || '-' || substr(to_char((v_year)),3,4)
    end ;
    v_fiscal_quarter_start_date :=
    case
    when v_month between 1 and 3 then to_date( v_year || '-' || '01-01' , 'YYYY-MM-DD')
    when v_month between 4 and 6 then to_date( v_year || '-' || '04-01' , 'YYYY-MM-DD')
    when v_month between 7 and 9 then to_date( v_year || '-' || '07-01' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '10-01' , 'YYYY-MM-DD')
    end;
    v_fiscal_quarter_end_date :=
    case
    when v_month between 1 and 3 then to_date( v_year || '-' || '03-31' , 'YYYY-MM-DD')
    when v_month between 4 and 6 then to_date( v_year || '-' || '06-30' , 'YYYY-MM-DD')
    when v_month between 7 and 9 then to_date( v_year || '-' || '09-30' , 'YYYY-MM-DD')
    else to_date( v_year || '-' || '12-31' , 'YYYY-MM-DD')
    end;
    v_fiscal_quarter :=
    case
    when v_month between 1 and 3 then 4
    when v_month between 4 and 6 then 1
    when v_month between 7 and 9 then 2
    else 3
    end;
    v_fiscal_quarter_id :=
    case
    when v_month between 1 and 3 then 'Q4' || '-'|| substr(to_char((v_year-1)),3,4)
    when v_month between 4 and 6 then 'Q1' || '-'|| substr(to_char((v_year)),3,4)
    when v_month between 7 and 9 then 'Q2' || '-'|| substr(to_char((v_year)),3,4)
    else 'Q3' || '-'|| substr(to_char((v_year)),3,4)
    end;
    v_fiscal_half_year_start_date :=
    case
    when v_month between 4 and 9 then to_date(v_year ||'-04-01','YYYY-MM-DD')
    when v_month between 10 and 12 then to_date(v_year ||'-10-01','YYYY-MM-DD')
    else to_date((v_year-1) ||'-10-01','YYYY-MM-DD')
    end;
    v_fiscal_half_year_end_date :=
    case
    when v_month between 4 and 9 then to_date(v_year ||'-09-30','YYYY-MM-DD')
    when v_month between 10 and 12 then to_date(v_year ||'-03-31','YYYY-MM-DD')
    else to_date((v_year) ||'-03-31','YYYY-MM-DD')
    end;
    v_fiscal_half_year_id :=
    case
    when v_month between 4 and 9 then 'HALF1' || '-' || substr(to_char((v_year)),3,4)
    when v_month between 10 and 12 then 'HALF2' || '-' || substr(to_char((v_year)),3,4)
    else 'HALF2' || '-' || substr(to_char((v_year-1)),3,4)
    end;
    v_fiscal_year_start_date :=
    case
    when v_month between 4 and 12 then to_date(v_year ||'-04-01','YYYY-MM-DD')
    else to_date((v_year-1) ||'-04-01','YYYY-MM-DD')
    end;
    v_fiscal_year_end_date :=
    case
    when v_month between 4 and 12 then to_date((v_year+1) ||'-03-31','YYYY-MM-DD')
    else to_date((v_year) ||'-03-31','YYYY-MM-DD')
    end;
    v_fiscal_year_id :=
    case
    when v_month between 4 and 12 then 'FY' || '-' || substr(to_char((v_year)),3,4)
    else 'FY' || '-' || substr(to_char((v_year-1)),3,4)
    end;
    v_fiscal_year :=
    case
    when v_month between 4 and 12 then v_year
    else (v_year-1)
    end;
    v_fiscal_month_name :=
    case when v_month = 1 then 'JAN'
    when v_month = 2 then 'FEB'
    when v_month = 3 then 'MAR'
    when v_month = 4 then 'APR'
    when v_month = 5 then 'MAY'
    when v_month = 6 then 'JUN'
    when v_month = 7 then 'JUL'
    when v_month = 8 then 'AUG'
    when v_month = 9 then 'SEP'
    when v_month = 10 then 'OCT'
    when v_month = 11 then 'NOV'
    else 'DEC'
    end;
    v_fiscal_quarter_name :=
    case
    when v_month between 1 and 3 then 'Q4'
    when v_month between 4 and 6 then 'Q1'
    when v_month between 7 and 9 then 'Q2'
    else 'Q3'
    end;
    v_fiscal_half_name :=
    case
    when v_month between 4 and 9 then 'HALF1'
    else 'HALF2'
    end;
    INSERT INTO TIME_DIM
    VALUES
    ( TIME_KEY_S.NEXTVAL ,
    v_calendar_date,
    'STANDARD-FISCAL',
    v_week_start_date,
    v_week_end_date ,
    v_week_id ,
    v_week_number ,
    v_period_name,
    v_month_start_date,
    v_month_end_date,
    v_month_id,
    v_quarter_start_date,
    v_quarter_end_date,
    v_quarter_id,
    v_half_year_start_date,
    v_half_year_end_date,
    v_half_year_id,
    v_year_start_date,
    v_year_end_date,
    v_year_id,
    v_year,
    v_week_start_date,
    v_week_end_date ,
    v_week_id ,
    v_week_number ,
    v_fiscal_month_start_date,
    v_fiscal_month_end_date,
    v_fiscal_month,
    v_fiscal_month_id,
    v_fiscal_quarter_start_date,
    v_fiscal_quarter_end_date,
    v_fiscal_quarter,
    v_fiscal_quarter_id,
    v_fiscal_half_year_start_date,
    v_fiscal_half_year_end_date,
    v_fiscal_half_year_id,
    v_fiscal_year_start_date,
    v_fiscal_year_end_date,
    v_fiscal_year_id,
    v_fiscal_year,
    1,
    sysdate,
    sysdate,
    user,
    user,
    -1,
    v_fiscal_month_name,
    v_fiscal_quarter_name,
    v_fiscal_half_name
    COMMIT;
    END LOOP;
    COMMIT;
    DBMS_OUTPUT.PUT_LINE ( 'v_calendar_date ' || v_calendar_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_year ' || v_year );
    DBMS_OUTPUT.PUT_LINE ( 'v_month ' || v_month);
    DBMS_OUTPUT.PUT_LINE ( 'v_month_start_date ' || v_month_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_month_end_date ' || v_month_end_date );
    DBMS_OUTPUT.PUT_LINE ( 'v_period_name ' || v_period_name );
    DBMS_OUTPUT.PUT_LINE ( 'v_month_id ' || v_month_id);
    DBMS_OUTPUT.PUT_LINE ( 'v_quarter_start_date ' || v_quarter_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_quarter_end_date ' || v_quarter_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_quarter_id ' || v_quarter_id);
    DBMS_OUTPUT.PUT_LINE ( 'v_half_year_start_date ' || v_half_year_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_half_year_end_date ' || v_half_year_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_half_year_id ' || v_half_year_id);
    DBMS_OUTPUT.PUT_LINE ( 'v_year_start_date ' || v_year_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_year_end_date ' || v_year_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_year ' || v_year);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_month ' || v_fiscal_month);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_month_id ' || v_fiscal_month_id);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_quarter_start_date ' || v_fiscal_quarter_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_quarter_end_date ' || v_fiscal_quarter_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_quarter ' || v_fiscal_quarter);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_quarter_id ' || v_fiscal_quarter_id);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_half_year_start_date ' || v_fiscal_half_year_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_half_year_end_date ' || v_fiscal_half_year_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_half_year_id ' || v_fiscal_half_year_id );
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_year_start_date ' || v_fiscal_year_start_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_year_end_date ' || v_fiscal_year_end_date);
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_year_id ' || v_fiscal_year_id );
    DBMS_OUTPUT.PUT_LINE ( 'v_fiscal_year ' || v_fiscal_year );
    EXCEPTION
    WHEN parameters_exception THEN
    raise_application_error (-20001,'PASS p_start_date lesser than or equal to p_end_date');
    WHEN OTHERS THEN
    raise_application_error(-20002,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
    END;
    /

  • Need help with LV Real Time

    hi everyone, I have few things to ask about Labview Real Time.
    1. after searching and reading, I've come into conclusion: I need to work under Labview RT to have a while loop to iterate at 1MHz speed, is it correct?
    2. how do I know if LV-RT is installed in my PC? I've seen my MAX, I saw so many softwares installed, but I didn't see any RT installed, is it NI-RIO?
    3. in my function palette, I have Real Time VI's. But I can't put simply this  in a while loop and put 1 us as wait time. 
    I have PXI chassis PXIe-1082, and I want to generate serial digital data using PXIe 6544.
    And I need to write my data faster than 1 ms (like 100us) . How to do this?
    My PC specs are Intel 2x 2,6GHz; RAM 2GB; Windows 7, 32 bit; my Labview version is 2010.
    Any helps are appreciated.
    Regards,
    Yan.

    hi nathand, thanks for reply
    I'm actually doing a project in university, where my supervisor has bought the devices for his project and I just need to search in internet & forum of how to make it work. And too bad he doesnt really know how to program Labview, so I keep asking somewhere else like in forum and emailing NI for support.
    I've seen the examples, and I have generated my waveform using 40MHz clock rate, for each data, I'm writing it with an array of 40 bits boolean which takes 40 x 25 ns = 1us for one data generation.
    So, simply said, I'm using buffer of 40 bits boolean. Then I'm using the index of FOR loop as a counter, I treat this counter as the step of the ramp, then I convert into digital waveform.
    So, if I'm generating without any quotient&remainder block function, each steps would be generated after every 1us of time elapsed.
    And if I'm (for example) using 10 with quotient&remainder, each steps would be generated after every 10us of time elapsed. 
    With that trick, I should be able to change the quotient input (lets say T1) as big as I want (as delay) between each generation, with the fastest rate = 1us, right?
    I'm saving the waveform into TDMS file and checked, that the generation is fine. But I just got a feeling, with using FOR loop, it takes time to generate my waveforms.
    I've tried to change T1 into 1000, which means, it should generate each step in every 1000 x 1us = 1ms; and generation of 256 steps should be done in 256 ms, right? I've checked the TDMS and it looks fine, but just, the duration took longer than it should be. I think it takes like 256ms per steps instead of 256ms for all steps. I don't know, I think I shouldn't use FOR loop either.
    Regards,
    Yan.

  • Need help on one req which is related to Jobs

    Hi,
    I have designed one Utility program which updates the data from One database table to another database table.
    This Utility program runs every day through Job over night.
    So I wanted to  give one option to my client so that if they perforn some action by pressing one button, i wanted to display the records which are updated to database table yesterday night.
    Can you pleae help me on this.Is it possible to go ahead with ALV Grid ?.

    Hi,
    There can be many possible ways of doing it. What my understanding is you want to display the entries which were updated by the job in previous run.
    1. check the table you are updating has any date and time signature or not, if yes select that data based on date and time signature and display in ALV.
    2.Before updating the tables by Job data must be in some table. Save that internal table as file in application server and when you want to display it , read the file and display it in ALV.
    3. create another custom table with extra date and time signature and update them also with same data as what done by job. then while you want to display the same to user read this table to display them.
    4.As told earlier read from spool.
    You need to decide what you want depending on the conditions at ur end.
    Regards
    Anurag

  • Boss is gonna kill me. I Need help inserting a DATE/TIME into MSAccess

    Hello,
    I have spent way to long trying to figure out how to insert a date into the date/time field of a microsoft access database. Could someone please help me figure this out. I know there are a million previous posts about this topic and i looked through a bunch and none of them seem to work... i have tried so many different things. The code i am working (at this point in time.. since it has changed a million times) is:
                             String MYDATE = "yyyy-MM-dd hh:mm:ss a";
                             Date date = new Date();
                             String dateout = new SimpleDateFormat(MYDATE).format(date);
                             System.out.println(" the date is " + dateout);
    Timestamp timeStamp = new Timestamp(date.getTime());
    timeStamp.setNanos(0);
                             System.out.println(" the date is " + timeStamp);
                             String sql2 = "INSERT INTO DATE5 (stuff, date) VALUES ('hello', CVDATE(" + timeStamp + "))";
                             ProblemTrackingDB.DoUpdate(sql2);
                             sql2 = "INSERT INTO DATE5 (stuff, date) VALUES ('hello', '" + dateout + "')";
                             ProblemTrackingDB.DoUpdate(sql2);
    i have tried both of those ways and either work (ie... comment one out and try the other)
    i always get a " Syntax error in INSERT INTO statement" thrown
    i have also tried without the single quotes.
    Any help would Be MUCH appreciated as my boss is starting to get agrivated...
    thanks to anyone who helps,
    Jon

    Change your program to use a PreparedStatement to do this insert. You only need to create a PreparedStatement once, so in your constructor or initializer do this:PreparedStatement insert = connection.PrepareStatement("INSERT INTO DATE5 (stuff, date) VALUES (?, ?)");Then the code to write a record is this:Timestamp timeStamp = new Timestamp(date.getTime());
    timeStamp.setNanos(0);
    insert.setString(1, "hello");
    insert.setTimeStamp(2, timeStamp);
    insert.executeUpdate();That's all. You never need to mess about with formatting timestamps in the way your database needs them, the PreparedStatement takes care of all that for you.

Maybe you are looking for

  • BADI or function module for updating open purchase orders

    Hi all, Does anyone know of a BADI or function module which can be used for updating item prices in open purchase orders? All helpful answers are highly appreciated! Regards, MV

  • Displaying the field symbol result in ALV GRID

    hi.     I have a requirement to display the field symbol in ALV GRID. I am getting a error 'FIELD SYMBOL NOT YET BEEN ASSIGNED'  when i am calling the 'REUSE ALV GRID DISPLAY'. Can any one help me out..

  • Elements 11 has stopped working.

    Says to re-install but I can't get into the program to de-activate it. How can I reinstall it. Thanks, Ken

  • How to use Jaxws to generate stubs instead of using jaxrpc?

    Hi All, In our code we have been using jax-rpc with JDK 4 to generate stubs. Now we have been told to switch to Jax-ws using JDK 5. Can jax-ws be used to generate stubs? Does jax-ws comes in package with jwsdk/jwsdp? If yes, then which version of jws

  • Problems with fade outs - audio

    Hi I have a problem that's driving me crazy. Whenever I add a fade out transition at the end of a clip, a random piece of audio from earlier in the clip appears at full volume alongside the fade. Is this a bug and does anyone know a way round it? iMo