How do i break this code.

All,
I am getting the "PLS-00123: program too large error"
when i execute the following code. Is there a way i can break the huge
update statement.
Please suggest me.
PROCEDURE PR_UPD_FACT ( v_Part in varchar2 )
IS
fupd_stmnt VARCHAR2(19190);
upd_cid      NUMBER;
upd_recnum     NUMBER;
BEGIN
fupd_stmnt :=
'UPDATE ' ||v_Part|| ' SET ' ||
     'WRKG01_ASM_BODY_DONE_Y = ' || 'TO_DATE(' || '''' || to_char
(ods_record.WRKG01_ASM_BODY_DONE_Y,'DD/MON/YY HH:MI:SS') || ''''
|| ',' || '''' || 'DD/MON/YY HH:MI:SS' || '''' || ')' || ',' ||
'WRKG01_ASM_BUCK_Y = ' || 'TO_DATE(' || '''' || to_char(
ods_record.WRKG01_ASM_BUCK_Y,'DD/MON/YY HH:MI:SS') || '''' || ','
|| '''' || 'DD/MON/YY HH:MI:SS' || '''' || ')' || ',' ||
-- *** UPDATTING 366 COLUMNS OF A HUGE TABLE ***
' WHERE ' ||
' WRKG01_CNT_MDL_YEAR_C = ' || '''' || ods_record.WRKG01_CNT_MDL_YEAR_C || '''' ||
' AND WRKG01_ORD_PROD_SRC_C = ' || '''' || ods_record.WRKG01_ORD_PROD_SRC_C || '''' ||
' AND WRKG01_ORD_PROD_ORD_ID_C = ' || '''' || ods_record.WRKG01_ORD_PROD_ORD_ID_C || '''';     
upd_cid := DBMS_SQL.OPEN_CURSOR;
     DBMS_SQL.PARSE(upd_cid, fupd_stmnt, DBMS_SQL.NATIVE);
     upd_recnum := DBMS_SQL.EXECUTE(upd_cid);
     DBMS_SQL.CLOSE_CURSOR(upd_cid);
END PR_UPD_FACT;
Thank You

I can't tell which Oracle version you are on, but the limit for v7.x is 64K, v8.0 (up to 8.1.3) is 128K, and 8i and up have a limit of 256M.
One thing you should definitely incorporate - regardless of whether you split up this statement - is bind variables. Instead of hardcoding the literal values within the string, just assign placeholders and then, on a call(s) to dbms_sql.bind_variable, supply the value(s).
So instead of:
'WRKG01_ASM_BODY_DONE_Y = ' || 'TO_DATE(' || '''' || to_char (ods_record.WRKG01_ASM_BODY_DONE_Y,'DD/MON/YY HH:MI:SS')
use:
'wrkg01_asm_body_done_y = :w01abd'
and then, after the call to dbms_sql.parse but before dbms_sql.execute:
dbms_sql.bind_variable(upd_cid, 'w01abd', to_char(ods_record.wrkg01_asm_body_done_y, 'DD/MON/YY HH:MI:SS'));
Also use bind variable for the parameters in your WHERE clause. You will still need to hardcode the table and column names (as you do for the tablename parameter v_part).
Now, using bind variables is extremely important, but it doesn't help your size issue. Is this procedure in a package? It might be, but I couldn't tell. If not, it probably should be.
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:571023051648
Another thing you might try is to break the update into two steps, each handled in a separate procedure (or separate packages). Now, if you are updating a column included in the WHERE clause, then this will not be a viable option.
Just some initial thoughts...

Similar Messages

  • How do I make this code generate a new pro when the "NEXT" button is pushed

    How do I make this code generate a new set of problem when the "NEXT" Button is pushed
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    /* Figure out how to create a new set of problms
    * Type a list of specifications, include a list of test cases
    * DONE :]
    package javaapplication1;
    import java.awt.GridLayout;
    import java.awt.Window;
    import javax.swing.*;
    import java.awt.event.*;
    * @author Baba Akinlolu -
    class Grid extends JFrame{
        int done = 0;
        final int score = 0;
        final int total = 0;           
            //Create Panels
            JPanel p2 = new JPanel();
            JPanel p3 = new JPanel();
            final JPanel p1 = new JPanel();
            //Create Radio buttons & group them
            ButtonGroup group = new ButtonGroup();
            final JRadioButton ADD = new JRadioButton("Addition");
            final JRadioButton SUB = new JRadioButton("Subtraction");
            final JRadioButton MUL = new JRadioButton("Multiplication");
            final JRadioButton DIV = new JRadioButton("Division");
            //Create buttons
            JButton NEXT = new JButton("NEXT");
            JButton END = new JButton("End");
            //Create Labels
            JLabel l1 = new JLabel("First num");
            JLabel l2 = new JLabel("Second num");
            JLabel l3 = new JLabel("Answer:");
            JLabel l4 = new JLabel("Score:");
            final JLabel l5 = new JLabel("");
            JLabel l6 = new JLabel("/");
            final JLabel l7 = new JLabel("");
            //Create Textfields
            final JTextField number = new JTextField(Generator1());
            final JTextField number2 = new JTextField(Generator1());
            final JTextField answer = new JTextField(5);
        Grid(){
            setLayout(new GridLayout(4, 4, 2 , 2));
            p2.add(ADD);
            p2.add(SUB);
            group.add(ADD);
            group.add(SUB);
            group.add(MUL);
            group.add(DIV);
            p2.add(ADD);
            p2.add(SUB);
            p2.add(DIV);
            p2.add(MUL);
            //Add to panels
            p1.add(l1);
            p1.add(number);
            p1.add(l2);
            p1.add(number2);
            p1.add(l3);
            p1.add(answer);
            p1.add(l4);
            p1.add(l5);
            p1.add(l6);
            p1.add(l7);
            p3.add(NEXT);
            p3.add(END);
            //Add panels
            add(p2);
            add(p1);
            add(p3);
            //Create Listners
            Listeners();
    void Listeners(){
          NEXT.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
             int answer1 = 0;
             //Grab the numbers entered
             int numm1 = Integer.parseInt(number.getText());
             int numm2 = Integer.parseInt(number2.getText());
             int nummsanswer = Integer.parseInt(answer.getText());
             //Set the score and total into new variabls
             int nummscore = score;
             int nummtotal = total;
             //Check if the add radio button is selected if so add
             if (ADD.isSelected() == true){
                 answer1 = numm1 + numm2;
             //otherwise check if the subtract button is selected if so subtract
             else if (SUB.isSelected() == true){
                 answer1 = numm1 - numm2;
             //check if the multiplication button is selected if so multiply
             else if (MUL.isSelected() == true){
                 answer1 = numm1 * numm2;
             //check if the division button is selected if so divide
             else if (DIV.isSelected() == true){
                 answer1 = numm1 / numm2;
             //If the answer user entered is the same with th true answer
             if (nummsanswer == answer1){
                 //add to the total and score
                 nummtotal += 1;
                 nummscore += 1;
                 //Convert the input back to String
                 String newscore = String.valueOf(nummscore);
                 String newtotal = String.valueOf(nummtotal);
                 //Set the text
                 l5.setText(newscore);
                 l7.setText(newtotal);
             //Otherwise just increase the total counter
             else {
                 nummtotal += 1;
                 String newtotal = String.valueOf(nummtotal);
                 l7.setText(newtotal);
      //Create End listener
    END.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            // get the root window and call dispose on it
            Window win = SwingUtilities.getWindowAncestor(p1);
            win.dispose();
    //new Grid();
    String Generator1(){
         int randomnum;
         randomnum = (1 + (int)(Math.random() * 100));
         String randomnumm = String.valueOf(randomnum);
         return randomnumm;
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            // TODO code application logic here
            JFrame frame = new Grid();
            frame.setTitle("Flashcard Testing");
            frame.setSize(500, 200);
            frame.setLocationRelativeTo(null);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }Edited by: SirSaula on Dec 7, 2009 10:17 AM

    Not only are you continuing to post in the wrong forum but now you are multiposting: [http://forums.sun.com/thread.jspa?threadID=5418935]
    If people haven't answered you other posting its probably because we don't understand the question. Quit cluttering the forum by asking the same question over and over and then next time you have a new question post it in the proper forum. Your first posting was moved becuase you didn't post it properly.

  • I lost my redemption code to install Lion onto my new computer. Is there a way I could get it again? When I go to the "get the update" page, it says that my serial number already has a code. How do I find this code again?!

    I lost my redemption code to install Lion onto my new computer. Is there a way I could get it again? When I go to the "get the update" page, it says that my serial number already has a code. How do I find this code again?!

    It is probably broken. You can try restoring it using Recovery Mode, but if that fails its time for a new phone. After all, it is 4 generations out of date. See: Recovery Mode

  • How  can i run this code correctly?

    hello, everybody:
        when  i run the code, i found that it dons't work,so ,i  hope somebody can help me!
        the Ball class is this :
        package {
        import flash.display.Sprite;
        [SWF(width = "550", height = "400")]
        public class Ball extends Sprite {
            private var radius:Number;
            private var color:uint;
            private var vx:Number;
            private var vy:Number;
            public function Ball(radius:Number=40, color:uint=0xff9900,
            vx:Number =0, vy:Number =0) {
                this.radius= radius;
                this.color = color;
                this.vx = vx;
                this.vy = vy;
                init();
            private function init():void {
                graphics.beginFill(color);
                graphics.drawCircle(0,0,radius);
                graphics.endFill();
    and the Chain class code is :
    package {
        import flash.display.Sprite;
        import flash.events.Event;
        [SWF(width = "550", height = "400")]
        public class Chain extends Sprite {
            private var ball0:Ball;
            private var ball1:Ball;
            private var ball2:Ball;
            private var spring:Number = 0.1;
            private var friction:Number = 0.8;
            private var gravity:Number = 5;
            //private var vx:Number =0;
            //private var vy:Number = 0;
            public function Chain() {
                init();
            public function init():void {
                ball0  = new Ball(20);
                addChild(ball0);
                ball1 = new Ball(20);
                addChild(ball1);
                ball2 = new Ball(20);
                addChild(ball2);
                addEventListener(Event.ENTER_FRAME, onEnterFrame);
            private function onEnterFrame(event:Event):void {
                moveBall(ball0, mouseX, mouseY);
                moveBall(ball1, ball0.x, ball0.y);
                moveBall(ball2, ball1.x, ball1.y);
                graphics.clear();
                graphics.lineStyle(1);
                graphics.moveTo(mouseX, mouseY);
                graphics.lineTo(ball0.x, ball0.y);
                graphics.lineTo(ball1.x, ball1.y);
                graphics.lineTo(ball2.x, ball2.y);
            private function moveBall(ball:Ball,
                                      targetX:Number,
                                      targetY:Number):void {
                ball.vx += (targetX - ball.x) * spring;
                ball.vy += (targetY - ball.y) * spring;
                ball.vy += gravity;
                ball.vx *= friction;
                ball.vy *= friction;
                ball.x += vx;
                ball.y += vy;
    thanks every body's help!

    ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
      and i changed the ball.pv property as public in the Ball class, and  the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
    2010-04-21
    Fang
    发件人: Ned Murphy <[email protected]>
    发送时间: 2010-04-20 23:01
    主 题: how  can i run this code correctly?
    收件人: fang alvin <[email protected]>
    I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class.  All of the properties in your Ball class are declared as private, so you probably cannot access them directly.  They would need to be public.  Also, I still don't see where you import Ball in the chain class such that it can use it.

  • How can i know how to redeem the code? how can i get this code?

    how can i know how to redeem the code? how can i get this code? please i need you help
    <Email Edited by Host>

    You are trying to create a new Apple ID? You don't have one yet? Is that correct?
    If so, then see this article on how to creat your Apple ID - and make up a password for it. Remember to write it down immediately.
    http://support.apple.com/en-us/HT203993

  • I forgot the codeslot of my ipod. How can I delete this code?

    I forgot the codeslot of my ipod. How can I delete this code? Can anybody help help me? I'm sorry for the bad English.

    Connect it to iTunes and Restore it.

  • How can i rewrite this code into java?

    How can i rewrite this code into a java that has a return value?
    this code is written in vb6
    Private Function IsOdd(pintNumberIn) As Boolean
        If (pintNumberIn Mod 2) = 0 Then
            IsOdd = False
        Else
            IsOdd = True
        End If
    End Function   
    Private Sub cmdTryIt_Click()
              Dim intNumIn  As Integer
              Dim blnNumIsOdd     As Boolean
              intNumIn = Val(InputBox("Enter a number:", "IsOdd Test"))
              blnNumIsOdd = IsOdd(intNumIn)
              If blnNumIsOdd Then
           Print "The number that you entered is odd."
        Else
           Print "The number that you entered is not odd."
        End If
    End Sub

    873221 wrote:
    I'm sorry I'am New to Java.Are you new to communication? You don't have to know anything at all about Java to know that "I have an error," doesn't say anything useful.
    I'm just trying to get you to think about what your post actually says, and what others will take from it.
    what does this error mean? what code should i replace and add? thanks for all response
    C:\EvenOdd.java:31: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=true;
    ^
    C:\EvenOdd.java:35: isOdd(int) in EvenOdd cannot be applied to ()
    isOdd()=false;
    ^
    2 errors
    Telling you "what code to change it to" will not help you at all. You need to learn Java, read the error message, and think about what it says.
    It's telling you exactly what is wrong. At line 31 of EvenOdd.java, you're calling isOdd(), with no arguments, but the isOdd() method requires an int argument. If you stop ant think about it, that should make perfect sense. How can you ask "is it odd?" without specifying what "it" is?
    So what is this all about? Is this homework? You googled for even odd, found a solution in some other language, and now you're just trying to translate it to Java rather than actually learning Java well enough to simply write this trivial code yourself?

  • How do I break my codes into classes??

    How do i break each tab into a class and call them inside a main program ??
    Please show me how thanks.
    import javax.swing.JTabbedPane;
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.JLabel;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import javax.swing.BorderFactory;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import java.sql.*;
    import java.io.*;
    public class DatabaseApp extends JPanel {
         // declare the width and height of UI
         public static int WIDTH = 800;
         public static int HEIGHT = 600;
         // create textfield objects for user to enter the input
         TextField employeeID = new TextField(15);
         TextField name = new TextField(40);
         TextField address = new TextField(40);
         TextField suburb = new TextField(20);
         TextField state = new TextField(5);
         TextField pCode = new TextField(5);
         TextField dob = new TextField(15);
         TextField homePh = new TextField(15);
         TextField workPh = new TextField(15);
         TextField mobile = new TextField("0",15);
         TextField eMail = new TextField(30);
         TextField dbase = new TextField("employee",20);
         TextField report = new TextField(15);
         TextField query= new TextField(50);
         TextArea displayArea = new TextArea(16,80);
         TextArea helpArea = new TextArea(20,80);
         public static void main (String[] args) {
              JFrame frame = new JFrame ("S-League Management System");
              frame.addWindowListener(new WindowAdapter(){
                        public void windowClosing (WindowEvent e) {
                             System.exit(0);
              frame.getContentPane().add(new DatabaseApp(), BorderLayout.CENTER);
              frame.setSize(800,600);
              frame.setResizable(false);
              frame.setVisible(true);
              //centralise the screen
              Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
              Dimension frameSize = frame.getSize();
              frame.setLocation((screenSize.width - frameSize.width) / 2,
                   (screenSize.height - frameSize.height) / 2);
         /** add buttons to the database form
         public JButton(String text,Icon icon)
         Creates a button with initial text and an icon.
         Parameters:
         text - the text of the button.
         icon - the Icon image to display on the button
         JButton newButton = new JButton (" New ", new ImageIcon(DatabaseApp.class.getResource("img/New.gif")));
         JButton addButton = new JButton (" Add ", new ImageIcon (DatabaseApp.class.getResource("img/Add.gif")));
         JButton findButton = new JButton (" Retrieve ", new ImageIcon (DatabaseApp.class.getResource("img/Find.gif")));
         JButton updateButton = new JButton (" Update ", new ImageIcon (DatabaseApp.class.getResource("img/Refresh.gif")));
         JButton deleteButton = new JButton (" Delete ", new ImageIcon (DatabaseApp.class.getResource("img/Delete.gif")));
         JButton submitButton = new JButton (" Submit Query ", new ImageIcon (DatabaseApp.class.getResource("img/Export.gif")));
         JButton reportButton = new JButton (" Report File ", new ImageIcon (DatabaseApp.class.getResource("img/AlignLeft.gif")));
         /** create tabbed pane for form
         * public void addTab(String title,Icon icon,Component component,String tip)
         * Parameters:
         * title - the title to be displayed in this tab
         * icon - the icon to be displayed in this tab
         * component - The component to be displayed when this tab is clicked.
         * tip - the tooltip to be displayed for this tab
         public DatabaseApp() {
              // create new tabbedPane object
              JTabbedPane tabbedPane = new JTabbedPane(){
                   ImageIcon imageIcon = new ImageIcon("img/logo.jpg");
                   Image image = imageIcon.getImage();
                   public void paintComponent (Graphics g) {
                        g.setColor(new Color(220,220,220));
                        g.fillRect(0,0,643,74);
                        g.drawImage(image, 0, 4, this);
                        super.paintComponent(g);
              tabbedPane.addTab(" Team Management ",null, buildQueryPanel(), "Team Management");
              tabbedPane.addTab(" Player Registration ",null, buildGeneralPanel(), "Player Registration");
              tabbedPane.addTab(" Author ",null, buildAuthorPanel(), "Author");
              // assign layout manager
              //setLayout(new GridLayout(1,1));
              tabbedPane.setSelectedIndex(1);
              tabbedPane.setBorder(BorderFactory.createEmptyBorder(78,0,0,0));
              add(tabbedPane);
         protected JPanel buildQueryPanel() {
              JPanel mainPane = new JPanel();
              // divided into three panes. these panes will be added to mainPanel
              JPanel westPane = new JPanel();
              JPanel centrePane = new JPanel();
              JPanel southPane = new JPanel();
              // assign the layout managers
              mainPane.setLayout(new BorderLayout());
              westPane.setLayout(new GridLayout(4,1));
              centrePane.setLayout(new GridLayout(4,1));
              // create array of Panels for label textfield and buttons and make them left align
              Panel labelPane[] = new Panel[4];
              Panel buttontxtPane[] = new Panel[4];
              Panel textPane[] = new Panel[1];
              for (int i=0; i < labelPane.length; ++i) {
                   labelPane[i] = new Panel();
                   labelPane.setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < buttontxtPane.length; ++i) {
                   buttontxtPane[i] = new Panel();
                   buttontxtPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < textPane.length; ++i) {
                   textPane[i] = new Panel();
                   textPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              // add different label to the labelPane
              labelPane[0].add(new JLabel("Database:"));
              labelPane[1].add(new JLabel("Query:"));
              labelPane[2].add(new JLabel("Report File:"));
              labelPane[3].add(new Label(""));
              // textfields
              buttontxtPane[0].add(dbase);
              buttontxtPane[1].add(query);
              buttontxtPane[2].add(report);
              // buttons
              buttontxtPane[3].add(submitButton);
              submitButton.setMnemonic('s');
              buttontxtPane[3].add(reportButton);
              reportButton.setMnemonic('r');
              // text area to view the result
              textPane[0].add(displayArea);
              // add action listener to buttons
              submitButton.addActionListener(new ButtonHandler());
              reportButton.addActionListener(new ButtonHandler());
              for(int i=0; i < labelPane.length; ++i)
                   westPane.add(labelPane[i]);
              for(int i=0; i < buttontxtPane.length; ++i)
                   centrePane.add(buttontxtPane[i]);
              for(int i=0; i < textPane.length; ++i)
                   southPane.add(textPane[i]);
              mainPane.add(westPane, BorderLayout.WEST);
              mainPane.add(centrePane, BorderLayout.CENTER);
              mainPane.add(southPane,BorderLayout.SOUTH);
              return mainPane;
         /**Create a JPanel for General tab, divide it into three JPanels for label, displaytext
         * and buttons.Assign a Flowlayout manager to each panel. Add label, textfield
         * and buttons to respective panel. following constructors will be used
         * for Jlabel
         * public JLabel(String text)
         * Creates a JLabel instance with the specified text. The label is aligned against the leading edge of its display area, and centered vertically.
         * Parameters:
         * text - The text to be displayed by the label.
         protected Component buildGeneralPanel() {
              // main panel
              JPanel mainPanel = new JPanel();
              // divided into three panes. these panes will be added to mainPanel
              JPanel westPane = new JPanel();
              JPanel centrePane = new JPanel();
              JPanel southPane = new JPanel();
              // assign the layout managers
              mainPanel.setLayout(new BorderLayout());
              westPane.setLayout(new GridLayout(12,1));
              centrePane.setLayout(new GridLayout(12,1));
              // create array of Panels for label textfield and buttons and make them left align
              Panel labelPane[] = new Panel[12];
              Panel textPane[] = new Panel[12];
              Panel buttonPane[] = new Panel[2];
              for (int i=0; i < labelPane.length; ++i) {
                   labelPane[i] = new Panel();
                   labelPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < textPane.length; ++i) {
                   textPane[i] = new Panel();
                   textPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              for (int i=0; i < buttonPane.length; ++i) {
                   buttonPane[i] = new Panel();
                   buttonPane[i].setLayout(new FlowLayout(FlowLayout.LEFT));
              // add different label to the labelPane
              labelPane[0].add(new JLabel("Employee No"));
              labelPane[1].add(new JLabel("Name"));
              labelPane[2].add(new JLabel("Address"));
              labelPane[3].add(new JLabel("Suburb"));
              labelPane[4].add(new JLabel("State"));
              labelPane[5].add(new JLabel("PostCode"));
              labelPane[6].add(new JLabel("Date of Birth"));
              labelPane[7].add(new JLabel("Home Phone"));
              labelPane[8].add(new JLabel("Work Phone"));
              labelPane[9].add(new JLabel("Mobile"));
              labelPane[10].add(new JLabel("E-mail"));
              // add textfield component to textPane
              textPane[0].add(employeeID);
              textPane[1].add(name);
              textPane[2].add(address);
              textPane[3].add(suburb);
              textPane[4].add(state);
              textPane[5].add(pCode);
              textPane[6].add(dob);
              textPane[7].add(homePh);
              textPane[8].add(workPh);
              textPane[9].add(mobile);
              textPane[10].add(eMail);
              // add button to buttonPane and assign keyboard key for shortcut e.g Alt + n
              buttonPane[0].add(newButton);
              newButton.setMnemonic('n');
              buttonPane[0].add(addButton);
              addButton.setMnemonic('a');
              buttonPane[0].add(findButton);
              findButton.setMnemonic('r');
              buttonPane[0].add(updateButton);
              updateButton.setMnemonic('u');
              buttonPane[0].add(deleteButton);
              deleteButton.setMnemonic('d');
              // add actionlistener to the buttons
              newButton.addActionListener(new ButtonHandler());
              addButton.addActionListener(new ButtonHandler());
              findButton.addActionListener(new ButtonHandler());
              updateButton.addActionListener(new ButtonHandler());
              deleteButton.addActionListener(new ButtonHandler());
              for (int i = 0; i < labelPane.length; ++i)
                   westPane.add(labelPane[i]);
              for (int i = 0; i < textPane.length; ++i)
                   centrePane.add(textPane[i]);
              for (int i = 0; i < buttonPane.length; ++i)
                   southPane.add(buttonPane[i]);
              mainPanel.add(westPane,BorderLayout.WEST);
              mainPanel.add(centrePane,BorderLayout.CENTER);
              mainPanel.add(southPane,BorderLayout.SOUTH);
              return mainPanel;
         protected JPanel buildAuthorPanel(){
              JPanel authorPanel = new JPanel();
              JPanel authorPane = new JPanel();
              authorPanel.setLayout(new BorderLayout());
              authorPane.setLayout(new GridLayout(9,1));
              Panel pane[] = new Panel[9];
              for (int i=0; i < pane.length; i++) {
                   pane[i] = new Panel();
                   pane[i].setLayout(new FlowLayout(FlowLayout.CENTER));
              pane[0].add(new JLabel(""));
              pane[1].add(new JLabel(""));
              pane[2].add(new JLabel(""));
              pane[3].add(new JLabel(""));
              pane[4].add(new JLabel("Name:Jasper Lim Jiqiang"));
              pane[5].add(new JLabel("Admin:992365G"));
              pane[6].add(new JLabel(""));
              pane[7].add(new JLabel(""));
              pane[8].add(new JLabel(""));
              for (int i=0; i < pane.length; i++)
                   authorPane.add(pane[i]);
              authorPanel.add(authorPane, BorderLayout.CENTER);
              return authorPanel;

    Maybe something like this:
    <code>
    JTabbedPane tabbedPane = new JTabbedPane();
              JPanel introPanel = new JPanel();
              introPanel.add(createIntroPanel());
              ImageIcon img = new ImageIcon(getResourceString("tabIconFile"));
              tabbedPane.addTab(getResourceString("introTab"), img, introPanel);
    </code>
    plus
    <code>
    protected JPanel createIntroPanel()
              JPanel pane = new IntroPanel();
              return pane;
    </code>
    Klint

  • How can I use this code in Muse?

    Please, tell me with details how to paste this code, which the "add this" widget on Muse to appear...
    <!-- AddThis Smart Layers BEGIN -->
    <!-- Go to http://www.addthis.com/get/smart-layers to customize -->
    <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-538d2f0f4872fcfe"></script>
    <script type="text/javascript">
      addthis.layers({
        'theme' : 'transparent',
        'follow' : {
          'services' : [
            {'service': 'facebook', 'id': 'africa.si.zgz'},
            {'service': 'twitter', 'id': 'Africa_Si'},
            {'service': 'google_follow', 'id': 'u/0/b/103262715708033329485/103262715708033329485/posts'},
            {'service': 'linkedin', 'id': 'África-sí', 'usertype': 'company'},
            {'service': 'youtube', 'id': 'africasizgz'}
        'whatsnext' : {} 
    </script>
    <!-- AddThis Smart Layers END -->
    Thank you!

    Thank you, but I still have a problem.... When a copy it directly on Muse through "ctrl + v" I see the whole code as text on Muse and when I paste it thorugh object--> Insert HTML Muse says that they "couldn't generate de miniature", do you know what I'm doing wrong?
    Thank you!

  • How do I get this code into iBook Author?

    I would like to add an accordion menu to my iBook that will reveal a list of web links when clicked. Here is a link to an example with example code. I'm just not sure how to get this code and it's required external javascript file into iBook author.
    http://www.dynamicdrive.com/dynamici...m?expandable=3
    Any help would be appreciated

    Oops. Thanks. Here is a new link:
    http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu-bullet.htm

  • How could I fix this code

    Hii 2 all
    How could I change this statement for parameters list,, so the client_name can contain spaces ??
    add_parameter(p_id,'p_client_name',TEXT_PARAMETER, '''' || :cntrl.client_name || '''');
    cause it couldn't print and give syntax error when the :cntrl.client_name contains any spaces !!!!
    please help
    thanks:)

    First I must apologize, I asked you to test something that was not needed... for a moment I thought we were talking about web.show_document, that's why I asked you to test with double-quotes..
    Regarding your problem, Manu is right, there is not need to wrap around the parameter in quotes..
    add_parameter(p_id,'p_client_name',TEXT_PARAMETER, :cntrl.client_name);I have to ask you the same question that Manu asked you before, where are you using this parameter?
    In your Report you must be using in a piece of PL/SQL code, we need you to post that code...
    Edited by: Rodolfo Ferrari on Sep 10, 2009 4:44 PM

  • How can i improve this code ?

    DATA: t_bkpf TYPE bkpf.
    DATA: t_bseg type bseg_t.
    DATA: wa_bseg like line of t_bseg.
    select * from bkpf into t_bkpf where document type ='KZ' and bldat in s_bldat.
    select single * from bseg into wa_bseg where belnr = t_bkpf-belnr.
    append wa_bseg to t_bseg.
    endselect.
    loop at t_bseg into wa_bseg.
      at new belnr.
         if wa_bseg-koart EQ 'K'.
            // pick vendor wrbtr
         else
           // pick other line item's wrbtr
         endif.
      endat.
    endloop.
    i am guessing my select statements arnt efficient performance wise, secondly in the loop when i use  'at new belnr' it aint showing my any values  whereas i get all the vendors(KOART EQ 'K') when i dont use 'at new belnr' .
    why is this so and how can i make the code efficient ?
    Thanks..
    Shehryar

    Hi,
    1.Dont read all the fields from the table unless it is required in your program.
    This will tremendously improve your performance.
    2.Make use of the key fields of the table wherever possible
    In your scenario you could use the fields BUKRS,BELNR,GJAHR of the table BKPF in the WHERE Clause rather than
    other fields.This will improve your performance a lot..
    3.As BSEG is a cluster table it will cause performance problem in most cases.So try to read
    the required fields from it rather than reading all the fields.Again Make use of the key fields in the WHERE Clause
    here too to improve the performance..
    4.Remove SELECT..ENDSELECT and replace it with FOR ALL ENTRIES to improve the performance.
    Cheers,
    Abdul Hakim
    Mark all useful answers..

  • How can I get this code to display 20 lines

    I need to get this code I have written to display 20 lines at a time, then the 20 using the Enter key.
    How would I approach this?
    I thought of making a RandomAcessFile object, but that seems like overthinking the problem, and I'm not sure that I could get that to work anyway.
    import java.io.*;
    public class ReadIt
    public static void main(String[] args)
         throws IOException
              System.out.println ("Enter The Desired .java Filename.");
              System.out.println ("Do not add the .java extention.");
              String fname;
              EasyIn type = new EasyIn();
              fname = type.readString();
              String fndotjava = new String(fname + ".java");
              //System.out.println (fndotjava);
              File inFile = new File(fndotjava);
              InputStream istream;
              OutputStream ostream;
              istream = new FileInputStream(inFile);
              ostream = System.out;
              int c;
              try
                     while((c = istream.read()) != -1)
                           ostream.write(c);
              catch(IOException e)
                     System.out.println("Error: " + e.getMessage());      
              finally
                    istream.close();
                    ostream.close();                 
    }Thanks
    Brad

    Well, a RandomAccessFile together with a counter should work. However, you can also achieve this by buffering the input rather than writing it directly out
    java.util.Vector vect = new java.util.Vector();
    try{
         while((c = istream.read()) != -1){
             vect.append(c);
    catch(IOException e){
         System.out.println("Error: " + e.getMessage());      
    finally{
         istream.close();                 
    }     with the help of
    java.util.Vector.size() and
    java.util.Vector.elementAt(int index)
    you are able to display only 20 lines at a time, you just need the additional code for reading System.in
    public static void prompt(String s){
        System.out.print(s + " ");
        System.out.flush();
      public static String readData ( BufferedReader in)  {
        boolean verfuegbar = true;
        while ( verfuegbar){
          try{
            S = in.readLine();
            if ( S != null)verfuegbar = false ;
          catch (IOException e){System.out.print (e);}
        return S;
      }now it should work with
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    prompt("return for continuing");
    int twentscount = 0;
    int count = 0;
    do{
       while( count < 20 && twentscount+count < vect.size() ){
           outstream.write(vect.elementAt(twentscount + count).toString() );
           count++;
    prompt("return");
    readData(in);
    twentscount += 20;
    count = 0;
    while(twentscount + count < vect.size());sure, this is code from head, and you can make many changes (e.g. instead of using twentscount use the modulo (%) operator saving one variable (while count % 20 != 0 ).
    I'm also not sure if it will definitly run , since i haven't tested it (especialy for index borders).
    I hope this will give you enough hints for this possible solution.
    Adrian

  • How do I alter this code?

    This code makes an external text file scroll on the stage. I
    would like to alter it so that it continues to scroll while the
    mouse is down, as moving the text a tiny bit on each mouse click
    seems useless to me. Thanks, jcarruth.
    var external_txt:TextField = new TextField();
    var externalReq:URLRequest = new URLRequest("external.txt");
    var externalLoad:URLLoader = new URLLoader();
    externalLoad.load(externalReq);
    externalLoad.addEventListener(Event.COMPLETE, textReady);
    up_btn.addEventListener(MouseEvent.CLICK, scrollUp);
    down_btn.addEventListener(MouseEvent.CLICK, scrollDown);
    external_txt.x = 175;
    external_txt.y = 100;
    external_txt.border = true;
    external_txt.width = 200;
    external_txt.height = 200;
    external_txt.wordWrap = true;
    addChild(external_txt);
    function textReady(event:Event):void
    external_txt.text = event.target.data;
    function scrollUp(event:MouseEvent):void
    external_txt.scrollV --;
    function scrollDown(event:MouseEvent):void
    external_txt.scrollV ++;
    }

    I would like to see this work. I got 8 error message on
    running it. Are these some custom Class package? And I do not see
    Class instantiations here.
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: The
    class or interface 'URLRequest' could not be loaded.
    var externalReq:URLRequest = new URLRequest("external.txt");
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 3: The
    class or interface 'URLLoader' could not be loaded.
    var externalLoad:URLLoader = new URLLoader();
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 14: The
    class or interface 'Event' could not be loaded.
    function textReady(event:Event):void
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 20: The
    class or interface 'int' could not be loaded.
    var t:Timer=new Timer(50,0);
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 26: The
    class or interface 'MouseEvent' could not be loaded.
    function scrollUp(event:MouseEvent):void {
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 30: The
    class or interface 'MouseEvent' could not be loaded.
    function scrollDown(event:MouseEvent):void {
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 34: The
    class or interface 'MouseEvent' could not be loaded.
    function stopScrollF(evt:MouseEvent){
    **Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 37: The
    class or interface 'TimerEvent' could not be loaded.
    function scrollF(evt:TimerEvent){

  • How can I fix this code ?

    hello,
    I have a small problem with this code:
    #include  <fstream>
    #include  <iostream>
    #include  <algorithm>
    #include  <iterator>
    #include  <string>
    #include  <vector>
    using namespace std;
    int main()
         string from, to;
         cin >> from >> to;
         ifstream is(from.c_str());
         istream_iterator<string> ii(is);
         istream_iterator<string> eos;
         //  line 24: Error:
         vector<string> b(ii, eos);  //  line 24: Error:
         sort(b.begin(), b.end());
         ofstream os(to.c_str());
         ostream_iterator<string> oo(os, "\n");     
             unique_copy(b.begin(), b.end(), oo);     
             return !is.eof() && !os;          
             return 0;
    }When I compile this happens
    bash-2.05$ CC -V
    CC: Sun C++ 5.6 2004/06/02
    bash-2.05$ CC -o std_vector.out std_vector.cpp
    "std_vector.cpp", line 24: Error:
    Could not find a match for
    std::vector<std::string>::vector(std::istream_iterator<std::string, char, std::char_traits<char>, int>, std::istream_iterator<std::string, char, std::char_traits<char>, int>)needed in main().
    1 Error(s) detected.
    What can I do ?
    best regards
    Morten Gulbrandsen

    You have run into a documented limitation of the default libCstd implementation of the C++ standard library. The default library is not a complete implementation, and in particular lacks required template member functions that allow implicit type conversions. We still use this library for binary compatibility with earlier releases.
    The optional STLport version of the library is a full implementation of hte C++ Standard Library. If you don't need binary compatibility, meaning you don't need to link to code that uses libCstd, you can add the option -library=stlport4 to every CC command line, compiling and linking. Your sample code compiles with STLport.
    If you need to use libCstd, you might get this code to work by inserting explicit type conversions. I have not tried to see whether that actually can be done.

Maybe you are looking for

  • Flash Player wants to be updated all the time

    I am running FireFox 3.6.9, and have upgdated Flashplayer to 10.1 r53 (the latest) I keep getting notified when checking my plugin updates that Flash wants to be updated and is vulnerable with more info message of This Plugin version has a security v

  • Using the TC with another wireless device - non-ethernet

    So I have an odd situation, and I'm hoping someone much smarter than myself can lend a hand. I live in Japan, and my internet is a little unusual.  My router now is a cell-style box with no plugs beyond the power supply.  It's through a company calle

  • Does adobe have a plug in for adobe professional for imposition software

    We are a digital printer and need new imposition software Needed for European size Needs to be able to What is the biggest sheet size I can step and repeat onto Step and repeat up to 21up on an SRA3 sheet Resize PDF's Can I create a booklets and then

  • Need Help For Bios Update...

    Hi Buddies, my mobo (760GM-P23 (FX)) is working with an Athlon II X3 455, Kingston HyperX KHX1333C9D3B1K2/4G Dual Kit and with just on-board graphic. MSI Live Update shows the bios H.20 as my board's and H.A0 as upgrade version. Is this information c

  • A process called "NETserver" continually  my CPU

    My Activity Monitor shows me that a process called NETserver uses just short of 70% of the CPU, and does so continuously (i.e. at least over the past hour). Another process, mDNSResponder, gobbles up another 40%, and syslogd another 40%. Any ideas wh