Requesting all for urgent help ...Designing a new GUI for KM docs.

Hi all,
As i know the KM docs are opened in a new browser ( IE or Firefox ) can we display them in a sort of GUI which can have limited options like " No File save as ", or "Print " etc, can this be done? Can someone give me a workflow as to how these are fetched and executed in browser and **if i have the JSP scripts for blocking some browser options and keyboard keys where do i write them ?**
Requesting your help please ,
Many thanks in advance
SantoshKumar Adapa
Edited by: Santosh Kumar Adapa on Mar 25, 2008 7:49 AM

Hi Sumit,
Thanks for the reply the blog was a great starter for me, but my primary concern is like when u open a KM doc its displayed in a browser right like IE or Firefox, which has all file options like save as, print etc, now my task is to make the docs available to only a limited no of ppl who can only see them but cannot save it, for this i have been asked to display the KM docs in a new GUI which lacks all these options.I know tht we can use some scripting to block the browser options and disable the keyboard strokes even but i donot know how to integrate these scripts to where and how far is this approach feasable?
Can you please help me out with this or else suggest me an alternate method of doing this using out KM layouts?
Thanks in advance
Santosh

Similar Messages

  • Need Help to create new screen for RF Sapconsole

    Hi Guru's
    I'm new on RF (but some years in ABAP) since last week.
    I need help to create new screens for RF (SAPLLMOB).
    Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
    I have to develop 2 new screens with really few time.
    And, another subsidiary question :
    how SAP can transfert information between the flash gun and the screen i have developped.
    Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
    It's a new strange world for me today...
    Many thanks to everyone who can explain me
    Alain

    hi,
    I am facing this problem as well. Is there any reference to create the new screen?
    Hope someone can help! Thanks!
    Regards,
    Darren

  • Looking for some help in creating an ItemFilter for a Targeter

    Looking for some help in creating an ItemFilter for a Targeter
    Need a examples for creating itemfilter and TargeterFirst

    Hi David,
    We can integrate Syncfusion with LightSwitch application, if you want to customize column when create a report using syncfusion reportviewer, since I didn't try this third party
    extension before, I think you could consider getting help from
    syncfusion forum, more syncfusion experts can help you on this issue.
    Thanks for your understanding.
    Best regards,
    Angie
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Urgent help - Xtra and new firmware probl

    After trying to get my Xtra to work with my new vista P.C i discovered that i needed to upgrade the firmware.
    so after reading that it deletes the contents of the Xtras HDd ( formats it) i backed up everything and then downlaoded the firmware, and ran the upgrade.
    and then it all came to a stop, a windows mnessage came on screen about transfering files using windows media player or take no action, i left this message alone then my Xtra re-booted as advised on screen, and now its stuck at
    Rescue mode v.3, with all the usual options, most of which end with 'Firmware error' Before returning to the rescue screen.
    The firmware upgrade only tells me that the player is not conected.
    the big bigf problem is thatr i need the player to work for tommorow. ( UK time is now 0:45pm, i ned it working by 2:00 am)
    help.Message Edited by Rich_T on 05--200702:49 PM

    Rich T?I had this problem and the only way to sort is to:?Uninstall WMPGo in and uninstall WMP that is still showing.Remove all creative installations.Uninstall the driver through device manager\hardware\uninstall driver.Disconnect mp3 player.Reboot PCReconnect mp3 playerReinstall firmware. This worked for me, so hopefull it will work for you?

  • Help! Purchasing new computers for music classroom!

    Hi - I need to submit a budget request ASAP (or the money goes elsewhere!) for some new computers for my high school music classroom. We currently have G4 eMacs that have stopped working well due to a lack of software upgrade support from our school board (the Toronto District School Board, Toronto, ON Canada).
    What suggestions does anyone have regarding cost-effective units for the classroom (ideally would like 5-6), along with software suggestions (what comes standard, what would we have to add, and at what cost) for use with midi (we have one midi-keyboard) and Finale music notation software, as well as Garageband. Also would like the capability to record student performances and playback to allow them to receive immediate feedback on their progress. Oh, and CD/DVD burning would be beneficial.
    Any help you can provide is MUCH appreciated!

    Here's the Apple Canada education web site.
    http://www.apple.com/ca/education/
    Here's the link to the Apple online education store.
    http://canadaedu.apple.com/routing/index.php?lang=eng
    If you stick with the iMac or MacBook/MacBook Pro product lines you will receive the basic hardware (computer, built-in display, keyboard, mouse or trackpad, operating system, basic applications) with the system. If you have specific music software/hardware that you need then I agree with Tanya3300 that you should give Apple a call.
    Apple does offer some midi hardware. Here's a link:
    http://store.apple.com/us/search?find=midi
    Garageband comes with each system an it may provide you with the recording and reviewing tools that you need.
    http://www.apple.com/ilife/garageband/
    My kids music teacher *7th-8th grade) used an excellent software package from makemusic.com to assign homework. The kids would play the assigned pieces on their instruments at home in front of their computer or using the Mac systems at school. The software would automtically grade and provide feedback regarding rhythym, note accuracy, etc., then send the sound file to the teacher for final review and grading so that she could provide feedback to each student. It worked really well.
    http://makemusic.com/
    Here's another link that may be helpful:
    http://blog.ischoolmusic.org/

  • Can we design a custom GUI for Displaying KM docs

    Hi all,
    The task is to secure the documents published in KM and accessible (read&write)to a limited group,the proposal is to display the docs in a new GUI which lacks options like, "save as , print,copy,paste," and i should also be able to disable certain Keyboard strokes like "printscreen,ctrl+C" etc.
    Request you all to tell me the possiblity of such GUI design else kindly suggest me any other alternative like role based splitting....etc...
    Many thanks in advance
    SantoshKumar Adapa

    Hi Santosh,
    you may fulfill your requirement from these links
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/504e31fc-f46f-2910-98b4-dd94478c22f8]
    see the link "customization – Change the layout, context menus as per your choice!" from the below link
    [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/251732004]
    hope this helps you
    vv

  • Can I use the Garageband app for iPad to create a new ringtone for my iPhone 4?

    I want to create new ringtones for my iPhone, and consulting Support, they explain how to do that using Garageband 9.0, but I want to know if the Garageband app for iPad can be used to do the same thing or not. The iPad uses iOS 4.3.3.

    Would you be composing the ringtone in garageband or taking existing material and editing it? You could create something but then you would have to send to iTunes and format it as a ringtone there I believe

  • Hello everyone, hoping for some help with my new Apple Cinema Display 20"

    Hi everyone, I bought an Apple Cinema Display 20 inch LCD monitor, just about 3 weeks ago. I have two issues I am hoping to get some help with.
    1) I am using the screen on a PC with Windows XP, and I was very disappointed at the lack of PC support. I have no on screen display (OSD), so I can't see what percentage I have my brightness set to, and I can't alter the colour or contrast of the display, etc. Luckily it defaulted to very good settings, but I would really like to be able to use the (fan made?) program called "WinACD". If I would be best asking somewhere else, please direct me there. If not, my problem is that I installed it added the "Controls" tab, but it just says, Virtual Control Panel "None Present". I have tried googling for an answer, and I have seen many suggestions, but none of them worked. I installed the WinACD driver without my USB lead plugged in, and someone said that was important. So I have tried uninstalling, rebooting, then reinstalling it again with the USB plugged in, and a device plugged in to my monitor to be sure. It didn't seem to help. I have actually done this process a few times, just to be sure. So I would really like to get that working if possible.
    2) I am disappointed at the uniformity of the colour on the display. I have seen other people mention this (again, after a google search), and that someone seemed to think it is just an issue we have to deal with, with this generation of LCD monitors. Before I bought this screen, I had an NEC (20wgx2), and it had a very similar issue. Most of the time, you cannot see any problem at all, but if you display an entire screen with a dark (none prime) colour, like a dark blue green colour, you can see areas where it is slightly darker than others. It was more defined on the NEC screen, and that is why I returned it. I now bought this Apple Cinema Display, because it was the only good alternative to the NEC. (It has an 8bit S-IPS / AS-IPS panel, which was important to me). But the problem exists in this screen too. It isn't as bad thankfully, but it still exists... I have actually tried a third monitor just to be sure, and the problem existed very slightly in that one, so I think I am probably quite sensitive in that I can detect it.
    It is most noticable to me, because I do everything on this PC. I work, I watch films, and I play games. 99% of the time, I cannot see this problem. But in some games (especially one)... the problem is quite noticeable. When you pan the view around, my eyes are drawn to the slight areas on my screen which are darker, and it ruins my enjoyment. To confirm it wasn't just the game, like I said, I can use a program to make the entire screen display one solid colour, and if you pick the right type of colour (anything that isn't a bright primary colour), I can see the problem - albeit fairly faintly.
    I am pretty positive that it is not my graphics card or any other component of my PC, by the way, because everything is brand new and working perfectly, and the graphics card specifically, I have upgraded and yet the problem remains - even on the new card. Also, the areas that are darker, are different on this screen than on the other screens I have used.
    So basically, I would like to register my disappointment at the lack of perfect uniformity on a screen which cost me £400 (over double what most 20 inch LCD screens cost), and I would like to know if anybody could possibly suggest a way to fix it?
    It is upsetting, becuase although this problem exists on other screens too, this is, as far as I know, the most expensive 20" LCD monitor available today, and uses the best technology available too.
    p.s. If anyone would like to use the program that lets you set your entire PC screen a specific colour, it is called "Dead Pixel Buddy", and it is a free piece of software, made by somebody to check for dead pixels. But I found it useful for other things too, including looking at how uniform the colour of the screen is. That's not to say I was specifically looking for this problem by the way... the problem cought my eye.
    Thanks in advance!
    Message was edited by: telelove

    I've been talking about this on another forum too, and I made some pictures in photoshop to describe the problem. Here is what I posted on the other forum:
    Yes, "brightness uniformity" definitely seems to be the best description of my issue.
    Basically it just seems like there are very faint lines down the screen, that are slightly darker than the other areas on the screen. They aren't defined lines, and they aren't in a pattern. It's just slight areas that are darker, and the areas seem like narrow bands/lines. Usually you can't see it, but in some cases, it is quite noticeable. It is mainly when I'm playing a game. The slightly darker areas are not visible, and then when the image moves (because I am turning in a car, or turning a plane, or turning in a shooter etc.) the image moves, but these slightly darker areas stay still, and that makes them really stand out.
    As for how it looks, I tried to make an example in photoshop:
    Original Image:
    http://img340.imageshack.us/img340/3045/td1ja9.jpg
    Then imagine turning the car around a bend, and then it looks like this:
    http://img266.imageshack.us/img266/959/td2hq7.jpg
    It's those lines in the clouds. If you can tab between the two images, you can see the difference easily. Imagine seeing those lines appear, every single time you move in a game. (I haven't tested this in movies yet, but I am assuming it's the same).
    It isn't very clear on a static image. But when the image moves, the darker areas stay in the same place and it draws your eyes towards them. It isn't terrible, but it is annoying, especially consider how much this screen cost.
    Message was edited by: telelove

  • Seeking for urgent help~!!

    Hello there, i've bought the GUIDE TO ORACLE 9i and been told that i have to register to get a registration cd key in order to install the software kit to do the practicals in the book itself. However, i've registered through otn, and been told that "they have sent the registration key to the email i have given to them and it will arrive in a few minutes" but it's seem to be more than 5 days and i still couldn't get the cd key- means i can't install the software. Does anyone out there know who i can turn to? I 'm now in Australia and already called to the Australia helpline but they can't seem to help me and suggested i should come to this forum to seek for help. Is there anyone who can help me? I need to do the practical ASAP as i need to sit for an exam soon. without installing it i can't do at all. Anyone who can help me is appreciated.. as i am really needing it urgently.
    Mandy,

    Is the e-mail address in your profile a current one? If not, unfortunately, you will need to re-register and have the key sent again.
    Regards,
    OTN

  • URGENT HELP REQUIRED _ Creating Labels for Triangle

    Hi everyone... the code below is my application - Pythagoras Theorem.. or rather displaying it.. But i have not been able to get the Vertex of the triangle Labelled as A B C... I need to do that and change the Triangle Table data to A B C insted of Horizontal Vertical and Hypotenuise and as the triangle is stretched on screen A B And C keep moving as well ...
    Besides i need to Show this in the tabel
    - Values of A ^ 2 , B^2 and C ^2 as welll as a row showing A^2+B^2 = C^2
    the code is as follows..
    This is the main class called Geometry
    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;
    import java.lang.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.awt.FileDialog;
    import java.io.*;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.JFrame;
    public class Geometry {
        CardLayout cards;
        JPanel panel;
        public Geometry() {
            cards = new CardLayout();
            panel = new JPanel(cards);
            addCards();
            JFrame f = new JFrame("Geometry");
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setJMenuBar(getMenuBar());
            f.getContentPane().add(panel);
            f.setSize(500,500);
            f.setLocation(0,0);
            f.setVisible(true);
            f.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                public void mouseMoved(MouseEvent e) {
                   System.out.println("Mouse  " + e.getX() +","  + e.getY());
                public void mouseDragged(MouseEvent e) {
                    System.out.println("Draggg: x=" + e.getX() + "; y=" + e.getY());
            //            public void mouseMoved(MouseEvent me) {
            //                System.out.println("Moving: x=" + me.getX() + "; y=" + me.getY());
            //        panel.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());
        private void addCards() {
            // card one
            TriangleModel tri = new TriangleModel(175,100,175,250,325,250);
            TriangleView view  = new TriangleView(tri);
            JPanel panelOne = new JPanel(new BorderLayout());
            panelOne.add(view.getUIPanel(), "North");
            panelOne.add(view);
            panelOne.add(view.getTablePanel(), "South");
            panelOne.setName("Pythagoras's Theorem");
            panel.add("Pythagoras's Theorem", panelOne);
                  view.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            // card two
            TestModel trin = new TestModel(175,100,175,250,325,250);
            TestView viewn  = new TestView(trin);
            JPanel panelTwo = new JPanel(new BorderLayout());
            panelTwo.add(viewn.getUIPanel(), "North");
          // panelTwo.setBackground(Color.blue);
            panelTwo.setName("Similar Triangles");
            panelTwo.add(viewn);
            panelTwo.add(viewn.getTablePanel(), "South");
                  viewn.addMouseMotionListener(
            new MouseMotionListener() { //anonymous inner class
                //handle mouse drag event
                 public void mouseMoved(MouseEvent e) {
                    System.out.println("Mouse at " + e.getX() +","  + e.getY());
               public void mouseDragged(MouseEvent e) {
                   System.out.println("Dragging: x=" + e.getX() + "; y=" + e.getY());
            panel.add("Similar Triangles", panelTwo);
            JPanel panelThree = new JPanel();
            panelThree.setBackground(Color.white);
            panelThree.setName("Circle Theorem1");
            panel.add("Circle Theorem1", panelThree);
        private JMenuBar getMenuBar() {
            JMenu File = new JMenu("File");
            JSeparator separator1 = new JSeparator();
            JMenuItem Open = new JMenuItem("Open");
    //         Open.addActionListener(new java.awt.event.ActionListener() {
    //            public void actionPerformed(java.awt.event.ActionEvent evt) {
    //                openActionPerformed(evt);
            JMenuItem Save = new JMenuItem("Save");
            JMenuItem Print = new JMenuItem("Print");
            JMenuItem Exit = new JMenuItem("Exit");
            Exit.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    ExitActionPerformed(evt);
            JMenu theorem = new JMenu("Theorem");
            ActionListener l = new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    JMenuItem item = (JMenuItem)e.getSource();
                    String name = item.getActionCommand();
                    cards.show(panel, name);
            Component[] c = panel.getComponents();
            for(int j = 0; j < panel.getComponentCount(); j++) {
                String name = c[j].getName();
                JMenuItem item = new JMenuItem(name);
                item.setActionCommand(name);
                item.addActionListener(l);
                theorem.add(item);
            JMenuBar menuBar = new JMenuBar();
            JMenuBar menuBar1 = new JMenuBar();
            menuBar.add(File);
            File.add(Open);
            File.add(separator1);
            File.add(Save);
            File.add(Print);       
            File.add(Exit);
            menuBar.add(theorem);
            return menuBar;
    //    private void openActionPerformed(java.awt.event.ActionEvent evt) {
    //        FileDialog fileDialog = new FileDialog(this, "Open...", FileDialog.LOAD);
    //        fileDialog.show();
    //        if (fileDialog.getFile() == null)
    //            return;
    //        fileName = fileDialog.getDirectory() + File.separator + fileDialog.getFile();
    //        FileInputStream fis = null;
    //        String str = null;
    //        try {
    //            fis = new FileInputStream(fileName);
    //            int size = fis.available();
    //            byte[] bytes = new byte [size];
    //            fis.read(bytes);
    //            str = new String(bytes);
    //        } catch (IOException e) {
    //        } finally {
    //            try {
    //                fis.close();
    //            } catch (IOException e2) {
    //        if (str != null)
    //            textBox.setText(str);
        private void ExitActionPerformed(java.awt.event.ActionEvent evt) {
            // TODO add your handling code here:
            System.exit(0);
        public static void main(String[] args) {
            new Geometry();
    }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 Triangle
    public Triangle()
    TriangleModel tri = 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(), "North");
    f.getContentPane().add(view);
    f.getContentPane().add(view.getTablePanel(), "South");
    f.setSize(500,500);
    f.setLocation(200,200);
    f.setVisible(true);
    import java.awt.Point;
    import java.awt.Rectangle;
    import java.awt.event.MouseEvent;
    import javax.swing.JTable;
    import javax.swing.event.MouseInputAdapter;
    * TriangleControl.java
    * Created on 06 February 2005, 01:19
    * @author  Rahindra Naidoo
    public class TriangleControl extends MouseInputAdapter
        TriangleView view;
        TriangleModel model;
        Point start;
        boolean dragging, altering;
        Rectangle lineLens;            // used for 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 location: " +
                                             model.findCentroid());
            view.repaint();  // for the construction 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],  3, j + 1);
            view.getCentroidLabel().setText("centroid location: " +
                                             model.findCentroid());
    * TriangleModel.java
    * Created on 06 February 2005, 01:18
    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;
    * @author  Rahindra Naidoo
    public class TriangleModel                      //  (x1, y1)
    {                                         //      |\
        static final int SIDES = 3;         //      | \
        private int cx, cy;                  //      |  \
        Polygon triangle;                     //      |_ _\ (x3, y3)
        int selectedIndex;                   //  (x2, y2)
        NumberFormat nf;
        Line2D[] medians;
        Point2D centroid;
        public TriangleModel(int x1, int y1, int x2, 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 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.x)
                    x[2] = p.x + (int)((y[2] - p.y) / slope);
                    // rise / run == (p.y - y[0]) / (p.x - x[0])
                    y[0] = p.y - (int)((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 from
            // any vertex to the midpoint of the 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], y[j]);
                // get midpoint of line opposite vertex
                double dx = ((double)x[last] - x[next])/2;
                double dy = ((double)y[last] - y[next])/2;
                Point2D oppLineCenter = new Point2D.Double(x[next] + dx,
                                                           y[next] + dy);
                medians[j] = new Line2D.Double(vertex, oppLineCenter);
            // centroid is located on any median 2/3 the way from the
            // vertex (P1) to the midpoint (P2) on the opposite side
            double[] lengths = getSideLengths();
            double dx = (medians[0].getX2() - medians[0].getX1())*2/3;
            double dy = (medians[0].getY2() - medians[0].getY1())*2/3;
            double px = medians[0].getX1() + dx;
            double py = medians[0].getY1() + dy;
            //System.out.println("px = " + nf.format(px) +
            //                 "\tpy = " + 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 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[opp] * lengths[opp];
                double divisor = 2 * lengths[j] * lengths[last];
                double vertex = Math.acos(top / divisor);
                vertices[j] = nf.format(Math.toDegrees(vertex));
            return vertices;
        public String[] getLengths()
            double[] lengths = getSideLengths();
            String[] lengthStrs = 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 String[lengths.length];
            for(int j = 0; j < squareStrs.length; j++)
                squareStrs[j] = nf.format(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[next], y[next]);
            return lengths;
    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;
    * TriangleView.java
    * Created on 06 February 2005, 01:21
    public 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: " + 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 Ellipse2D.Double(model.centroid.getX() - 2,
                                             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 construction");
            showCon.addActionListener(new ActionListener()
                public void actionPerformed(ActionEvent e)
                    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", "degrees"
            String[] sidesRow = { "vertical", "horizontal", "hypotenuse" };
            String[] anglesRow = { "hyp to ver", "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, 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 - 1];
            table = new JTable(data, headers)
                public boolean isCellEditable(int row, int col)
                    return false;
            DefaultTableCellRenderer renderer =
                (DefaultTableCellRenderer)table.getDefaultRenderer(String.class);
            renderer.setHorizontalAlignment(JLabel.CENTER);
            centroidLabel = new JLabel("centroid location:  ", JLabel.CENTER);
            Dimension d = centroidLabel.getPreferredSize();
            d.height = table.getRowHeight();
            centroidLabel.setPreferredSize(d);
            JPanel panel = new JPanel(new BorderLayout());
            panel.setBorder(BorderFactory.createTitledBorder("triangle data"));
            panel.add(table);
            panel.add(centroidLabel, "South");
            return panel;
    }PLEASE HELP ---- Also does any one know how to draw a Triangle on a screen which can be controlled by a JSlider such that as and whenits incremented the triangle increase and vice versa... I need to prove Similarity in triangles using A Jslider that controls one triangle while the other triangle is Still on screen

    Sharan,
    The code given was part of the assignment and you are supposed to make the changes for your part right?
    Please give details of what you have done so far and not expect us to do your assignment for you. We'll be glad to help answer questions and point to the right direction, but giving us the entire assignment and saying, very nicely I might add, "Please do it for me." Just seems to make a mockery of the hours, days, and years that many of us has spent earning our degrees and learning our skills.
    Work on it and ask specific questions with examples of what you have done and you'll get a much better response.

  • URGENT help required : Custom Authentication Plugin for validation of users

    Hi Experts.
    I'm a newbie and am stuck in middle of nowhere.
    I have been asked to develop a custom authentication plug-in which would validate a user using the attributes such as a userid and a shared-userid.
    shared-userid is just a custom id that would be generated on the basis of some logic.
    Currently I'm using OAM 10.1.4.3.0 on WINDOWS server and as everybody, I'm also not able to find any sample files or sample folder structure.
    As per one of the other threads https://forums.oracle.com/forums/thread.jspa?messageID=3838474, sample code and sample folders are removed from this particular version and were present in some previous version.
    So, can anyone please help me out with the following:
    1. How can I proceed to accomplish this task, i.e. to check whether a user-id and a shared-userid both are validated and a user is granted access.
    2. Are all of these files required to create a custom authentication plug-in or can we proceed only with the ".c" file (i.e. make file, authn.c, and a dll file made using the make file and .c file)
    3. Can anybody provide me with a sample file or a sample code written in "C" wherein the plug-in connects to the LDAP and searches for a particular dn for comparison or something. Also a sample make file for windows to convert the .c file to .dll.
    PLEASEEEE help me ASAP.
    Regards
    Edited by: 805912 on Nov 15, 2011 7:18 PM

    Hi,
    Regarding question 2, you also need the header file is supplied in the Access Server installation directory, under ...access\oblix\sdk\authn_api and is called authn_api.h. you need this to build the dll which must then be placed in the Access Server's ...\access\oblix\lib directory.
    Regarding question 3, if you install an earlier version of the Access Server, ie 10.1.4.2 or less, then you will get a \access\oblix\sdk\authentication\samples\authn_api directory that contains a basic sample authentication plugin. However, there is still documented in the 10.1.4.3 Developer Guide another sample plugin, simplapi.c, in the 10.1.4.3 Developer Guide with instructions on how to use it. It does work, but unfortunately requires a couple of edits to get it working after copy&pasting it (no code changes, just fairly obvious case changes eg changing ObanPlugin* to ObAnPlugin*). I used the following commands to get it to compile into a .so file on unix:
    g++44 -c -fPIC -Wno-deprecated -m32 simpleapi.c
    g++44 -shared -nostdlib -lc -m32 simpleapi.o -o simpleapi.so
    but I really would not know if or how these translate into a Windows environment.
    Regards,
    Colin
    Edited by: ColinPurdon on Nov 15, 2011 2:50 PM

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • Need urgent help with a new Z program please

    I have to write a program that finds files matching some pattern, for example I have files test1,test2,test3 in a directory then if I pass test* as parameter it should find all the files i.e, test1,2,3. I have to then store the files in internal table, loop through it and have to call some other program zzz that has a selection screen with default parameters.
    1) Is there any function that I can call that gives all the files by passing wild card (ex:test*) and store the files in internal table?
    2) How do I call some other program ZZZ from my program?
    3) How do I pass values from my program to other program's selection screen?
    Your help would be greatly appreciated.
    Thanks.
    Mithun

    Hi,
    1) data: FILE_TABLE TYPE STANDARD TABLE OF FILE_INFO.
    data: wa_file type file_info.
    data: count type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>DIRECTORY_LIST_FILES
                EXPORTING
                    DIRECTORY = 'C:\'
                    FILTER    = 'test.*'
                    files_only = 'X'
                changing
                    FILE_TABLE = file_table[]
                    count      = count.
    loop at file_table into wa_file.
      write: / wa_file-filename.
    endloop.
    2) You can use SUBMIT statement to call another program..
    3) In the SUBMIT statement you can use the WITH addition to pass the values to the program.
    Thanks,
    Naren

  • Help with a New Case for the ZEN Touch 20

    Does anyone know of a case other than the one that came with the player?Something I can use,not like the pouch. It would be nice to change songs or even adjust the volume with out having to pull the player out all the time. If some one from Creative reads this....do you have any idea how much money you can make if you put out a case that gives end uesers access to all functions with out haveing to remove from the case.PLEASE HELP!!!!!

    Please Creative!! We need to have at least one case option that allows access to the screen and buttons at a reasonable price. Maybe strike a deal with a current case manufacturer to supply an option for all of the desperate users out here. I'm seriously looking at options to make one myself from materials I can find (actually came across a how-to on making a case out of a milk jug--please don't make us resort to such measures).
    By the way, the Vaja case is nice, but $80 (including shipping) is ridiculous IMO when you just need something to hold the player and provide access at the same time.
    My 2 cents.

  • URGENT HELP! - The prefix "xsi" for attribute "xsi:type" is not bound

    Hi! i createD a WebService using the JWSDP 1.2. In the server-side i read a xml file, create another empty Document and using the importNode() method i populate the empty created doc. The problem is when i try to send client this created document. I'm using the DOMSource to send it to client side. Both client and WS method code are below! Does anyone know the answer??
    And I'm getting this error:
    [java] Endpoint address = http://localhost:8080/cm/ContextManager
    [java] [Fatal Error] :2:42: The prefix "xsi" for attribute "xsi:type" is not bound.
    [java] javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:type" is not bound.
    [java] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:469)
    [java] at contextclient.CMClient.main(Unknown Source)
    [java] Caused by: org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:type" is not bound.
    [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1139)
    [java] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
    [java] ... 1 more
    [java] ---------
    [java] org.xml.sax.SAXParseException: The prefix "xsi" for attribute "xsi:type" is not bound.
    [java] at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1139)
    [java] at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
    [java] at contextclient.CMClient.main(Unknown Source)
    ====================CLIENT CODE================================
    Source getdevice = manager.getDevice("How");
    DOMResult domResult = new DOMResult();
    // getting a transformation factory instance
    TransformerFactory transformerFactory = TransformerFactory.newInstance();
    Transformer transformer = transformerFactory.newTransformer();
    transformer.transform(getdevice, domResult);
    Node node = domResult.getNode();
    DOMSource domSRC = new DOMSource(node);               
    StreamResult streamResult = new StreamResult(System.out);
    transformer.transform(domSRC, streamResult);
    ===============================================================
    ===================WebService Method CODE======================
         public Source getDevice(String primaryContext)
              Source src = null;
              try
                   String uri = "C:\\foo\\DeviceInstance.xml";
                   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   //create the first Document
                   Document doc1 = builder.parse(uri);
                   //create the second Document
                   Document doc2 = builder.newDocument();
                   //create the second doc's root element and append it
                   Element rootDoc2 = (Element)doc2.createElement("device");
                   doc2.appendChild(rootDoc2);               
                   //get root of first document
                   Element rootDoc1 = doc1.getDocumentElement();
                   NodeList list = rootDoc1.getElementsByTagName(primaryContext);
                   for(int i = 0; i < list.getLength(); i++)
                        Element nodeToMove = (Element) list.item(i);
                        Node newNode = doc2.importNode(nodeToMove, true);
                        rootDoc2.appendChild(newNode);
                   src = new DOMSource(doc2);          
              catch(DOMException dome)
                   dome.printStackTrace();
              catch(Exception e)
                   e.printStackTrace();
              return src;
    ===============================================================
    Does anyone know what could it be? Please, it's very urgent!
    Tks in Advance,
    Rodrigo.

    The xml i'm trying to send is below. It's important explain that in a standalone app it works perfectly. Unfortunately, when i perform the same actions in the WS world, it doesn't work. See, i tried to put the attributes inside the root element with the setAttributeNS() method but i got the same error again. How could i bound the attribute with no errors like that said before???
    <?xml version="1.0" encoding="UTF-8"?>
    <device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="context.xsd">
    <Identity xsi:type="fooType">
                   <Name>
                        <GivenName>Rodrigo</GivenName>
                        <FamilyName>Felicio</FamilyName>
                   </Name>
              </Identity>
    <Identity xsi:type="foowType">
                   <DeviceID>dev00345</DeviceID>
              </Identity>
    </device>
    Regards,
    Rodrigo.

Maybe you are looking for

  • Apple loops won't index

    I use Logic Expres 9.1.5. So, I've made 160+ apple loops of drum parts. They are all playable in the Apple Loops utility when I open them. However, for some nonsensical reason, no more than 31 of them will shop up in my loop browser when I re-index.

  • Error while running index creation

    Hi All , I am running index creation step like below . alter session enable parallel DDL; alter session set workarea_size_policy=manual; alter session set sort_area_size=250000000; alter session set db_file_multiblock_read_count=128; CREATE INDEX "CU

  • Browser doesn't display applets (classes)

    hi all, i am sure every beginner faced the same problem though i am not a beginner, i am facing this strange problem, and i can't figure out where the proble is . i just started developing simple swing applications. first i want to try the examples g

  • Caching XQuery Result in OSB for Performance Improvement

    Hi, I have written a custom XPath function in Java to pick the IP address of the machine and registered the same with Oracle Service Bus 11g. In the Proxy Message Flow, the server IP is picked at run time by using XQuery that refers to the Custom Fun

  • Saving a form on click of a button.

    Hi, I need the script to save the form on click of button.I've tried to use "app.execMenuItem("Save");".But it is not working. Is there any equvalent for this command in livecycle forms? Please Help..