Random presentation of images from plist.

Hello all, my name is Merlin and of course... Im new to this! LOL Ive been teaching myself Obj-C and Cocoa for the better part of 5 months now, and I have to say... I found my path. I absolutely love it and cant wait till I feel more comfortable with the methodology. But enough about me!
Im working on a Q&A based app. To get the UI to look EXACTLY the way I wanted it to, I designed all of the questions in Photoshop. These questions range in topic but normally ask you to tap on something specific in the image. Picture an image with a bunch of dogs and the prompt "tap the boxer..."
I then have 2 custom buttons in IB, one covers the entire screen name "incorrectButton" and another named "correctButton" placed over the spot in the image that is the "correct" location.
I have a HomePageViewController with a start button that loads Question1ViewController with the previously mentioned background UIImageView. Im using presentModalVC to load the question image with a nice UIModalTransCrossDissolve.
Question1ViewController...
"Tap on the boxer"...
User taps incorrect location is sent to my IncorrectResponseViewController which states "Sorry, try again" and pops automatically after a 2 second delay.
User taps correct location is sent to my CorrectResponseViewController which states "That is correct!" and unhides a nextButton. Pressing it implements nextButtonPressed which takes you to Question2ViewController (again by presenting it Modally). Question2ViewController then had a nib with question2.png loaded as the background and a new button layout to correspond to the new "correct" location.
Since the method to call this "next" question is "nextButtonPressed", I soon realized I would never be able to get past Question2 unless I created some kind of loop and store the questions in a plist or Core Data.
This is where I started to investigate loading all of my question images (or just their file names as an NSString) into a plist and using the same nib to present them all. I figured I could also store the "correctButton" coordinates as a Dictionary in that plist and call those in a setFrame method when I want to present the next question.
So I have my plist built and I think it's correct...
[TIMG]http://img.photobucket.com/albums/v686/FJMerlin/Screenshot2010-09-14at20550PM.pn g[/TIMG]
I also created a Constants file with the following keys...
#define BACKGROUNDIMAGE_KEY @"backgroundImage"
#define CORRECTBUTTONLOCATION_KEY @"correctButtonLocation"
#define XBUTTONLOC_KEY @"x"
#define YBUTTONLOC_KEY @"y"
#define WBUTTONLOC_KEY @"w"
#define HBUTTONLOC_KEY @"h"
So this is where my noobism shines through. Im having one **** of a time getting the values out of this plist and onto the screen. What I would like to do is load all (100 as of now) the questions into this plist. Then present the QuestionsViewController and have it randomly present the question Images. Upon selecting the correct location, modally present the CorrectResponseViewController with the nextButton, and have the nextButtonPressed method return you to QuestionsViewController with a new question and button layout. As of now, Im mostly concerned with getting anything out of the plist to work before I worry about randomizing the questions.
Ive attempted to call these values a few different ways.
.h
@interface Q1ViewController : UIViewController {
IBOutlet UIImageView *backgroundImage;
IBOutlet UIButton *backButton;
IBOutlet UIButton *correctButton;
IBOutlet UIButton *incorrectButton;
IBOutlet UIButton *nextButton;
NSMutableArray *questions;
NSMutableArray *buttonCorridinates;
@property (nonatomic, retain) IBOutlet UIImageView *backgroundImage;
@property (nonatomic, retain) IBOutlet UIButton *backButton;
@property (nonatomic, retain) IBOutlet UIButton *nextButton;
@property (nonatomic, retain) IBOutlet UIButton *correctButton;
@property (nonatomic, retain) IBOutlet UIButton *incorrectButton;
@property (nonatomic, retain) NSMutableArray *questions;
@property (nonatomic, retain) NSMutableArray *buttonCorridinates;
- (IBAction) backButtonPressed:(id) sender;
- (IBAction) nextButtonPressed:(id) sender;
- (IBAction) correctButtonPressed:(id) sender;
- (IBAction) incorrectButtonPressed:(id) sender;
@end
.m
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
backButton.hidden = YES;
nextButton.hidden = YES;
NSString *path = [[NSBundle mainBundle] pathForResource:@"Questions" ofType:@"plist"];
NSMutableArray* tmpArray = [[NSMutableArray alloc] initWithContentsOfFile:path];
self.questions = tmpArray;
[tmpArray release];
UIImage *tmpImage = [UIImage objectForKey:BACKGROUNDIMAGE_KEY];
[backgroundImage setImage: tmpImage];
[correctButton setFrame:CGRectMake(20.0f,226.0f,192.0f,37.0f)];
[tmpImage release];
NSString *correctButtonLoc = [[NSString alloc] intValue:CORRECTBUTTONLOCATION_KEY];
[correctButton setFrame:CGRectMake(@"%@"),correctButtonLoc];
//or this.... LOL
UIImageView *tmpImage = [[UIImageView alloc] initWithImage:@"%@", BACKGROUNDIMAGE_KEY];
[backgroundImage setImage:tmpImage];
NSString *xButtonLoc = [[NSString intValue[questions objectForKey:XBUTTONLOC_KEY]];
NSString *yButtonLoc = [[NSString intValue[questions objectForKey:YBUTTONLOC_KEY];
NSString *wButtonLoc = [[NSString intValue[questions objectForKey:WBUTTONLOC_KEY];
NSString *hButtonLoc = [[NSString intValue[questions objectForKey:HBUTTONLOC_KEY];
[correctButton setFrame:CGRectMake(@"%@","%@","%@","%@") xButtonLoc, yButtonLoc, wButtonLoc, hButtonLoc];
I feel like I know what to do, I just dont know how to do it. I have the image paths stored in the plist, so I obviously need to call those paths then convert them to the actual image, am I on the right track in that thinking?
For the coordinates, I also have those stored as strings. So Im sure the same holds true. Need to convert those to ints to set my frame. But again, no matter how many time I read through the string formatting guide, I still cant seem to luck into this one.
Once I have this figured out. Ill want to have something very similar to the randomizing plist code from James' FlashCard app which I found in another thread. http://discussions.apple.com/thread.jspa?threadID=2542025
RayNewbie was kind enough to point me in the right direction to start my own thread so here I am!
I hope this isnt to long winded. I wanted to be detailed. Thanks in advance for any guidance.

ok, been at it for half the day already and cant seem to get the shuffleArray method to work with my code. I did tweak some things to make it more similar to the construct of James' FlashCard app.
I did away with my Correct and IncorrectViewControllers. I changed the methods for pressing those buttons to simply change the background image to the appropriate response as well as unhide the next and back buttons to allow these controls to reside in the same VC. Here is how I have it now...
@implementation QuestionsViewController
@synthesize backgroundImage;
@synthesize backButton;
@synthesize nextButton;
@synthesize correctButton;
@synthesize incorrectButton;
@synthesize questions;
@synthesize counter;
- (void)dealloc {
     [backgroundImage release];
     [backButton release];
     [nextButton release];
     [correctButton release];
     [incorrectButton release];
     [questions release];
     [super dealloc];
-(void) viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     nextButton.hidden = YES;
     backButton.hidden = YES;
- (void) enableButton {
     int count = [questions count];
     nextButton.enabled = counter < count - 1 ? YES : NO;
     backButton.enabled = counter > 0 ? YES : NO;
// The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    return self;
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
     [super viewDidLoad];
     NSString *path = [[NSBundle mainBundle] pathForResource:@"Questions" ofType:@"plist"];
     NSLog(@"%s: path=%@", __func__, path);
     NSMutableArray* tmpArray = [[NSMutableArray alloc]initWithContentsOfFile:path];
     self.questions = tmpArray;
     [tmpArray release];
     [self reset];     
- (void)shuffleArray:(NSMutableArray*)array {
     int total = [array count];
     if (total <= 1)
          return;
     NSMutableArray *poolArray = [[NSMutableArray alloc] initWithArray:array];
     [array removeAllObjects];
     for (int i = 0; i < total; i++) {
          int index = random() % [poolArray count];
          [array addObject:[poolArray objectAtIndex:index]];
          [poolArray removeObjectAtIndex:index];
- (IBAction)reset {
     srandomdev();
     counter = 0;
     [self shuffleArray:questions];
     if ([questions count]) {
          NSDictionary *Question = [questions objectAtIndex:counter];
          NSString *imageFileName = [Question objectForKey:@"backgroundImage"];
          UIImage *bkgdImage = [UIImage imageNamed:imageFileName];
          [backgroundImage setImage:bkgdImage];
          NSDictionary *correctPts = [Question objectForKey:@"correctButtonLocation"];
          CGRect correctRect = CGRectMake(
                                                  [[correctPts objectForKey:@"x"] doubleValue],
                                                  [[correctPts objectForKey:@"y"] doubleValue],
                                                  [[correctPts objectForKey:@"w"] doubleValue],
                                                  [[correctPts objectForKey:@"h"] doubleValue]
          [correctButton setFrame:correctRect];
     } else {
          [backgroundImage setImage:nil];     
     [self enableButton];
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
     // Return YES for supported orientations
     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
- (IBAction) correctButtonPressed:(id) sender {
     NSLog(@"correct button pressed");
     nextButton.hidden = NO;
     backButton.hidden = NO;
     UIImage *correctImage = [UIImage imageNamed:@"thatIsCorrect.png"];
     [backgroundImage setImage:correctImage];
     [correctImage release];
- (IBAction) nextButtonPressed:(id)sender {
     NSLog(@"Next button pressed");
     int count = [questions count];
     if (counter < count - 1) {
          NSDictionary *nextItem = [self.questions objectAtIndex:++counter];
          NSString *imageFileName = [nextItem objectForKey:@"backgroundImage"];
          UIImage *bkgdImage = [UIImage imageNamed:imageFileName];
          [backgroundImage setImage:bkgdImage];
          NSDictionary *correctPts = [nextItem objectForKey:@"correctButtonLocation"];
          CGRect correctRect = CGRectMake(
                                                  [[correctPts objectForKey:@"x"] doubleValue],
                                                  [[correctPts objectForKey:@"y"] doubleValue],
                                                  [[correctPts objectForKey:@"w"] doubleValue],
                                                  [[correctPts objectForKey:@"h"] doubleValue]
          [correctButton setFrame:correctRect];
     [self enableButton];
- (IBAction) incorrectButtonPressed:(id) sender {
     NSLog(@"incorrect button pressed");
     IncorrectResponseViewController *incorrectResponseViewController = [[IncorrectResponseViewController alloc] initWithNibName:@"IncorrectResponseViewController" bundle:nil];
     incorrectResponseViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
     [self presentModalViewController:incorrectResponseViewController animated:YES];
     [incorrectResponseViewController release];
- (IBAction) backButtonPressed:(id) sender {
     NSLog(@"Back button pressed");
     if (counter > 0) {
          NSDictionary *nextItem = [self.questions objectAtIndex:--counter];
          NSString *imageFileName = [nextItem objectForKey:@"backgroundImage"];
          UIImage *bkgdImage = [UIImage imageNamed:imageFileName];
          [backgroundImage setImage:bkgdImage];
          NSDictionary *correctPts = [nextItem objectForKey:@"correctButtonLocation"];
          CGRect correctRect = CGRectMake(
                                                  [[correctPts objectForKey:@"x"] doubleValue],
                                                  [[correctPts objectForKey:@"y"] doubleValue],
                                                  [[correctPts objectForKey:@"w"] doubleValue],
                                                  [[correctPts objectForKey:@"h"] doubleValue]
          //NSLog(@"Question %d:\n\timageFileName=%@\n\tcorrectRect=%@", count++, imageFileName, NSStringFromCGRect(correctRect));
          [correctButton setFrame:correctRect];
     [self enableButton];     
- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    // Release any cached data, images, etc that aren't in use.
- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
@end
The only issue I was having was with "counter" which I see in James' .m file but I wasnt sure what the ivar was. So I used your recommendation Ray and searched all his posts here on the forum and found that it was an fact an int. Now it appears everything is actually working! I just need to tweak the UI to hide and unhide my back and next buttons consistently but so far this is exactly what I was looking for.
Next up I have to figure out how to convert the coordinates to landscape so my correctButton lands up in the right spot and of course... score keeping! LOL
Thanks again Ray!

Similar Messages

  • What is the FASTEST way to present an image from disk?

    I am currently using the standard read *jpeg file to display an image from disk to a picture control. My question is what is the most efficient method of getting an image ot the front panel, whether it is with this control, IMAQ, etc. At the end of the day, timing is crucial, and I would like to sync a trigger with the onset of an image.
    Thanks in advance.

    > I am currently using the standard read *jpeg file to display an image
    > from disk to a picture control. My question is what is the most
    > efficient method of getting an image ot the front panel, whether it is
    > with this control, IMAQ, etc. At the end of the day, timing is
    > crucial, and I would like to sync a trigger with the onset of an
    > image.
    >
    FASTEST will be imaq, and both the intensity graph and the picture
    control will be a bit slower since they are both better suited to other
    tasks.
    First, if you only have a small number of jpegs, you might preload them.
    You could even go so far as to draw them to a hidden picture control
    and simply show it when your event occurs.
    The differences here are roughly that IMAQ will already have the image
    data
    placed into their image and will simply need to draw it, similar to
    showing a LV control. The picture control data is a flattened version
    of the image that needs to be interpreted somewhat and placed into a
    system image, then drawn. The intensity graph assumes that is is false
    coloring an intensity map and is zooming or stretching the data as well.
    Therefore it also constructs a bitmap from the data and takes a bit
    longer to do it as it decimates and stretches the data as necessary.
    Greg McKaskle

  • How do I copy an image from one Keynote presentation to another one?

    I have a previously saved presentation on Keynote in iCloud. I created it from my desktop at work. Some of the images I used for the presentation I want to use again in another presentation, onlh this time I am working off my laptop and don't have the same access to those images. Is it possible to copy/paste images from one Keynote presentation into another? I can't even seem to click on the image and save it.
    Any suggestions?

    Clicking and dragging does not work.
    Click on the image and Copy and Paste
    or
    Inspector > Metrics > File Info > click on the icon of the file and drag it to your desktop
    You can then drag that file back in wherever you want.
    Peter

  • Pull random images from iPhoto library folders

    I'm trying to come up with a script to pull random images from my iPhoto library and copy them to another folder that I can then use with another program (GeekTool) to display them on my desktop.
    What I'd like to be able to do is pull 30-50 of these images at a time. I can use GeekTool to call the script at a given interval (eg. every half hour) and have a completely different set of images everytime the script is run.
    I'm a complete obliviot when it comes to applescripting, so I'm at the mercy of the experts. I've managed to find a couple of scripts that can do something similar with the screensaver, but I'm unable to figure out the script enough to make it do what I need.
    Any help would be much appreciated. Thanks.
    brad

    You should post your question on the iPhoto forum.
    http://discussions.apple.com/category.jspa?categoryID=143
    Make sure you post your question in the appropriate iPhoto forum based on which version of iPhoto you have (4, 5 or 6).

  • Not able to download image from database

    not able to download image from database am in jdeveloper 11g release 2 am using this example
    : http://tompeez.wordpress.com/2011/11/26/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-2/
    hi am not able to down load my image my jsp xml is
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document title="sms4200.jspx" id="d1">
    <af:messages id="m1"/>
    <af:form id="f1" usesUpload="true">
    <af:panelStretchLayout topHeight="211px" id="psl1" inlineStyle="width:1338px; background-color:Navy;">
    <f:facet name="top">
    <af:panelHeader text="Sms Intergration Sources" id="ph1">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:panelStretchLayout id="psl2" inlineStyle="height:178px; width:1018px;" topHeight="22px"
    endWidth="589px" startWidth="55px" bottomHeight="33px">
    <f:facet name="end">
    <af:panelHeader text="Office" id="ph2"
    inlineStyle="width:900px; background-color:Navy;">
    <f:facet name="context"/>
    <f:facet name="menuBar"/>
    <f:facet name="toolbar"/>
    <f:facet name="legend"/>
    <f:facet name="info"/>
    <af:panelFormLayout id="pfl3" inlineStyle="background-color:Navy;" rows="1">
    <f:facet name="footer"/>
    <af:inputText label="#{bindings.Name1.hints.label}"
    required="#{bindings.Name1.hints.mandatory}"
    columns="20"
    maximumLength="#{bindings.Name1.hints.precision}"
    shortDesc="#{bindings.Name1.hints.tooltip}" id="it2">
    <f:validator binding="#{bindings.Name1.validator}"/>
    </af:inputText>
    <af:inputText
    label="#{bindings.LocalUpDirectory1.hints.label}"
    required="#{bindings.LocalUpDirectory1.hints.mandatory}"
    columns="20"
    maximumLength="#{bindings.LocalUpDirectory1.hints.precision}"
    shortDesc="#{bindings.LocalUpDirectory1.hints.tooltip}"
    id="it3">
    <f:validator binding="#{bindings.LocalUpDirectory1.validator}"/>
    </af:inputText>
    </af:panelFormLayout>
    </af:panelHeader>
    </f:facet>
    <f:facet name="top">
    <af:inputText value="#{bindings.IntegrationTypeName1.inputValue}"
    label="#{bindings.IntegrationTypeName1.hints.label}"
    required="#{bindings.IntegrationTypeName1.hints.mandatory}"
    columns="#{bindings.IntegrationTypeName1.hints.displayWidth}"
    maximumLength="#{bindings.IntegrationTypeName1.hints.precision}"
    shortDesc="#{bindings.IntegrationTypeName1.hints.tooltip}" id="it1">
    <f:validator binding="#{bindings.IntegrationTypeName1.validator}"/>
    </af:inputText>
    </f:facet>
    </af:panelStretchLayout>
    </af:panelHeader>
    </f:facet>
    <f:facet name="center">
    <!-- id="af_one_column_header_stretched" -->
    <af:decorativeBox theme="dark" id="db1" inlineStyle="width:1050px; background-color:Navy;">
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll" id="pgl3" inlineStyle="background-color:Navy;">
    <af:panelStretchLayout id="psl3" inlineStyle="width:1012px; height:502px;"
    topHeight="133px" startWidth="0px">
    <f:facet name="center">
    <af:panelStretchLayout id="psl5" endWidth="659px" startWidth="171px">
    <f:facet name="center"/>
    <f:facet name="start"/>
    <f:facet name="end">
    <af:panelGroupLayout layout="scroll" id="pgl2">
    <af:inputFile label="Select Image" id="if1" autoSubmit="true"
    valueChangeListener="#{ImageBean.uploadFileValueChangeEvent}"/>
    <af:commandButton actionListener="#{bindings.CreateInsert.execute}"
    text="Restart Load Image Process"
    disabled="#{!bindings.CreateInsert.enabled}"
    id="cb2"/>
    <af:commandButton actionListener="#{bindings.Commit.execute}"
    text="Save"
    disabled="#{!bindings.Commit.enabled}"
    id="cb3"/>
    <af:commandButton text="View" id="cb1"
    partialSubmit="true"
    unsecure="#{ImageBean.downloadButton}"
    action="#{image.downloadImage}"
    binding="#{image2.downloadButton}"/>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="top"/>
    </af:panelStretchLayout>
    </f:facet>
    <f:facet name="start"/>
    <f:facet name="top">
    <af:panelStretchLayout id="psl4" startWidth="232px" endWidth="296px"
    bottomHeight="18px" topHeight="11px">
    <f:facet name="bottom"/>
    <f:facet name="center"/>
    <f:facet name="start">
    <af:panelFormLayout id="pfl1" labelAlignment="top">
    <f:facet name="footer"/>
    <af:inputText label="File from PC to be Transfered" id="it4"/>
    </af:panelFormLayout>
    </f:facet>
    <f:facet name="end">
    <af:panelFormLayout id="pfl2" labelAlignment="top" maxColumns="10">
    <f:facet name="footer">
    <af:inputText value="#{bindings.DocumentName.inputValue}"
    label="File Transfered to Database"
    required="#{bindings.DocumentName.hints.mandatory}"
    columns="50"
    rows="1"
    maximumLength="#{bindings.DocumentName.hints.precision}"
    shortDesc="#{bindings.DocumentName.hints.tooltip}"
    id="it5" simple="false">
    <f:validator binding="#{bindings.DocumentName.validator}"/>
    </af:inputText>
    </f:facet>
    </af:panelFormLayout>
    </f:facet>
    <f:facet name="top"/>
    </af:panelStretchLayout>
    </f:facet>
    </af:panelStretchLayout>
    </af:panelGroupLayout>
    </f:facet>
    </af:decorativeBox>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    </af:document>
    </f:view>
    </jsp:root>
    and my log file is
    <ViewHandlerImpl> <_checkTimestamp> Apache Trinidad is running with time-stamp checking enabled. This should not be used in a production environment. See the org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION property in WEB-INF/web.xml
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
    the method am calling is
        public BlobDomain downloadImage() {
            FacesContext facesContext = null;
            OutputStream outputStream = null;
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            // get an ADF attributevalue from the ADF page definitions
            AttributeBinding attr = (AttributeBinding)bindings.getControlBinding("Documentimage");
            if (attr == null) {
                return null;
            // the value is a BlobDomain data type
            BlobDomain blob = (BlobDomain)attr.getInputValue();
            try { // copy hte data from the BlobDomain to the output stream
                IOUtils.copy(blob.getInputStream(), outputStream);
                // cloase the blob to release the recources
                blob.closeInputStream();
                // flush the outout stream
                outputStream.flush();
            } catch (IOException e) {
                // handle errors
                e.printStackTrace();
                FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
                FacesContext.getCurrentInstance().addMessage(null, msg);
            return blob;
        }i get this error when clicking the button
    error when not able to download image
    <BeanHandler> <getStructure> Failed to build StructureDefinition for : sms4200.ImageBean
    <UIXEditableValue> <_isBeanValidationAvailable> A Bean Validation provider is not present, therefore bean validation is disabled
    Edited by: Tshifhiwa on 2012/06/03 10:53 AM
    Edited by: Tshifhiwa on 2012/06/03 10:56 AM
    Edited by: Tshifhiwa on 2012/06/03 10:57 AM

    hi i try to run your sample am geting this error
    Error 500--Internal Server Error
    oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/HRDS
         at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1453)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:329)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:600)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:417)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8972)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.sendPoolMessage(ApplicationPoolImpl.java:4606)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.prepareApplicationModule(ApplicationPoolImpl.java:2536)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(ApplicationPoolImpl.java:2346)
         at oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(ApplicationPoolImpl.java:3245)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:571)
         at oracle.jbo.http.HttpSessionCookieImpl.useApplicationModule(HttpSessionCookieImpl.java:234)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:504)
         at oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(SessionCookieImpl.java:499)
         at oracle.adf.model.bc4j.DCJboDataControl.initializeApplicationModule(DCJboDataControl.java:517)
         at oracle.adf.model.bc4j.DCJboDataControl.getApplicationModule(DCJboDataControl.java:867)
         at oracle.adf.model.binding.DCDataControl.setErrorHandler(DCDataControl.java:487)
         at oracle.jbo.uicli.binding.JUApplication.setErrorHandler(JUApplication.java:261)
         at oracle.adf.model.BindingContext.put(BindingContext.java:1318)
         at oracle.adf.model.binding.DCDataControlReference.getDataControl(DCDataControlReference.java:247)
         at oracle.adf.model.BindingContext.instantiateDataControl(BindingContext.java:1020)
         at oracle.adf.model.dcframe.DataControlFrameImpl.doFindDataControl(DataControlFrameImpl.java:1645)
         at oracle.adf.model.dcframe.DataControlFrameImpl.internalFindDataControl(DataControlFrameImpl.java:1514)
         at oracle.adf.model.dcframe.DataControlFrameImpl.findDataControl(DataControlFrameImpl.java:1474)
         at oracle.adf.model.BindingContext.internalFindDataControl(BindingContext.java:1150)
         at oracle.adf.model.BindingContext.get(BindingContext.java:1103)
         at oracle.adf.model.binding.DCParameter.evaluateValue(DCParameter.java:82)
         at oracle.adf.model.binding.DCParameter.getValue(DCParameter.java:111)
         at oracle.adf.model.binding.DCBindingContainer.getChildByName(DCBindingContainer.java:2748)
         at oracle.adf.model.binding.DCBindingContainer.internalGet(DCBindingContainer.java:2796)
         at oracle.adf.model.binding.DCExecutableBinding.get(DCExecutableBinding.java:115)
         at oracle.adf.model.binding.DCUtil.findSpelObject(DCUtil.java:329)
         at oracle.adf.model.binding.DCBindingContainer.evaluateParameterWithElCheck(DCBindingContainer.java:1478)
         at oracle.adf.model.binding.DCBindingContainer.findDataControl(DCBindingContainer.java:1608)
         at oracle.adf.model.binding.DCIteratorBinding.initDataControl(DCIteratorBinding.java:2542)
         at oracle.adf.model.binding.DCIteratorBinding.getDataControl(DCIteratorBinding.java:2477)
         at oracle.adf.model.binding.DCIteratorBinding.getAttributeDefs(DCIteratorBinding.java:3319)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.fetchAttrDefs(JUCtrlValueBinding.java:514)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDefs(JUCtrlValueBinding.java:465)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:541)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeDef(JUCtrlValueBinding.java:531)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding$1JUAttributeDefHintsMap.(JUCtrlValueBinding.java:4104)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getAttributeHintsMap(JUCtrlValueBinding.java:4211)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.getHints(JUCtrlValueBinding.java:2564)
         at oracle.jbo.uicli.binding.JUCtrlValueBinding.internalGet(JUCtrlValueBinding.java:2389)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding.internalGet(FacesCtrlAttrsBinding.java:275)
         at oracle.adf.model.binding.DCControlBinding.get(DCControlBinding.java:749)
         at javax.el.MapELResolver.getValue(MapELResolver.java:164)
         at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
         at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
         at com.sun.el.parser.AstValue.getValue(Unknown Source)
         at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
         at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
         at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
         at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.getLabel(LabelLayoutRenderer.java:929)
         at oracle.adfinternal.view.faces.renderkit.rich.LabelLayoutRenderer.encodeAll(LabelLayoutRenderer.java:213)
         at oracle.adfinternal.view.faces.renderkit.rich.LabeledInputRenderer.encodeAll(LabeledInputRenderer.java:215)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1088)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.access$400(RegionRenderer.java:50)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:707)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer$ChildEncoderCallback.processComponent(RegionRenderer.java:692)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
         at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
         at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer._encodeChildren(RegionRenderer.java:297)
         at oracle.adfinternal.view.faces.renderkit.rich.RegionRenderer.encodeAll(RegionRenderer.java:186)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at oracle.adf.view.rich.component.fragment.UIXRegion.encodeEnd(UIXRegion.java:323)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeCenterFacet(PanelStretchLayoutRenderer.java:879)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeCenterPane(PanelStretchLayoutRenderer.java:1294)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer._encodeMiddlePanes(PanelStretchLayoutRenderer.java:351)
         at oracle.adfinternal.view.faces.renderkit.rich.PanelStretchLayoutRenderer.encodeAll(PanelStretchLayoutRenderer.java:316)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
         at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1277)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1659)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1655)
         at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
         at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:399)
         at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
         at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1027)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:334)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:232)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:313)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:122)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: While trying to lookup 'jdbc.HRDS' didn't find subcontext 'jdbc'. Resolved ''; remaining name 'jdbc/HRDS'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:247)
         at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:182)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at oracle.jbo.server.DBTransactionImpl.lookupDataSource(DBTransactionImpl.java:1439)
         ... 190 more
    my connection.xml is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <References xmlns="http://xmlns.oracle.com/adf/jndi">
    <Reference name="HRDS" className="oracle.jdeveloper.db.adapter.DatabaseProvider" credentialStoreKey="HRDS" xmlns="">
    <Factory className="oracle.jdeveloper.db.adapter.DatabaseProviderFactory"/>
    <RefAddresses>
    <StringRefAddr addrType="sid">
    <Contents>smsdev</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="subtype">
    <Contents>oraJDBC</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="port">
    <Contents>1521</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="hostname">
    <Contents>localhost</Contents>
    </StringRefAddr>
    <StringRefAddr addrType="user">
    <Contents>hr</Contents>
    </StringRefAddr>
    <SecureRefAddr addrType="password"/>
    <StringRefAddr addrType="oraDriverType">
    <Contents>thin</Contents>
    </StringRefAddr>
    </RefAddresses>
    </Reference>
    </References>
    Edited by: Tshifhiwa on 2012/06/04 2:20 PM

  • How can i show images from different folders  in image gallery

    Hi All,
             i have downloaded and executed photo viewer image gallery application.
              in that we r showing images sequentially what we have defined in xml file.
             but i want show images randomly or i want show images from different gallary.
    Can any one help me.
    thanks
    Raghu.

    WaqarLFC7 wrote:
    On Windows:
    Ctrl + click on the songs you want to group - then right click and click get info and it will ask you if you want to get info for multiple items click YES then under album name it whatever you want and them songs will be grouped into 1 album.
    Mac:
    Same procedure but hit SHIFT instead of CTRL.
    Actually, it's right click or ctrl click, same as windows.

  • How to create Image from 8-bit grayscal pixel matrix

    Hi,
    I am trying to display image from fingerprintscanner.
    To communicate with the scanner I use JNI
    I've wrote java code which get the image from C++ as a byte[].
    To display image I use as sample code from forum tring to display the image.
    http://forum.java.sun.com/thread.jspa?forumID=20&threadID=628129
    import java.awt.*;
    import java.awt.color.*;
    import java.awt.image.*;
    import java.io.*;
    import java.util.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class Example {
    public static void main(String[] args) throws IOException {
    final int H = 400;
    final int W = 600;
    byte[] pixels = createPixels(W*H);
    BufferedImage image = toImage(pixels, W, H);
    display(image);
    ImageIO.write(image, "jpeg", new File("static.jpeg"));
    public static void _main(String[] args) throws IOException {
    BufferedImage m = new BufferedImage(1, 1, BufferedImage.TYPE_BYTE_GRAY);
    WritableRaster r = m.getRaster();
    System.out.println(r.getClass());
    static byte[] createPixels(int size){
    byte[] pixels = new byte[size];
    Random r = new Random();
    r.nextBytes(pixels);
    return pixels;
    static BufferedImage toImage(byte[] pixels, int w, int h) {
    DataBuffer db = new DataBufferByte(pixels, w*h);
    WritableRaster raster = Raster.createInterleavedRaster(db,
    w, h, w, 1, new int[]{0}, null);
    ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
    ColorModel cm = new ComponentColorModel(cs, false, false,
    Transparency.OPAQUE, DataBuffer.TYPE_BYTE);
    return new BufferedImage(cm, raster, false, null);
    static void display(BufferedImage image) {
    final JFrame f = new JFrame("");
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.getContentPane().add(new JLabel(new ImageIcon(image)));
    f.pack();
    SwingUtilities.invokeLater(new Runnable(){
    public void run() {
    f.setLocationRelativeTo(null);
    f.setVisible(true);
    And I see only white pixels on black background.
    Here is description of C++ method:
    GetImage
    Syntax: unsigned char* GetImage(int handle)
    Description: This function grabs the image of a fingerprint from the UFIS scanner.
    Parameters: Handle of the scanner
    Return values: Pointer to 1D-array, which contains the 8-bit grayscale pixel matrix line by line.
    here is sample C++ code which works fine to show image in C++
    void Show(unsigned char * bitmap, int W, int H, CClientDC & ClientDC)
    int i, j;
    short color;
    for(i = 0; i < H; i++) {
         for(j = 0; j < W; j++) {
         color = (unsigned char)bitmap[j+i*W];
         ClientDC.SetPixel(j,i,RGB(color,color,color));
    Will appreciate your help .

    Hi Joel,
    The database nls parameters are:
    select * from nls_database_parameters;
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET CL8MSWIN1251
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 9.2.0.4.0
    Part of the email header:
    Content-Type: multipart/alternative; boundary="---=1T02D27M75MU981T02D27M75MU98"
    -----=1T02D27M75MU981T02D27M75MU98
    -----=1T02D27M75MU981T02D27M75MU98
    Content-Type: text/plain; charset=us-ascii
    -----=1T02D27M75MU981T02D27M75MU98
    Content-Type: text/html;
    -----=1T02D27M75MU981T02D27M75MU98--
    I think that something is wrong in the WWV_FLOW_MAIL package. In order to send 8-bit characters must be used UTL_SMTP.WRITE_ROW_DATA instead of the UTL_SMTP.WRITE_DATA.
    Regards,
    Roumen

  • System Image Utility 10.6.3 - fails when creating NetBoot image from DVD

    System Image Utility 10.6.3, trying to create a NetBoot image from a bundled installer disc that came with a 27" Late 2009 iMac (iMac11,1). Image creation fails consistently, since the image that System Image Utility creates is only 901M.
    Anyone see this before?
    Don
    --------- System Image Utility log ----------
    Workflow Started (2010-06-16 14:03:02 -0700)
    Starting action: Define Image Source
    Finished running action: Define Image Source
    Starting action: Create Image
    Starting image creation process...
    Create NetBoot Image
    Initiating NetBoot from Install Media.
    Creating working path at /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD
    Creating disk image (Size: 901 MB)
    Finalizing disk image.
    created: /Library/NetBoot/NetBootSP0/NetBoot of Mac OS X Install DVD/NetBoot.dmg
    Attaching disk image
    Installing to destination volume
    2010-06-16 14:03:38.126 installer[2365:6f03] Looking for system packages
    2010-06-16 14:03:38.129 installer[2365:6f03] no system packages found
    2010-06-16 14:03:38.130 installer[2365:6f03] No or Invalid system receipts found on /private/tmp/mnt.LjFArn
    2010-06-16 14:03:38.130 installer[2365:6f03] Attempting fallback using: /System/Library/PrivateFrameworks/SystemMigration.framework/Resources/FallbackS ystemFiles.plist
    2010-06-16 14:03:38.175 installer[2365:6f03] Finding system files...
    2010-06-16 14:03:38.619 installer[2365:6f03] Writing system path cache.
    2010-06-16 14:03:38.623 installer[2365:6f03] Error writing cache to /private/tmp/mnt.LjFArn/Library/Caches/com.apple.FindSystemFiles.plist
    2010-06-16 14:03:38.625 installer[2365:6f03] Failed to enumerate /tmp/mnt.LjFArn/Library/Caches, cannot prune (
    "com.apple.userpictureCache"
    installer: Package name is Mac OS X
    installer: Installing at base path /private/tmp/mnt.LjFArn
    installer: The install failed (There is not enough space on this disk to install the selected items. Deselect at least 6.46 GB and try again.)
    Script is done.
    NetBoot creation failed.
    Image creation process finished...
    Stopping image creation.
    Image creation failed.

    Brian Nesse wrote:
    Hi Don, here's my guess...
    The 901 number is additional space added in the scripts. This indicates that the source image size was 0.
    Since you are making a NetBoot from Install media, under the covers the installer process is being run to create a NetBoot volume. The media shipped with the 27" iMac is most likely CPU specific and thus the installation fails because you are trying to create the image (i.e. install the system) on an unsupported CPU.
    In order to produce a NetBoot from the install media, you'll have to create it on the 27" iMac.
    Hi Brian,
    Thanks for the response. This makes perfect sense. I'll give this a try and shout back!
    Thanks,
    Don

  • Deleting all images from iPhone (ios 6.1.4)

    I am currently trying to delete all the images from my phone to clear space for other applications.
    (Transferring them to my computer was an excruciating process and actually forced me to purchase an external program, but I digress.)
    I can't delete photos at all in the iPhone photos app. Going edit > select photo > delete causes the Photos app to crash every time. This happens whether I have selected one or more than one photos. I have restarted the app (double tap home button and delete the app from the fold-up menu) several times, but the problem recurs when I try again. In any case, I have over 37,000 photos so this would be a horribly inefficient way to do it.
    Key things to note
    1) I only have Windows 7 on my PC. Therefore, I cannot use any mac related programs like iPhoto to mass delete images.
    2) Windows explorer is unable to consistently recognize my iPhone. I have gone into device manager many times and reinstalled the driver, and attempted other fixes I found off of Google, but alas for past several months I have not been able to get it to recognize the iPhone as a camera or as anything at all. As of recent weeks, the iPhone does not even show up in the list of external devices plugged into the computer regardless of driver reinstallation, and only my external HDD appears.
    3) Back in the past when the Autoplay window did show up, there was never an option to import pictures and videos- furthermore, selecting the sole 'open device to view files' simply showed me a series of blank folders in my iPhone.
    At that time, I already had had my settings set to show hidden files and folders, so I was mystified that windows explorer insisted no files were present in the folders when there were quite obviously photos on my phone.
    I am unable to import photos using windows explorer. As such, this fix cannot be used: http://support.apple.com/kb/HT4083
    I am very disappointed at how nonfunctional the interaction between Windows and Apple devices has become. In the past, I was able to import pictures from my iphone 4S this same PC using windows explorer's autoplay popup, and it is sad that this is unsupported with the  iPhone 5.
    4) iTunes, which is on the same computer, does recognize the iPhone. I can sync perfectly fine.
    5) Very few of the images have been imported from my computer. Most of them were taken or saved on the phone itself, so removing sync of photos from the sync process doesn't do anything.
    6) There are no photos on Photo Stream or Photo Library, because I only recently found out about these features (1-2 days ago researching solutions). All 37,000+ photos are in Camera roll. This means that I cannot turn off Photo stream and have the pictures disappear like in this fix. https://discussions.apple.com/thread/5099543?start=0&tstart=0
    Given all of this information and my limitation in options, how do I delete all of the images on my phone efficiently?

    Incidentally, restoring the phone to factory settings is not a viable solution because I have a lot of apps, notes and other material which I do not wish to lose and would not be stored in a backup.

  • Help needed for downloading the image from Inage URL

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

  • Problem In moving 1 image from 1 panel to next and maintain size of original image?

    Why is it when i drag one image from the bottom panel over to another picture(solid color) i will only get 50% of the image and not the full image. Same thing when i copy and paste that image over the gray solid colored image also i will get only 50% of the image.  The original image of the cat(full view) is about 24.79%  and picture is 11.733 x 15.644 in size.  the other image (solid color) is at 43.63%  or 6.667 x 8.889". size is in inches. Do i have to resize the images and if so how as i am a stupie in this matter. The images are aligned side by side on the main panel or display.I am trying to place the cat over the gray background image  and with a layer mask delete the present baackground of the cat to uncover the gray of the bottom layer.  Thanks!!

    Probably the resolution of each image has a different value. You can check this in Image>resize>image size. The resolution is expressed in px/in.
    If you are attempting to place the cat on a plain gray background, try this:
    Set your foreground color chip  (lower left) to the shade of gray desired
    Open the picture with the cat
    Using one of the selection tools (e.g. Selection brush, lasso), select the cat
    Place the cat on a separate layer (Layer>new>layer via copy)
    Place a blank layer between the background layer and the cat layer
    Fill the blank layer with gray ( Edit>fill layer>foreground color)
    Use the move tool to position the cat, and resize, if necessary, with the corner handles of the bounding box.

  • How to copy and paste images from Internet to keynote on iPad?

    I want to make presentations on the go using Internet images and keynote. How can I get images from websites copied into my photo album, as that seems to be the only way you can add a image in keynote. Is there legal problems involved in it? Because I can do it no problem using my desktop etc.
    Thanks,
    Dave

    Click and drag is your friend!
    This thread probably belongs in the safari area, but anyway:
    If you click and hold, there should be a cursor that appears with a file. Then, simply drag it to your desktop where the file will appear.
    Or:
    Right-click (control-click) the picture and there should be a 'save image' or 'save image as' option. Select that, then save it!
    Afterwards, simply find the file in your screen saver options in system preferences, and then select it.
    Good Luck!

  • Editing Image From PDF File To Use in AI Document

    Hello,
    I am a beginner user of AI and am having trouble with editing certain images from PDF files on Illustrator. I'm not even sure what I'm trying to do can be done on Illustrator or requires Photoshop.
    A) Here is the first example (Note that this is only similar to the type of image I am talking about. It is not the exact one as I don't have access to it right now):
    So let's say here are the things I want to do. (1) Extract it from the PDF file, (2) transfer it to my AI document without blurriness, (3) change the white background of the image to another color (eg. grey), (4) and embolden the lines presently in the image. If you can advise what's the way to perform these tasks?
    I have used image trace at times but if the photo is too light, portions of it will vanish. The portions that do remain become way too bold. It would be great if there was a way I could make most if not each components of the image controllable/movable. Is it possible?
    Also, what if I want to erase some of the text on the image? I have tried using the eraser tool but it does not erase on images.
    B) How would I go about removing the background of a photo like this and replacing it with a color?
    Please keep in mind that I am a complete neophyte when it comes to using Illustrator, Photoshop etc so take this into consideration when explaining. Thanks in advance

    Trent,
    To make a clear and clean drawing like A), it is better to use the image as a locked template and recreate with the native tools; most things can be made with the Rectangle Tool and the Ellipse Tool, some with the Line Segment Tool or the Pen Tool; and you can use different Window>Pathfider operations.
    It is probably easier to get rid of the surroundings in B) using Photoshop where you can erase colours within a range; the grass seen through the windows may be treated by itself, and you may wish to keep the shadow.

  • Upload image from server in jdev release2 11.1.2.4.0?????

    HI i am using jdev 11.1.2.4.0
    my requirments are
    1.upload image from server
    2.display image and edited by using editor page like paint.
    3.save that edited copy also
    i am new i jdev,is this requirements are done by jdev,please help,i dont have any idea,please help????

    Unfortunately upgrading to 10.8.2 messes up your previously configured steps and you can no longer rely on Java Preferences to define your JDK setup.
    What I suggest is doing this:
    1) Delete your current JDev installation + the system directory
    2) Ensure that the symbolic link as described in step 3 of the following link is still present and points to actual file
    3) Follow the steps in this blog: https://blogs.oracle.com/blueberry/entry/how_to_saddle_your_mountain ... to reinstall JDev.
    This should get you back up and running.
    CM.

  • Can't copy text or images from webpages and paste into word documents or notepad

    Today suddenly I cannot copy text or images from webpages (I tried many different ones) and paste into my word 2010 document or notepad. What can I do to get this ability back. Yesterday it worked fine. It does not appear to be a problem with word or notepad so I have to assume it is a problem with Firefox

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

Maybe you are looking for

  • Error while opening the B2C Web Shop

    Hi All, Our Basis team has installed the JAVA Stack for CRM 7.0 EHP1. We can successfully open the XCM page for the web shop using the following URL: http://host:port/b2c/admin/xcm/init.do. We get a SAP E-Commerce Error page when we try to launch the

  • Skype is not working on my phone

    My skype to go number is not working on my cell phone. I call it and it doesn't ring, the skype menu options do not show up. Its completely without sound, but I can see that the call is going on because its connecting. I try to call other phones ever

  • Ora 6502 error in forms

    hi all, in created a insert form ,where in i have over ridden the 'when-button pressed' trigger. when the button is pressed all the data from the form is entered into the database. I am succeding in transferring the data into the database but ...' ge

  • How does one attach an image to a domain in mail?

    I understand how to attach a picture, or image, to a specific person in Apple's mail.  For example, I can attach a picture of, say, the Apple logo to the email addressed [email protected] However, it would be really useful if I could add a Apple logo

  • What to copy table entries from production to test

    Hello! After production client copying to TSTclient NNN the table Z* (concerned PA2001) was not copied completely... How could I transfer Z* table entries to TSTNNN? Via SCC8? Is pa2001 also need to be copy? Regards, Tonya