OA Graph - Strange behaviour while Sorting

Hi,
I have a Graph and Data table below the graph. The table shows the search results from the graph. Few columns in the table are sortable.
When the graph is generated for the first time, its generated with some bars respective to the values in the table.
But when the table is sorted based any column, then the values of these graphs are changing.
Eg.
we have bars for OCT,NOV,DEC,JAN,FEB
Say when the page loads, the values for those months are as follows.
OCT:100,NOV:70,DEC:0,JAN:80,FEB:100
But when sorted based on the month, the values are changing in the graph, say
OCT:0,NOV:100,DEC:100,JAN:0,FEB:0
Which should not happen at all.
Can anyone help to understand what is happening here ?!

Hi,
I have a Graph and Data table below the graph. The table shows the search results from the graph. Few columns in the table are sortable.
When the graph is generated for the first time, its generated with some bars respective to the values in the table.
But when the table is sorted based any column, then the values of these graphs are changing.
Eg.
we have bars for OCT,NOV,DEC,JAN,FEB
Say when the page loads, the values for those months are as follows.
OCT:100,NOV:70,DEC:0,JAN:80,FEB:100
But when sorted based on the month, the values are changing in the graph, say
OCT:0,NOV:100,DEC:100,JAN:0,FEB:0
Which should not happen at all.
Can anyone help to understand what is happening here ?!

Similar Messages

  • Strange Behaviour while scanning from Canon MP600r with 10.5.7

    Dear all,
    I am working with the Canon MP600r (wifi) and scanned without any probs in Tiger. In Leopard I could not scan until 10.5.5. came out. Again everything was fine. Now in 10.5.6 and 10.5.7 I have strange problems: I can use the preview, abut while scanning suddenly it says that there is no communication with the scanner...!!
    Hope for little help
    Thanks
    Bernhard

    Hello Bernhard,
    Your issue sounds like there may be a problem with signal strength. I would open the Canon IJ Network Tool (which you can access via the Utility icon from the Printer Queue) and check the signal strength.
    If the strength is okay then you could try scanning at a low resolution, such as 75dpi. If you usually scan at a higher resolution, then scanning at a lower resolution will make the scanned file smaller and if that works then you know you still have a network quality issue. What brand and model of wireless router do you have?
    PaHu

  • Strange behaviour while charging

    My iPad 1is unusable while charging.
    In iBooks, for instance, it will not change pages properly, either moving between pages randomly without user input, or refusing to change pages when directed.
    In other apps, different forms of unusual behaviour occur, all seeming to be associated with random detection of user input when none is applied, or incorrect response to real user input.
    It operates normally when off charge.
    Any advice, please.

    Are you using the Apple supplied cable and power adapter or third party accessories? Are you charging by plugging the power adapter into a wall socket?
    I would check the cable, the power adapter, change the wall socket - do the basic things first and try to narrow down the cause. It just be that your cable is bad - it could have a hairline crack that you cannot see - try another cable from an iPod or iPhone - do some experimentation.

  • Nokia C3-01 -strange behaviour/ problems with Noki...

    When I was choosing my new mobile, I had two options : Samsung Wave 533 and Nokia C3-01. After a lot of hesitance I decided to pick up Nokia, believing to its high quality despite its poor media potential. However, now I think that it was a bad idea.
          Firstly, I have never thought that Touch and Type won't have ability to adjust brightness of the screen (AWFUL IN THE NIGHT), set up more then one alarm and use many of JAVA applications. When I tried to install some applications, it said- out of memory. Out of memory?! My old SE K770i could much more! What annoys me the most is that I can't use my e-mail account via Nokia Mail. When I press the icon of it , there is an error Null pointer exception and  applications shuts. Other strange behaviour- while I was typing sms , suddenly there was hard, long vibration, screen  went white and mobile restarted. Other users of C3-01, check this: go to messages, then other messages , then direct , start typing and try to go back to menu- screen turns white, mobile restarts (I'm polish , so names may be a little bit different) . How on earth, can mobile restart so often?.
        , Secondly,the funniest one- Ovi shop. Important thing in every Nokia. Guess what- I can't use it! When I to launch the apllication and try to go to the shop, there is information that it's not avaible for my phone. I used it a week ago and worked properly.
          All in all, I hope that Nokia will share an update of software to this model. I am just so disappointed. What I am sure about that next mobile will not be from finnish enterprise.
    Solved!
    Go to Solution.

    Sorry Brother, Your Device is totally misfunctioned and FAULTY, You Need to go back to Nokia Care Centre and GET IT REPLACED.
    Your Device is faulty.
    Please Dont Blame Nokia Or the C3-01 Device Because both are QUALITY PRODUCTS.
    I have C3-01 Since 4 Months Now and I havent Had a Single Complain about my device even though I am a Rough Handler and Using the Mobile Upto its Extend.
    You Have 2 options, Try To Fix your Device at Home By :
    Soft reset your Nokia C3-01 Touch and Type you need to press *#7780# and then Dial. The security code is 12345. Once you complete this, your phone will come back to factory settings, but you will not loose personal data. Anyway it is recommended to make a backup before performing any of the mentioned procedures.
    To hard reset your Nokia C3-01 Touch and Type you just have to press *#7370# and press Dial. The phone will request the security code that is by default 12345. Please be aware that you will loose all the data in your phone, so you should backup all relevant information.
    If Problem still persist then Connect to PC Suite/Ovi Suite and Reinstall the Firmware.
    BUT U NEED YOUR DEVICE TO BE UPDATED TO ITS LATEST FIRMWARE = v06.05
    If still not fixed then, REPLACE YOUR DEVICE ASAP, because as given by Nokia, C3-01 Device Works according to its Specification as Specified.
    If I've helped in any way, a click upon the White star to the left would always be appreciated.
    If however my answer also solves your problem clicking below " ACCEPT AS SOLUTION " it will benefit other users!

  • Strange Behaviour after 6.0.2 install

    Hello all,
    This is my first posting to Apple Discussions, so please be kind...
    I recently installed iTunes 6.0.2 via Software Update and noticed strange behaviour while trying to edit a smart playlist. I have a smart playlist set up to select songs between 3 and 5 stars in My Rating, which have not been played in the last four weeks. While trying to edit the star range, I found that I could only select two stars or five stars. If I clicked one star, it changed to two; if I clicked any other number of stars, it changed to five. As a test, I restored the previous iTunes.app from backup and the problem disappeared.
    Anyone have any ideas what might be causing this?
    Thanks,
    Jon

    Hello Web_Diko,
    I'm sorry but I don't know where you can find that package. I take nightly backups of my machine so I just restored the previous version from my backup. Maybe try a search for "iTunes 6.0.1" on Google or on www.apple.com?
    When I mentioned the "privacy thing" I was alluding to the various items about iTunes 6.0.3 "phoning home" with details of what tracks you are playing together with your Apple ID. It doesn't bother me personally, but I think that the complaints are legitimate, because people should be told whenever they install a program that sends information back to the vendor.
    Jon

  • Strange behaviour of weblogic 6.1 while delivering charts

    Hi everybody,
    I hope I'm right here.
    I've a strange behaviour of weblogic server 6.1.
    What I want to do: Requesting a chart and writing it to somewhere else, so I
    send a request for this chart with wget.
    It seems that weblogic server is sending an 200 OK in front of the data,
    which is very strange for me.
    So wget is writing a chart file with length 0, later it will write the right
    file. But that's too late because my script tries immediatly after the OK to
    copy the file to two other destinations.
    Here's the output
    bash-2.05$ /usr/bin/wget -O wlserver6.1/cache/temp/test.gif
    http://192.168.1.226:7001/charts/tool?ID=103
    [2] 28992
    [3] 28993
    [1] Done /usr/bin/wget -O wlserver6.1/temptest.gif -S
    http://192.168.1.226:7001/charts/tool?ID=103
    --16:24:22-- http://192.168.1.226:7001/charts/tool?ID=103
    => `wlserver6.1/cache/temp/test.gif'
    Connecting to 192.168.1.226:7001... connected!
    HTTP request sent, awaiting response... bash-2.05$ 200 OK
    Length: 2,785 [image/gif]
    0K .. 100% @ 2.66
    MB/s
    16:24:26 (2.66 MB/s) - `wlserver6.1/cache/temp/test.gif'
    saved [2785/2785]
    BTW: same thing happens with lynx, so it's not wget
    Hope someone can help
    Martin

    You should post on interest.webserver, but 200 OK is standard http response.
    Don't confuse the headers with the content. I would expect that any other
    simple http server functions in the same manner.
    cheers
    mbg
    "Martin Haberstroh" <[email protected]> wrote in message
    news:[email protected]..
    Hi everybody,
    I hope I'm right here.
    I've a strange behaviour of weblogic server 6.1.
    What I want to do: Requesting a chart and writing it to somewhere else, soI
    send a request for this chart with wget.
    It seems that weblogic server is sending an 200 OK in front of the data,
    which is very strange for me.
    So wget is writing a chart file with length 0, later it will write theright
    file. But that's too late because my script tries immediatly after the OKto
    copy the file to two other destinations.
    Here's the output
    bash-2.05$ /usr/bin/wget -O wlserver6.1/cache/temp/test.gif
    http://192.168.1.226:7001/charts/tool?ID=103
    [2] 28992
    [3] 28993
    [1] Done /usr/bin/wget -O wlserver6.1/temptest.gif -S
    http://192.168.1.226:7001/charts/tool?ID=103
    --16:24:22-- http://192.168.1.226:7001/charts/tool?ID=103
    => `wlserver6.1/cache/temp/test.gif'
    Connecting to 192.168.1.226:7001... connected!
    HTTP request sent, awaiting response... bash-2.05$ 200 OK
    Length: 2,785 [image/gif]
    0K .. 100% @ 2.66
    MB/s
    16:24:26 (2.66 MB/s) - `wlserver6.1/cache/temp/test.gif'
    saved [2785/2785]
    BTW: same thing happens with lynx, so it's not wget
    Hope someone can help
    Martin

  • Strange behaviour of Runtime.getRuntime().exec(command)

    hello guys,
    i wrote a program which executes some commands in commandline (actually tried multiple stuff.)
    what did i try?
    open "cmd.exe" manually (administrator)
    type "echo %PROCESSOR_ARCHITECTURE%" and hit enter, which returns me
    "AMD64"
    type "java -version" and hit enter, which returns me:
    "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    type "reg query "HKLM\SOFTWARE\7-zip"" returns me:
    HKEY_LOCAL_MACHINE\SOFTWARE\7-zip
    Path REG_SZ C:\Program Files\7-Zip\
    i wrote two functions to execute an command
    1) simply calls exec and reads errin and stdout from the process started:
    public static String execute(String command) {
              String result = "";
              try {
                   // Execute a command
                   Process child = Runtime.getRuntime().exec(command);
                   // Read from an input stream
                   InputStream in = child.getInputStream();
                   int c;
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
                   in = child.getErrorStream();
                   while ((c = in.read()) != -1) {
                        result += ((char) c);
                   in.close();
              } catch (IOException e) {
              return result;
         }the second function allows me to send multiple commands to the cmd
    public static String exec(String[] commands) {
              String line;
              String result = "";
              OutputStream stdin = null;
              InputStream stderr = null;
              InputStream stdout = null;
              // launch EXE and grab stdin/stdout and stderr
              try {
                   Process process;
                   process = Runtime.getRuntime().exec("cmd.exe");
                   stdin = process.getOutputStream();
                   stderr = process.getErrorStream();
                   stdout = process.getInputStream();
                   // "write" the parms into stdin
                   for (int i = 0; i < commands.length; i++) {
                        line = commands[i] + "\n";
                        stdin.write(line.getBytes());
                        stdin.flush();
                   stdin.close();
                   // clean up if any output in stdout
                   BufferedReader brCleanUp = new BufferedReader(
                             new InputStreamReader(stdout));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += line + "\n";
                   brCleanUp.close();
                   // clean up if any output in stderr
                   brCleanUp = new BufferedReader(new InputStreamReader(stderr));
                   while ((line = brCleanUp.readLine()) != null) {
                        result += "ERR: " + line + "\n";
                   brCleanUp.close();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              return result;
         }so i try to execute the commands from above (yes, i am using \\ and \" in java)
    (1) "echo %PROCESSOR_ARCHITECTURE%"
    (2) "java -version"
    (3) "reg query "HKLM\SOFTWARE\7-zip""
    the first function returns me (note that ALL results are different from the stuff above!):
    (1) "" <-- empty ?!
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    the second function returns me:
    (1) x86 <-- huh? i have AMD64
    (2) java version "1.6.0_11"
    Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
    Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)
    (3) ERROR: The system was unable to find the specified registry key or value.
    horray! in this version the java version is correct! processor architecture is not empty but totally incorrect and the reg query is still err.
    any help is wellcome
    note: i only put stuff here, which returns me strange behaviour, most things are working correct with my functions (using the Runtime.getRuntime().exec(command); code)
    note2: "reg query "HKLM\HARDWARE\DESCRIPTION\System\CentralProcessor\0" /t REG_SZ" IS working, so why are "some" queries result in ERR, while they are working if typed by hand in cmd.exe?

    ok, i exported a jar file and execute it from cmd:
    java -jar myjar.jar
    now the output is:
    (1) "" if called by version 1, possible to retrieve by version 2 (no clue why!)
    (2) "java version "1.6.0_10-beta"
    Java(TM) SE Runtime Environment (build 1.6.0_10-beta-b25)
    Java HotSpot(TM) 64-Bit Server VM (build 11.0-b12, mixed mode)"
    (3) C:\Program Files\7-Zip\
    so all three problems are gone! (but its a hard way, as i need both functions and parse a lot of text... :/ )
    thanks for the tip, that eclipse changes variables (i really did not knew this one...)

  • Strange behaviour: two servers on the same port

    Hi!
    I hope this is the right section for this post. I need help about a strange behaviour involving a ServerSocket.
    For my thesis I need to write a program that receives data from a pre-existing DSMS client, filters them and then sends them to a pre-existing DSMS server. And here is my problem: if I try to create a ServerSocket on the same port of the DSMS server, my program throws no exception, and the servers seem running on the same port. This is a behaviour that I'd like to avoid, but I cannot understand what the problem is. Can you help me?
    The source code of the DSMS server can be found here (it's written in C++): http://infolab.stanford.edu/stream/code/stream-0.6.0.tar.gz
    The source code of my server class, instead, is this one:
    import java.io.*;
    import java.net.*;
    public class ThreadGenerator {
         private ServerSocket server;
         public void connect(String servPort, String cHost, String cPort) {
              try {
                   server = new ServerSocket(servPort);
                   System.out.println("SERVER running on port "+servPort);
              } catch (BindException e) {
                   System.out.println("Address already in use!");
              } catch (Exception e) {
                   System.err.println(e);
              try {
                   while(true){
                        Socket client = server.accept();
                        StreamThread T = new StreamThread(client, cHost, cPort);
                        T.start();
              } catch (EOFException e) {
                   System.out.println("Server closed connection!");
              } catch (Exception e) {
                   System.err.println(e);
    }I'm programming on Mac OSX Tiger, with Java 1.5.0.
    Thanks in advance for your help.

    The problem is still happening to me, I tried in this very moment. The code I'm using is the one I posted, and the second server is the one that I linked. I don't think there's anything else to add.
    If you're sure that the problem is not in my code, then it means that it is in the linked server, which partially solves the problem. But I'd like to know, if it's possibile, if there is any other way to check if the port is already in use.

  • Windows 8.1 Enterprise Evaluation- Strange behaviour of network adapter

    Hello there are discussions and questions around this community about network adapter dropping connection while system is running. But I have found unique problem with my network adapter driver.
    I have tried to state my problem as clearly as possible. Please ask if any detail is required.
    My network status shows no access on following occasions:
    1. On alternate system wakeups.
        eg:  
    a. System boots up 
    Internet accessible
    no problem
    b. I put system to sleep(first time) and wake it up
    No access to internet !!!
    When I check in network and sharing center not even adapter shows in disabled status.(See video from the link given below).
    c. Without restarting system or without installing network adapter again,  I put system to sleep again and wake it up (2nd time).
    Internet accessible
    d. I put system to sleep for (3rd time) and wakes it up.
    No access to internet!!
    If I put system to sleep again and wake it up definitly I get network access.
    2. If I switch off the modem before windows shutdown completely or in the process of shutdown, next time when I boot system, even though the modem is switched on before booting the system, No internet access tooltip will be shown on network
    sysbol.
    Another strange behaviour is on no internet access status, I start installing adapter, and it loads required files and prompt me to click "next" and "click" install.
    But the thing is before I go to "next" button, I will get network access as shown in this link
    http://youtu.be/sPlXVEiYBeo. Ignore virtualbox adapter. Same behaviour was there when there is no vbox adapter. Same was happening in Windows 8 Pro, but not in windows 7, so that there is no H/W problem I think. 
    Any idea on how to fix this or any alternate solution ? 

    Hi,
    Firstly, access your network adapter official website to get the proper driver applied to your system.
    Then going to Control Panel > Device Manager, right click your adapter > Properties. Under the Power Management tab, make sure "Allow the computer to turn off this device to save power" checkbox unchecked.
    If it still persists, try to disable "fast startup" as below steps:
    1.In Control Panel, open the Power Options item.
    2.Click the Choose what the power buttons do link.
    3.Clear the Turn on fast startup (recommended) check box.
    4.Click Save Settings.
    Karen Hu
    TechNet Community Support

  • Strange behaviour on text insert into a HTML pane

    Hi all,
    I am trying to fix a problem on inserting a span tag into an existing html page (in an EDITABLE JEditorPane).
    The behaviour:
    Assuming the cells in a table (3 rows, 2 columns) are numbered from 1 to 6, with cell one being the top left most, cell 2 top right, cell 3 middle left, etc.
    1. Inserting the text "<span></span>" in cell 4 causes during any attempt to later type into cell 5 the characters to be appended instead into cell 4, directly after the close span tag.
    2. The insertion in the first place behaves strange. If I have the caret positioned for cell 5 so that I can insert there
    (via the function void javax.swing.text.html.HTMLEditorKit.insertHTML(HTML Document doc, int offset, String html, int popDepth, int pushDepth, Tag insertTag) )
    even though the caret position is visible in cell 5, the insertion seems to take place in cell 4.
    I can sort of compensate for this by adding 1 to the offset. However, then when inserting into a line of text, for example, "the quick red fox jumped over the lazy dog"
    I insert directly before the 'j' in 'jumped', the insertion looks like this "the quick red fox j<span>..</span>umped over the lazy dog"
    So that is no solution.
    IMPORTANT! Just to prove it is not the span tag causing the trouble, if this span tag already exists in a cell on 'Load' of the html file, the strange behaviour is not observed.
    Something is going wrong here. It is me? Or is it a bug?
    Please help!!
    Here is a test app, and the test html you can use (place in current directory).
    Please test like this:
    1. run application (the html should be loaded into the pane)
    2. the span tag is programmed to automatically insert at cell 4 (by using the +1 method on the insert)
    3. another span tag was already existing in the html file, at cell 8
    4. Attempt to type into cell 5
    result: the text appears instead at cell 4
    5. Type into cell 9
    result: the text correctly is entered into cell 9
    See the difference!!
    Help!
    The test java app:
    package small.test;
    import java.awt.BorderLayout;
    import java.awt.Container;
    import java.io.File;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.StringReader;
    import javax.swing.JEditorPane;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.SwingUtilities;
    import javax.swing.text.JTextComponent;
    import javax.swing.text.html.HTML;
    import javax.swing.text.html.HTMLDocument;
    import javax.swing.text.html.HTMLEditorKit;
    import javax.swing.text.html.parser.ParserDelegator;
    public class HtmlInsertTest extends JEditorPane
         public HtmlInsertTest()
         public static void main(String args[])
              JFrame frame = new JFrame("Loading/Saving Example");
              Container content = frame.getContentPane();
              frame.setSize(600, 600);
              final HtmlInsertTest editorPane = new HtmlInsertTest();
              editorPane.setEditable(true);
              JScrollPane scrollPane = new JScrollPane(editorPane);
              content.add(scrollPane, BorderLayout.CENTER);
              editorPane.setEditorKit(new HTMLEditorKit());
              JPanel panel = new JPanel();
              content.add(panel, BorderLayout.SOUTH);
              frame.setSize(600, 600);
              doLoadCommand(editorPane);
              editorPane.insertHTML("<span>inserted text</span>", 84);
              frame.setVisible(true);
         public static String getHTML()
              return
              "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">"+
              "<HTML>"+     "<HEAD>"+
              "     <META HTTP-EQUIV=\"CONTENT-TYPE\" CONTENT=\"text/html; charset=utf-8\">"+
              "     <TITLE></TITLE>"+          
              "</HEAD>"+
              "<BODY LANG=\"en-AU\" DIR=\"LTR\">"+
              "<P STYLE=\"margin-bottom: 0cm\">This is a test xhtml document. "+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">Here is a table:</P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <p></p>"+
               "     <TABLE WIDTH=100% BORDER=1 BORDERCOLOR=\"#000000\" CELLPADDING=4 CELLSPACING=0>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%>"+
         "                    <P>It has</P>"+
         "               </TD>"+
         "               <TD WIDTH=50%>"+
         "                    <P>2 columns</P>"+
         "               </TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P>And 4 rows</P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P><span>existing text</span></P></TD>"+
         "          </TR>"+
         "          <TR VALIGN=TOP>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "               <TD WIDTH=50%><P></P></TD>"+
         "          </TR>"+
         "     </TABLE>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">We will test the drag and drop"+
         "     functionality with this document. "+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">It will be loaded with the hlml editor.</P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     <P STYLE=\"margin-bottom: 0cm\">"+
         "     </P>"+
         "     </BODY>"+
         "     </HTML>";
         public static void doLoadCommand(JTextComponent textComponent)
              StringReader reader = null;
              try
                   System.out.println("Loading");
                   reader = new StringReader(getHTML());
                   // Create empty HTMLDocument to read into
                   HTMLEditorKit htmlKit = new HTMLEditorKit();
                   HTMLDocument htmlDoc = (HTMLDocument)htmlKit.createDefaultDocument();
                   // Create parser (javax.swing.text.html.parser.ParserDelegator)
                   HTMLEditorKit.Parser parser = new ParserDelegator();
                   // Get parser callback from document
                   HTMLEditorKit.ParserCallback callback = htmlDoc.getReader(0);
                   // Load it (true means to ignore character set)
                   parser.parse(reader, callback, true);
                   // Replace document
                   textComponent.setDocument(htmlDoc);
                   System.out.println("Loaded");
              catch (Exception exception)
                   System.out.println("Load oops");
                   exception.printStackTrace();
              finally
                   if (reader != null)
                        reader.close();
         public void insertHTML(String text, int offset)
              SwingUtilities.invokeLater(new insertAction(this, text, offset));
         class insertAction implements Runnable
              String text = "";
              int offset = 0;
              JEditorPane jEditorPane1 = null;
              public insertAction(JEditorPane _jEditorPane1, String _text, int _offset)
                   jEditorPane1 = _jEditorPane1;
                   text = _text;
                   offset = _offset;
              @Override
              public void run()
                   HTMLDocument doc = (HTMLDocument)jEditorPane1.getDocument();
                   HTMLEditorKit kit = (HTMLEditorKit)jEditorPane1.getEditorKit();
                   try
                        System.out.println("reading from string reader");
                        kit.insertHTML(     doc,
                                          offset,//+1
                                          text,
                                          0,//0
                                          0,//0
                                          HTML.Tag.SPAN);
                        System.out.println(jEditorPane1.getText());
                   catch (Exception e)
                        System.out.println("error inserting html: " + e);
    }Edited by: svaens on Jul 16, 2009 6:34 PM
    fix another stuffed up attempt at a SSCCE.

    Well, I know nothing about HTML in JEditorPanes. I have never been able to figure out how insertions work.
    My comment was a warning to others. Some people (like me) avoid answering posting of this type for reasons given in the JavaRanch link. Others will answer anyway. Other might first check the other site to see if they are wasting there time, but they can only do that if a link was posted with the original question.
    The only suggestion I have is to repost the question, (since this posting is now completely off topic) making sure to then respond to this posting stating that a fresh question has been asked so you don't get a discussion going on in two places.

  • Strange behaviour of .swf movies - AS2/AS3

    Hello from Italy,
         this is my first post and I think I need some help from the experts...
         I am putting together an interactive Flash movie which is made of several different small movies. For the sake of clarity, I'll call them A.swf, B.swf, ..., Z.swf. The movies are launched from each other depending on certain buttons I've implemented.
         The first one, A.swf, is actually a sort of "main menu": it grants access to all the other movies and it is also the point of return from them when a certain button is pressed.
         Important: All the movies are scripted in AS3, except for the last one which, for a number of reasons, is scripted in AS2.
         The return from any (but the last) movie to the first, say B.swf to A.swf, is implemented like this:
    function eventResponseSole(event:MouseEvent):void {
    var myLoader:Loader = new Loader();
    addChild(myLoader);
    var url:URLRequest = new URLRequest("A.swf");
    myLoader.load(url);
    sole_btn.addEventListener(MouseEvent.CLICK, eventResponseSole);
         This is, of course, AS3.
         The last movie, which is scripted in AS2, returns to A.swf like this:
    luna_btn.onRelease = function() {
    loadMovie("A.swf", _root);
         The strange behaviour is this: if I launch Z.swf and navigate with the proper button up to A.swf, everything works. But if I launch A.swf, navigate to Z.swf and attempt to return, this doesn't work. There are no problems, instead, moving up and down between movies scripted in AS3, that is with the first bit of code I've pasted. My guess is that the syntax in AS2 is correct, but something stops A.swf from "launching itself" when the control is transferred to Z.swf, but the movie is launched in the original window. Is this diagnosis reasonable? And if so, would someone kindly provide a way out of this? Re-doing Z.swf in AS3 is not an option, I'm afraid, it will have to stay as it is. I also have to add I've tried some solutions by setting _lockroot, but this doesn't seem to work.
         Many thanks in advance!
         Marco Olivotto

    Mixing AS2 into AS3 is not without stipulations... and I am no expert on translating those stipulations, but here is what the Flash documentation says regarding the matter... the third paragraph may be significant to your case:
    - ActionScript 3.0 code can load a SWF file written in ActionScript 1.0 or 2.0, but it cannot access the SWF file's variables and functions.
    - SWF files written in ActionScript 1.0 or 2.0 cannot load SWF files written in ActionScript 3.0. This means that SWF files authored in Flash 8 or Flex Builder 1.5 or earlier versions cannot load ActionScript 3.0 SWF files.
    The only exception to this rule is that an ActionScript 2.0 SWF file can replace itself with an ActionScript 3.0 SWF file, as long as the ActionScript 2.0 SWF file hasn't previously loaded anything into any of its levels. An ActionScript 2.0 SWF file can do this through a call to loadMovieNum(), passing a value of 0 to the level parameter.

  • IPhoto: strange behaviour with preview thumbnails

    Is there a simple way in iPhoto 8 to rebuild the thumbnail database?
    I recently noticed a strange behaviour iPhoto 8 has with previews: In some of my event categories, iPhoto does not display the correct preview thumbnail of the picture, but a preview thumbnail of another event. When I click on the thumbnail, it reloads the appropriate preview and it does not happen again - with that picture. Also, if I double click an event to open it, the small thumbnail of the event's key photo that is to be displayed in the title bar (next to the All Events button) is not always correct.
    Thank you for your help!
    Stefan

    I have similar problems (lately) with iPhoto 6.0.6 -- thumbnails do not equal the images they 'thumbnail' of.
    Sometimes when it opens, it (recently) asked me to rebuild the thumbnails, but not always.
    Can I force a thumbnail rebuild using the command you gave - Apple-option while opening iPhoto? In iPhoto 6.0.6 this primarily forces a new selection of a library.

  • Font has a strange behaviour

    One of my fonts has a strange behaviour. Some characters print perfectly on screen but not on the printer, neither in the preview ???
    I tried to de-install and re-install that particular font, but that did'nt help.
    any clues ? thanks,
    MJ

    Here's the problem. It's a complete piece of junk.
    The baseline is so far off on zero through nine that they're being just about pushed off the chart. Next, look at the glyph names. A-H are correct. From there on, you get some sort of bizarre numbering where the rest of the upper and lower case letter designations should be.
    That this font ever worked is amazing.

  • Strange behaviour on reading procfs

    Hello,
    I have a strange behaviour reading process table from procfs. Some processes have a resident size and image size of 0 (zero). So I wrote a little test program and generated a 32bit binary. It gave me the same result. After I made a 64bit binary and this brought the expected results. Do anyone of you have an idea what i'm making wrong. Below you can find an output example and the code of the program.
    Every answer is appreciated
    erinda
    pfs.s32pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 0 0
    24151 oracle 11 0.00 7.01 0 0
    pfs.s64pid name nlwp %cpu %mem image resident
    1 init 1 0.00 0.03 2368 1184
    7 svc.startd 13 0.01 0.04 8696 1720
    649 snmpd 1 0.00 0.08 9352 3440
    24151 oracle 11 0.00 7.01 330240 286664
    and here the program
    int main(int ac, char * av[])
    struct dirent * procEntry;
    char prcPath[PRARGSZ];
    psinfo_t prcInfo;
    pid_t pid;
    int rtc;
    DIR * procDir = opendir("/proc");
    if(procDir == NULL)
    printf("opendir(/proc) failed\n");
    return 1;
    printf(" pid name nlwp %%cpu %%mem image resident\n");
    printf("----------------------------------------------------------\n");
    rewinddir(procDir);
    while(procEntry = readdir(procDir))
    if(procEntry->d_name[0] == '.' || // skip "." and ".."
    procEntry->d_name[0] == '\0') // skip empty name
    continue;
    pid = atoi(procEntry->d_name);
    if(pid == 0 || pid == 2 || pid == 3)
    continue;
    size_t size = sizeof(psinfo_t);
    sprintf (prcPath, "/proc/%s/psinfo", procEntry->d_name);
    int pprocfs = open(prcPath, O_RDONLY);
    if (pprocfs < 0)
    return 2;
    else
    ssize_t bytesRead = read(pprocfs, &prcInfo, size);
    if (bytesRead != size)
    return 3;
    close (pprocfs);
    printf(" %5d %-15s %4d %5.2f %5.2f %8lu %8lu\n",
    prcInfo.pr_pid,
    prcInfo.pr_fname,
    prcInfo.pr_nlwp,
    (float)(100.0 * prcInfo.pr_pctcpu / 0x8000),
    (float)(100.0 * prcInfo.pr_pctmem / 0x8000),
    (ulong_t)prcInfo.pr_size,
    (ulong_t)prcInfo.pr_rssize);
    }

    Hello.
    If a 32 bit process reads from /proc different structures are returned as if a 64 bit process reads the same files.
    In the OpenSolaris sources this can be seen in http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/proc/prvnops.c#2600 (line 2600).
    Unfortunately a 32 bit task cannot get all information about a 64 bit task - at least not in current Solaris version. I think this is a problem to be solved by Sun...
    Martin
    If anyone from Sun involved in the development of the procfs reads this: My proposal is:
    /proc/xxx/psinfo32 and psinfo64 and a symlink psinfo. The symlink's destination depends on the reading processes data model....
    (The same should be done with all files (lwpinfo...) in /proc).
    Another idea is a special IOCTL that controls if a 32 bit task wants to access the 64 bit structures...

  • Strange behaviour of jdbc-mysql driver

    I am trying to store japanese characters in mysql and display also after reading from the database using JSP. I am using the following code.
    <%@ page contentType="text/html; charset=UTF-8"%>
    ....... some code ......
    <%
    Class.forName( "org.gjt.mm.mysql.Driver" );
    Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8", "user", "pass" );
    Statement st = con.createStatement();
    st.executeUpdate( "insert into test values('" + request.getParameter( "imgname" ) + "')" );
    ResultSet rs = st.executeQuery( "select * from test" );
    while( rs.next() ) {
    %> DB Value: <%= rs.getString( "imgname" ) %>
    <% } %>
    I found one strange behaviour. I have to change the DriverManger.getConnection line to the following, to write the data correctly in the database.
    DriverManager.getConnection("jdbc:mysql://localhost:3306/DB","user","pass")
    If I read from the database using the same parameters as above, I am getting garbled data.
    To retrieve the data correctly from the database I have to use the following line instead of the previous one.
    DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?useUnicode=true&characterEncoding=UTF-8", "user", "pass" );
    In short, I have to pass different parameters to DriverManager.getConnection() for writing and reading from the database. But it is not possible practically. I am using mm.mysql-2.0.8 jdbc-mysql driver, mysql is 3.23.47 and english windows 2000.
    I have tried the string.getBytes("UTF-8") and new String( getBytes(string), "UTF-8") methods, but not getting the correct data.
    Can anybody guide me how can I store and display the japanese character correctly?
    Thanks to all,
    gaurang.

    I downloaded the latese driver from sourceforge, but still the same thing is happening. Is there any other thing which I should do?
    Thanks
    gaurang.

Maybe you are looking for

  • Can't open 1 document created using travel journal template

    Since installing Snow Leopard yesterday I found out I can't open this one file I created using the travel journal template. All other Pages '09 files are fine. I just get this error message telling me Pages had to close my document "unexpectedly". *"

  • How do I open Pages '08 files with the current version of Pages (5.5)?

    I have a computer full of Pages '08 files. I just upgraded to Yosemite and purchased the new Pages. It looks great but Pages is telling me that it doesn't open Pages '08 files. Apparently it only opens it's own files and Pages '09 files. As far as I

  • In Applications preferences I assign Content Type qfx to iBank but every qfx download asks me what app I want to open the qfx file with! Why?

    Hard to add more detail... I open Firefox Applications preferences, assign "iBank" to Content Type "qfx file", yet every time I download a .qfx file Firefox opens a "Opening stmt.qfx" window asking what should Firefox do with it. Every time I select

  • Compiling OFGTEL.PLL

    Hi All, I am not able to compile the PL/SQL library file OFGTEL.PLL on Windows NT machine in Forms9i. When I try to compile, I get the following errors: Compilation errors on CGDV$REF_CODES: PL/SQL ERROR 201 at line 381, column 17 identifier 'CG_REF_

  • Help system won't load

    Lately, I haven't been able to access the Mac OS X system help. I'm running 10.3.9 (just reinstalled and re-updated, etc.) and when I try to run Help, it starts to come up and then just goes away.... won't load. Ideas, suggestions welcome. Thanks, Da