File Plug-in strange behaviour

Hi all,
I'm trying to publish a stream using my own File Plugin but I
don't understand how the FMS wants to use it.
When I publish a stream using NetStream.publish("streamname",
"record") the FMS:
1.- opens the file to read
2.- query all the attributes of the file (using the handle).
I return size '0' (the file is empty).
3.- tries to read 294912 bytes.
4.- the file is empty, so I tell the FMS that I've read 0
bytes.
5.- closes the file
6.- queries all the attributes of the file (using the name).
7.- open the file to read & write
8.- queries again the file.
9.- tries to read 294912 bytes, but the file is empty.
10.- closes the file.
The client gets 'NetStream.Record.NoAccess'.
I don't know what the FMS is expecting from the File Plugin.
I'm trying to follow the documentation and the examples, but it
doesn't work.
Any clues?
Thanks,
Jorge

The file plug-in works fine in publishing case. Just use
provided FMS sample and you will be able to record publishing file
using external plug-in. Do not modify read by returning 0 since FMS
expects flv file header 13 bytes. Actually in publishing case you
do not needed to modify anything since in that case FMS passing
data to you in write request and you could post that data anywhere
you want.

Similar Messages

  • View Master mode strange behaviour with jpg files

    Hy all,
    I'm using Aperture, and I'm tweakin a lot the SW to discover all secrets ....
    I'm really concerned about a strange behaviour of the SW in view mode.
    If I open a jpg file, do not apply ANY modification, and apply the "show master" command (pressing M), there's a subtle behaviour :
    *the images get sharper !!!!*
    It behaves as if an "edge sharpening" was applied !!!!!!
    With _RAW files this thing doesn't happen at all._
    Even stranger, if I zoom to full definition (by pressing Z), and toggle between normal view and "show master" view, the immage remains the same !
    The effect is not so evident with all images, but sometimes it is !!
    Anyway, I expect not to have such kind of things with a professional SW.
    With professional cameras and good quality files it's really annoying not to beeing sure what's the REAL content of the jpg image.
    Has anyone noted this thing ? Is there a reasonable explanation ?
    The only one I tried to figure out is the following : may be Aperture applies some kind of resampling algorithm with jpg files (bicubic, bilinear, etc).
    May be this resampling is not applied with 100% magnification, as weel as with raw files.
    But it's only my guessing. Now, I'm tweaking other viewers and other SW to understand what's the real jpg image stored in the file : the blurer one form normal view or the sharper one with "show master" mode.
    I stress once again : of course, the jpg file I'm talking about have no settings at all, just imported and toggled with M button.
    Thanks in advance.
    Regards,
    Enzo

    Hy,
    I'm afraid I'm not been clear.
    The problem is this :
    1) jpg image opened in normal view mode, no zoom, (no quick preview, of course) : image with a certain amount of blour
    2) jpg image opened in show master mode, no zoom, (no quick previre, of course) : image SHARPER with respect with the previous.
    No edit applied from import, so "show master" command shouln't apply any change in rendering, should it ?
    The only thing I said on 100% view is that such difference (between normal mode e show mastermode) is not present with 100% magnification.
    That was the issue.
    Enzo

  • Strange Behaviour in File class

    Hi,
    I noticed a strange behaviour. There is a file contains unicode letters in its name. I tried
    File file=new File("c:\@ℏℑ\@�⅙0.txt");
    file.exists() // I checked existence of file using this statement which returns false although file is exist.
    What can I do ?
    Thanks

    Hi,
    Thanks for the reply.
    I am showing the sample:
    //This is a list method
    static void list(File file) {
            if (file.isDirectory()) {
                File[] files = file.listFiles();
                if (files != null) {
                    for (int i = 0; i < files.length; i++) {
                        if(files.isDirectory()){
    list(files[i]);
    }else{
    System.out.println(files[i].getAbsolutePath() + " " + files[i].exists());
    System.out.println(file.getAbsolutePath() + " " + file.exists());
    if I call this method like this from main method:
    File file=new File("C:\\Documents and Settings\\Neha\\Desktop\\ttt\\@&#8463;&#8465;\\@�&#8537;0.txt");
    list(file);
    output:
    C:\Documents and Settings\Neha\Desktop\ttt\@??\@�?0.txt false [with Jre5]
    C:\Documents and Settings\Neha\Desktop\ttt\@??\@�?0.txt true [with Jre6]
    if I call like this
    File file=new File("C:\\Documents and Settings\\Neha\\Desktop\\ttt");
    list(file);
    Output:
    C:\Documents and Settings\Neha\Desktop\ttt\@??\@�?0.txt true
    C:\Documents and Settings\Neha\Desktop\ttt\@??\Chambal25.txt true
    C:\Documents and Settings\Neha\Desktop\ttt\@?? true
    C:\Documents and Settings\Neha\Desktop\ttt true

  • Aliases file - Strange Behaviour

    Greetings all,
    I've been having some strange behaviour with my Postfix installations lately. My logfiles are filled with intermittent entries of:
    Oct 17 18:52:10 xserve1 postfix/smtpd[4117]: table hash:/etc/aliases(0,lock|fold_fix) has changed -- restarting
    Oct 17 18:52:12 xserve1 postfix/local[4129]: table hash:/etc/aliases(0,lock|no_regsub|no_proxy|no_unauth|fold_fix) has changed -- restarting
    This would seem to be a minor nuissance, but unfortunately it seems that mails are arriving in the second or two it takes for Postfix to restart, and are getting rejected or delayed because the service isn't available.
    Looking at the /etc/aliases/postfix file, something seems to be intermittently touching it. I don't see any changes to the file content, but the modification date is updated, and an extended (@) file attribute is added for "com.apple.TextEncoding".
    The only recent changes I have made to my config were to enable SASL with some directives ("smtpd_tls_auth_only = yes" for example) to ensure proper security.
    My servers are running 10.6.5 and 10.6.4. Any suggestions would be appreciated. Thanks.

    Looking at the logs, I'm begining to suspect that the offender is "com.apple.wikid.mailinglists". I don't use group mailing lists so I've disabled this item by adding disabled-true to its plist. Hopefully this solves the problem.

  • APEX Listener and EPG - strange behaviour

    Hi
    For some years, I've used EPG for APEX but have struggled with performance particularly as I can have up to 150 student developers using at any one time.
    I do a fair amount of work using ORDImage and have successfully developed APEX applications to upload image files and display full-size and thumbnail images.
    After upgrading to APEX 4.1 (from 4.0), I decided to install APEX Listener standalone.
    Before I did so I checked that my applications still worked in 4.1 and they did.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.
    Configuring APEX Listener and running the same application through that DOES display the images.
    So this part of the application works under APEX Listener but not under EPG.
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank page with a wwv_flow.accept URL although the image does indeed upload. Under EPG it works as expected and I get a success confirmation.
    So this part of the application works under EPG but not under APEX Listener.
    Has anyone else come across different behaviour depending on the mode of connection?
    Thanks
    Brian
    [Oracle EE 11gR2, Windows Server 2008R2, APEX 4.1, APEX Listener 1.1.3]

    Hi Brian,
    it sounds like you have both EPG and APEX Listener running on the same machine, so your problem might result from a port conflict. Note that both services use TCP port 8080 as default.
    At least a port conflict would explain the strange behaviour in your case, some things working on one web server and some on the other.
    Some parts of your initial post hint to that direction, e.g.
    However, just installing APEX Listener but not configuring it (yet) has meant that my image display in a report using a procedure based on >wpg_docload.download_file( l_ordimage_image.source.localData ) no longer works in EPG - the images are not displayed.... because the APEX Listener only interfere with the EPG if it is at least running on the same machine as your database and furthermore, if it is unconfigured in terms of ist database connection, a port conflict might be the only way it could cause anything like that.
    However, if you are sure that's not the issue, please check if you see any error in the APEX Listener's log for the following action you performed:
    My application also allows users to upload images from APEX_APPLICATION_FILES using standard code. Under APEX Listener after uploading, I'm left with a blank >page with a wwv_flow.accept URL although the image does indeed uploadIf you actually see just a blank screen, something very bad must have happened and you should see some kind of stack trace there.
    For further investigations, if necessary, it would be helpful to know how you deployed or started your APEX Listener and which JDK version you use.
    For the moment, I still think the port conflict is my best guess.
    You could avoid it by either changing the port for EPG (I'd not recommend that if you have other users still using it) or by changing the port for your APEX Listener.
    -Udo

  • 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...)

  • 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 from new 2012R2 in old domain

    Hi all,
    At work (education level), I'm starting to take charge of windows admin, so beiing a noob admin I'm finding strange behaviours that I hope you can help me solve them all :-)
    We've one (big) domain with about 5000 computers (workers and students all together), and around 50000 users (again, workers and students all together) setup like this:
    DC-DOMAIN-1:
    Windows Server 2008R2
    Shares NETLOGON and SYSVOL
    DC-DOMAIN-2:
    Windows Server 2003 R2 x64
    Shares CertEnroll, NETLOGON, SMSLOGON, SYSVOL
    Checking RootDSE, I see 'domainControllerFunctionaly is Windows 2003' (DC-DOMAIN-2)
    So, with this setup, I've noticed these strange behaviours, hope list isn't too big  (guess there will be more behaviours but these seemed too odd):
    1) On DC-DOMAIN-2, WinServer 2003 eventlog, inside 'Directory Service', I found this warning event ID 1083 (Source NTDS Replication):
    Active Directory could not update the following object with changes received from the domain controller at the following network address because Active Directory was busy processing information.
    Object:CN=<an user name>, CN=Users, DC=DOMAIN
    Usually followed by an information event (eventid 1955) which says:
    ctive Directory encountered a write conflict when applying replicated changes to the following object.
    Object:
    <SAME USER OBJECT THAN PREVIOUS EVENT ID>
    Time in seconds:
    0
    Event log entries preceding this entry will indicate whether or not the update was accepted.
    A write conflict can be caused by simultaneous changes to the same object or simultaneous changes to other objects that have attributes referencing this object. This commonly occurs when the object represents a large group with many members, and the functional level of the forest is set to Windows 2000. This conflict triggered additional retries of the update. If the system appears slow, it could be because replication of these changes is occurring.
    User Action
    Use smaller groups for this operation or raise the functional level to Windows Server 2003.
    And having as result that user being blocked in domain.
    2) I've added a new print server based on Windows Server 2012R2 (running inside an updated ESX 5.5 with VMXNET3 ethernet adapter as recommended by vmware), and seen in the event viewer these warnings/errors:
    At System log:
    Error Event ID 5783, Source NETLOGON:
    The session setup to the Windows NT or Windows 2000 Domain Controller \\DC-DOMAIN-2.fulldns.name for the domain DOMAIN is not responsive. The current RPC call from Netlogon on \\PRINTSERVER to \\DC-DOMAIN-2.fulldns.name has been cancelled.
    I've seen Event ID 5783 with DC-DOMAIN-1 too....
    Error Event ID 5719, Source NETLOGON:
    This computer was not able to set up a secure session with a domain controller in domain DOMAIN due to the following:
    The remote procedure call failed and did not execute.
    This may lead to authentication problems. Make sure that
    this computer is connected to the network. If the problem persists, please contact your domain administrator.
    ADDITIONAL INFO:
    If this computer is a domain controller for the specified domain, it sets up the secure session to the primary domain controller emulator in the specified domain. Otherwise, this computer sets up the secure session to any domain controller in the specified domain.
    At Microsoft-Windows-TerminalServices-RemoteConnectinoManager/Admin found also this warning:
    Warning Event ID 20499 Source TerminalServices-RemoteConnectionManager:
    Remote Desktop Services has taken too long to load the user configuration from server \\DC-DOMAIN-2.fulldns.name for user administrator
    3) If I try Group Policy Modeling on DC-DOMAIN-1 (server 2008R2), everything works fine, no matter if I try it against DC-DOMAIN-1 or DC-DOMAIN-2, but if I try this from the Server 2012R2 (the one from point 2), I get this:
    Simulation against DC-DOMAIN-2: Gets executed, but all GPO show as inaccessible, empty or disabled.
    Simulation against DC-DOMAIN-1: Sometimes it gets executed as DC-DOMAIN-2, sometimes I get an error saying query can't be executed.
    4) From server 2012R2, I usually manage printing GPO. If I click on the domain root (GPMC, forest, Domains, DOMAIN-NAME-ROOT) right pane, I get a pop up saying: 
    'A processing error ocurred collecting data using this base domain controller. Please change the base domain controller and try again'
    After closing popup, right pane says something like 'DC-DOMAIN-2.fulldns.name' is the baseline domain controller for this domain.
    No infrastructure Status information exists for this domain.
    Click the Detect Now button below to gather infrastructure status from all of the domain controllers in this domain.
    Pressing 'Detect Now' does nothing, and trying to select New Baseline DC shows again same pop up than before.
    5) Last, but not least, I've feeling that GPO takes too much to apply. I've found scenarios in which even after executing 'gpupdate /force' correctly on client computer either local or domain admin, I can't see the new changes (gpresult says it has been
    updated though). But couldn't find anything on eventlog that informs about problems with GPOs...
    For all these strange behaviours I've noticed in last month that I started checking things as sys admin, I believe domain is damaged, or something is wrong there (not just my new server 2012R2, even if it's running inside an ESX, blehh), so please, any hint
    on what to check, what to change, what to fix, would be highly appreciated.
    Thanks in advance.

    Hi Paul,
    Honestly, I'm still trying to figure out all broken things reported by tests :( Guess Jesper's suggestion about adding a new 2008 DC to get rid of 2003 and start checking again after that may be best option.
    I'll try to summarize list of things I believe are wrong:
    running
    DCDIAG /V /C /D /E /s:yourdcname > c:\dcdiag.log  for every DC, shows different errors. They show things such as:
    another domain running here (not administered by us, only relationship is that our users are shared with that domain, nothing else) appear when Printing out pDsInfo (as if they were DC of our domain too, but they do not even share RootDomain). Guess it
    may be for a bug old sys admin had when clonning from his 2008R2 template, that forgot to change SID... I already noticed 1 year ago our print server shared SID with those DC, guess there may be more servers sharing SID too :-(
    Within Starting test: Replications, I see few messages at Replication Latency Check, such as the one for CN=Schema, CN=Configuration, DC=<ourdomain>: 
    Latency information for 35 entries in the vector were ignored.
                      35 were retired Invocations.  0 were either: read-only replicas and are not verifiably latent, or dc's no longer replicating this nc.  0 had no latency information (Win2K DC)
    On Services test, I see an 
       Invalid service type: RpcSs on DC-DOMAIN-3, current value
                WIN32_OWN_PROCESS, expected value WIN32_SHARE_PROCESS
    On SystemLog, I see LOTS of warnings/errors such as:
    A warning event occurred.  EventID: 0x80000002
                Time Generated: 07/28/2014   08:21:54
                (Event String (event log = System) could not be retrieved, error
                0x503)
             An error event occurred.  EventID: 0xC0000003
                Time Generated: 07/28/2014   08:22:18
                (Event String (event log = System) could not be retrieved, error
                0x3afc)
    Missing entries on DNS (we've a static DNS)
    netdiag.exe /v > c:\netdiag.log Showed again DNS problems such as our primary DNS pointing to all DC, secondary
    DNS pointing just to DC with FSMO roles,...
    repadmin.exe /showrepl * /verbose /all /intersite > c:\repl.txt  Gave no errors, now I must check in detail
    if every replica is correct
    And finally,
    dnslint /ad /s "ip address of your dc"  gave more DNS problems:
    One or more DNS servers may not be authoritative for the domain
    One or more DNS servers did not respond to UDP queries
    One or more zone files may have expired
    SOA record data was unavailable and/or missing on one or more DNS servers
    Sumarizing, guess it will be better to fix DNS problems, promote new 2008R2 DC to get rid of 2003 one, promote domain to 2008 too, check again for messages and relationship with other domain, and then come back here for support if needed 
    EDIT: Almost forgot to talk about SYSVOL folder. As said before, there are 426 GPO folders inside Policies. Of them, 375 have an inetres.adm files in it (smallest one 1398 KB, almost all of them 2307 or 2707 kb).... 

  • 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.

  • [SOLVED] French Canadian keyboard strange behaviour

    Hello!
    I just upgraded to Gnome 2.30 in [testing] and my keyboard has a strange behaviour. With Gnome 2.28, my keyboard layout was set to Canadian French (legacy), and still is, though some of the keys do not behave the same. For instance, the accents "`", "¸" and ^ do not behave as usual, but rather give me some letter with that accent on it, rather than letting me choose the letter on which put the accent.
    Moreover, the SHIFT+3 combination gives me a # instead of a /, but not in all software. Google Chrome has the good behaviour, but gnome-terminal gives me a #.
    Do you understand any of this?
    I'll post the packages I have upgraded.
    [2010-04-05 01:09] upgraded openssl (0.9.8n-1 -> 1.0.0-2)
    [2010-04-05 01:09] upgraded python (2.6.5-2 -> 2.6.5-3)
    [2010-04-05 01:09] upgraded pygobject (2.20.0-1 -> 2.21.1-1)
    [2010-04-05 01:09] upgraded pygtk (2.16.0-2 -> 2.17.0-1)
    [2010-04-05 01:09] upgraded gnome-menus (2.28.0.1-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded libsoup (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded libldap (2.4.21-1 -> 2.4.21-2)
    [2010-04-05 01:09] upgraded libidl2 (0.8.13-1 -> 0.8.14-1)
    [2010-04-05 01:09] upgraded orbit2 (2.14.17-1 -> 2.14.18-1)
    [2010-04-05 01:09] upgraded gconf (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:09] upgraded gnome-keyring (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:09] upgraded heimdal (1.3.1-3 -> 1.3.2-1)
    [2010-04-05 01:09] upgraded libsoup-gnome (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded gnome-icon-theme (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libgweather (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded evolution-data-server (2.28.3.1-1 -> 2.30.0-2)
    [2010-04-05 01:10] upgraded gnome-desktop (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libwnck (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:10] upgraded libunique (1.1.6-1 -> 1.1.6-2)
    [2010-04-05 01:10] upgraded gnome-disk-utility (2.28.1-1 -> 2.30.1-1)
    [2010-04-05 01:11] upgraded libarchive (2.8.3-1 -> 2.8.3-3)
    [2010-04-05 01:11] upgraded smbclient (3.5.1-1 -> 3.5.1-2)
    [2010-04-05 01:11] upgraded gvfs (1.4.3-1 -> 1.6.0-1)
    [2010-04-05 01:11] upgraded gnome-vfs (2.24.2-2 -> 2.24.3-2)
    [2010-04-05 01:11] upgraded libbonobo (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded libgnome (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:11] upgraded libart-lgpl (2.3.20-1 -> 2.3.21-1)
    [2010-04-05 01:11] upgraded libgnomecanvas (2.26.0-1 -> 2.30.1-1)
    [2010-04-05 01:11] upgraded libbonoboui (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded librsvg (2.26.0-2 -> 2.26.2-1)
    [2010-04-05 01:11] upgraded gnome-panel (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:11] upgraded libgnomeui (2.24.2-1 -> 2.24.3-1)
    [2010-04-05 01:11] upgraded gnome-python (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:11] upgraded alacarte (0.12.4-2 -> 0.13.1-1)
    [2010-04-05 01:11] upgraded apache (2.2.15-1 -> 2.2.15-2)
    [2010-04-05 01:11] upgraded at-spi (1.28.1-1 -> 1.30.0-1)
    [2010-04-05 01:11] upgraded totem-plparser (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded brasero (2.28.3-2 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded icu (4.2.1-1 -> 4.4-1)
    [2010-04-05 01:12] upgraded brltty (4.1-2 -> 4.1-3)
    [2010-04-05 01:12] upgraded libgtop (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:12] upgraded bug-buddy (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded cheese (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded clutter (1.0.10-1 -> 1.2.4-1)
    [2010-04-05 01:12] upgraded clutter-gtk (0.10.2-1 -> 0.10.2-2)
    [2010-04-05 01:12] upgraded libxklavier (4.0-1 -> 5.0-1)
    [2010-04-05 01:12] upgraded libgnomekbd (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded gnome-settings-daemon (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:12] upgraded zenity (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded metacity (2.28.1-1 -> 2.30.0-2)
    [2010-04-05 01:13] upgraded gnome-control-center (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded compiz-decorator-gtk (0.8.4-2 -> 0.8.4-3)
    [2010-04-05 01:13] upgraded libcups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:13] upgraded openslp (1.2.1-2 -> 1.2.1-3)
    [2010-04-05 01:13] upgraded cups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:13] upgraded curl (7.20.0-1 -> 7.20.0-2)
    [2010-04-05 01:13] upgraded cvs (1.11.23-4 -> 1.11.23-5)
    [2010-04-05 01:13] upgraded postgresql-libs (8.4.3-1 -> 8.4.3-2)
    [2010-04-05 01:13] upgraded cyrus-sasl-plugins (2.1.23-1 -> 2.1.23-2)
    [2010-04-05 01:13] upgraded cyrus-sasl (2.1.23-3 -> 2.1.23-4)
    [2010-04-05 01:13] upgraded dbus-python (0.83.0-2.1 -> 0.83.1-1)
    [2010-04-05 01:13] upgraded gnome-python-desktop (2.28.0-3 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded deskbar-applet (2.28.0-3 -> 2.30.0-1)
    [2010-04-05 01:13] upgraded dnsutils (9.6.1-2 -> 9.6.1-3)
    [2010-04-05 01:14] upgraded eog (2.28.2-2 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded libwebkit (1.1.15.4-3 -> 1.1.90-2)
    [2010-04-05 01:14] upgraded gobject-introspection (0.6.6-1 -> 0.6.9-1)
    [2010-04-05 01:14] upgraded epiphany (2.28.2-2 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded evince (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:14] upgraded gtkhtml (3.28.3-1 -> 3.30.0-1)
    [2010-04-05 01:14] upgraded evolution-exchange (2.28.3-1 -> 2.30.0-2)
    [2010-04-05 01:14] upgraded evolution-webcal (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:14] upgraded file-roller (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gcalctool (5.28.2-1 -> 5.30.0-1)
    [2010-04-05 01:15] upgraded gconf-editor (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gnome-session (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gdm (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded gtksourceview2 (2.8.2-1 -> 2.10.0-1)
    [2010-04-05 01:15] upgraded pygtksourceview2 (2.8.0-1 -> 2.10.0-1)
    [2010-04-05 01:15] upgraded gedit (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:15] upgraded git (1.7.0.3-1 -> 1.7.0.4-1)
    [2010-04-05 01:15] upgraded libsigc++2.0 (2.2.4.2-1 -> 2.2.5-1)
    [2010-04-05 01:15] upgraded glibmm (2.22.1-1 -> 2.24.0-1)
    [2010-04-05 01:15] upgraded gucharmap (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-applets (2.28.0-2 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-backgrounds (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded gnome-bluetooth (2.28.6-1 -> 2.30.0-1)
    [2010-04-05 01:16] upgraded vte (0.22.5-1 -> 0.24.0-2)
    [2010-04-05 01:16] upgraded gnome-desktop-sharp (2.26.0-3 -> 2.26.0-5)
    [2010-04-05 01:16] upgraded gnome-doc-utils (0.18.1-1 -> 0.20.0-1)
    [2010-04-05 01:17] upgraded gnome-games (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-games-extra-data (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-mag (0.15.9-1 -> 0.16.1-1)
    [2010-04-05 01:17] upgraded gnome-media (2.28.5-1 -> 2.30.0-2)
    [2010-04-05 01:17] upgraded gnome-netstatus (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:17] upgraded gnome-nettool (2.28.0-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-power-manager (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gnome-screensaver (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:17] upgraded gtkmm (2.18.2-1 -> 2.20.0-1)
    [2010-04-05 01:17] upgraded gnome-system-monitor (2.28.0-1 -> 2.28.1-1)
    [2010-04-05 01:18] upgraded system-tools-backends (2.8.3-1 -> 2.10.0-1)
    [2010-04-05 01:18] upgraded liboobs (2.22.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded nautilus (2.28.4-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-system-tools (2.28.2-1 -> 2.30.0-2)
    [2010-04-05 01:18] upgraded gnome-terminal (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gtk-engines (2.18.5-1 -> 2.20.0-1)
    [2010-04-05 01:18] upgraded gnome-themes (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-user-share (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:18] upgraded gnome-utils (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded xulrunner (1.9.2.2-2 -> 1.9.2.3-1)
    [2010-04-05 01:19] upgraded yelp (2.28.1-2 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded gnome2-user-docs (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded gok (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:19] upgraded grep (2.6.2-1 -> 2.6.3-1)
    [2010-04-05 01:19] upgraded gstreamer0.10-bad (0.10.18-2 -> 0.10.18-3)
    [2010-04-05 01:19] upgraded neon (0.28.6-2 -> 0.28.6-4)
    [2010-04-05 01:19] upgraded gstreamer0.10-bad-plugins (0.10.18-2 -> 0.10.18-3)
    [2010-04-05 01:19] upgraded hamster-applet (2.28.2-1 -> 2.30.0.1-1)
    [2010-04-05 01:19] upgraded net-snmp (5.5-2 -> 5.5-3)
    [2010-04-05 01:19] upgraded hplip (3.9.12-5 -> 3.10.2-1)
    [2010-04-05 01:20] upgraded imap (2007e-1 -> 2007e-2)
    [2010-04-05 01:20] upgraded jre (6u18-2 -> 6u19-2)
    [2010-04-05 01:21] upgraded kdebase-workspace (4.4.2-1 -> 4.4.2-2)
    [2010-04-05 01:21] upgraded kernel26-firmware (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded kernel26 (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded kernel26-headers (2.6.33.1-1 -> 2.6.33.2-1)
    [2010-04-05 01:24] upgraded lib32-glib2 (2.22.5-1 -> 2.24.0-1)
    [2010-04-05 01:24] upgraded lib32-atk (1.28.0-1 -> 1.30.0-1)
    [2010-04-05 01:24] upgraded lib32-e2fsprogs (1.41.10-1 -> 1.41.11-1)
    [2010-04-05 01:24] upgraded lib32-openssl (0.9.8n-1 -> 1.0.0-2)
    [2010-04-05 01:24] upgraded lib32-heimdal (1.3.1-3 -> 1.3.2-1)
    [2010-04-05 01:24] upgraded lib32-libcups (1.4.2-5 -> 1.4.3-2)
    [2010-04-05 01:24] upgraded lib32-pango (1.26.2-1 -> 1.28.0-1)
    [2010-04-05 01:24] upgraded lib32-gtk2 (2.18.9-2 -> 2.20.0-2)
    [2010-04-05 01:24] upgraded lib32-libgl (7.7-1 -> 7.7.1-0.1)
    [2010-04-05 01:24] upgraded lib32-libxml2 (2.7.6-2 -> 2.7.7-1)
    [2010-04-05 01:24] upgraded lib32-mesa (7.7-1 -> 7.7.1-0.1)
    [2010-04-05 01:24] upgraded lib32-qt (4.6.2-2 -> 4.6.2-3)
    [2010-04-05 01:24] upgraded libepc (0.3.10-1 -> 0.3.11-1)
    [2010-04-05 01:24] upgraded libfetch (2.30-1 -> 2.30-3)
    [2010-04-05 01:24] upgraded libgail-gnome (1.20.1-1 -> 1.20.2-1)
    [2010-04-05 01:24] upgraded libgdata (0.4.0-1 -> 0.6.4-1)
    [2010-04-05 01:24] upgraded libgnomecups (0.2.3-6 -> 0.2.3-7)
    [2010-04-05 01:24] upgraded libgnomeprint (2.18.6-2 -> 2.18.7-2)
    [2010-04-05 01:24] upgraded libgnomeprintui (2.18.4-1 -> 2.18.5-1)
    [2010-04-05 01:24] upgraded librpcsecgss (0.19-2 -> 0.19-3)
    [2010-04-05 01:24] upgraded libssh (0.4.1-1 -> 0.4.1-3)
    [2010-04-05 01:25] upgraded libxml++ (2.26.0-1 -> 2.30.0-1)
    [2010-04-05 01:25] upgraded links (2.2-3 -> 2.2-4)
    [2010-04-05 01:25] upgraded lynx (2.8.7-1 -> 2.8.7-2)
    [2010-04-05 01:25] upgraded sbcl (1.0.35-1 -> 1.0.37-1)
    [2010-04-05 01:25] upgraded maxima (5.20.1-2 -> 5.20.1-3)
    [2010-04-05 01:25] upgraded mercurial (1.5-1 -> 1.5.1-1)
    [2010-04-05 01:26] upgraded miro (2.5.4-4 -> 3.0-1)
    [2010-04-05 01:26] upgraded mousetweaks (2.28.2-1 -> 2.30.0-1)
    [2010-04-05 01:26] upgraded nasm (2.07-1 -> 2.08.01-1)
    [2010-04-05 01:26] upgraded nautilus-actions (1.12.2-1 -> 2.30.0-1)
    [2010-04-05 01:26] upgraded nautilus-open-terminal (0.18-1 -> 0.18-2)
    [2010-04-05 01:26] upgraded nautilus-sendto (2.28.2-1 -> 2.28.4-1)
    [2010-04-05 01:26] upgraded samba (3.5.1-1 -> 3.5.1-2)
    [2010-04-05 01:26] upgraded nautilus-share (0.7.2-4 -> 0.7.2-5)
    [2010-04-05 01:26] upgraded network-manager-applet (0.8-2 -> 0.8-3)
    [2010-04-05 01:26] upgraded nfs-utils (1.2.2-1 -> 1.2.2-2)
    [2010-04-05 01:26] upgraded nmap (5.21-1 -> 5.21-2)
    [2010-04-05 01:26] upgraded ptlib (2.6.5-1 -> 2.6.5-2)
    [2010-04-05 01:27] upgraded opal (3.6.6-1 -> 3.6.6-2)
    [2010-04-05 01:27] upgraded openntpd (3.9p1-10 -> 3.9p1-11)
    [2010-04-05 01:28] upgraded openoffice-base (3.2.0-1 -> 3.2.0-3)
    [2010-04-05 01:28] upgraded openssh (5.4p1-3 -> 5.4p1-4)
    [2010-04-05 01:28] upgraded openvpn (2.1.1-1 -> 2.1.1-2)
    [2010-04-05 01:28] upgraded orca (2.28.3-1 -> 2.30.0-1)
    [2010-04-05 01:28] upgraded perl-crypt-ssleay (0.57-3 -> 0.57-4)
    [2010-04-05 01:28] upgraded perl-uri (1.52-1 -> 1.54-1)
    [2010-04-05 01:28] upgraded php (5.3.2-4 -> 5.3.2-6)
    [2010-04-05 01:28] upgraded php-apache (5.3.2-4 -> 5.3.2-6)
    [2010-04-05 01:28] upgraded pixman (0.16.6-1 -> 0.18.0-1)
    [2010-04-05 01:28] upgraded postfix (2.7.0-1 -> 2.7.0-2)
    [2010-04-05 01:28] upgraded qt (4.6.2-2 -> 4.6.2-3)
    [2010-04-05 01:28] upgraded qtscriptgenerator (0.1.0-3 -> 0.1.0-4)
    [2010-04-05 01:29] upgraded rhythmbox (0.12.7-1 -> 0.12.8-1)
    [2010-04-05 01:29] upgraded ruby (1.9.1_p378-1 -> 1.9.1_p378-2)
    [2010-04-05 01:29] upgraded seahorse (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded seahorse-plugins (2.28.1-1 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded sound-juicer (2.28.1-2 -> 2.28.2-1)
    [2010-04-05 01:29] upgraded subversion (1.6.9-2 -> 1.6.9-4)
    [2010-04-05 01:29] upgraded syslog-ng (3.0.4-3 -> 3.0.4-4)
    [2010-04-05 01:29] upgraded telepathy-glib (0.10.1-1 -> 0.10.2-1)
    [2010-04-05 01:29] upgraded tomboy (1.1.0-1 -> 1.2.0-2)
    [2010-04-05 01:29] upgraded totem (2.28.5-2 -> 2.30.0-1)
    [2010-04-05 01:29] upgraded transmission-gtk (1.92-1 -> 1.92-2)
    [2010-04-05 01:30] upgraded vala (0.7.10-1 -> 0.8.0-1)
    [2010-04-05 01:30] upgraded vinagre (2.28.1-2 -> 2.30.0-1)
    [2010-04-05 01:30] upgraded vino (2.28.1-3 -> 2.28.2-1)
    [2010-04-05 01:30] upgraded virtuoso (6.1.0-1 -> 6.1.0-2)
    [2010-04-05 01:30] upgraded wget (1.12-1 -> 1.12-2)
    [2010-04-05 01:30] upgraded wpa_supplicant (0.6.10-1 -> 0.6.10-2)
    [2010-04-05 01:30] upgraded xorg-server (1.7.6-2 -> 1.7.6-3)
    [2010-04-05 01:30] upgraded xorg-xinit (1.2.0-1 -> 1.2.1-1)
    [2010-04-05 01:30] upgraded xterm (255-1 -> 256-1)
    [2010-04-05 09:21] upgraded fofix-svn (1991-1 -> 2038-1)
    [2010-04-05 12:31] upgraded gloobus-preview-bzr (212-1 -> 214-1)
    Last edited by valandil (2010-04-06 16:52:28)

    Problem solved!
    I remembered I once configured my keyboard with HAL and /etc/hal/fdi/policy/10-keymap.fdi was set to xkb.layout=ca and xkd.variant=fr. I changed the GDM layout to Canada and removed the xkb.variant=fr from the .fdi file and everything was fixed!

  • 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 in ORacle Forms Webutil 106 / Error message WUC-14 WUC-12

    This is to inform you about a strange behaviour in Webutil V1.0.6
    Hosting environment is Oracle Application Server 10.1.2.0.2 on Unix Solaris 10
    Oracle Server 10.2.0.4.0 Enterprise Edition
    Client-envionment : Windows 2000, IE 6
    I created an Forms based application which reads in certain text files into the database using
    Webutil. The data will get changed using the application with logic and lateron a different textfile
    will be transmitted using either ftp or it may be created on the client side (again with Webutil).
    This solution worked perfect for some time (a year or so) using CLIENT_TEXT_IO...
    Hoewever, during the week, I recognized users coming up with the statement that the download
    to the local client does not worked anymore in certain situations. The system is producing an error-msg
    on the Form in the following sequence :
    WUC-14 [getFromObjectCache] ...
    WUC-14 [getFromObjectCache] ...
    WUC-12 [FileFunctions.newLine()] ...
    I traced the session and traced WebUtil, was able to reproduce the problem but could not find out the source
    of it in the first place.
    Hoewever, it came out, that part of the file being created on the client is a "¿" sign : hex :$BF
    This was already part of the file being read in the first place, so the value is stored in the database.
    There is no problem when reading a file having a content like this with CLIENT_TEXT_IO but there obviously is one
    when writing it to the local client.
    The file is getting processed on the client and gets closed with CLIENT_TEXT_IO.FCLOSE.
    After the FCLOSE statement is getting processed, the above errors occurs, The length of the produced file is then : 0 bytes ^^
    Whenever facing a problem like this check the content of the file you are trying to create.
    Workaround was :
    - set workingDirectory in formsweb.cfg
    - using Forms based TEXT_IO rather than CLIENT_TEXT_IO to create the file on the backend side (Apps-server)
    - implement WEBUTIL_FILE_TRANSFER.AS_To_Client_With_Progress to download the file to the client
    In order to make it a little bit "colourful" I implemented a bean with progressbar when creating the file on the back end side
    Works perfect... and looks nice :)

    XeM wrote:
    Hi Andreas,
    install.syslib.location.client.0=webutil\syslibi found the above line over google but when i check my webutility configuration file i didn't found it there. I added this line after the line i have mentioned in previous post but this also not worked. And then i worked on changing permission over folder.
    HI XeM
    Your adding location is ok. But i suggest try something different. Change the above line to
    /* i'm confuse with the \ or / *\
    install.syslib.location.client.0=\webutil
    or
    install.syslib.location.client.0=/webutilAnd do the following work In the client
    1. Close ALL open browsers.
    2. On the client machine search all directories for webutil.*properties and delete all instances of that file.
    3. Delete d2kwut60.dll, JNIsharedstubs.dll, and jacob.dll from the JRE\bin directory.
    4. Clear the JRE jar cache. This can be done several ways, but using the Java Control Panel is likely the easiest and safest.
    Now stop the OC4J instance and start again and try at client...
    Hope this works...
    If works... please post the solutions.
    Hamid

  • Strange behaviour or not?

    Hi all...I'm new in this forum and I have a question to you. I think my curiosity is about the compiler, so I post here.
    I use Java SE 1.5 and 1.6. If I write a simple class like the following
    public class Prova{
    public static void main(String[] args){
    Integer a1=128;
    Integer a2=128;
    /*1*/System.out.println(a1==a2);
    /*2*/System.out.println(a1);
    /*3*/System.out.println(a2);
    I get the following strange result
    /*1*/ prints true if a1 and a2 are both inizialized between -128 and 127 (exactly 256 values, the ones obtainable from a byte) and false for values less then -128 or bigger then 127...
    Is this a strange behaviour or not? Why do I obtain such results?
    please note that /*2*/ and /*3*/ ALWAYS print the declared values (in this case 128).
    thank you!

    Shadow-DK wrote:
    From version 1.5 that declaration began correct and the result was similar to Integer i = new Integer(100);
    No that wouldn't permit caching. Its like Integer i = Integer.valueOf(100);The caching MUST occur for values -128 thru 127, it may occur for other values. I would not rely on caching not occurring outside that range.
    See [the language spec section on boxing conversion|http://java.sun.com/docs/books/jls/third_edition/html/conversions.html#5.1.7]
    If you aren't sure what the compiler is doing, it can be informative to use the javap command with the -c option to view the classfile.
    Usage: javap <options> <classes>...
    where options include:
       -c                        Disassemble the code
       -classpath <pathlist>     Specify where to find user class files
       -extdirs <dirs>           Override location of installed extensions
       -help                     Print this usage message
       -J<flag>                  Pass <flag> directly to the runtime system
       -l                        Print line number and local variable tables
       -public                   Show only public classes and members
       -protected                Show protected/public classes and members
       -package                  Show package/protected/public classes
                                 and members (default)
       -private                  Show all classes and members
       -s                        Print internal type signatures
       -bootclasspath <pathlist> Override location of class files loaded
                                 by the bootstrap class loader
       -verbose                  Print stack size, number of locals and args for met
                                 If verifying, print reasons for failureBruce

  • Strange behaviour with smart music list in iTunes

    I don't know how is the name of this list in english. In portuguese iTunes calls "Lista Inteligente". So, I eddited a list to show all musics never played up to 100 months ago. If I click on a music in this list, before it plays, the music disappear from the list as it would be played and nothing will be played. And so one, the next and etc. No date is shown in "last play" but the music isn't anymore to see in this List.
    This list works well for many years but suddenly I have this strange behaviour.
    could it be something wrong with new update? Now I have iTunes installed 11.3.0.54

    Click the gray disclosure triangle in front of the iPod touch name.
    Thus I cannot do any functions with the music on my iPod - such as delete songs, update song info, etc.
    I would suggest making any changes to songs in iTunes and then transferring the songs to the touch.
    You can create playlists and autosync on lythos playlists.
    Then add/delete from those playlists, update items in iTunes then plug in the touch to sync it.

Maybe you are looking for