viOpen suspended on Linux (returns close 0x3fff0082)

Hello

I run an application on Linux that uses NI Visa to talk to a device compatible 488.2 using a TCP/IP socket. Control and status of the unit is generally very good, but we met a strange behavior for 2 causes of error.

Case 1: We unplug the Ethernet cable after have successfully opened a session of bus with the equipment. The sequence of events is usually as follows:

1. next attempt the provisions of the code to write data on the bus returns an error code as it should.

2. the appeal that followed to viClose() returns a 0x3fff0082 (VI_WARN_NULL_OBJECT).

3. the call to viOpen() is suspended, regardless of the time elapsed between close and open.

Case 2: With the cable still disconnected, restart us the equipment model process which tries to open a session of bus.

1. the initial call to viOpen() returns 0xBFFF0011 (VI_ERROR_RSRC_NFOUND), as it should.

2. even in the case of 1, viClose() returns 0x3fff0082 (VI_WARN_NULL_OBJECT)

3. even in case 1, which followed calls to viOpen() hang.

You would think that with the device disconnected from the network, the ResourceNotFound error would return to all calls to viOpen(). But the returning viClose() warning indicates that something strange happening. Someone saw something like that?

Thank you

-Dan

OR Visa: 4.5.1

Linux: Redhat, 2.6.18 - 92.el5

After digging in our application code, I found the root of the problem. The code implements the timer to reconnect by subscribing to the operating system all the N seconds of SIGALRM (see C++ time.h and signal.h files). I'm not completely sure of the ins and outs, but somehow the SIGALRM treatment appear to interfere with the call to Visa and cause the deadlock. I'm sure that Visa creates his own son, but that does not help the coexistence.

In short, the timer of the process should be unregistered before as I call the viOpen. After the call, you can re - save and continue as usual. Note: This applies not only to the viOpen, but also to all other Visa functions that perform i/o. (like getAttribute and setAttribute functions are simply properties of the session itself and are not tampered with).

Thanks for the tips, hope that this is useful for people who see this phenomenon in the future.

Tags: NI Hardware

Similar Questions

  • DV7:fail return to suspend under linux mint 14

    I have a HP Pavilion dv7

    p/n FF2OUA #ABC

    DV7 - 1027ca

    running mint14 linux 64-bit with cinnamon as the vehicle of display.

    If I use the option suspends the logout button, the machine indeed set itself in a sort

    a State suspended.

    Maybe a few hours later, I move the mouse and the brainstorming of the machine, to display the screen as it

    has when suspended, with the exception of a greenish top-left window with a red circle with a white landscape

    stripe, as well as a collection of boxes in which the characters would appear normally, I guess; Maybe

    It is a warning or a statement - who knows.

    None of the office is accessible; in the end, I have to hold the power button long enough

    to turn the machine off and restart, losing my working state to suspend.

    If there is a fix, I'd be very interested to learn about it.

    At soon Mouseion

    Hi Mouseion,

    You would be better off this announcement in a Linux forum and hear because do all sort of troubleshooting then we will have to look back to Windows.

    Thank you

  • Impossible to suspend (SUSE Linux Enterprise Server 12)

    I have difficulties to suspend a virtual machine of SUSE Linux Enterprise Server 12.

    Even improved v7.1.1 fusion in the hope that it can be fixed.

    He is the pop up box.

    Screen 2.png

    No problem with SUSE Linux Enterprise Server 11 SP1/SP2/SP3 systems.

    Has anyone else seen elsewhere.

    -Bruce-

    Hi Bruce,.

    Welcome to the Fusion community.

    Please try to re - install vmware tools in your virtual machine and see if this could solve your problem. Thank you.

  • How to close ipad3

    I used to close my iPad in the night by a double-click and drag then all open windows, leaving just the homepage. At that point I stop.

    Lately, however, when I go to swipe off window open or apps, they are all just move together including the home page. I can't get rid of them one at a time.

    What is the problem?

    Thank you.

    as with a phone just click suspend on top, manually close the applications that have been suspended to the storage by the operating system uses when even more power then let them be

    and a cold boot when you turn completely off your use of the device much more power

  • Request to close class (without GUI) app via the Menu - help please!

    Hello everyone, as you can see I took the sample application for the execution of a background application and adds a system-wide menu. The question is how can I properly close the application via the menu.

    I just moved from the C++ so mental conversion to Java is running (learn a lot of new ways to cause exceptions in a whole new language)

    Any help would be appreciated, I've seen the question several times with no response or vague answers and no code to back it up.

    Thank you!

    /**
    * GUILessApplication
    *
    * A sample application that appears on the Ribbon
    * but has no user interface.
    */

    package guiLessApp;

    Net.rim.device.api.system import. *;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItem;
    Import net.rim.blackberry.api.menuitem.ApplicationMenuItemRepository;

    / public final class GUILessApp extends Application
    {
    public static BackGroundApp backGroundApp;
             
    Public Shared Sub main (String [] args)
    {
    PAP GUILessApp = new GUILessApp();
    theApp.enterEventDispatcher ();
    }

    public GUILessApp()
    {
    Creates and starts a new thread BackGroundApp.
              
    backGroundApp = new BackGroundApp();
    backGroundApp.start ();
                       
    MyMenuItem myMenuitem = new MyMenuItem (17);

    ApplicationMenuItemRepository
    .getInstance (.addMenuItem)
    (ApplicationMenuItemRepository
    . MENUITEM_SYSTEM, myMenuitem);
    }
        
    The thread that is running in the background.
    SerializableAttribute public class BackGroundApp extends Thread
    {
    Boolean stopThread = false;
    public synchronized void stop()
    {
    stopThread = true;
    }

    public void run()
    {
    While (! stopThread)
    {
    You must run your treatment here.
    This example prints just one line
    in the output window BlackBerry JDE
    System.out.println ("Application is running");

    Sleep for 5 seconds to avoid the
    application to run out of control
    Try
    {
    Sleep (5000);
    }
    catch (System.Exception e)
    {
    Exception handling would be here.
    }
    }
    }
    }
    Stop the thread to exit.
    protected void onExit()
    {
    backGroundApp.stop ();
    }
    }

    class MyMenuItem extends ApplicationMenuItem {}

    using default constructors here.
    MyMenuItem (order int) {}
    Super (Order);
    }

    We must implement methods
    Run is called when the menuItem is called
    public Object execute (object context) {}

    do something here

    return the context;
    }

    toString must return the string that we want to
    use as a marker of the menuItem
    public String toString() {}
    return "Close App";
    }
    }

    Perfect!, just it sorted and it works like a charm.

  • problem creating PJC

    Please help:
    goal: find the URL of the document in which the applet is embedded

    Attempt: Applet class and Getdocumentbase() or GetCodeBase method used in the creation of JDeveloper PJC

    Problem: Compilation error wrong method - a dynamic method can be used in static context

    The code as follows
    package oracle.forms.fd;
    import java.net.InetAddress;
    import java.io.InputStream;
    import java.io.BufferedInputStream;
    import java.io.IOException;
    to import java.text.ParseException;
    import java.util.StringTokenizer;
    import java.applet.Applet;
    Import oracle.forms.ui.VBean;
    Import oracle.forms.handler.IHandler;
    Import oracle.forms.properties.ID;


    / public final class AppletInfos extends kifani
    {
    ………..
    …………….
    ………..
    private final static ID DIP = ID.registerProperty ("DIP");
    private final static MAC ID is ID.registerProperty ("MAC");.
    ………………..
    ………………
    private String some days in Paris ="";
    private String sMAC = "";
    Private boolean Arnaud = false;
    public void init (Manager IHandler)
    {
    Super.init (Handler);
    try {}
    Some days in Paris = Applet.getCodeBase ();
    sMAC = getMacAddress();
    } catch (Throwable t) {}
    t.printStackTrace ();
    }
    }
    public Object getProperty (pId No.)
    {
    if(PID == GETINFOS)
    {
    sInfos += "\nMAC address:" + sMAC.
    return of sInfos;
    }
    else if(pId == DIP) return some days in Paris;
    else if(pId == MAC) return sMAC;
    Return super.getProperty (pId);
    }

    Private final public static String getMacAddress() throws IOException {}
    The os string = System.getProperty ("os.name");
    try {}
    {if (OS. StartsWith ("Windows"))}
    Return windowsParseMacAddress (windowsRunIpConfigCommand ());
    }
    else {if (os.startsWith ("Linux"))
    Return linuxParseMacAddress (linuxRunIfConfigCommand ());
    }
    else {}
    throw new IOException ("unknown operating system:" + os);
    }
    } catch (ParseException ex exception) {}
    ex.printStackTrace ();
    throw new IOException (ex.getMessage ());
    }
    }
    /*
    * Linux stuff
    */
    Private final public static String linuxParseMacAddress (String ipConfigResponse) throws ParseException {
    String localHost = null;
    try {}
    localHost = InetAddress.getLocalHost () .getHostAddress ();
    } catch (exception java.net.UnknownHostException ex) {}
    ex.printStackTrace ();
    throw new ParseException (ex.getMessage (), 0);
    }
    StringTokenizer tokenize = new StringTokenizer (ipConfigResponse, "\n");
    String lastMacAddress = null;
    {while (tokenizer.hasMoreTokens ())}
    String line = tokenizer.nextToken (.trim ());
    Boolean containsLocalHost = line.indexOf (localHost) > = 0;
    If the line contains the IP address
    If (containsLocalHost & & lastMacAddress! = null) {}
    Return lastMacAddress;
    }
    If the line contains the MAC address
    int macAddressPosition = line.indexOf ("HWaddr");
    If (macAddressPosition < = 0) Then continues
    String macAddressCandidate = line.substring (macAddressPosition + 6) .trim ();
    {if (linuxIsMacAddress (macAddressCandidate))}
    lastMacAddress = macAddressCandidate;
    continue;
    }
    }
    ParseException ex = new ParseException
    ("cannot read the MAC address for" + localHost + "from [" + ipConfigResponse + ""] ", 0");
    ex.printStackTrace ();
    throw ex;
    }
    {private static final boolean linuxIsMacAddress (String macAddressCandidate)
    TODO: use a smart regular expression
    If (macAddressCandidate.length ()! = 17) return false;
    Returns true;
    }
    Private final public static String linuxRunIfConfigCommand() throws IOException {}
    Process p is Runtime.getRuntime () .exec ("ifconfig");.
    InputStream stdoutStream = new buffer (p.getInputStream ());
    StringBuffer buffer = new StringBuffer();
    for (;) {
    int c = stdoutStream.read ();
    If (c ==-1) break;
    buffer. Append ((Char) c);
    }
    String outputText = buffer.toString ();

    stdoutStream.close ();

    return outputText;
    }
    /*
    * Windows stuff
    */
    Private final public static String windowsParseMacAddress (String ipConfigResponse) throws ParseException {
    String localHost = null;
    try {}
    localHost = InetAddress.getLocalHost () .getHostAddress ();
    } catch (exception java.net.UnknownHostException ex) {}
    ex.printStackTrace ();
    throw new ParseException (ex.getMessage (), 0);
    }
    StringTokenizer tokenize = new StringTokenizer (ipConfigResponse, "\n");
    String lastMacAddress = null;

    {while (tokenizer.hasMoreTokens ())}
    String line = tokenizer.nextToken (.trim ());

    If the line contains the IP address
    If (Line.EndsWith (localHost) & & lastMacAddress! = null) {}
    Return lastMacAddress;
    }

    If the line contains the MAC address
    int macAddressPosition = line.indexOf(":");
    If (macAddressPosition < = 0) Then continues

    String macAddressCandidate = line.substring (macAddressPosition + 1) .trim ();
    {if (windowsIsMacAddress (macAddressCandidate))}
    lastMacAddress = macAddressCandidate;
    continue;
    }
    }

    ParseException ex = new ParseException ("can not read MAC addresses from [" + ipConfigResponse + "]", 0);
    ex.printStackTrace ();
    throw ex;
    }
    {private static final boolean windowsIsMacAddress (String macAddressCandidate)
    TODO: use a smart regular expression
    If (macAddressCandidate.length ()! = 17) return false;

    Returns true;
    }
    Private final public static String windowsRunIpConfigCommand() throws IOException {}
    Process p is Runtime.getRuntime () .exec ("ipconfig/all");.
    InputStream stdoutStream = new buffer (p.getInputStream ());

    StringBuffer buffer = new StringBuffer();
    for (;) {
    int c = stdoutStream.read ();
    If (c ==-1) break;
    buffer. Append ((Char) c);
    }
    String outputText = buffer.toString ();

    stdoutStream.close ();

    return outputText;
    }
    }

    Hello

    There are a number of errors in your code. Here's the corrected version that works:


    package oracle.forms.fd;
    import java.net.InetAddress;
    import java.io.InputStream;
    import java.io.BufferedInputStream;
    import java.io.IOException;
    to import java.text.ParseException;
    import java.util.StringTokenizer;
    import java.applet.Applet;
    Import oracle.forms.ui.VBean;
    Import oracle.forms.handler.IHandler;
    Import oracle.forms.properties.ID;

    / public final class AppletInfos extends kifani
    {

    private final static ID DIP = ID.registerProperty ("DIP");
    private final static MAC ID is ID.registerProperty ("MAC");.
    private final static GETINFOS ID is ID.registerProperty ("GETINFOS");.

    private String some days in Paris ="";
    private String sMAC = "";
    Private boolean Arnaud = false;
    public void init (Manager IHandler)
    {
    Super.init (Handler);
    try {}
    Some days in Paris = handler.getApplet () .getCodeBase () .getHost ();
    sMAC = getMacAddress();
    } catch (Throwable t) {}
    t.printStackTrace ();
    }
    }
    public Object getProperty (pId No.)
    {
    if(PID == GETINFOS)
    {
    Return "\nMAC address:" + sMAC.

    }
    else if(pId == DIP) return some days in Paris;
    else if(pId == MAC) return sMAC;
    Return super.getProperty (pId);
    }

    Private final public static String getMacAddress() throws IOException {}
    The os string = System.getProperty ("os.name");
    try {}
    {if (OS. StartsWith ("Windows"))}
    Return windowsParseMacAddress (windowsRunIpConfigCommand ());
    }
    else {if (os.startsWith ("Linux"))
    Return linuxParseMacAddress (linuxRunIfConfigCommand ());
    }
    else {}
    throw new IOException ("unknown operating system:" + os);
    }
    } catch (ParseException ex exception) {}
    ex.printStackTrace ();
    throw new IOException (ex.getMessage ());
    }
    }
    /*
    * Linux stuff
    */


    Private final public static String linuxParseMacAddress (String ipConfigResponse) throws ParseException {
    String localHost = null;
    try {}
    localHost = InetAddress.getLocalHost () .getHostAddress ();
    } catch (exception java.net.UnknownHostException ex) {}
    ex.printStackTrace ();
    throw new ParseException (ex.getMessage (), 0);
    }
    StringTokenizer tokenize = new StringTokenizer (ipConfigResponse, "\n");
    String lastMacAddress = null;
    {while (tokenizer.hasMoreTokens ())}
    String line = tokenizer.nextToken (.trim ());
    Boolean containsLocalHost = line.indexOf (localHost) > = 0;
    If the line contains the IP address
    If (containsLocalHost & lastMacAddress! = null) {}
    Return lastMacAddress;
    }
    If the line contains the MAC address
    int macAddressPosition = line.indexOf ("HWaddr");
    If (macAddressPosition<= 0)="">
    String macAddressCandidate = line.substring (macAddressPosition + 6) .trim ();
    {if (linuxIsMacAddress (macAddressCandidate))}
    lastMacAddress = macAddressCandidate;
    continue;
    }
    }
    ParseException ex = new ParseException
    ("cannot read the MAC address for ' + 'from' localHost, 0);
    ex.printStackTrace ();
    throw ex;
    }
    {private static final boolean linuxIsMacAddress (String macAddressCandidate)
    TODO: use a smart regular expression
    If (macAddressCandidate.length ()! = 17) return false;
    Returns true;
    }
    Private final public static String linuxRunIfConfigCommand() throws IOException {}
    Process p is Runtime.getRuntime () .exec ("ifconfig");.
    InputStream stdoutStream = new buffer (p.getInputStream ());
    StringBuffer buffer = new StringBuffer();
    for (;) {
    int c = stdoutStream.read ();
    If (c ==-1) break;
    buffer. Append ((Char) c);
    }
    String outputText = buffer.toString ();

    stdoutStream.close ();

    return outputText;
    }
    /*
    * Windows stuff
    */
    Private final public static String windowsParseMacAddress (String ipConfigResponse) throws ParseException {
    String localHost = null;
    try {}
    localHost = InetAddress.getLocalHost () .getHostAddress ();
    } catch (exception java.net.UnknownHostException ex) {}
    ex.printStackTrace ();
    throw new ParseException (ex.getMessage (), 0);
    }
    StringTokenizer tokenize = new StringTokenizer (ipConfigResponse, "\n");
    String lastMacAddress = null;

    {while (tokenizer.hasMoreTokens ())}
    String line = tokenizer.nextToken (.trim ());

    If the line contains the IP address
    If (Line.EndsWith (localHost) & lastMacAddress! = null) {}
    Return lastMacAddress;
    }

    If the line contains the MAC address
    int macAddressPosition = line.indexOf(":");
    If (macAddressPosition<= 0)="">

    String macAddressCandidate = line.substring (macAddressPosition + 1) .trim ();
    {if (windowsIsMacAddress (macAddressCandidate))}
    lastMacAddress = macAddressCandidate;
    continue;
    }
    }

    ParseException ex = new ParseException ("cannot read the MAC address of", 0);
    ex.printStackTrace ();
    throw ex;
    }
    {private static final boolean windowsIsMacAddress (String macAddressCandidate)
    TODO: use a smart regular expression
    If (macAddressCandidate.length ()! = 17) return false;

    Returns true;
    }
    Private final public static String windowsRunIpConfigCommand() throws IOException {}
    Process p is Runtime.getRuntime () .exec ("ipconfig/all");.
    InputStream stdoutStream = new buffer (p.getInputStream ());

    StringBuffer buffer = new StringBuffer();
    for (;) {
    int c = stdoutStream.read ();
    If (c ==-1) break;
    buffer. Append ((Char) c);
    }
    String outputText = buffer.toString ();

    stdoutStream.close ();

    return outputText;
    }
    }

    Make sure:

    (1) refer to your bean (implementation class) as: oracle.forms.fd.AppletInfos
    (2) use the get_custom_property built-in for your info:
    For example:
    : B1. MAC: = Get_Custom_Property (' B1.) TEXTAREA', 1, 'MAC');
    : B1. DIP: = Get_Custom_Property (' B1.) TEXTAREA', 1, 'DIP');
    Please note that there is a property GETINFOS that was not declared in your code and added. You can change it if you wish.
    (3) you must sign your jar file. Check the webutil on your developer installation directory for an example.

    Hafed
    www.degenio.com

    Published by: mhafod on January 24, 2009 23:26

    If you want to see the changes that I made, please make a diff. Thank you.

  • How to cancel a stop of applications?

    • How do CANCEL you force judgment of applications in Android 2.2.2?
      I force-order some applications as this saves the battery and it should not have apps unnecessary running and drain the battery in the background all the time BUT if you decide to reuse these apps force-order AGAIN for all time during the run-to-the-context, how can do you it? Pl reply.

    You're right that you can effectively force close applications (primarily pre-installed), as they will automatically restart just themselves.

    The rest of your applications does not restart themselves up to what start again you. To get an application to run in the background that you previously stopped, you can simply launch the application.

    I should also mention that you don't really need to force apps to stop. PΘriphΘriques Linux (such as Android phones) use RAM very differently from Windows devices.

    When a Windows application closes, the OS frees the memory for use by other devices. This means that you should have almost always free RAM.

    When a Linux application closes, the operating system keeps the app in memory. This allows to speed up the application launch time. The memory is not released until another application is launched which requires more memory that is available. It is normal (and not bad) to have little or no free memory.

    Most applications that show that 'running' is not really running, but is simply still in memory, waiting for you to start again. They are not draining any battery power, unless you see they use the CPU.

  • 2360ee dv3 problems... Please help!

    Hello! I use a 2360ee dv3, and I have several problems with it,

    1 -http://h30434.www3.hp.com/t5/Notebook-Hardware-e-g-Windows-8/hp-dv3-2360ee-overheating-every-hour-or... (I made another thread, but no body has responded, also I forgot other problems)

    2. because you people forgot to add in support of NX switch in the bios (I install a new one and it's same thing) I had to clean-install win 8 and which lead to all my drivers, services premium (including their serial code) should be deleted (but that's my problem...) anyway, I have not found all the drivers on the Web site! and now switch capable graphics are not running and is so as well the "ati radeon 4300/4500" and the "Intel integrated graphics i3" to run at the same time, creating a screen (laptop) and a virtual screen, causing a lot of things work on the other screen and just because it is already running and it is better to the screen of my laptop on the ati card now when I try to set only, second screen using Fn + f4 screen resolution setting did not work and Yes, infact the Intel card takes him not on the first screen while the ati is the second and the laptop screen is located on the second, now the problem is, definition of the screen for duplicate or second screen will only cause me a long process of trying to make it work again , and when I'm finally wins, if I sleep the laptop, stop, suspend extended or even close the lead, still working on the Intel card boom causing me problems and to cite, I installed the latest drivers from the amd website, I don't want the card Intel running at all, because if you go on the link located at no. 1 I did not describe , but it is the processor that is over heating and I believe that the processor is an apu with a graphic map of the week, and that could add a little heat, also the heat problem I installed pirriform speccy on my father's computer too (also 2360ee dv3 and fun is done: he bought his two years in front of me) and his stuff work at about 50-50-55-40 (card mother-CPU-gpu-hdd) and while typing this , mine are 78-76 - 79--(n'apparaissant ne pas)!

    3 - the battery shows "plugged in, not charging", but is going up slowly, what is the problem?

    4-i set the battery to high performance, something more than that and I'm back in the days of my old laptop ram of 1 GB acer "m celerion! I know that the setting are just for sleeping and other things but how can alter performance?

    and please focus on the No. 2 most, thank you!

    I could not yet test the process below, but it may be worth trying in your case.  Minecraft is a set of OpenGL, so it won't use the default AMD card.  See this document for more information about the systems of switchable graphics of AMD and OpenGL.

    http://h30434.www3.HP.com/T5/notebook-display-and-video-e-g-Windows-8/How-to-install-AMD-beta-drivers-get-OpenGL-working-without-a/m-p/2652867/highlight/true#M67435

    As you said, it works in "windowed mode".  With this in mind, you could try the workaround suggested or leave such what because it works to a certain extent.

  • Retrieves the width of screen

    Hi team,

    I have a following code:

    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.i18n.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.collection.util.*;
    import net.rim.device.api.ui.decor.*;
    
    import java.util.*;
    
    public final class SeedAboutScreen extends MainScreen implements SeedManagerResource
    {
        //members ------------------------------------------------------------------
    
        private static ResourceBundle _resources = ResourceBundle.getBundle(BUNDLE_ID, BUNDLE_NAME);
        private static SeedHelpScreen _seedHelpScreen;
    
        private VerticalFieldManager _manager;
    
        public SeedAboutScreen()
        {
            super();
    
            _manager = (VerticalFieldManager)getMainManager();
    
            BitmapField image_top = new BitmapField(Bitmap.getBitmapResource(_resources.getString(IMAGE_TOP)), FIELD_HCENTER | FOCUSABLE);        
    
            Background image_background = BackgroundFactory.createBitmapBackground(Bitmap.getBitmapResource(_resources.getString(IMAGE_BACKGROUND)), 0, 0, Background.REPEAT_INHERIT);
    
            BitmapField image_logo = new BitmapField(Bitmap.getBitmapResource(_resources.getString(IMAGE_LOGO)), FIELD_HCENTER | FOCUSABLE);
    
            _manager.setBackground(image_background);  
    
            Font font_title = this.getFont().derive(Font.PLAIN | Font.BOLD);
            Font font_application = this.getFont().derive(Font.PLAIN, 16);
            Font font_bold = this.getFont().derive(Font.PLAIN | Font.BOLD, 16);
    
            LabelField _titleField = new LabelField(_resources.getString(APPLICATION_TITLE), FOCUSABLE);
            LabelField _descriptionField = new LabelField(_resources.getString(APPLICATION_DESCRIPTION), FOCUSABLE);
            LabelField _versionField = new LabelField("Version: " + _resources.getString(APPLICATION_VERSION), 0, -1, Field.FIELD_RIGHT | FOCUSABLE);
    
            _titleField.setFont(font_title);
            _descriptionField.setFont(font_bold);
            _versionField.setFont(font_bold); 
    
            try {
    
                _manager.add(image_top);
                _manager.add(_titleField);
                _manager.add(new LabelField(" "));
                _manager.add(_descriptionField);
                _manager.add(new SeparatorField());
                _manager.add(_versionField);
                _manager.add(new LabelField(" "));
    
                   }
            catch (IllegalArgumentException e)
                {
               System.out.println(e.getMessage());
                }
        }
    
        public boolean onClose()
        {
            _seedHelpScreen = new SeedHelpScreen();
            UiApplication.getUiApplication().pushScreen(_seedHelpScreen);
            return true;
        }
    
        public boolean keyChar(char key, int status, int time) {
            //intercept the ESC key - back out of this screen on its receipt
            boolean retval = false;
    
            switch (key) {
            case Characters.ESCAPE:
                onClose();
                retval = true;
                break;
            }
    
            return retval;
        }     
    
        private MenuItem _closeItem = new MenuItem(null, 0 , 200000, 10) {
            public void run() {
                onClose();
            }
            public String toString()
            {
                return "Close";
            }
        };
    
        protected void makeMenu ( Menu menu, int instance )
        {
            menu.add(_closeItem);
        }
    
    }
    

    I need get the screen width to create the following option:

    
            Switch (widthScreenDevice())
    
             case 480:                BitmapField image_top = new BitmapField("image 1.png");           case 320:            BitmapField image_top = new BitmapField("image 2.png");  ...
    

    I have no idea about this, please help me.

    Thank you.

    Hello

    Take 2 static public variables called deviceWidth and deviceHeight and initialize these variables with

    deviceWidth = Display.getWidth () deviceHeight = Display.getHeight () and

    Initialize these variables in the constructor of the class that contains the main() and then use these variables in your application.

  • an icon that is animated to the page until it loads the data

    Hi all
    When loading a page jspx, I make a web service call.
    It takes about 10-15 seconds to load... .till then page is empty
    I just want to add an icon that is animated until
    This web service call is executed this jspx page loading.

    Please help me on this.



    Thank you
    Shaz

    Hello

    in this case I think that it is best to use a call to run inside as otherwise the application expects the WS return

    1. Add an af:clientListener to af:document and set it to load
    2. define an af:serverListener to af:document and map it to a managed bean that calls the Web Service
    3. in the JS function that responds to the event load, display a popup showing the busy status
    4. use af:serverListener to invoke the Web Service
    5. from the managed bean, as soon as the WS call is returned, close the popup (you can do in Java or by using ExternalRenderKitService using JavaScriot

    Not sure if the tips above are not enough because you don't mention your level of experience with ADF. If there is a follow-up to this question, let me know.

    Frank

  • Query performance poor when they join CONTAINS to another table

    We just recently started evaluation Oracle Text for a search solution. We must be able to find a table which can have over 20 million lines. Each user can have visibility to a very small part of these lines. The goal is to have a single Oracle text index that represents all the columns of research in the table (multi column datastore) and provide a score for each search result so that we can sort the search results in descending score order. What we see is that the performance of the queries of TOAD are extremely fast, when we write a simple CONTAINS query against the table indexed Oracle text. However, when we first try reduce the lines from that CONTAINS query must search using a we find the query performance degrades significantly.

    For example, we can find all the records that a user has access from our base table of the following query:

    SELECT d.duns_loc
    DUNS d
    JOIN primary_contact pc
    ON d.duns_loc = pc.duns_loc
    AND pc.emp_id =: employeeID;

    This query may run in < 100 m in the example, this query returns close to 1200 lines of the duns_loc of primary key.

    Our search query looks like this:

    SELECT score (1), d.
    DUNS d
    WHERE CONTAINS (TEXT_KEY,: research, 1) > 0
    ORDER BY score (1) DESC;

    The: Find value in this example will be 'Highway '. The query can return 246 k lines in about 2 seconds.

    2 seconds is good, but we should be able to have a much quicker response if the request did not have to search the entire table, right? Since each user can only records from 'view' that they are assigned to as us if the search operation had to be analysed a tiny tiny percentage of the TEXT index, we should see results faster (and more relevant). If we now write the following query:

    WITH the subset
    AS
    (SELECT d.duns_loc
    DUNS d
    JOIN primary_contact pc
    ON d.duns_loc = pc.duns_loc
    AND pc.emp_id =: employeeID
    )
    SELECT score (1), d.
    DUNS d
    JOIN the subset s
    ON d.duns_loc = s.duns_loc
    WHERE CONTAINS (TEXT_KEY,: research, 1) > 0
    ORDER BY score (1) DESC;

    For reasons that we have not been able to identify this query actually takes longer to run than the sum times the contributing elements. This query takes more than 6 seconds to run. We, or our DBA can understand why this query runs worse than a large open research. Open research is not ideal because the query eventually folders back to the user, they do not have access to view.

    Has anyone ever encountered something like that? Any suggestions on what to watch or where to go? If someone wants more information to help diagnosis to let me know, and I'll be happy to produce it here.

    Thank you!!

    Since you're using two tables, you will get probably better performance on an index that uses a section group and a user_datastore that uses a procedure. He should be able to recover all the data with a simple query, and hit a single index. Please see the demo below. Indexing can be slower, but research should be faster. If you have your primary and foreign keys in place and current statistics before you create the index, it should speed up indexing.

    SCOTT@orcl_11gR2> -- tables:
    SCOTT@orcl_11gR2> CREATE TABLE duns
      2    (duns_loc       NUMBER,
      3       business_name  VARCHAR2 (15),
      4       business_name2 VARCHAR2 (15),
      5       address_line   VARCHAR2 (30),
      6       city            VARCHAR2 (15),
      7       state            VARCHAR2 (2),
      8       business_phone VARCHAR2 (15),
      9       contact_name   VARCHAR2 (15),
     10       contact_title  VARCHAR2 (15),
     11       text_key       VARCHAR2 (1),
     12       CONSTRAINT     duns_pk PRIMARY KEY (duns_loc))
     13  /
    
    Table created.
    
    SCOTT@orcl_11gR2> CREATE TABLE primary_contact
      2    (duns_loc       NUMBER,
      3       emp_id            NUMBER,
      4       CONSTRAINT     primary_contact_pk
      5                   PRIMARY KEY (emp_id, duns_loc),
      6       CONSTRAINT     primary_contact_fk FOREIGN KEY (duns_loc)
      7                   REFERENCES duns (duns_loc))
      8  /
    
    Table created.
    
    SCOTT@orcl_11gR2> -- data:
    SCOTT@orcl_11gR2> INSERT INTO duns (duns_loc, address_line) VALUES (1, 'highway')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> INSERT INTO duns (duns_loc, address_line) VALUES (2, 'highway')
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> INSERT INTO primary_contact VALUES (1, 1)
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> INSERT INTO primary_contact VALUES (2, 2)
      2  /
    
    1 row created.
    
    SCOTT@orcl_11gR2> INSERT INTO duns (duns_loc, address_line)
      2  SELECT object_id, object_name
      3  FROM   all_objects
      4  WHERE  object_id > 2
      5  /
    
    76029 rows created.
    
    SCOTT@orcl_11gR2> INSERT INTO primary_contact
      2  SELECT object_id, namespace
      3  FROM   all_objects
      4  WHERE  object_id > 2
      5  /
    
    76029 rows created.
    
    SCOTT@orcl_11gR2> -- gather statistics:
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'DUNS')
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> EXEC DBMS_STATS.GATHER_TABLE_STATS (USER, 'PRIMARY_CONTACT')
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- procedure:
    SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE duns_proc
      2    (p_rowid IN ROWID,
      3       p_clob     IN OUT NOCOPY CLOB)
      4  AS
      5  BEGIN
      6    FOR d IN
      7        (SELECT duns_loc,
      8             '' ||
      9             business_name     || ' ' ||
     10             business_name2  || ' ' ||
     11             address_line  || ' ' ||
     12             city  || ' ' ||
     13             state     || ' ' ||
     14             business_phone  || ' ' ||
     15             contact_name  || ' ' ||
     16             contact_title ||
     17             ''
     18             AS duns_cols
     19         FROM      duns
     20         WHERE  ROWID = p_rowid)
     21    LOOP
     22        DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (d.duns_cols), d.duns_cols);
     23        FOR pc IN
     24          (SELECT '' || emp_id || '' AS pc_col
     25           FROM   primary_contact
     26           WHERE  duns_loc = d.duns_loc)
     27        LOOP
     28          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (pc.pc_col), pc.pc_col);
     29        END LOOP;
     30    END LOOP;
     31  END duns_proc;
     32  /
    
    Procedure created.
    
    SCOTT@orcl_11gR2> SHOW ERRORS
    No errors.
    SCOTT@orcl_11gR2> -- user datastore, section group with field section:
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference ('duns_store', 'USER_DATASTORE');
      3    ctx_ddl.set_attribute ('duns_store', 'PROCEDURE', 'duns_proc');
      4    ctx_ddl.set_attribute ('duns_store', 'OUTPUT_TYPE', 'CLOB');
      5    ctx_ddl.create_section_group ('duns_sg', 'BASIC_SECTION_GROUP');
      6    ctx_ddl.add_field_section ('duns_sg', 'emp_id', 'emp_id', true);
      7  end;
      8  /
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- text index with user datastore and section group:
    SCOTT@orcl_11gR2> CREATE INDEX duns_context_index
      2  ON duns (text_key)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  FILTER BY duns_loc
      5  PARAMETERS
      6    ('DATASTORE     duns_store
      7        SECTION GROUP     duns_sg
      8        SYNC          (ON COMMIT)')
      9  /
    
    Index created.
    
    SCOTT@orcl_11gR2> -- variables:
    SCOTT@orcl_11gR2> VARIABLE employeeid NUMBER
    SCOTT@orcl_11gR2> EXEC :employeeid := 1
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> VARIABLE search VARCHAR2(100)
    SCOTT@orcl_11gR2> EXEC :search := 'highway'
    
    PL/SQL procedure successfully completed.
    
    SCOTT@orcl_11gR2> -- query:
    SCOTT@orcl_11gR2> SET AUTOTRACE ON EXPLAIN
    SCOTT@orcl_11gR2> SELECT SCORE(1), d.*
      2  FROM   duns d
      3  WHERE  CONTAINS
      4             (text_key,
      5              :search || ' AND ' ||
      6              :employeeid || ' WITHIN emp_id',
      7              1) > 0
      8  /
    
      SCORE(1)   DUNS_LOC BUSINESS_NAME   BUSINESS_NAME2  ADDRESS_LINE                   CITY            ST BUSINESS_PHONE
    ---------- ---------- --------------- --------------- ------------------------------ --------------- -- ---------------
    CONTACT_NAME    CONTACT_TITLE   T
    --------------- --------------- -
             3          1                                 highway
    
    1 row selected.
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 2241294508
    
    --------------------------------------------------------------------------------------------------
    | Id  | Operation                   | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |                    |    38 |  1102 |    12   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| DUNS               |    38 |  1102 |    12   (0)| 00:00:01 |
    |*  2 |   DOMAIN INDEX              | DUNS_CONTEXT_INDEX |       |       |     4   (0)| 00:00:01 |
    --------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       2 - access("CTXSYS"."CONTAINS"("TEXT_KEY",:SEARCH||' AND '||:EMPLOYEEID||' WITHIN
                  emp_id',1)>0)
    
    SCOTT@orcl_11gR2>
    
  • No Audio on Win7 x 64 or Linux I suspend and resume (so this works)

    Well... this problem is * very * strange.

    Basically, I bought this laptop a L665D-S5076, everything works well so far. Except for the sound.

    At the moment I opened it upward, I started in windows and update the BIOS, everything worked well (no sound)...

    I rebooted to verify that the BIOS update worked (I've updated because I saw before I have bought... changes of interest that have been made).

    Then I wanted to install Linux (more precisely ArchLinux), being that I only use Windows for games. For everything else, Linux is much better at it.

    I wiped the entire hard drive (the entire partition table), installed Windows 7 x 64 bit on a disc, I had to hang out... Note that I deleted the recovery partition and all other partitions unwanted who took more space I wanted (and the MS-DOS Master File Table supports only up to 4 primary partitions... and of course, Windows consumes almost all of them).

    So I installed Windows 7... installed Linux... it was all clean, I installed the drivers for Windows... and even on Linux, everything works correctly (surprised - apparently the majority of the chipset seems to be open-source/linux very easy... which is great).

    in any case, I just happened to close my screen and forget about Windows 7 by default to sleep when it's done. It picks up and I suddenly heard my sound work...

    So I restarted and the sound does not work... but suspends to RAM and then return to fix it...

    The _strangest_ thing is that not only this that under Windows, but it also does in Linux. Exactly... even... question...

    Didn't know that...

    So basically, now I want to get his job without having to pause to 'fix '. Obviously ;-)

    And please do not even think to say "remove this strange thing you called Linux" just because it "is not recommended" or something... especially since Linux cannot physically * touch * Windows, in the State I in.

    Thanks, I'd really like to listen to music under Linux & games w / sound in Win7 ;-)

    So, it was 64-bit this machine shipped with? I have no attention or care. Just curious... Although drivers say they support both which is nice. I guess he did, because it cannot allocate > 3 concerts in the x 86 arch.

    Call technical support and was told to send it to toshiba - seems to be a hardware problem. Would explain why the problem is present in both windows & linux. If their repair treatment is as good as seemed their support, then we should all go smoothly... If all goes well it is treated quickly and I have not any future hardware problems - I really need to use it for school... But I guess that's no matter what, when you get a dud that immediately, you think that all are going to be like that.

  • Tecra M5: standby/suspend one with a Linux 2.6 kernel

    I'm using linux kernel v2.6.16.20 on a Tecra M5, stable distribution of Debian 3.1. Most things seem to work properly, an annoying problem with the nvidia graphics drivers means that I can't go to a text console after starting X, but the more annoying is that I have to stop and start the machine there is no way I have found yet to convince standby or suspend.

    I use ACPI. As a fall back I also tried APM but it seems that it is not of any popular support APM in the BIOS on this laptop. That's fine, I'd rather be using ACPI, just need to make it work. I updated the BIOS to version 1.5.

    I have activated CONFIG_ACPI_SLEEP (also have CONFIG_SMP, CONFIG_SUSPEND_SMP, CONFIG_HOTPLUG_CPU, seem to need the last in order then to activate CONFIG_ACPI_SLEEP) and CONFIG_SOFTWARE_SUSPEND.
    $ cat/sys/power/state
    Reports:
    disc of mem

    Don't know where the option 'sleep' went, without active CONFIG_ACPI_SLEEP it reports 'sleep mem.

    Running: (in single-user mode, using-s at startup, so this minimum amount is running)
    $ echo "mem" >/sys/power/state
    Things start to happen, the screen becomes white with a second or two which makes it difficult to actually identify what he began to do/don't, but then it's right there, fan is active, can't really tell if the hard drive is still turning but there is little change except the cutting screen. May not then wake up at all, screen remains blank, no access to disk AFAIK, left for 10 minutes or so just in case is to have time-out problems, nothing. Only solution then is to powercycle (now the power button / Stop button for more than 4 seconds) and start from scratch again.

    Have also tried 2.6.16.9 compilation and applied suspend2 patch in an attempt to get the machine to suspend to disk, not my ideal choice but any suspension would be good at this point. All patched and updated ok, (taken 2.6.19.9 simply own patches against the kernel version had suspend2 I knew) running script "hibernate" written in the file or the fine swap, it shuts the laptop very well, but just the recovery does not. Tried FilesWriter initially and then went down to the most frequent SwapWriter, added ' echo >/proc/suspend2/do_resume ' initrd and also tried adding a script to/etc/mkinitrd/scripts that appear on a couple of distro Debian suspend2 lists for initrd plays, still no joy.
    Tried to adjust compression = none in the config I noticed that when using FileWriter with initrd problem lack the lzf module, rather than messing around trying to add lzf to initrd I figured disabling compression at least would allow me to test, still no joy. SwapWriter I got close, looked like, he begins to take over, then the laptop restarts after just a few seconds and then start normally, start info went. Nothing in the paper that I can see to suggest there is no problem at all.

    Am I missing something completely obvious here? I have searched several sites, came up with very little. Doesn't sound like a lot of people have linux on a Tecra M5, the few that relate the bits of material work, none seems to talk about Eve/suspension. Or maybe it chance is just a lot better than mine!

    Does anyone have any suggestions on how I can get this to work? I would like to be able to "standby" (S1) the laptop at the beginning so at least the material should continue to work on summary, then possibly S3/S4 (suspension on ram or disk) later if I can get this work and equipment to take back the goods. Only the next step I can think acpidump but my knowledge of the workings of ACPI is nonexistence, otherwise than to know it should work better than it does currently.

    Suggestions welcome!

    Thank you very much
    Pete

    Hello

    It is also possible that standby or Hibernate mode is not important for users. ;)
    In my view, it is important that this OS runs stabile and hardware components are recognized correctly.

    Sorry but I can't help you and hope another user of Tecra M5 with Linux has better luck than you.

    In any case good luck!

  • Firefox is suspended after he tried to update Adobe Flash. I can't fix it until Firefox is open, but I'm unable to close TI-menu bar don't appear again.

    In the Adobe Flash update process, Firefox froze. It fits as being open, and any fixes I've tried will work as long as it's open, but I can't close it. Even when I click on the icon of Firefox, the Firefox menu bar does not appear. Any Firefox window.

    If Firefox is still in progress, use the the Task Manager on your computer for
    Close it. After that, try to Start Firefox in Safe Mode {web link}

    While you are in safe mode;
    Press Alt or F10 to bring up the toolbar.
    Followed;

    Windows; Tools > Options
    Linux; Edit > Preferences
    Mac; name of the application > Preferences

    Then Advanced > General.
    Find and stop using hardware acceleration.

    Search web sites secure. Are there problems?

    Then restart.

  • When I close the tab it does not return the last active tab

    My English is not very good, so I'm sorry about that. I want to return last active tab when I close a tab.
    Example; I use 2. tab, then I spend 4. tab, then close it. Firefox goes to 5. tab, not 2. I did a google search, but I can't find anything useful.

    OK, I tried the ' tab mix more ', it has the option "return selected the last tab" when closing tab, it works, but he also broke something. When I open a link in a new tab by currently tab, it opens right into the stack tab. I checked if "browser.tabs.selectOwnerOnClose" is changed to about: config, but it is not changed, its value is true (the default). The addon made it's ineffective, I think.
    So I'll try to find another addon. (open to suggestions)

Maybe you are looking for

  • Motorcycle G (2nd) 16 GB double in Europe?

    I am interested in motorcycle double (2nd) G 16GB UK Europe. How can I buy it? because there is no option to buy or pre-order.

  • BSD trying to reinstall XP

    I am trying to reinstall XP on a Thinkpad R500, the problem I have is when I put the XP cd boot from, the cd player works cd and looks like it will load but whenever I just get a BSD, any cd of xp, I use. Now to clarify, I use my cd of XP MVL not the

  • Playlists SensMe not updated

    Hello, I have mp3s on SD card. SensMe has not updated its playlists. I have updated info music several times without success...Any ideas?Thank you, Arnaldo

  • When waiting to print will not cancel

    How can I force a cancellation of all documents in the print queue?  Have been removed successfully 2 docs in waiting, but great photo still in the print queue and won't go away tho "Cancel all documents." Now, nothing will print. THX

  • INDESIGN CC 2015 CEASED TO OPERATE AFTER THE POWER TO

    HelloI've just updated to the latest version of indesign, and when I run it, it gives me the message that it has stopped working.The only solution I found that worked really is to replace the. DLL files following the steps on this page-> InDesign cra