Length of the p_file_name in wwsbr_api.upload_blob

Hi,
I am uploading blob file on portal 10 with
wwsbr_api.upload_blob (
p_file_name => p_doc_name,
p_blob => l_doc_content.doc,
p_mime_type => l_doc_content.mime_type)
the problem i have is that if the length of the p_file_name exceed 60 char it is truncated, i don't know if there is a way to load the entire file name or it is a limit of the system.
Can u help
Thks in advance

Hello,
Has anybody used this function successfully yet? I
am trying to use it, unfortunately, I am not that
experienced in working with blobs and I am getting
lost.
I understand most of the code in the sample that
comes with the package, however, I keep tripping on
the get_blob() function. I have skimmed through the
dbms_lob package but everything seems to be focused
on inserting the blob into a table. How do I create
a function like get_blob() that will download the
file/document into a blob variable?
Can somebody please give some sample code or step by
step instructions.
Thank you in advance for your help,
SteveWere you ever able to resolve this issue? I am having a similar issue now.

Similar Messages

  • Calculating and displaying the Length of the side of a triangle

    Hi everyone. I am currently working on Dragging and Stretching a triangle on screen. Ive got it working to a certain extent but the only problem is that whenever I go to the point from which i have to drag my triangle i.e. the Left hand Corner of the BAse at exactly 300,300 it redraws a new triangle below the existing one and then when i stretch it from the top and the right it leaves a trail of triangles everytime. But when i resize my window it clears the trail only to start agian when I drag or stretch it...
    All my code for wahtever I have done is displayed below. I would appreciate all the help that any one can offer.
    Secondly , as I stretch my triangle I would like to calculate My Length of the hypotenuse and the other 2 sides as they change and display it in System.out.println for now...
    PLEASE HELP
    the code is
    This is my Main Form --- Interactive Geometry.java
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    * InteractiveGeometry.java
    * Created on 30 November 2004, 20:29
    * @author  Kripa Bhojwani
    public class InteractiveGeometry extends javax.swing.JFrame {
        public EastPanel eastpanel;
        public Container container;
        public GeomPanel gp;
        public boolean pressed = false;
        public boolean pressT = false;
        public boolean pressR = false;
        /** Creates new form InteractiveGeometry */
        public InteractiveGeometry() {
            initComponents();
            eastpanel = new EastPanel();
            container = new Container();
            Model model = new Model(300,150,450,300,300,300);
            gp = new GeomPanel(model);
            container = getContentPane();
            container.add(eastpanel,BorderLayout.EAST);
            container.add(gp,BorderLayout.CENTER);
            setSize(1400,9950);
            gp.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseDragged(MouseEvent me) {
                    setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
                public void mouseMoved(MouseEvent me) {
                    setTitle("Moving: x=" + me.getX() + "; y=" + me.getY());
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            jMenuBar2 = new javax.swing.JMenuBar();
            jMenu2 = new javax.swing.JMenu();
            jMenuItem1 = new javax.swing.JMenuItem();
            jMenu1 = new javax.swing.JMenu();
            jMenuItem2 = new javax.swing.JMenuItem();
            addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
                public void mouseDragged(java.awt.event.MouseEvent evt) {
                    formMouseDragged(evt);
                public void mouseMoved(java.awt.event.MouseEvent evt) {
                    formMouseMoved(evt);
            addWindowListener(new java.awt.event.WindowAdapter() {
                public void windowClosing(java.awt.event.WindowEvent evt) {
                    exitForm(evt);
            jMenuBar2.setBackground(new java.awt.Color(0, 102, 204));
            jMenu2.setBackground(new java.awt.Color(222, 222, 238));
            jMenu2.setText("File");
            jMenu2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenu2ActionPerformed(evt);
            jMenuItem1.setBackground(new java.awt.Color(204, 255, 255));
            jMenuItem1.setText("Exit");
            jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem1ActionPerformed(evt);
            jMenu2.add(jMenuItem1);
            jMenuBar2.add(jMenu2);
            jMenu1.setBackground(new java.awt.Color(199, 215, 255));
            jMenu1.setText("Theorem ");
            jMenuItem2.setText("Pythagoras Theorem");
            jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jMenuItem2ActionPerformed(evt);
            jMenu1.add(jMenuItem2);
            jMenuBar2.add(jMenu1);
            setJMenuBar(jMenuBar2);
            pack();
        private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
        private void formMouseDragged(java.awt.event.MouseEvent evt) {
            // TODO add your handling code here:
        private void formMouseMoved(java.awt.event.MouseEvent evt) {
            // TODO add your handling code here:
        public void mouseDragged(MouseEvent me) {
            setTitle("Dragging: x=" + me.getX() + "; y=" + me.getY());
        private void jMenu2ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
        private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        /** Exit the Application */
        private void exitForm(java.awt.event.WindowEvent evt) {
            System.exit(0);
         * @param args the command line arguments
        public static void main(String args[]) {
            InteractiveGeometry ig = new InteractiveGeometry();
            ig.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            ig.show();
            // new InteractiveGeometry().show();
        // Variables declaration - do not modify
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar2;
        private javax.swing.JMenuItem jMenuItem1;
        private javax.swing.JMenuItem jMenuItem2;
        // End of variables declaration
    This is my Panel -- GeomPanel.java which draws everything -- /*
    * GeomPanel.java
    * Created on 30 November 2004, 20:29
    import java.awt.*;
    import java.util.*;
    import javax.swing.*;
    import java.awt.Graphics.*;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import java.awt.geom.Line2D;
    import java.awt.geom.Point2D;
    import java.awt.event.*;
    import java.awt.Graphics2D;
    import java.awt.geom.Ellipse2D;
    import javax.swing.event.TableModelListener;
    import javax.swing.JScrollPane;
    import javax.swing.event.*;
    import java.awt.Dimension;
    import java.awt.Container.*;
    * @author Kripa Bhojwani
    public class GeomPanel extends javax.swing.JPanel implements Observer, MouseMotionListener, MouseListener {
    private Model model;
    private boolean pressed = false;
    private boolean pressT = false;
    private boolean pressR = false;
    /** Creates new form GeomPanel */
    public GeomPanel(Model model) {
    this.model = model;
    model.addObserver(this);
    addMouseListener(this);
    addMouseMotionListener(this);
    initComponents();
    setBackground(Color.getHSBColor(6,600,660));
    public void paintComponent(Graphics gfx) {
    Graphics2D g = (Graphics2D) gfx;
    Point tc = model.getTop();
    Point lc = model.getLeft();
    Point rc = model.getRight();
    Point2D.Double p1 = new Point2D.Double(tc.getX(),tc.getY());
    Point2D.Double p2 = new Point2D.Double(lc.getX(),lc.getY());
    Point2D.Double p3 = new Point2D.Double(rc.getX(),rc.getY());
    Line2D.Double line = new Line2D.Double(p1, p2);
    Line2D.Double line1 = new Line2D.Double(p2, p3);
    Line2D.Double line2 = new Line2D.Double(p1, p3);
    g.setColor(Color.BLACK);
    g.draw(line);
    g.draw(line2);
    g.draw(line1);
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    private void initComponents() {
    setLayout(new java.awt.BorderLayout());
    addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
    public void mouseDragged(java.awt.event.MouseEvent evt) {
    formMouseDragged(evt);
    private void formMouseDragged(java.awt.event.MouseEvent evt) {
    // TODO add your handling code here:
    public void mouseClicked(MouseEvent e) {
    public void mouseDragged(MouseEvent e) {
    System.out.println("Dragged at "+ e.getX()+ "," + e.getY());
    if(pressed == true){
    model.setLeft(e.getX() , e.getY());
    else if(pressT == true){
    model.setTop(e.getX() , e.getY());
    else if (pressR == true){
    model.setRight(e.getX(), e.getY());
    else{
    pressed = false;
    pressT= false;
    pressR=false;
    repaint();
    public void mouseEntered(MouseEvent e) {
    public void mouseExited(MouseEvent e) {
    public void mouseMoved(MouseEvent e) {
    System.out.println("Mouse at " + e.getX() +"," + e.getY());
    public void mousePressed(MouseEvent e) {
    if (model.getLeft().getX()== e.getX() && model.getLeft().getY()== e.getY()){
    pressed = true;
    else if (model.getTop().getX()==e.getX() && model.getTop().getY()==e.getY()){
    pressT = true;
    else if(model.getRight().getX() == e.getX() && model.getRight().getY()==e.getY()){
    pressR = true;
    // else if(model.getCircle().getX() == e.getX() && model.getCircle().getY() == e.getY()){
    // inoval = true;
    else {
    pressed =false;
    pressT = false;
    pressR = false;
    } repaint();
    public void mouseReleased(MouseEvent e) {
    if(pressed == true){
    model.setLeft(e.getX(),e.getY());
    else if (pressT ==true ){
    model.setTop(e.getX(), e.getY());
    else if(pressR ==true){
    model.setRight(e.getX(),e.getY());
    else {
    pressed = false;
    pressT = false;
    pressR = false;
    repaint();
    public void update(Observable o, Object arg) {
    repaint();
    // Variables declaration - do not modify
    // End of variables declaration
    This is my Model class called Model.java which Holds all teh data for my triangle
    import java.awt.Point;
    import java.util.Observable;
    * Model.java
    * Created on 05 December 2004, 14:11
    * @author  Kripa Bhojwani
    public class Model extends Observable{
        private int  x1,x2,x3, y1,y2,y3;
        private int _transx;
        private int _transy;
        private int _c;
        private int _d;
        /** Creates a new instance of Model */
        public Model(int x1, int y1, int x2, int y2, int x3, int y3) {
            this.x1 = x1;
            this.y1 = y1;
            this.x2 = x2;
            this.y2 = y2;
            this.x3 = x3;
            this.y3 = y3;
            setChanged();
            notifyObservers();
        public void setTop(int x1, int y1){
            //this.x1 =x1;
            this.y1= y1;
            setChanged();
            notifyObservers();
        public void setRight(int x2, int y2){
            this.x2 = x2;
            // this.y2 =y2;
            setChanged();
            notifyObservers();
        public void setLeft(int x3, int y3){
            _transx = x3 - this.x3;
            _transy = y3 - this.y3;
            this.x3 += _transx;
            this.y3 += _transy;
            this.y2 += _transy;
            this.x2 += _transx;
            this.x1 += _transx;
            this.y1 += _transy;
            setChanged();
            notifyObservers();
        public Point getTop(){
            Point p = new Point(x1,y1);
            return p;
        public Point getRight(){
            Point p1 = new Point(x2,y2);
            return p1;
        public Point getLeft(){
            Point p3 = new Point(x3,y3);
            return p3;
        public void update() {
            setChanged();
            notifyObservers();
    This is my TableModel which is the JTable to display all the Cordinates and Lengths and other Measurements like angles etc./*
    * TableModel.java
    * Created on 03 December 2004, 15:08
    import javax.swing.JTable;
    import javax.swing.JScrollPane;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.Observer;
    import javax.swing.event.TableModelEvent;
    import javax.swing.table.AbstractTableModel;
    * @author Kripa Bhojwani
    public class TableModel extends AbstractTableModel implements Observer{
    private String[] columnNames = {"Point", "X Coordinate", "Y Coordinate"};
    private Object[][] data = {};
    private int rowCount;
    private int columnCount;
    /** Creates a new instance of TableModel */
    public TableModel() {
    rowCount = 0;
    columnCount = 3;
    public int getColumnCount() {
    return columnCount;
    public int getRowCount() {
    return rowCount;
    public String getColumnName(int col) {
    return columnNames[col];
    public void setColumnName (String[] name){
    columnNames = name;
    public void setValueAt(Object obj, int row, int col) {
    data[row][col] = obj;
    fireTableCellUpdated(row, col);
    TableModelEvent tme = new TableModelEvent(this);
    fireTableChanged(tme);
    public Object getValueAt(int row, int col) {
    return data[row][col];
    public void update(java.util.Observable o, Object arg) {
    This is the Panel on the east side of My Main application form which will display all the measurements and Cordinates ---EastPanel.java
    import java.awt.BorderLayout;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.event.TableModelListener;
    import java.awt.Dimension;
    * EastPanel.java
    * Created on 04 December 2004, 23:07
    * @author  Kripa Bhojwani
    public class EastPanel extends javax.swing.JPanel implements TableModelListener{
        private TableModel tm;
        /** Creates new form EastPanel */
        public EastPanel() {   
          initComponents();
            tm = new TableModel();
            JTable table1 = new JTable(tm);
            table1.setPreferredScrollableViewportSize(new Dimension(250,264));
            table1.getModel().addTableModelListener(this);
            JScrollPane sp = new JScrollPane(table1);
            add(sp,BorderLayout.EAST);
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        private void initComponents() {
            setLayout(new java.awt.BorderLayout());
        public void tableChanged(javax.swing.event.TableModelEvent e) {
        // Variables declaration - do not modify
        // End of variables declaration
    }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.text.NumberFormat;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.DefaultTableCellRenderer;
    public class G
    public G()
    TriangleModel tri = new
    ri = new TriangleModel(175,100,175,250,325,250);
    TriangleView view = new TriangleView(tri);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(view.getUIPanel(),
    Panel(), "North");
    f.getContentPane().add(view);
    f.getContentPane().add(view.getTablePanel(),
    Panel(), "South");
    f.setSize(500,500);
    f.setLocation(200,200);
    f.setVisible(true);
    public static void main(String[] args)
    new G();
    class TriangleModel // (x1,
    y1)
    {                                         //      |\
    static final int SIDES = 3; // | \
    private int cx, cy; // |
    | \
    Polygon triangle; // |_
    |_ _\ (x3, y3)
    int selectedIndex; // (x2,
    (x2, y2)
    NumberFormat nf;
    Line2D[] medians;
    Point2D centroid;
    public TriangleModel(int x1, int y1, int x2, int
    int y2, int x3, int y3)
    int[] x = new int[] { x1, x2, x3 };
    int[] y = new int[] { y1, y2, y3 };
    triangle = new Polygon(x, y, SIDES);
    nf = NumberFormat.getNumberInstance();
    nf.setMaximumFractionDigits(1);
    public boolean contains(Point p)
    // Polygon.contains doesn't work well enough
    return (new Area(triangle)).contains(p);
    public boolean isLineSelected(Rectangle r)
    Line2D line = new Line2D.Double();
    for(int j = 0; j < SIDES; j++)
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    int x1 = x[j];
    int y1 = y[j];
    int x2 = x[(j + 1) % SIDES];
    int y2 = y[(j + 1) % SIDES];
    line.setLine(x1, y1, x2, y2);
    if(line.intersects(r))
    selectedIndex = j;
    return true;
    selectedIndex = -1;
    return false;
    * Only works for right triangle with right angle
    angle at (x2, y2)
    public void moveSide(int dx, int dy, Point p)
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    switch(selectedIndex)
    case 0:
    x[0] += dx;
    x[1] += dx;
    break;
    case 1:
    y[1] += dy;
    y[2] += dy;
    break;
    case 2:
    double rise = y[2] - y[0];
    double run = x[2] - x[0];
    double slope = rise/run;
    // rise / run == (y[2] - p.y) / (x[2]
    ] - p.y) / (x[2] - p.x)
    x[2] = p.x + (int)((y[2] - p.y) /
    )((y[2] - p.y) / slope);
    // rise / run == (p.y - y[0]) / (p.x
    y - y[0]) / (p.x - x[0])
    y[0] = p.y - (int)((p.x - x[0]) *
    )((p.x - x[0]) * slope);
    public void translate(int dx, int dy)
    triangle.translate(dx, dy);
    public Polygon getTriangle()
    return triangle;
    public String findCentroid()
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    // construct the medians defined as the line
    the line from
    // any vertex to the midpoint of the opposite
    opposite line
    medians = new Line2D[x.length];
    for(int j = 0; j < x.length; j++)
    int next = (j + 1) % x.length;
    int last = (j + 2) % x.length;
    Point2D vertex = new Point2D.Double(x[j],
    Double(x[j], y[j]);
    // get midpoint of line opposite vertex
    double dx = ((double)x[last] -
    le)x[last] - x[next])/2;
    double dy = ((double)y[last] -
    le)y[last] - y[next])/2;
    Point2D oppLineCenter = new
    Center = new Point2D.Double(x[next] + dx,
    y[next]
    y[next] + dy);
    medians[j] = new Line2D.Double(vertex,
    uble(vertex, oppLineCenter);
    // centroid is located on any median 2/3 the
    2/3 the way from the
    // vertex (P1) to the midpoint (P2) on the
    ) on the opposite side
    double[] lengths = getSideLengths();
    double dx = (medians[0].getX2() -
    etX2() - medians[0].getX1())*2/3;
    double dy = (medians[0].getY2() -
    etY2() - medians[0].getY1())*2/3;
    double px = medians[0].getX1() + dx;
    double py = medians[0].getY1() + dy;
    //System.out.println("px = " + nf.format(px)
    rmat(px) +
    // "\tpy = " +
    py = " + nf.format(py));
    centroid = new Point2D.Double(px, py);
    return "(" + nf.format(px) + ", " +
    ", " + nf.format(py) + ")";
    public String[] getAngles()
    double[] lengths = getSideLengths();
    String[] vertices = new
    es = new String[lengths.length];
    for(int j = 0; j < lengths.length; j++)
    int opp = (j + 1) % lengths.length;
    int last = (j + 2) % lengths.length;
    double top = lengths[j] * lengths[j] +
    lengths[last] *
    lengths[last] * lengths[last] -
    lengths[opp] *
    lengths[opp] * lengths[opp];
    double divisor = 2 * lengths[j] *
    lengths[j] * lengths[last];
    double vertex = Math.acos(top /
    h.acos(top / divisor);
    vertices[j] =
    ertices[j] = nf.format(Math.toDegrees(vertex));
    return vertices;
    public String[] getLengths()
    double[] lengths = getSideLengths();
    String[] lengthStrs = new
    rs = new String[lengths.length];
    for(int j = 0; j < lengthStrs.length; j++)
    lengthStrs[j] = nf.format(lengths[j]);
    return lengthStrs;
    public String[] getSquares()
    double[] lengths = getSideLengths();
    String[] squareStrs = new
    rs = new String[lengths.length];
    for(int j = 0; j < squareStrs.length; j++)
    squareStrs[j] = nf.format(lengths[j] *
    lengths[j] * lengths[j]);
    return squareStrs;
    private double[] getSideLengths()
    int[] x = triangle.xpoints;
    int[] y = triangle.ypoints;
    double[] lengths = new double[SIDES];
    for(int j = 0; j < SIDES; j++)
    int next = (j + 1) % SIDES;
    lengths[j] = Point.distance(x[j], y[j],
    (x[j], y[j], x[next], y[next]);
    return lengths;
    class TriangleView extends JPanel
    private TriangleModel model;
    private Polygon triangle;
    private JTable table;
    private JLabel centroidLabel;
    private boolean showConstruction;
    TriangleControl control;
    public TriangleView(TriangleModel model)
    this.model = model;
    triangle = model.getTriangle();
    showConstruction = false;
    control = new TriangleControl(this);
    addMouseListener(control);
    addMouseMotionListener(control);
    public void paintComponent(Graphics g)
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D)g;
    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
    RenderingHints.VALUE_ANTIALIAS_ON);
    g2.draw(triangle);
    if(model.medians == null)
    centroidLabel.setText("centroid location:
    id location: " + model.findCentroid());
    // draw medians and centroid point
    if(showConstruction && !control.dragging)
    g2.setPaint(Color.red);
    for(int j = 0; j < 3; j++)
    g2.draw(model.medians[j]);
    g2.setPaint(Color.blue);
    g2.fill(new
    g2.fill(new Ellipse2D.Double(model.centroid.getX() -
    2,
    model.centroid.getY()
    model.centroid.getY() - 2, 4, 4));
    public TriangleModel getModel()
    return model;
    public JTable getTable()
    return table;
    public JLabel getCentroidLabel()
    return centroidLabel;
    public JPanel getUIPanel()
    JCheckBox showCon = new JCheckBox("show
    ox("show construction");
    showCon.addActionListener(new
    ener(new ActionListener()
    public void actionPerformed(ActionEvent
    (ActionEvent e)
    boolean state =
    boolean state =
    ((JCheckBox)e.getSource()).isSelected();
    showConstruction = state;
    repaint();
    JPanel panel = new JPanel();
    panel.add(showCon);
    return panel;
    public JPanel getTablePanel()
    String[] headers = new String[] { "", "", "",
    // row and column data labels
    String[] rowHeaders = {
    "sides", "lengths", "squares", "angles",
    ", "angles", "degrees"
    String[] sidesRow = { "vertical",
    rtical", "horizontal", "hypotenuse" };
    String[] anglesRow = { "hyp to ver", "ver to
    "ver to hor", "hor to hyp" };
    // collect data from model
    String[] angles = model.getAngles();
    String[] lengths = model.getLengths();
    String[] squares = model.getSquares();
    String[][] allData = { sidesRow, lengths,
    lengths, squares, anglesRow, angles };
    int rows = 5;
    int cols = 4;
    Object[][] data = new Object[rows][cols];
    for(int row = 0; row < rows; row++)
    data[row][0] = rowHeaders[row];
    for(int col = 1; col < cols; col++)
    data[row][col] = allData[row][col -
    lData[row][col - 1];
    table = new JTable(data, headers)
    public boolean isCellEditable(int row,
    ble(int row, int col)
    return false;
    DefaultTableCellRenderer renderer =
    (DefaultTableCellRenderer)table.getDefaultRenderer(St
    ring.class);
    renderer.setHorizontalAlignment(JLabel.CENTER);
    centroidLabel = new JLabel("centroid
    centroid location: ", JLabel.CENTER);
    Dimension d =
    sion d = centroidLabel.getPreferredSize();
    d.height = table.getRowHeight();
    centroidLabel.setPreferredSize(d);
    JPanel panel = new JPanel(new
    anel(new BorderLayout());
    panel.setBorder(BorderFactory.createTitledBorder("tri
    angle data"));
    panel.add(table);
    panel.add(centroidLabel, "South");
    return panel;
    class TriangleControl extends MouseInputAdapter
    TriangleView view;
    TriangleModel model;
    Point start;
    boolean dragging, altering;
    Rectangle lineLens; // used for line
    line selection
    public TriangleControl(TriangleView tv)
    view = tv;
    model = view.getModel();
    dragging = altering = false;
    lineLens = new Rectangle(0, 0, 6, 6);
    public void mousePressed(MouseEvent e)
    Point p = e.getPoint();
    lineLens.setLocation(p.x - 3, p.y - 3);
    // are we over a line
    if(model.isLineSelected(lineLens))
    start = p;
    altering = true;
    // or are we within the triangle
    else if(model.contains(p))
    start = p;
    dragging = true;
    public void mouseReleased(MouseEvent e)
    altering = false;
    dragging = false;
    view.getCentroidLabel().setText("centroid
    centroid location: " +
    model.findCentroid());
    view.repaint(); // for the construction
    truction lines
    public void mouseDragged(MouseEvent e)
    Point p = e.getPoint();
    if(altering)
    int x = p.x - start.x;
    int y = p.y - start.y;
    model.moveSide(x, y, p);
    updateTable();
    view.repaint();
    start = p;
    else if(dragging)
    int x = p.x - start.x;
    int y = p.y - start.y;
    model.translate(x, y);
    view.repaint();
    start = p;
    private void updateTable()
    String[] lengths = model.getLengths();
    String[] squares = model.getSquares();
    String[] angles = model.getAngles();
    JTable table = view.getTable();
    for(int j = 0; j < angles.length; j++)
    table.setValueAt(lengths[j], 1, j + 1);
    table.setValueAt(squares[j], 2, j + 1);
    table.setValueAt(angles[j], 4, j + 1);
    view.getCentroidLabel().setText("centroid
    centroid location: " +
    model.findCentroid());
    Hey sorry mate.. ive got a nother problem.
    I need to add loads of theorems to this tool. so i need a JMenu Bar called File with all the normal things. then another Menu called Theorems where i can have a list of JMenuItems with the theorem names --- Like when they click on Pythagoras Theorem it opens up all the triangle and the traingle data that u helped me with.
    The thing is im using netbeans and in netbeans i can do it coz its there and all you got to do is put the components together.
    Please Help
    Thanks...
    Sharan

  • The length of the password entry field in the BEx Analyser

    Hi,
    The password is 8 characters in the BW system.
    When users changing their newly assigned passwords. When logging into the BEx Analyser, and prompted to change the password, a password entry box is displayed, with an entry field longer then 8 characters. Some users are therefore entering passwords longer then 8 characters. This is fine when they first login, but when they try come back to the system, their logon fails.
    Can something be done to restrict the length of the password entry field in the BEx Analyser?
    Many Thanks
    Jonathan

    Hi Jonathan
    we are having the same problem - did you find a way to resolve this?  I did not find any SAP notes referring to the issue.
    Regards
    Hayley

  • The length of the recording and exporting truncated

    Hi there.
    It's my first venture into GarageBand. I have just a few questions.
    First, how can I tell the length of my recording without having to listen to the entire session? Dragging the indicator bar in the window to move it along takes a very long time, is there a quicker way to do this?
    Second, I have been exporting my files to iTunes to burn CD's. I am seeing that the file get's shortened in the process. It's not just a small clip, but rather edits out over 15 minutes on one file. Any thoughts? I called Apple and they knew nothing.

    To determine the length:
    - Switch the meter that shows bars and beats to minutes and seconds (by clicking on the clock icon).
    - Scroll to the end of the song.
    - Click into the timeline's ruler, and the cursor will be taken there, the meter showing the minutes and seconds.
    As for the export: Do you see the little purple triangle in the timeline, pointing to the left? That's your End of Song marker. Does it sit at the right position? If not, move it there and try exporting again. And since this little ******* is playing tricks sometimes, a more exact way of exporting is using the circle function and setting the circle section exactly from the beginning to the end of what you want to export.
    Oh, and by the way: How long is your recording? If it exceeds 999 bars, then GB will only export until bar 999, although your whole recording is still there.
    Come back and tell us what you found out!

  • The type and the length of the members of the structures

    I am making the BC-XAL program.
    Reading `XAL_Interface_Documentation_11.pdf', now I succeeded in "Reading All Saved Monitor Sets" and "Reading All Monitors of a Monitor Set". but I can't find the type and the length of the member of the Structure BAPITNDEXT, so I cannot get the Monitoring Tree of a Monitor.
    where can I get any documents or information ?

    This is how it looks in my 46c system.
    MTSYSID         SYSYSID         CHAR      8     0R/3 System, name of R/3 System                                 
    MTMCNAME        ALMCNAME        CHAR     40     0Alert: name of monitoring context                              
    MTNUMRANGE      ALTIDNUMRG      CHAR      3     0Alert: monitoring type number range (perm., temp, ...)         
    MTUID           ALTIDUID        CHAR     10     0ALert: Unique Identifier for  Monitoring Types (used in TID)   
    MTCLASS         ALTIDMTCL       CHAR      3     0Alert: monitoring type class (perf., single msg.,...)          
    MTINDEX         ALTIDINDEX      CHAR     10     0Alert: internal handle for TID                                 
    EXTINDEX        ALTIDINDEX      CHAR     10     0Alert: internal handle for TID                                 
    ALTREENUM       ALTREENUM       INT4     10     0Alert: MT Tree info: Number of tree                            
    ALIDXINTRE      ALIDXINTRE      INT4     10     0Alert: Tree Info: Index of MT in Tree                          
    ALLEVINTRE      ALLEVINTRE      INT4     10     0Alert: Tree Info: Level of MTE in Tree                         
    ALPARINTRE      ALPARINTRE      INT4     10     0Alert: Tree Info: Index of Parent of MT in Tree                
    OBJECTNAME      ALMOBJECT       CHAR     40     0Alert: Name of Monitoring Object                               
    MTNAMESHRT      ALMTNAMESH      CHAR     40     0Alert: Short Name of Monitoring Type                           
    CUSGRPNAME      ALCUSGROUP      CHAR     40     0Alert: Customization: Name of Customization Group              
    DELIVERSTA      ALDELIVSTA      INT4     10     0Alert: MT Val: Delivery Status                                 
    HIGHALVAL       ALVALUE         INT4     10     0Alert: alert value (1 = green, 2 = yellow, ....)               
    HIGHALSEV       ALSEVERITY      INT4     10     0Alert: severity (alerts, monitoring type custom..)             
    ALSYSID         SYSYSID         CHAR      8     0R/3 System, name of R/3 System                                 
    MSEGNAME        ALMSEGNAME      CHAR     40     0Alert: name of monitoring segment                              
    ALUNIQNUM       ALAIDUID        CHAR     10     0Alert: Unique Identifier to be used in AID (char10)            
    ALINDEX         ALINDEX         CHAR     10     0Alert: internal handle                                         
    ALERTDATE       ALDATE          DATS      8     0Alert: date                                                    
    ALERTTIME       ALTIME          TIMS      6     0Alert: Time value in timeformat                                
    DUMMYALIGN      ALDUMMYC2       CHAR      2     0Alert: Dummy field. Purpose: Alignment of date/time 16 byte    
    LASTVALDAT      ALDATE          DATS      8     0Alert: date                                                    
    LASTVALTIM      ALTIME          TIMS      6     0Alert: Time value in timeformat                                
    LASTVALDUM      ALDUMMYC2       CHAR      2     0Alert: Dummy field. Purpose: Alignment of date/time 16 byte    
    ACTUALVAL       ALVALUE         INT4     10     0Alert: alert value (1 = green, 2 = yellow, ....)               
    ACTUALSEV       ALSEVERITY      INT4     10     0Alert: severity (alerts, monitoring type custom..)             
    VALSYSID        SYSYSID         CHAR      8     0R/3 System, name of R/3 System                                 
    VMSEGNAME     ALMSEGNAME     CHAR     40     0     Alert: name of monitoring segment                                  
    VALUNIQNUM     ALAIDUID     CHAR     10     0     Alert: Unique Identifier to be used in AID (char10)                                  
    VALINDEX     ALINDEX     CHAR     10     0     Alert: internal handle                                  
    VALERTDATE     ALDATE     DATS     8     0     Alert: date                                  
    VALERTTIME     ALTIME     TIMS     6     0     Alert: Time value in timeformat                                  
    VALERTDUM     ALDUMMYC2     CHAR     2     0     Alert: Dummy field. Purpose: Alignment of date/time 16 byte                                  
    COUNTOFACT     ALCNTACTAL     INT4     10     0     Alert: MT Val: Count of active Alerts                                  
    COUNTSUM     ALCNTSUMAL     INT4     10     0     Alert: MT Val: Sum of Alerts in MT                                  
    VISUSERLEV     ALVISILEVL     INT4     10     0     Alert: MTE type dev cust: Visible on user level (op,exp,dev)                                  
    TDSTATUS     ALTDSTATUS     INT4     10     0
         Alert: MT: Type Def Status
    Welcome to SDN.
    Regards,
    Rich Heilman

  • Calculating the length of the longest side of a polygon

    If you want to calculate the length of the longest side of a polygon -- for example a rectangle -- how can that be done using the standard geometrical functions of spatial in an oracle 10g2 database?
    SDO_LENGHT delivers the outline of the polygon. If have looked at the LRS functions, but could not come up with a combination that delivers me what I am looking for. Any suggestion is appreciated.

    What do you see as the longest side?
    Is that the longest stretch between 2 consecutive vertices?
    If this is the case, this sql could be of help, which could need maybe some optimisation and extension (calculates straigth distance between 2 consecutive vertices).
    select id, p_side_nr, p_side,  p_side_length
    from
    select id,  p_side_nr, p_side, sdo_geom.sdo_length(p_side, 0.005) p_side_length,  max(sdo_geom.sdo_length(p_side, 0.005)) over (partition by id) max_p_side_length
    from
    select id, p_side_nr,
           sdo_geometry(2002, NULL, NULL,
                 SDO_ELEM_INFO_ARRAY(1,2,1),
                 SDO_ORDINATE_ARRAY(startx, starty, endx, endy)
                ) p_side
    from
         select
               startp.id, startp.x startx, startp.y starty, startp.v_id p_side_nr, endp.x endx, endp.y endy, endp.v_id
         from
              select  s.id, t.id v_id, t.x, t.y
              from your_table_name s, table(sdo_util.getvertices(geometry)) t
              ) startp
              select s.id, t.id v_id, t.x, t.y
              from your_table_name s, table(sdo_util.getvertices(geometry)) t
              ) endp
         where startp.id = endp.id
         and startp.v_id = endp.v_id - 1
    ) where p_side_length = max_p_side_lengthif you do not need the geometry of that longest side, you could follow Ivan's suggestion as a shortcut by using Pythagoras.
    Edited by: lucvanlinden on Sep 2, 2008 7:48 PM

  • Error on activating the table "DB length of the key of table too large"

    Hi Experts,
    I am getting the error while activating my table PSM_REQ_BO_ELM_NAME.  Activation error log is as follows
    "DB length of the key of table PSM_REQ_BO_ELM_NAME is too large (>900)"..
    I have a table which has 4 filed as key one with char 6 and rest 3 with char 120 each.
    Could you please help me to get rid of this error.
    Thanks in advance.
    Regards,
    Pradeep

    When ever we create a table in Data dictionary, a corresponding database table will be created in Data base server. For the primary key we maintained in Data Dictionary, another data base table will be created seperately where as the table length should not exceed some limit set by the Administrator.
    So, Reduce the length of the primary key in the table by deleting the field as key field/ reducing the size of the field.
    In your case, maintain the primary key field length not more than 400.
    ***Length if the Primary key should not exceed 120. other wise performance will be low while fetching the data.

  • What is the length of the Lightning cable that comes with the iPad Air?

    Actually have three questions.
    1. What is the length of the Lightning cable that came with my iPad Air? I ask because I might need to purchase a new one.
    2. My current Lightning cable, the one that came with my Air, the end of the cable, the rubber is coming off, it's stretched. Would AC+ send me a new one?
    3. I have an iPhone 5s also, does the iPhone have it's own unique Lightning cable or can I use my iPad Air Lightning cable to charge my iPhone and vice versa, are the Lightning cables universal with the newer products?
    Thanks.

    http://store.apple.com/us/ipad/ipad-accessories/cables-docks#!

  • If we can increase the length of the Short Text field in a purchase order?

    Hi Experts,
    Please suggest if we can increase the length of the Short Text field in a purchase order?
    If yes, How? and what will be the impact?
    Thanks
    Gavar

    Dear Arpit,
    You can use PO Text field for long description of the material.
    Regards,
    Manish Jain

  • Output data to txt file with full length of the field as in database

    Hi
    I have a problem related to output data I ntxt file on server
    for eg
    CONCATENATE
    wa_sagadr_outtab-seqno
    wa_sagadr_outtab-bpext
    wa_sagadr_outtab-name_org1
    wa_sagadr_outtab-country INTO wa_sagadr_text SEPARATED BY ''.
    the output is separated by single space irrespective of database length of the field , I want to display all the lenth of the database field eventhough the remaining space is blank ie if a field is 20 char in dtabase and only filled with 6 char the whole 20 char lenth should be displayed in the output file
    ouput as below
    required format ie space equvalent to as in database lenght
    000001       700006               C4 Plant AMD Export Sdn.Bhd.so on.
    my format as coming single space in between only
    000001 700006 C4 Plant AMD Export Sdn.Bhd
    pls suggest

    For this maintain an work area with the fields and structure same as the one which you want.
    ten populate the work are and write to file.
    concatenate will not work.
    e.g.
    DATA: begin of wa_sagadr_text,
              seqno like wa_sagadr_outtab-seqno,
              bpext like wa_sagadr_outtab-bpext,
              name_org1 like wa_sagadr_outtab-name_org1,
              country like wa_sagadr_outtab-country
              end of wa_sagadr_text,
    clear wa_sagadr_text.
    wa_sagadr_text-seqno = wa_sagadr_outtab-seqno.
    wa_sagadr_text-bpext= wa_sagadr_outtab-bpext.
    wa_sagadr_text-name_org1 = wa_sagadr_outtab-name_org1.
    wa_sagadr_text-country = wa_sagadr_outtab-country INTO wa_sagadr_text.
    transfer wa_sagadr_text to outputfile
    or write:/ your fields.

  • I made a duplicate copy of an imovie HD project and when I updated the titles on the copy, the video stuttered . I'm using Snow Leopard OSX. The length of the movie increased unexpedtedly too.

    I made a duplicate  of an imovie HD project so I could have two different versions. I tried making the copies both by using File> Duplicate and the Save As command in imovie.
    When I changed the title on the copy, the video stuttered when I played it back.  Also the overall length of the movie increased by about 6 seconds throwing off some sync even though the replacement title was exactly the same length in seconds and frames as the one I replaced.
    any thoughts how to fix this?
    I'm using OSX 10.6.8.
    thanks.

    *24 December 2009*
    *Dear Mac Users:*
    Hello. Thanks to AppleMan1958 for answering my question about how to edit an iMovie project
    on another computer.
    Here is a question related to the process of transferring the iMovie '09 project file from my friend's
    computer to an external drive so that I can edit that project in iMovie '09 on my MacBook Pro:
    How do I know if my Smart Disk FireLite portable external drive is formatted to MAC OS X Extended (journaled)? How I do format this Smart Disk FireLite USBFLB80C to MAC OS X Extended (journaled)?
    When I connect the Smart Disk FireLite to my MacBook Pro via USB, open iMovie '09, and select View
    Events By Disk or rather "Group Events By Disk," an icon for the FireLite external drive appears, but there is a yellow triangle with a black exclamation mark on the icon for the external drive. What does this "warning" mean? There are MP3s of music on the same external drive and they open just fine in iTunes. The one iMovie project file that is already on the drive will not open up in iMovie.
    So, how do I properly format this external drive in order to transfer an iMovie project file from my friend's computer so that I can edit it on my MacBook Pro using iMovie '09?
    Sincerely,
    Corey

  • How do i make a still image (photo) fit the length of the music? I record music and want to put the tracks to a video file with a still image of my business logo in the background. Any help?

    How do I make a still image (photo) fit the length of the music? I record music and want to convert the tracks to a video file with a still image of my business logo in the background. On windows movie maker you could just select "fit to music" but this program isnt as easy to figure out! Any help?

    Double-click on the still image in the project timeline to open the Inspector. In the Inspector, adjust the duration by typing in a new duration to match the length of your music. I think the limit for a still image is 10 minutes. If you need more than this, simply drag the image into the timeline again then adjust its duration. The two images will play seamlessly (no gap will be visible).
    See this iMovie Help topic:
    http://help.apple.com/imovie/#mov3a883915
    You can achieve more precision when entering durations by changing a preference in the menu item iMovie Preferences. Check (tick) the preference for Show Time As HH:MM:SS:frames. This will enable you to enter the duration of stills down to the frame level, rather than full seconds (NTSC is 30 frames per second; PAL is 25 fps). When entering times, type a colon between each time segment, such as 2:50:15, which represents 2 minutes 50 seconds and 15 frames. For 5 seconds 20 frames you would enter 5:20 and so forth.
    Note that the music will only run to the length of the video in the timeline (in your case, the still images). So, after increasing the stills duration you will need to drag the end of the music track as far as required. The stills can be dragged inwards to reduce the duration if necessary.
    John
    Message was edited by: John Cogdell - added Note

  • How to calculate length of the string in transformation file

    Hello all
    I have tried a number of ways and I am not able to calculate the length of the incoming field in transformation file for my data load. Here is the issue.
    I have an incoming string of length 10 and I need to use it to update multiple dimensions which will need first 2, 4 ,6 , 8 characters respectively.
    Now in transformation file ID=ID(1:2) works perfect. However, the BW InfoObject will have multiple values as shown below:
    ID
    Description
    AB
    Business
    ABCD
    Business Organization
    ABCDEF
    Business Line
    ABCDEFGH
    Product Family
    ABCDEFGHIJ
    Product Line
    ABCDEFGHIJKL
    Brand
    I want to update my dimension for Business Organization. I need to update only the records where the length of the incoming string is 4. If I do ID(1:4), I will get the duplicate records and will see the ID less than 4 characters in rejected records. The latter is not such a big issue but the former one is as I need to fetch the right description as well. The formula should check the length and then only pass the record else a dummy value.
    A formula to achieve this in the transformation file is what I am looking for.
    Regards
    Gajendra

    Thanks Vadim for the quick response!
    I am also trying something similar and really appreciate your input here. However, I am not sure if the conversion is really happening.
    Here is what I have done:
    But the strings <> 4 in length are still passing through.

  • I rented a movie on my iPad. It downloaded fine but would only play 36 minutes, 5 seconds worth of the movie; although the time kept running for the length of the movie. Can this be fixed or do I need to get a refund?

    I rented a movie on my iPad. It downloaded fine but would only play 36 minutes, 5 seconds worth of the movie; although the time kept running for the length of the movie. Can this be fixed or do I need to get a refund?

    You can try a rest:
    Reset iPad:  Press and hold the On/Off Sleep/Wake button and the Home
    button at the same time for at least ten seconds, until the Apple logo appears.
    - If that does work, contact iTunes and request a redownload.  You can ask for a refund though.

  • How to change the lengths of the layout

    Hi ,
    I am executing one report, output is coming fine but next if i go to print preview for PO number only 9 digits are appearing one digit is missing, actually column is trucated, there in print preview there is one tab called Change Layout, there if i see length of the PO no is 9, so its showing only 9 digits, actually length of the PO no should be 10.in change layout the length is editable i can change from 9 to 10, after that there is a button called copy, then it will show correctly, it works only one time, so each and every time user has to change the length, so can any one suggest how to change that length in the layout permanently, bcos there is no save button there.
    Can any one tell me from where all these lengths are coming which are appearing in change layout.Surely its not coming from the report.

    Hi friend,
    That depends upon the space provided by the ALV column for that variable or the heading size its not based on the data element size.
    If you want to be more clear lust count the space available for each field available at the print preview.
    The details for that are stored in table T180S just see the documentation available for that table.
    And see when the table is getting filled like that so that you will be able to find a solution where and how it is getting populated.
    Use column width optimization for getting the correct output.
    If you have any queries in this please revert back to me i will help you.
    Thanks,
    Sri Hari
    Edited by: srihari.kumar on Jan 5, 2012 4:01 PM

Maybe you are looking for