IllegalArgumentException in PIMItem.getString (int, int)

int[] intarray = cont.getFields();
for(int x = 0; x < intarray.length; x++)
{
    System.out.println(cont.getString(intarray[x],0));
}

This is just one example of code, but it throws the same exception is my real application.  Suite is a Contact object that I've initialized from the context object in the address book.  Whenever I get to the line getString, it throws an IllegalArgumentException for anything other than the constant of PIMItem.TEL despite the fact that other objects are not null.  I develop for the Blackberry 7290 with Handheld Software version 4.1 and JDE version 4.1.  Is there a reason that I'm getting this exception?

EDIT: Sorry, Contact.TEL not PIMItem

You don't want to read a string if it * is * a string.  Try something like:

int[] intarray = cont.getFields();
for(int x = 0; x < intarray.length; x++)
{
    if (myPimList.getFieldDataType(intarray[x]) == PIMItem.STRING) {
        System.out.println(cont.getString(intarray[x],0));
    }
}

Tags: BlackBerry Developers

Similar Questions

  • IllegalArgumentException in SQLiteDemo on CodeSigningKey (int, String)

    Hi all

    I am trying to run the SQLiteDemo on my BlackBerry Simulator (5.0) (using Eclipse plug-ins, JDE). The project will build without any problem. When I try to launch the project of the Simulator, however, I get an IllegalArgumentException on CodeSigningKey.get (int, String) on line 308 of CodeSigningKey.class (whose source is not found).

    I suppose it comes from the following line of code in SQLiteDemo.java:

    // Retrieve the code signing key for the XYZ key file
            CodeSigningKey codeSigningKey = CodeSigningKey.get(CodeModuleManager.getModuleHandle( "SQLiteDemo" ), "XYZ");
    

    The values of int, String at this stage are:

    moduleHandle = 0

    signerId = XYZ

    I use the XYZ.key provided in the BlackBerry sqlitedemo.zip. Anyone know why I get this error?

    Thank you!

    My project was not «enabled for BlackBerry»

  • Why not Bitmap.GetBitmapResource)

    I am trying to load a bitmap and I get an IllegalArgumentException in JDE 5.0.0 (have not compiled with previous can).  The file exists in the project, in fact, it is even used for the transfer of the icon of the Application - that work spendidly.  I created the image in Adobe Illustrator and exported as a 100 x 75 pixels format PNG-24. I realized another PNG this way that exists in the project who is responsible (for the unfolded above).  I tried to produce another image and load, with the two images previous (one that works and one that doesn't work) in the project and it fails with this defense, too.

    No restrictions on the inclusion of images in projects?

    Thank you

    Brandon

    The simple code:

    final Bitmap bm1 = Bitmap.getBitmapResource("cameraRollover.png");
    

    The call stack:

    Thread [StarfaceRecoApp(230)id=321742848] (Suspended (exception IllegalArgumentException))
        Resource.getIconOffset(byte[], int) line: 158
        Resource.getIconBytes(byte[], int) line: 188
        StarfaceRecoAppRIMResources(Resource).findResource(String) line: 63
        StarfaceRecoAppRIMResources(Resource).getResource(String) line: 103
        Bitmap.getBitmapResource(String, String) line: 2333
        Bitmap.getBitmapResource(String) line: 2359
        MainHubScreen.(StarfaceApp$StarfaceRecoApp) line: 30
        StarfaceApp$StarfaceRecoApp.() line: 187
        StarfaceApp$StarfaceRecoApp.main(String[]) line: 27
    

    Hello

    I don't know, but have you tried to do something like that?

    PNGEncodedImage.getEncodedImageResource("cameraRollover.png").getBitmap()
    

    Since it is a PNG image.

  • Overlap two images, ordinary java works, and not in BlackBerry JDE 5

    I have an application for swing of simple java that takes two images and overlaps the other. While trying to this port in JDE5, I got out there is no class BufferedImage in the api of BB, but a similar class of the Bitmap. It's brought to BB mixing function is unable to produce an image that overlap. It shows a blank white screen.

    Here's the plain java function

    public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,            double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   } 
    

    Here's the java function of BB

      public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }
    
                         bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                    }
    
                 return bi3;    }
    

    The weight of the arg is a value from 1 to 100.

    For reference, the full plain java source

    /* * To change this template, choose Tools | Templates * and open the template in the editor. */
    
    package imagetest;
    
    /** * * @author COMPUTER */// Blender1.java
    
    import java.awt.*;import java.awt.image.*;
    
    import javax.swing.*;import javax.swing.event.*;
    
    /** * This class describes and contains the entry point to an application that * demonstrates the blending transition. */
    
    public class Blender1 extends JFrame{  /**    *     */   private static final long serialVersionUID = 1L;
    
        /**    * Construct Blender1 GUI.     */
    
     public Blender1() {     super("Blender #1");      setDefaultCloseOperation(EXIT_ON_CLOSE);
    
            // Load first image from JAR file and draw image into a buffered image.
    
         ImageIcon ii1 = new ImageIcon(getClass().getResource("x.png"));       final BufferedImage bi1;      bi1 = new BufferedImage(ii1.getIconWidth(), ii1.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      Graphics2D g2d = bi1.createGraphics();        int h = ii1.getImage().getHeight(null);       System.out.println("Blender1.Blender1()--------> height :" + h);       g2d.drawImage(ii1.getImage(), 0, 0, null);        g2d.dispose();
    
          // Load second image from JAR file and draw image into a buffered image.
    
            ImageIcon ii2 = new ImageIcon(getClass().getResource("y.png"));       final BufferedImage bi2;      bi2 = new BufferedImage(ii2.getIconWidth(), ii2.getIconHeight(),              BufferedImage.TYPE_INT_RGB);      g2d = bi2.createGraphics();       int h2 = ii2.getImage().getHeight(null);      System.out.println("Blender1.Blender1()--------> height :" + h2);      g2d.drawImage(ii2.getImage(), 0, 0, null);        g2d.dispose();
    
          // Create an image panel capable of displaying entire image. The widths       // of both images and the heights of both images must be identical.
    
         final ImagePanel ip = new ImagePanel();       ip.setPreferredSize(new Dimension(ii1.getIconWidth(), ii1             .getIconHeight()));       getContentPane().add(ip, BorderLayout.NORTH);
    
           // Create a slider for selecting the blending percentage: 100% means      // show all of first image; 0% means show all of second image.
    
          final JSlider slider = new JSlider(JSlider.HORIZONTAL, 0, 100, 100);      slider.setMinorTickSpacing(5);        slider.setMajorTickSpacing(10);       slider.setPaintTicks(true);       slider.setPaintLabels(true);      slider.setLabelTable(slider.createStandardLabels(10));        slider.setInverted(true);     ChangeListener cl;        cl = new ChangeListener()     {         public void stateChanged( ChangeEvent e )         {             // Each time the user adjusts the slider, obtain the new              // blend percentage value and use it to blend the images.
    
                   int value = slider.getValue();                ip.setImage(blend(bi1, bi2, value / 100.0));          }     };        slider.addChangeListener(cl);     getContentPane().add(slider, BorderLayout.SOUTH);
    
           // Display the first image, which corresponds to a 100% blend     // percentage.
    
          ip.setImage(bi1);
    
           pack();       setVisible(true); }
    
       /**    * Blend the contents of two BufferedImages according to a specified weight.   *     * @param bi1  *            first BufferedImage  * @param bi2  *            second BufferedImage     * @param weight   *            the fractional percentage of the first image to keep     *     * @return new BufferedImage containing blended contents of BufferedImage  *         arguments   */
    
     public BufferedImage blend( BufferedImage bi1, BufferedImage bi2,         double weight )   {     if (bi1 == null)          throw new NullPointerException("bi1 is null");
    
          if (bi2 == null)          throw new NullPointerException("bi2 is null");
    
          int width = bi1.getWidth();       if (width != bi2.getWidth())          throw new IllegalArgumentException("widths not equal");
    
         int height = bi1.getHeight();     if (height != bi2.getHeight())
    
              throw new IllegalArgumentException("heights not equal");
    
            BufferedImage bi3 = new BufferedImage(width, height,              BufferedImage.TYPE_INT_RGB);      int[] rgbim1 = new int[width];        int[] rgbim2 = new int[width];        int[] rgbim3 = new int[width];
    
          for (int row = 0; row < height; row++)     {         bi1.getRGB(0, row, width, 1, rgbim1, 0, width);           bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
             for (int col = 0; col < width; col++)          {             int rgb1 = rgbim1[col];               int r1 = (rgb1 >> 16) & 255;                int g1 = (rgb1 >> 8) & 255;             int b1 = rgb1 & 255;
    
                    int rgb2 = rgbim2[col];               int r2 = (rgb2 >> 16) & 255;                int g2 = (rgb2 >> 8) & 255;             int b2 = rgb2 & 255;
    
                    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));               int g3 = (int) (g1 * weight + g2 * (1.0 - weight));               int b3 = (int) (b1 * weight + b2 * (1.0 - weight));               rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;            }
    
               bi3.setRGB(0, row, width, 1, rgbim3, 0, width);       }
    
           return bi3;   }
    
       /**    * Application entry point.    *     * @param args     *            array of command-line arguments  */
    
     public static void main( String[] args )  {     Runnable r = new Runnable()       {         public void run()         {             // Create Blender1's GUI on the event-dispatching             // thread.
    
                  new Blender1();           }     };        EventQueue.invokeLater(r);    }}
    
    /** * This class describes a panel that displays a BufferedImage's contents. */
    
    class ImagePanel extends JPanel{ /**    *     */   private static final long serialVersionUID = 4977990666209629996L;    private BufferedImage bi;
    
       /**    * Specify and paint a new BufferedImage.  *     * @param bi   *            BufferedImage whose contents are to be painted   */
    
     void setImage( BufferedImage bi ) {     this.bi = bi;     repaint();    }
    
       /**    * Paint the image panel.  *     * @param g    *            graphics context used to paint the contents of the current   *            BufferedImage    */
    
     public void paintComponent( Graphics g )  {     if (bi != null)       {         Graphics2D g2d = (Graphics2D) g;          g2d.drawImage(bi, null, 0, 0);        } }}
    

    Full java BB source

    /* * ImageScreen.java * * © ,  * Confidential and proprietary. */
    
    package src;
    
    /** *  */
    
    import java.io.OutputStream;import javax.microedition.io.Connector;import javax.microedition.io.file.FileConnection;import net.rim.device.api.system.Bitmap;import net.rim.device.api.ui.Field;import net.rim.device.api.ui.FieldChangeListener;import net.rim.device.api.ui.UiApplication;import net.rim.device.api.ui.component.BitmapField;import net.rim.device.api.ui.component.ButtonField;import net.rim.device.api.ui.component.Dialog;import net.rim.device.api.ui.component.LabelField;import net.rim.device.api.ui.container.HorizontalFieldManager;import net.rim.device.api.ui.container.MainScreen;import net.rim.device.api.ui.component.GaugeField;/** * The main screen to display an image taken from the camera demo. */public final class ImageScreen extends MainScreen{    /** The down-scaling ratio applied to the snapshot Bitmap */    private static final int IMAGE_SCALING = 7;
    
        /** The base file name used to store pictures */    private static final String FILE_NAME = System.getProperty("fileconn.dir.photos") + "IMAGE";
    
        /** The extension of the pictures to be saved */    private static final String EXTENSION = ".bmp";
    
        /** A counter for the number of snapshots taken */    private static int _counter;    Bitmap image1,image2; BitmapField imageField;     /** A reference to the current screen for listeners */    private ImageScreen _imageScreen;
    
       /**    * Constructor    * @param raw A byte array representing an image    */    public ImageScreen( final byte[] raw1,final byte[] raw2 )    {        // A reference to this object, to be used in listeners        _imageScreen = this;
    
            setTitle("Blend and Save");
    
            // Convert the byte array to a Bitmap image        image1 = Bitmap.createBitmapFromBytes( raw1, 0, -1, 1 );        image2 = Bitmap.createBitmapFromBytes( raw2, 0, -1, 1 );        // Create two field managers to center the screen's contents        HorizontalFieldManager hfm1 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm2 = new HorizontalFieldManager( Field.FIELD_HCENTER );        HorizontalFieldManager hfm3 = new HorizontalFieldManager( Field.FIELD_HCENTER );        // Create the field that contains the image//blend(image1, image2, 50/ 100.0)        imageField = new BitmapField(blend(image1, image2, 50/ 100.0) ){
    
               public int getPreferredWidth(){ return 250;}           public int getPreferredHeight(){ return 150;}
    
             };
    
            hfm1.add( imageField ); 
    
            GaugeField scroller = new GaugeField("Adjust (alt + < >)",0,100,50,Field.EDITABLE | Field.FOCUSABLE);        //scroller.setBackground( net.rim.device.api.ui.decor.BackgroundFactory.createSolidBackground(0x00000000));          scroller.setChangeListener( new GaugeFieldListener() );         hfm2.add(scroller);         // Create the SAVE button which returns the user to the main camera        // screen and saves the picture as a file.        ButtonField photoButton = new ButtonField( "Save" );        photoButton.setChangeListener( new SaveListener(raw1,raw2) );        hfm3.add(photoButton);
    
            // Create the CANCEL button which returns the user to the main camera        // screen without saving the picture.        ButtonField cancelButton = new ButtonField( "Cancel" );        cancelButton.setChangeListener( new CancelListener() );        hfm3.add(cancelButton);
    
            // Add the field managers to the screen        add( hfm1 );        add( hfm2 );        add( hfm3 );scroller.setFocus();//scroller.setValue(50);    }    public Bitmap blend( Bitmap bi1, Bitmap  bi2,                      double weight )        {
    
                  if (bi1 == null)                       throw new NullPointerException("bi1 is null");
    
                    if (bi2 == null)                       throw new NullPointerException("bi2 is null");
    
                    int width = bi1.getWidth();            if (width != bi2.getWidth())                   throw new IllegalArgumentException("widths not equal");
    
                   int height = bi1.getHeight();          if (height != bi2.getHeight())
    
                            throw new IllegalArgumentException("heights not equal");
    
             Bitmap bi3 = new Bitmap(width, height);         int[] rgbim1 = new int[width];         int[] rgbim2 = new int[width];         int[] rgbim3 = new int[width];
    
                    for (int row = 0; row < height; row++)         {            // bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize) 
    
                 // bit - > int[] argbData, int offset, int scanLength, int x, int y, int width, int height) 
    
                           bi1.getARGB(rgbim1,0,width,0,row, width,1);//  row, width, 1, , 0, width);                       bi2.getARGB(rgbim2,0,width,0,row, width,1); 
    
                           //bi1.getRGB(0, row, width, 1, rgbim1, 0, width);                       //bi2.getRGB(0, row, width, 1, rgbim2, 0, width);
    
                           for (int col = 0; col < width; col++)                  {                              int rgb1 = rgbim1[col];                                int r1 = (rgb1 >> 16) & 255;                           int g1 = (rgb1 >> 8) & 255;                            int b1 = rgb1 & 255;
    
                              int rgb2 = rgbim2[col];                                int r2 = (rgb2 >> 16) & 255;                           int g2 = (rgb2 >> 8) & 255;                            int b2 = rgb2 & 255;
    
                              int r3 = (int) (r1 * weight + r2 * (1.0 - weight));                            int g3 = (int) (g1 * weight + g2 * (1.0 - weight));                            int b3 = (int) (b1 * weight + b2 * (1.0 - weight));                            rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;                     }                    //bi -> int startX, int startY, int w, int h, int[] rgbArray, int offset, int scansize)                     //bit -> (int[] data, int offset, int scanLength, int left, int top, int width, int height)                      bi3.setARGB(rgbim3, 0, width, 0,  row,width, 1);
    
                        // bi3.setRGB(0, row, width, 1, rgbim3, 0, width);                }
    
                 return bi3;    }
    
       /**    * Handles trackball click events    * @see net.rim.device.api.ui.Screen#invokeAction(int)    */       protected boolean invokeAction(int action)    {        boolean handled = super.invokeAction(action); 
    
            if(!handled)        {            switch(action)            {                case ACTION_INVOKE: // Trackball click.                {                                 return true;                }            }        }                return handled;              }
    
     /**    * A listener used for the "Save" button    */    private class GaugeFieldListener implements FieldChangeListener    {        public void fieldChanged(Field field, int context)        {          int value =  ((GaugeField)field).getValue(); if (value==0){return;}          imageField.setBitmap( blend(image1, image2, value/ 100.0) );          ((GaugeField)field).setLabel("Adjust (alt + < >)"+value);        }    }   /**    * A listener used for the "Save" button    */    private class SaveListener implements FieldChangeListener    {        /** A byte array representing an image */        private byte[] _raw1,_raw2;
    
           /**        * Constructor.        * @param raw A byte array representing an image        */        SaveListener(byte[] raw1,byte[] raw2)        {            _raw1 = raw1;            _raw2 = raw2;        }
    
           /**        * Saves the image as a file in the BlackBerry filesystem        */        public void fieldChanged(Field field, int context)        {            try            {                       // Create the connection to a file that may or                // may not exist.                FileConnection file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );
    
                    // If the file exists, increment the counter until we find                // one that hasn't been created yet.                while( file.exists() )                {                    file.close();                    ++_counter;                    file = (FileConnection)Connector.open( FILE_NAME + _counter + EXTENSION );                }
    
                    // We know the file doesn't exist yet, so create it                file.create();
    
                    // Write the image to the file                OutputStream out = file.openOutputStream();                out.write(_raw1);
    
                    // Close the connections                out.close();                file.close();            }            catch(Exception e)            {                Dialog.alert( "ERROR " + e.getClass() + ":  " + e.getMessage() );            }
    
                // Inform the user where the file has been saved            Dialog.inform( "Saved to " + FILE_NAME + _counter + EXTENSION );
    
                // Increment the image counter            ++_counter;
    
                // Return to the main camera screen            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }
    
       /**    * A listener used for the "Cancel" button    */    private class CancelListener implements FieldChangeListener    {       /**        * Return to the main camera screen        */        public void fieldChanged(Field field, int context)        {            UiApplication.getUiApplication().popScreen( _imageScreen );        }    }}
    

    Yes, your original code:

    for (int col = 0; col < width; col++){int rgb1 = rgbim1[col];int r1 = (rgb1 >> 16) & 255;int g1 = (rgb1 >> 8) & 255;int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];int r2 = (rgb2 >> 16) & 255;int g2 = (rgb2 >> 8) & 255;int b2 = rgb2 & 255;
    
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));int g3 = (int) (g1 * weight + g2 * (1.0 - weight));int b3 = (int) (b1 * weight + b2 * (1.0 - weight));rgbim3[col] = (r3 << 16) | (g3 << 8) | b3;}
    

    Labour Code:

    for (int col = 0; col < width; col++)
    {
    int rgb1 = rgbim1[col];
    int a1 = (rgb1 >> 24) & 255;
    int r1 = (rgb1 >> 16) & 255;
    int g1 = (rgb1 >> 8) & 255;
    int b1 = rgb1 & 255;
    
    int rgb2 = rgbim2[col];
    int a2 = (rgb2 >> 24) & 255;
    int r2 = (rgb2 >> 16) & 255;
    int g2 = (rgb2 >> 8) & 255;
    int b2 = rgb2 & 255;
    
    int a3 = (int) (a1 * weight + a2 * (1.0 - weight));
    int r3 = (int) (r1 * weight + r2 * (1.0 - weight));
    int g3 = (int) (g1 * weight + g2 * (1.0 - weight));
    int b3 = (int) (b1 * weight + b2 * (1.0 - weight));
    rgbim3[col] = (a3 << 24) | (r3 << 16) | (g3 << 8) | b3;
    }
    
  • HTTP connection problem. What is going on?

    I am trying to write a simple program to test the validity of the URL via a http connection.

    For the good URL, the program works very well.

    Bad URL however found two ways:

    1: no answer at all (program runs as if nothing happened, waiting for user input.) The text in the EditField is the same incorrect url intentionally being tested)

    2: IllegalArgumentException in RIMConnector.open (int, int, String, boolean, FirewallContext) line: 76.

    What is going on?

    Here is the code:

    import java.io.IOException;
    import javax.microedition.io.Connector;
    import javax.microedition.io.HttpConnection;
    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.ui.UiApplication;
    
    final class UrlCheck extends UiApplication {
        private EditField urlField;
        public static void main(String[] args) {
            UrlCheck theApp = new UrlCheck();
            theApp.enterEventDispatcher();
        }
    
        public UrlCheck() {
            MainScreen theScreen = new MainScreen();
            LabelField title = new LabelField("URL Check");
            theScreen.setTitle(title);
    
            urlField = new EditField("URL: ", "", Integer.MAX_VALUE, BasicEditField.FILTER_DEFAULT);
            theScreen.add(urlField);
    
            FieldChangeListener listenerCancel = new FieldChangeListener() {
                public void fieldChanged(Field field, int context) {
                    String URL = urlField.getText();
                    HttpConnection conn = null;
                    int response = 0;
                    try {
                        conn = (HttpConnection)Connector.open(URL);
                        conn.setRequestMethod(HttpConnection.GET);
                        response = conn.getResponseCode();
                        if (response == 200){
                            Dialog.inform("URL OK");
                            return;
                        }
                        if(response == 401){
                            Dialog.inform("URL Requires Authorization");
                        }
                    } catch (IOException e) {
                        e.printStackTrace();
                        Dialog.inform("Bad URL");
                    }
                }
            };
            ButtonField checkUrl = new ButtonField("Check");
            checkUrl.setChangeListener(listenerCancel);
            theScreen.add(checkUrl);
            pushScreen(theScreen);
        }
    }
    

    Okay, that was stupid.

    I caught the IllegalArgumentException as well and it fixed the problem.

  • Interpret the hot methods table

    Hi all

    TL; DR: What are the causes some methods appear more frequently than others in the table in point hot method?

    I use the Mission control with JDK 64 bit for Linux 1.7.0_40.  Sorry, it's a bit long.

    I have a problem of unusual performance where some lots turns very quickly (< 10 minutes) after an app server restart but almost always of 80-90 minutes on the following nights.  The work of copying the data from Teradata to Oracle by running a single JDBC query against Teradata, read the records of ~ 50 k and engraving to Oracle in batches of ~ 2000 in parallel with the consistency of work Manager and repeating up to about 15 m rows have been processed.  This used to run constantly fast under 32-bit JRockit R28.x (Java 5).

    I realized many recordings of flight of the lots.  What jumps out at me is the gaps between the read the events of Teradata.  The event log shows this sequence for the main batch job thread:

    socket read Teradata event (15-20 ms constantly)

    method of profiling of events read the result set (total duration varies from night to night)

    socket read Teradata event (15-20 ms constantly)

    method of profiling of events read the result set (total duration varies from night to night)

    socket read Teradata event (15-20 ms constantly)

    method of profiling of events read the result set (total duration varies from night to night)

    events pending for the job manager complete queue Java monitor (< 500 ms constantly)

    repeat...

    There are usually 3 socket read groups events between calls to the job manager.  If the batch is running quickly, there are very small gaps between the readings of socket with the method very little profiling events (100ms).  If it works in the range of 30 minutes (rarely), these gaps are about 1 second.  If it works in the range of 90 minutes (often), these gaps are about 3 seconds.  In other words, it takes more time to read the results out of the resultset buffer it does for them to insert Oracle!  The only thing attracted my attention since the recording of the flight, is that there are a lot of events in this profiling method.  It seems that the methods of reading data from the result set, resultSet.getString (int) for example, take more time on some nights than others.  How would that be?

    I've already spent the result based on the name of the calls defined as resultSet.getString (name) of calls based on the post as resultSet.getString (int) based on what previous records (and my analysis of the decompiled Teradata driver) showed.  Methods hot look a little different now, but the performance is the same.

    The server has 4 modern processors, its use is about 20 to 30%, debit GC is far superior to 99%.

    Thank you

    John

    This proved be caused by the cache code to fill.  Once we have activated PrintCompilation and had Wily monitor the size of the cache in code, it was obvious.  We have quadrupled our cache of code size and now actually use about 80-90 MB.  25 k methods are compiled.  This particular step of our lots went from 90 minutes to 7.  Overall, the CPU usage has been reduced by half.  Not bad.

  • Change the order of the components in FlowPane

    I'm interested, how I can change with mouse drag and drop the order of the components in FlowPane. I have an example that can work with TabPane and drag between two TabPanes tabs:

    public class DragPanel {
    
        private static final String TAB_DRAG_KEY = "panel";
        private static ObjectProperty<Tab> draggingTab = new SimpleObjectProperty<>();
    
        // Drag Panel
        public static Tab makePanelDrag(final Tab tabA, final Label tabALabel)
        {
    
            tabALabel.setOnDragDetected(new EventHandler<MouseEvent>()
            {
                @Override
                public void handle(MouseEvent event)
                {
                    Dragboard dragboard = tabALabel.startDragAndDrop(TransferMode.MOVE);
                    ClipboardContent clipboardContent = new ClipboardContent();
                    clipboardContent.putString(TAB_DRAG_KEY);
                    dragboard.setContent(clipboardContent);
                    draggingTab.set(tabA);
                    DragBuffer.setDraggingTab(draggingTab);
    
                    // For Java 8
                    // Make screenshot of the dragged component
                    //Image img = tabALabel.snapshot(null, null);
                    //dragboard.setDragView(img, 7, 7);
                    //tabA.getTabPane().getTabs().remove(tabA);
                    event.consume();
                }
            });
            return tabA;
        }
    
        // Drop Tab
        public static TabPane makeTabDrop(final TabPane tabPane)
        {
    
            tabPane.setOnDragEntered(new EventHandler<DragEvent>()
            {
                @Override
                public void handle(DragEvent event)
                {
                    /* the drag-and-drop gesture entered the target */
                    /* show to the user that it is an actual gesture target */
                    if (event.getGestureSource() != tabPane && event.getDragboard().hasString())
                    {
                        tabPane.setCursor(Cursor.MOVE);
                        // Add Glow effect when the mouse holds object over the TabPane
                        tabPane.setEffect(new Glow(0.5));
    
                    }
                    event.consume();
                }
            });
    
            tabPane.setOnDragExited(new EventHandler<DragEvent>()
            {
                @Override
                public void handle(DragEvent event)
                {
                    /* mouse moved away, remove the graphical cues */
                    tabPane.setCursor(Cursor.DEFAULT);
                    // Remove the Glow effect when the mouse is not over the tabPane with Object
                    tabPane.setEffect(new Glow(0.0));
                    event.consume();
                }
            });
    
            tabPane.setOnDragOver(new EventHandler<DragEvent>()
            {
                @Override
                public void handle(DragEvent event)
                {
                    final Dragboard dragboard = event.getDragboard();
                    if (dragboard.hasString()
                            && TAB_DRAG_KEY.equals(dragboard.getString())
                            && DragBuffer.getDraggingTab().get() != null
                            && DragBuffer.getDraggingTab().get().getTabPane() != tabPane)
                    {
                        event.acceptTransferModes(TransferMode.MOVE);
                        event.consume();
                    }
                }
            });
    
            tabPane.setOnDragDropped(new EventHandler<DragEvent>()
            {
                @Override
                public void handle(DragEvent event)
                {
                    final Dragboard dragboard = event.getDragboard();
                    if (dragboard.hasString()
                            && TAB_DRAG_KEY.equals(dragboard.getString())
                            && DragBuffer.getDraggingTab().get() != null
                            && DragBuffer.getDraggingTab().get().getTabPane() != tabPane)
                    {
                        final Tab tab = DragBuffer.getDraggingTab().get();
                        tab.getTabPane().getTabs().remove(tab);
                        tabPane.getTabs().add(tab);
                        // Tempolary fix
                        new Timeline(new KeyFrame(Duration.millis(100), new EventHandler<ActionEvent>()
                        {
                            @Override
                            public void handle(ActionEvent event)
                            {
                                tabPane.getSelectionModel().select(tab);
                            }
                        })).play();
                        event.setDropCompleted(true);
                        DragBuffer.getDraggingTab().set(null);
                        event.consume();
                    }
                }
            });
            return tabPane;
        }
    }
    
    

    The question is how do I get the position of the foresight of component the FlowPane and change the order when I drop the component?

    P.S

    I have a FlowPane with many small panels that are BorderPanes. I want to change the order of the BorderPanes with the mouse drag and drop. But I'm sure that this feature at the moment is not possible. So I think I can solve this problem in the other direction.

    I can insert component additional which will be inserted into the FlowPane and held the BorderPane:

    FlowPane-> component-> BorderPane

    I can add setOnDragDetected() and setOnDragDropped to the component in order to implement the transaction slip and fall.
    The question is which component will be suitable for this task? I need to make it transparent and it must be resizable auto because the BorderPanes can expand and shrink. Can you give me some advice?

    Concerning

    No idea why you think that you should add another component between each part of the border and the workflow pane. Why not just put the behavior of dragging on each side of the border?

    To change the order, just children of the pane flow and basically manipulate it like any other list, using (...) remove and add (...). Just be careful to remove the two nodes first, then add them after (so you do not violate the rules of the graphic scene).

    import java.util.Random;
    
    import javafx.application.Application;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.FlowPane;
    import javafx.scene.layout.Pane;
    import javafx.stage.Stage;
    
    public class DraggableFlowPane extends Application {
    
        @Override
        public void start(Stage primaryStage) {
            final FlowPane root = new FlowPane();
            final Random rng = new Random();
            final int NUM_NODES = 120;
            for (int i = 0; i < NUM_NODES; i++) {
                int red = rng.nextInt(256);
                int green = rng.nextInt(256);
                int blue = rng.nextInt(256);
                Node node = createNode();
                node.setStyle(String.format("-fx-background-color: rgb(%d, %d, %d);", red, green, blue));
                root.getChildren().add(node);
            }
            primaryStage.setScene(new Scene(root, 600, 500));
            primaryStage.show();
        }
    
        private Node createNode() {
            final BorderPane bp = new BorderPane();
            bp.setOnDragDetected(new EventHandler() {
                @Override
                public void handle(MouseEvent event) {
                    Dragboard db = bp.startDragAndDrop(TransferMode.MOVE);
                    ClipboardContent clipboard = new ClipboardContent();
                    final int nodeIndex = bp.getParent().getChildrenUnmodifiable()
                            .indexOf(bp);
                    clipboard.putString(Integer.toString(nodeIndex));
                    db.setContent(clipboard);
                    event.consume();
                }
            });
            bp.setOnDragOver(new EventHandler() {
                @Override
                public void handle(DragEvent event) {
                    boolean accept = true;
                    final Dragboard dragboard = event.getDragboard();
                    if (dragboard.hasString()) {
                        int incomingIndex = Integer.parseInt(dragboard.getString());
                        int myIndex = bp.getParent().getChildrenUnmodifiable()
                                .indexOf(bp);
                        if (incomingIndex == myIndex) {
                            accept = false;
                        }
                    } else {
                        accept = false;
                    }
                    if (accept) {
                        event.acceptTransferModes(TransferMode.MOVE);
                    }
                }
            });
            bp.setOnDragDropped(new EventHandler() {
                @Override
                public void handle(DragEvent event) {
                    boolean success = false;
                    final Dragboard dragboard = event.getDragboard();
                    if (dragboard.hasString()) {
                        int incomingIndex = Integer.parseInt(dragboard.getString());
                        final Pane parent = (Pane) bp.getParent();
                        final ObservableList children = parent.getChildren();
                        int myIndex = children.indexOf(bp);
                        final int laterIndex = Math.max(incomingIndex, myIndex);
                        Node removedLater = children.remove(laterIndex);
                        final int earlierIndex = Math.min(incomingIndex, myIndex);
                        Node removedEarlier = children.remove(earlierIndex);
                        children.add(earlierIndex, removedLater);
                        children.add(laterIndex, removedEarlier);
                        success = true;
                    }
                    event.setDropCompleted(success);
                }
            });
            bp.setMinSize(50, 50);
            return bp;
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    
  • Java stored procedure

    Hello

    I tried to register with the Java stored procedure and created a Java class for it. I am quite successful in compiling and executing the code using the Java compiler in Windows CMD, but I meet below error when I try to do the same thing via Java stored proc.
    PRAZY@orcl> CREATE OR REPLACE  FUNCTION WINREGREAD(REGKEY VARCHAR2,REGVALUE VARCHAR2) RETURN VARCHAR2
      2  AS
      3  LANGUAGE JAVA NAME 'WindowsRegistry.readString(java.lang.String,java.lang.String) return java.lang.String';
      4  /
    
    Function created.
    PRAZY@orcl> call winregread('Software\\MyApps','Test') into :mystring;
    call winregread('Software\\MyApps','Test') into :mystring
    *
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.NullPointerException
    
    
    Elapsed: 00:00:00.01
    PRAZY@orcl>
    Here's the Java code and its put
    //Uncomment the below like while compiling Java source in DB
    //CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "WinRegistry" AS
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.HashMap;
    import java.util.Map;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.prefs.Preferences;
    public class WindowsRegistry {
      public static final int HKEY_CURRENT_USER = 0x80000001;
      public static final int HKEY_LOCAL_MACHINE = 0x80000002;
      public static final int REG_SUCCESS = 0;
      public static final int REG_NOTFOUND = 2;
      public static final int REG_ACCESSDENIED = 5;
      private static final int KEY_ALL_ACCESS = 0xf003f;
      private static final int KEY_READ = 0x20019;
      private static Preferences userRoot = Preferences.userRoot();
      private static Preferences systemRoot = Preferences.systemRoot();
      private static Class<? extends Preferences> userClass = userRoot.getClass();
      private static Method regOpenKey = null;
      private static Method regCloseKey = null;
      private static Method regQueryValueEx = null;
      static {
        try {
          regOpenKey = userClass.getDeclaredMethod("WindowsRegOpenKey",
              new Class[] { int.class, byte[].class, int.class });
          regOpenKey.setAccessible(true);
          regCloseKey = userClass.getDeclaredMethod("WindowsRegCloseKey",
              new Class[] { int.class });
          regCloseKey.setAccessible(true);
          regQueryValueEx = userClass.getDeclaredMethod("WindowsRegQueryValueEx",
              new Class[] { int.class, byte[].class });
          regQueryValueEx.setAccessible(true);
        }
        catch (Exception e) {
          e.printStackTrace();
        }
      }
      private WindowsRegistry() {  }
    
      public static String readString(String key, String valueName)
       throws IllegalArgumentException, IllegalAccessException,
        InvocationTargetException 
      {
    
        int hkey = HKEY_LOCAL_MACHINE;
          return readString(systemRoot, hkey, key, valueName);
      }
    
    private static String readString(Preferences root, int hkey, String key, String value)
    throws IllegalArgumentException, IllegalAccessException,
        InvocationTargetException 
      {
        try
    {
        int[] handles = (int[]) regOpenKey.invoke(root, new Object[] {
            new Integer(hkey), toCstr(key), new Integer(KEY_READ) });
    
        if (handles[1] != REG_SUCCESS) {
          return null;
        }
        byte[] valb = (byte[]) regQueryValueEx.invoke(root, new Object[] {
            new Integer(handles[0]), toCstr(value) });
        regCloseKey.invoke(root, new Object[] { new Integer(handles[0]) });
        return (valb != null ? new String(valb).trim() : null);
    }
    catch (NullPointerException e)
    { 
    return e.getMessage();
    }
      }
    // utility
      private static byte[] toCstr(String str) {
        byte[] result = new byte[str.length() + 1];
        for (int i = 0; i < str.length(); i++) {
          result[i] = (byte) str.charAt(i);
        }
        result[str.length()] = 0;
        return result;
      }
    
    //Begin - Remove the following lines while compiling Java source in DB
    public static void main(String[] args) throws Exception 
      {
    String value = "";
    value = WindowsRegistry.readString("Software\\MyApps","Test");
        System.out.println("Reg key Value is: " +value);
      }
    //End
    
    };
    
    //Output
    d:\Java_Test>javac WindowsRegistry.java
    
    d:\Java_Test>java WindowsRegistry
    Reg key Value is: TEST VALUE
    
    -----------------------------------------------------------------------------
    
    Env. Details:
    =======
    Windows Vista 32 bit
    
    DB:
    ====
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
    As you can see, I get my results when I run the same command prompt class, but encounter an error when it is executed from the DB.

    Also, I have granted permission to the runtime using DBMS_JAVA. Is there an any other permission problem?

    Kindly help and let me know if you need another entry.

    Thank you!

    Kind regards
    Prazy

    The Pref class is not supported in Oracle. So I used Java SP for BACK orders executed and calling in turn REG QUERY command.
    Tested with Windows 2003, Win XP and Win Vista (32-bit).

    PRAZY@orcl> select banner from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Release 11.1.0.6.0 - Production
    PL/SQL Release 11.1.0.6.0 - Production
    CORE     11.1.0.6.0     Production
    TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
    NLSRTL Version 11.1.0.6.0 - Production                                                                                                                                                                                                                    
    
    Elapsed: 00:00:00.00
    PRAZY@orcl> CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "WindowsRegistry" AS
      2  import java.io.*;
      3  import java.lang.*;
      4
      5  public class WindowsRegistry {
      6
      7  public static String ReadKey(String key,String valueName)
      8  {
      9       String finalVal=null;
     10       String curVal=null;
     11       String command="reg query " + key + " /v " + valueName;
     12         try {
     13             // get runtime environment and execute child process
     14             Runtime systemShell = Runtime.getRuntime();
     15             Process output = systemShell.exec(command);
     16             // open reader to get output from process
     17             BufferedReader br = new BufferedReader (new InputStreamReader(output.getInputStream()));
     18             String line = null;
     19              while((line = br.readLine()) != null )
     20                  {
     21                 finalVal = curVal;
     22                      curVal = line;
     23                  }
     24                 output.waitFor();
     25            //get the value by calling findkeyval method
     26            finalVal=findKeyVal(finalVal.trim(),valueName);
     27             return finalVal;
     28             }
     29          catch (IOException ioe){ return "";}
     30          catch (Throwable t) { return "";}
     31  }
     32
     33  //Method to split the output and retrieve key value
     34  public static String findKeyVal(String keyLine,String valName)
     35  {
     36       String retVal="";
     37       String [] temp = null;
     38       temp = keyLine.split("\\s+");
     39       if (temp[0].equals(valName)) {
     40            for (int i=2; i CREATE OR REPLACE FUNCTION WinRegRead(keyPath varchar2,keyName varchar2) RETURN VARCHAR2
      2  AS
      3  LANGUAGE JAVA NAME 'WindowsRegistry.ReadKey(java.lang.String,java.lang.String) return java.lang.String';
      4  /
    
    Function created.
    
    Elapsed: 00:00:00.01
    PRAZY@orcl> var keyVal varchar2(50)
    PRAZY@orcl> print
    
    KEYVAL
    --------------------------------------------------------------------------------------------------------------------------------                                                                                                                          
    
    PRAZY@orcl> call WinRegRead('HKLM\Software\Oracle','inst_loc') into :keyVal;
    
    Call completed.
    
    Elapsed: 00:00:00.04
    PRAZY@orcl> print
    
    KEYVAL
    --------------------------------------------------------------------------------------------------------------------------------
    C:\Program Files (x86)\Oracle\Inventory                                                                                                                                                                                                                   
    

    Fact!

    I hope this might help someone!

    Kind regards
    Prazy

  • Web services - handling response type complex

    I have to consume a web service that returns an array of complex type.
    The wsdl looks like below:
    Request: POST /UserManager/usermanager.asmx HTTP/1.1
    < soap: Body >
    "" < GetMargins xmlns = " http://tempuri.org/ ' / >
    < / soap: Body >

    Response: HTTP/1.1 200 OK
    < soap: Body >
    "< GetMarginsResponse xmlns =" http://tempuri.org/ "> "
    < GetMarginsResult >
    < String > < / string >
    < String > < / string >
    < / GetMarginsResult >
    < / GetMarginsResponse >
    < / soap: Body >
    --------
    The service is currently in my local network. If I call the service with the code below:
    < cfinvoke
    WebService = "" http://oecdevel/usermanager/usermanager.asmx?wsdl " "
    method = "GetMargins.
    returnVariable = "stGetMarginsResponse" >
    < cfscript >
    I get the answer: org.tempuri.ArrayOfString@465545dd
    I tried to create a struct, etc, but I had no luck at all.
    How can I read the answer? Help, please. Thanks in advance.

    The answer is an instance of a java object - ArrayOfString. I suggest you start using cfdump on it. That lists the properties and methods of your response object. I suspect you will see 2 methods, writing and getString (int i). So, if you call stGetMarginsResponse.getString (), you should have an array of returned simple strings that you can run a loop through. Or you can call stGetMarginsResponse.getString (i), where i is 0 to arraylen to get a specific element in the table.

    Let us know your results. Also, if you view the WSDL file I'll look in there far longer.

  • checking int null value

    Hello
    a little silly question how to check the value for null int...
    I'm dealing with java.lang.IllegalArgumentException When you call the function defined in AM when inputText which provides function the int parameter contains no value.
    How can this be avoided?
    for the types of objects, you can use operator 'is' Java, what primitives?

    You can use the following piece of code for int a

    If (("".equals (a)) |) ("null".equals (a)))
    {
    int one is null
    do something
    }

  • Cannot convert RichInputNumberSlider to int

    Hi all
    I have tried the panelDashboard component.
    I want to make a simple page with two components: an inputNumberSlider and a panelDashboard.
    I would like that the panelDashboard has the number of columns selected in the inputNumberSlider.

    I read the post of thi: < af:panelDashboard > component not made
    so I put in the "columns" of the panelDashboard of the value property: #{backingBeanScope.ins1.value}

    but I have this error:

    java.lang.IllegalArgumentException: cannot convert RichInputNumberSlider [UIXEditableFacesBeanImpl, id = ins1] of type class oracle.adf.view.rich.component.rich.input.RichInputNumberSlider in int
    at com.sun.el.lang.ELSupport.coerceToNumber(ELSupport.java:293)
    at com.sun.el.lang.ELSupport.coerceToType(ELSupport.java:373)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:194)
    at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:68)
    at oracle.adfinternal.view.faces.renderkit.rich.PanelDashboardRenderer.getColumns(PanelDashboardRenderer.java:384)
    Truncated. check the log file full stacktrace

    I want to convert to int, because if I set the 'columns' property # {backingBeanScope.ins1.value} without converting them, I do not see the panelDashboard.

    Why?

    I use Jdeveloper 11.1.1.0

    I do something similar. In my grain of support for dashboard, I just have a property of type string called 'prefNumCols' with the getters and setters.

    
    

    Then the dashboard is refers to this value simply and watches the foregoing as a partialTrigger

     
    

    Works for me :-)

    Published by: cafelatte, Sep 22, 2009 15:24

  • I've done int recevie confirm email from apple service

    my screen is broken and I gave apple service provider I've done int receive confirm electronic

    alwarfromchittoor wrote:

    my screen is broken and I gave apple service provider I've done int receive confirm electronic

    If I understand, you went to have the screen of your iPhone repaired to the Apple authorized service provider, but did not receive a confirmation email from the provider regarding your visit in? I understand that you want to have a form any registration. I would recommend that you please contact the store by their phone number and pull them to the top of your repair/service order and send a copy of you if possible. They might not have your voucher by e-mail or e-mail only those details when requested directly by the customer.

    This is a public forum, so no one will be able to help you retrieve this information here.

  • Auto SMS sent from my iPhone 5 to this number SMS int ' l 447903553650 and loaded for free! No history of sms sent in my message box! How can I solve it?

    Auto SMS sent from my iPhone 5 to this number SMS int ' l 447903553650 and loaded for free! No history of sms sent in my message box! How can I solve it?

    Tap settings > Messages and then turn OFF send as SMS .

  • I recently dropped my laptop and it is weird, one day he int open up to 4 start times and sometimes it shows me a folder and a question mark in the interface and sometimes asked to reset my password, what are the steps to take?

    I recently dropped my laptop and it is weird, one day he int open up to 4 start times and sometimes it shows me a folder and a question mark in the interface and sometimes asked to reset my password, what are the steps to take?

    Anything can be corrupted on your MacBook Pro, but from what you say, it seems that the cable drive/SSD/flash memory/SATA hard was seriously damaged. Him "question mark" means that your Mac is unable to find any bootable device, meaning that it does not yet detect your OS X drive.

    You should make a backup of your files (if you can still do it) and take the Mac at the Apple Store or dealer to get a diagnosis. There may be several damaged parts.

  • DeskJet 3630: HP DeskJet 3630 doesn't recongize 803 black carteidge int

    Hello. I met a problem when I using 803 ink cartridge black (instead of 63 black cartridge int) in my DeskJet 3630. The printer cannot detect the 803 even black ink cartridge, I tried two new 803 black ink cartridges that have been purchased in the supermarket. If DeskJet 3630 can use only 63 ink cartridge? If not, could you please give me some suggestions on how to fix this? Thank you very much.

    BTW: I tried all the solutions on the site of HP comfortable support.

    You bought the printer in a country and are now in another country?  You will need to Contact HP to ask a "regionalization Reset." Do not charge for this, it is covered under the warranty of the cartridge. You will need to have access to your computer and printer then on line with HP. You will also need to have a set of cartridges for the new region, once completed reset cartridges of region of origin no longer works.  Webpage of HP on the subject is here.

Maybe you are looking for