Images in jlabel -further query to peio1 and evert1234

hi,
I found a problem in bringing out images in jlabel.
thanks for evert1234 for your reply.
thanks for peio for your sample code.
I found an error "cannot resolve symbol"
for frame.getContentPane().I extended JFrame in the
class I implemented this init() method.
getContentPane is working correctly when called simply.
Being a UG student undertaking a training in java
swings I have a little maturity in java bugs.
please guide me.
yours friendly,
mohan raj

Hello ,
try to no rewritte a new topic for a same problem. You have only to do a reply..
For your problem try the further source.. I think it will help you
// ImageLabelExample.java
// Variations on a text & icon label.
import javax.swing.*;
import java.awt.*;
public class ImageLabelExample {
// put your address ICON
private static Icon icon = new ImageIcon("images/smile.gif");
public static void main(String[] args) {
JLabel l;
// create JLabel
     l=makeLabel(JLabel.TOP,JLabel.LEFT);
// Add the labels to a frame and display it
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container c = frame.getContentPane();
c.setLayout(new FlowLayout(FlowLayout.CENTER, 3, 3));
c.add(l);
frame.setSize(350,150);
frame.setVisible(true);
protected static JLabel makeLabel(int vert, int horiz) {
JLabel l = new JLabel("Smile", icon, SwingConstants.CENTER);
l.setVerticalTextPosition(vert);
l.setHorizontalTextPosition(horiz);
l.setBorder(BorderFactory.createLineBorder(Color.black));
return l;
Do not forget to give the Duke Dollars ;)
Thanks
Best regards

Similar Messages

  • Photo images from dig. cam [one is error and other won't open] questions

    My wife inserted the sd card in the card reader and copied about 70 photo image files to the Mac. The camera that took all the 70 photos was a Panasonic DMC-LZ5 but I don't think the camera model matters much here.
    For the first time, 2 of the many images seem to be corrupt. Mac X reports one photo image has an error while trying to open and reports the second image won't open.
    My main concern is whether or not to just delete the two error/corrupt jpg images. My other main concern is that I don't want to keep the two images if it could affect or corrupt my hd or Mac system in some way.
    I normally just trash corrupted files; however, in this case I went ahead and attempted to open both of the 2 troubled files myself later and they both opened up in Preview and didn't report any error or corruption. However, one of the jpg images defintely is corrupt when viewing it as the bottom of the image is definitely messed up. However, the other image now opens perfectly and looks fine to the eye as if nothing is wrong with it.
    Here is a link to the one photo image that isn't quite right [note the obvious distortion at bottom of image]. Link is http://mysite.verizon.net/vzenvo78/question595.jpg
    Further very relevant information: The SanDisk sd card that all the 70 images were on is a 1 gig card and the sd card seems to be a total loss. The sd card can't be initialized/formatted by disk utility and furthermore the sd card is no longer recognized by the Panasonic camera - the Panasonic camera won't even preview the images off the card or allow me to format the card even from the camera.

    Hello,
    I see what you are talking about. I just discovered this same exact problem on a friends G5 after he uploaded pics from his Leica.
    This is what I did: I ran Disk Utility from the system restore disc to verify and repair the drive. DU reported Volume Bitmap problems. DU was able to repair the disc. Next, I created a new user account and tried uploading the images from the camera to the G5 and it worked just fine. The images loaded like they should.
    I also reinstalled the drivers that came with the camera.
    Delete any files that your Mac reports as a problem. It's just not worth leaving them on the drive.
    So...... run Disk Utility from your system restore disc. If it reports errors, hopefully DU can repair them. If not, one option is to get DiskWarrior here:
    www.alsoft.com or TechToolPro4 here: www.micromat.com
    One other idea is how old is the card?
    Next idea is to create a new user acccount: System Prefs/Accounts. Try using that account to upload the same images. See if they upload as they should. If they do, then the issue isn't system wide, it's just in the other user account.
    Remember to always back up your images/audio/data often as you never know when you might need to do either an Archive or Erase and Reinstall.
    Carolyn

  • Using Lightroom 5.5 and Photoshop CC2014. Images no longer open in Photoshop when using "edit in" command. Photoshop opens but no image when trying to move between LR and PS. Any suggestions?

    Using Lightroom 5.5 and Photoshop CC2014. Images no longer open in Photoshop when using "edit in" command. Photoshop opens but no image when trying to move between LR and PS. Any suggestions?

    1. You have allowed Apple to auto-upgrade your Mac
    Turn off auto-update here:
    Menu > Apple > System Preferences > App Store
    2. The Icons on your dock are Aliases not real apps
    They point to where the apps really are which is:
    For Pages 5.2.2 in your Applications folder
    For Pages '09 in your Applications/iWork folder
    3. You are alternately opening documents randomly with either version of Pages
    Both Pages have the same file extension .pages and there is no certainty as to which version opens them when you double click on a file.
    right click on the file and choose which version you want to open it
    4. Pages '09 can not open Pages 5 files
    Pages 5 can not open Pages '08 files, and will convert and change Pages '09 and Word files.
    It will also auto save opened files into its own format.
    You can export these back to Pages '09 if you need to:
    Menu > File > Export > Pages '09
    5. Yes Pages 5.2.2 is a marked downgrade
    Pages 5.2.2 has a few improvements but has had over 110 features removed and is buggy.
    Sooner or later you will not be able to open a file or have it damaged in some way and it has a complex obscure file format largely incompatible with everything else, so you will not be able to rescue the contents of your file. If Pages or some third party server/eMail don't trash your file, eventually Apple will do it for you as it did when it released Pages 5 last September. I recommend using Pages '09 for the time being whilst you look for viable alternatives, some are here already and some are on the way.
    For further information about what has happened:
    http://www.freeforum101.com/iworktipsntrick/viewforum.php?f=22&sid=0882463378700 abf43a0f2433506bbbc&mforum=iworktipsntrick
    Peter

  • Images darken after editing in both Lightroom and PS

    My apologies if this topic has been recently addressed, I've canvassed both Adobe's online documentation as well as several archival pages of this thread without finding mention of it.
    I'm shooting JPEGs on a D70, importing them in Lightroom. LR has been working fine for me, except when I do adjustments on a jpg and then export it to PS with the 'Export Copy with LR Adjustments' option. The image shows up fine in PS as a .psd, and I can do all my editing on it fine, but when I then save it as a jpg, the resulting file will look dark and desaturated when viewed in Windows Picture and Fax Viewer, or when uploaded online. However, when viewed again in PS, the color looks fine.
    This occurs whether I export the file in ProPhoto or AdobeRGB color.
    Again, this issue only occurs if I edit the same file both in LR and PS. Files edited exclusively in either LR or PS look fine when saved as jpgs.
    I'm a little baffled here, and obviously it's a hindrance to my workflow not being able to do edits in both programs, so any help would be greatly appreciated.

    Jao,
    Thanks for taking the time to reply. I've come back to checking LR vs PS and the images look so much closer than they did last night. These are the same images without any further adjustments or change in the application prefs. I'm using two monitors but I've been viewing the images from both applications on the same monitor. My PS prefs are set-up correctly and my monitor was hardware calibrated less than a week ago.
    The only thing I can put this down to is that I launched LR after changing my main monitor from one to the other in the System prefs (where you drag the white top bar across to specify which is the start-up monitor) whereas last night I seem to remember having LR already launched before I switched monitors. As the monitor profiles are slightly different for each monitor because they're not the same LR must have adjusted the way it displayed according to the monitor profile at launch time. This is my best guess.
    Anyway, now I have a really good match from exporting JPG's from LR to a colour profile of sRGB so I didn't have to do any kind of conversion/adjustment/batch process in PS which is a relief as I've got 188 images I need to get printed at a lab at various sizes.
    Cheers
    Nas

  • View image based on the query

    view image based on the query
    hi i what to download my image based on the following query,am in jdeveloper 11g am using this method for download,i show the whole link of procedure where the query is located and how was it used in forms,but nw i what to take the query and put it in my java code not the webutil just the query,i put the whole forms package so you can undestand the logic of the query how was it used
        public void ViewImage(FacesContext facesContext, OutputStream outputStream)
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
            // get an ADF attributevalue from the ADF page definitions
            AttributeBinding attr = (AttributeBinding) bindings.getControlBinding("DocumentImage");
            if (attr == null)
                return;
            // the value is a BlobDomain data type
            BlobDomain blob = (BlobDomain) attr.getInputValue();
            try
            {   // copy the data from the BlobDomain to the output stream
                IOUtils.copy(blob.getInputStream(), outputStream);
                // cloase the blob to release the recources
                blob.closeInputStream();
                // flush the output stream
                outputStream.flush();
            catch (IOException e)
                // handle errors
                e.printStackTrace();
                FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, e.getMessage(), "");
                FacesContext.getCurrentInstance().addMessage(null, msg);
        }when i use the above method in diffient screen without the upload i get this error
    Target Unreachable, identifier 'viewImage' resolved to null
    Error     
    The file was not downloaded or was not downloaded correctly.
    the below procedure is how i what to download the image but in java,but usin query in below procedure
    function right_file (idref integer, i_file varchar2) return boolean is
    begin
         -- check directory
         -- file size
           if webutil_file.file_exists(dir ||'\' ||i_file) then
           return true;
           end if;
    return false;
    end;
    procedure download(i_dref integer, i_file varchar2) is
    file varchar2(50);
    dlin_id integer;
    l_success boolean;
    begin
         if not right_file (i_dref ,i_file ) then
                select file_name,dlin.id
                into file, dlin_id
                from sms_document_links dlin
                    ,sms_document_references dref
                where dref.id = i_dref
                and dref.dlin_id = dlin.id
       l_success :=  webutil_file_transfer.DB_To_Client
                         ( dir ||'\'|| file,
                           'SMS_DOCUMENT_LINKS',
                           'DOCUMENT_IMAGE',
                           'id = '||dlin_id);
      end if;          
    end download;
    procedure open_image (i_dref integer,i_file varchar2) is
    begin          
         local_path;
      local_viewer;       
         if I_file is not null then
              file := i_file;
         else
              select file_name into file
              from sms_document_references
              where id = i_dref
         end if;
         download(i_dref, file);
         if not webutil_host.ID_NULL(active_process) then
        close_previous_image_process;
         end if;
         image_dir_file := dir ||'\'|| file;
         process :=  webutil_host.nonblocking (image_viewer || image_dir_file);
         if webutil_host.ID_NULL(active_process) then
              active_process := process;
         end if;
         if webutil_host.equals(process,active_process) then
              null;
         else     
        close_previous_image_process;
        active_process := process;
         end if; 
         viewer_active := true;
    end;--

    oh ho.
    Dear user,
    this is not code factory/design factory/bla bla bla.
    this area for guide peoples where you are? what is way right to reach your target/goal. whatever in you words...
    from your post and also procedures, you are from forms background. am also came from ORacle froms 10g background try to understand. and implement it adf.
    back to topic:
    Target Unreachable, identifier 'viewImage' resolved to null Error .i just am giving the steps to igonre your error
    simple go to your taskflow - go to overview section - go to managed beans. configured you which you created bean say as x.java
    if you create following code can be seen in source
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="xx-V-TF">
        <default-activity id="__1">xxV</default-activity>
        <managed-bean id="__2">
          <managed-bean-name id="__4">SUP1040V</managed-bean-name>
          <managed-bean-class id="__5">com.x.x.view.xBeans.xxV</managed-bean-class>
          <managed-bean-scope id="__3">backingBean</managed-bean-scope>
        </managed-bean>
        <view id="xV">
          <page>/ReportsPageFragments/xxV.jsff</page>
        </view>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>

  • Changing images in JLabels

    I am creating a program which needs to display a grid of 7 by 7 images, as i am new to swing and fairly new to java i decided to use JLabels to show these images.
    I also need to be able to change these images, when buttons are clicked, i have set up the listeners for the buttons and the initial grid is correct however i cannot get the images to change?
    The JLabels are done as an array so each JLabel can be identified seperately.
    I have tried changing the labels eg Images=new JLabel("newimage.gif");
    and also I have tried creating other JLabels and doing things like
    Images[i]=newLabel //newLabel has the icon i want to use.
    I have repainting the screen and if i use the setText method on the JLabels then the text is displayed, however new images aren't
    do i need to not use JLabels, if so what can i use to do this?

    i tried using the setIcon function on my screen capture program and was unable to get it to update the image as long as the old image file was the same filename as the new image file. however if you change the image file name i got it to work fine......you just can't refresh an image of the same name if you've changed the content......

  • I dragged a cut out image from one photoshop document into another and now it is blurry. What to do?

    I dragged a cut out image from one photoshop document into another and now it is blurry. What can I do to prevent this?

    What is the resolution of the image that you "dragged"? The resolution is the number in pixels per inch (ppi). If you dragged a significantly lower resolution file into a higher resolution file, it could result in a blurry image.
    see below:
    For further reading of Key Concepts:
    http://www.adobe.com/designcenter-archive/keyconcepts/articles/concept_resolution.html
    You can determine the image size by choosing Image > Image Size
    below you can see the pixel dimensions of my example image.
    Resolution Basics:
    Adobe TV- http://tv.adobe.com/watch/creative-sweet-tv/photoshop-resolution-basics/
    http://tv.adobe.com/watch/visual-design/getting-started-09-resizing-an-image/
    Adobe Help:
    http://help.adobe.com/en_US/photoshop/cs/using/WSfd1234e1c4b69f30ea53e41001031ab64-7945a.h tml
    -janelle

  • Displaying Image using JLabel in swings

    I am not understanding how to display a image in swing using JLabel Component.
    I am writing in the following manner:
    // importing necessary packages
    in init() method
    public void init()
    Container cp= getContentPane()
    JLabel jl=new JLabel("Image",new ImageIcon("<image>.gif"),JLabel.CENTER);
    cp.add(jl);
    applet is running and only label msg is displaying but not the image.
    Please help me so that i can solve this problem.where the image is to be placed??and how it has to be included?
    Please provide me the solution.

    cp.add(new JLabel("Image",new ImageIcon(new java.net.URL (getCodeBase(),"Test.gif")),JLabel.CENTER));

  • Images in jlabel

    hi,
    I found a problem in bringing out images in jlabel.
    thanks for peio for your sample code.
    I found an error "cannot resolve symbol"
    for frame.getContentPane().I extended JFrame in the
    class I implemented this init() method.
    getContentPane is working correctly when called simply.
    Being a UG student undertaking a training in java
    swings I have a little maturity in java bugs.
    please guide me.
    yours friendly,
    mohan raj

    ImageIcon caches the previously loaded images and won't reload an image from the same source. Unfortunately, this is not documented in the public API but only in the source of ImageIcon.java.public class ImageIcon implements Icon, Serializable, Accessible {
        /* Keep references to the filename and location so that
         * alternate persistence schemes have the option to archive
         * images symbolically rather than including the image data
         * in the archive.
         */Use ImageIO#read to return an Image and the constructor of ImageIcon that takes an Image as parameter and you'll be set.
    db
    edit Next itme, no help. I dislike cross posters.
    [http://forums.sun.com/thread.jspa?threadID=5340651]
    Edited by: Darryl.Burke

  • Why are images on my desktop scrambled, chopped up, and behaving erratically?

    why are images on my desktop scrambled, chopped up, and behaving erratically?

    Exact model would be helpful
    Query by serial number
    Apple's warrenty database will identify the type of Mac you have.  Your serial number is securely sent, but you get only the name of your machine.
    https://selfsolve.apple.com/agreementWarrantyDynamic.do
    This site provides more information, but lacks security.
    "A serial number is a unique, identifying number or group of numbers and letters assigned to an individual piece of hardware or software. It's used for various things depending on the product / brand but what is your Mac's serial number for and more importantly... what is it hiding and what can it do for you ?"
    http://www.appleserialnumberinfo.com/Desktop/index.php
    You may have a problem with the video chip.
    Here is how to tell...
      Shutdown your machine.  Hold down the shift key.  Poweron.  Bootup will be longer.
        Wait awhile while you harddrive is being checked.
      An article on how to boot into safe mode.
        http://support.apple.com/kb/ht1455
    Runs OK in safe mode...
    Running in Safe mode leaves out some video drivers.  Which results in your machine not using advanced video hardware. As luck would have it, you can run the safe mode video drivers in normal mode.
    Here is how:
    https://discussions.apple.com/message/16057567#16057567
    Look through the above thread.  See the second page.  You don't have to read through the first page.  Just go to the part where I try a solution that works.
    Summary of G5 problems. Includes instructions on a hardware fix for the brave at heart:
    See -Rotten Apple- articles in both of these threads.
    https://discussions.apple.com/thread/4023152?tstart=0
    https://discussions.apple.com/message/18700825#18700825
    Robert

  • Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Hi! I need help, today I connected my mac Book Air to a tv for a presentation and as soon as I conected it the image on my screen went bigger. And I cant find the way to put it back as it was before. The Images are too big! heelp

    Morning DeeHutton,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at this article:
    iPhone: Hardware troubleshooting
    http://support.apple.com/kb/ts2802
    Best of luck,
    Mario

  • "IMAQ image to string" difference in 8.2 and 8.5

    My basic aim is to capture image from one computer and then send to another in LAN using TCP/IP. I have LabVIEW 8.5 and LabVIEW vision 8.5 in one and LabVIEW 8.2 and LabVIEW vision 8.2 in another. I capture an image in the computer whear I have installed 8.2 version of both and then flattened using " IMAQ image to string" and then sent it to computer using TCP/IP to computer with 8.5 version but the image is not displayed whearas when i do send that from 8.5 to 8.2 ( Capture the image in the computer with 8.2 and then flatten it to string and send it to the computer with 8.5 and display) , it works. Is it beacuse of different version of LabVIEW vision?

    Hi aman_bajra,
    You should be able to pass the image from one computer to another using TCP/IP, even if the computers have different versions of the Vision Development Module installed.  I tested this here and I had no difficulty sending the image from a computer running Vision 8.5 in LabVIEW 8.5 to a computer running Vision 8.2 in LabVIEW 8.2, or vice versa.  FYI, I used the normal Flatten to String node, not the IMAQ Image to String VI.  I have included the VIs I used to do this below.  Please give these a try and reply back if you are still unable to send your image properly.  Thanks.
    Rishee B.
    Applications Engineer
    National Instruments
    Message Edited by risheeb on 03-12-2008 12:24 PM
    Attachments:
    TCPIP Receive Image3.vi ‏45 KB
    TCPIP Send Image1.vi ‏74 KB

  • I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me..

    I need to pass a query in form of string to DBMS_XMLQUERY.GETXML package...the parameters to the query are date and varchar ..please help me build the string .Below is the query and the out put. ( the string is building fine except the parameters are with out quotes)
    here is the procedure
    create or replace
    procedure temp(
        P_MTR_ID VARCHAR2,
        P_FROM_DATE    IN DATE ,
        P_THROUGH_DATE IN DATE ) AS
        L_XML CLOB;
        l_query VARCHAR2(2000);
    BEGIN
    l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
       ' AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ',''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = '
        ||P_MTR_ID||
        ' AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE('
        ||P_FROM_DATE||
        ',''DD-MON-YY'') AND (TO_DATE('
        ||P_THROUGH_DATE||
        ','' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
    SELECT DBMS_XMLQUERY.GETXML('L_QUERY') INTO L_XML   FROM DUAL;
    INSERT INTO NK VALUES (L_XML);
    DBMS_OUTPUT.PUT_LINE('L_QUERY IS :'||L_QUERY);
    END;
    OUTPUT parameters are in bold (the issue is they are coming without single quotes otherwise th equery is fine
    L_QUERY IS :SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),'9999999.000') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),'$9,999,999.00') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),'9999999.000') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,'mm/dd/yyyy') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,'hh24:mi'), '00:00','24:00', TO_CHAR(s_datetime+.000011574,'hh24:mi')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '1'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,'DD-MON-YY') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = N3165 AND s_mtrch   = '2'
        AND s_datetime BETWEEN TO_DATE(01-JAN-13,'DD-MON-YY') AND (TO_DATE(31-JAN-13,' DD-MON-YY') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)

    The correct way to handle this is to use bind variables.
    And use DBMS_XMLGEN instead of DBMS_XMLQUERY :
    create or replace procedure temp (
      p_mtr_id       in varchar2
    , p_from_date    in date
    , p_through_date in date
    is
      l_xml   CLOB;
      l_query VARCHAR2(2000);
      l_ctx   dbms_xmlgen.ctxHandle;
    begin
      l_query:=  'SELECT
        a.s_datetime DATETIME,
        a.downdate Ending_date,
        a.downtime Ending_time,
        TO_CHAR(ROUND(a.downusage,3),''9999999.000'') kWh_Usage,
        TO_CHAR(ROUND(a.downcost,2),''$9,999,999.00'') kWh_cost,
        TO_CHAR(ROUND(B.DOWNUSAGE,3),''9999999.000'') KVARH
      FROM
        (SELECT s_datetime + .000011574 s_datetime,
          TO_CHAR(S_DATETIME ,''mm/dd/yyyy'') DOWNDATE,
          DECODE(TO_CHAR(s_datetime+.000011574 ,''hh24:'
          ||'mi''), ''00:'
          ||'00'',''24:'
          ||'00'', TO_CHAR(s_datetime+.000011574,''hh24:'
          ||'mi'')) downtime,
          s_usage downusage,
          s_cost downcost
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''1''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,''DD-MON-YY'') + 1)
        ) a,
        (SELECT s_datetime + .000011574 s_datetime,
          s_usage downusage
        FROM summary_qtrhour
        WHERE s_mtrid = :P_MTR_ID
        AND s_mtrch   = ''2''
        AND s_datetime BETWEEN TO_DATE(:P_FROM_DATE,''DD-MON-YY'')
                           AND (TO_DATE(:P_THROUGH_DATE,'' DD-MON-YY'') + 1)
        ) B
      where a.S_DATETIME = B.S_DATETIME(+)';
      l_ctx := dbms_xmlgen.newContext(l_query);
      dbms_xmlgen.setBindValue(l_ctx, 'P_MTR_ID', p_mtr_id);
      dbms_xmlgen.setBindValue(l_ctx, 'P_FROM_DATE', to_char(p_from_date, 'DD-MON-YY'));
      dbms_xmlgen.setBindValue(l_ctx, 'P_THROUGH_DATE', to_char(p_through_date, 'DD-MON-YY'));
      l_xml := dbms_xmlgen.getXML(l_ctx);
      dbms_xmlgen.closeContext(l_ctx);
      insert into nk values (l_xml);
    end;

  • Image Capture from iPhone to OS X and File Permissions

    Hello.  I'm running Lion 10.7.3 and have an iPhone 4S and iPad 2.  When I use the Image Capture app to transfer pictures and videos from my devices to OS X it works great with the exception of one problem.  Every file that it copies over ends up with permissions of:
    (Me): Read & Write
    everyone: No Access
    This is problematic because when my wife is logged into her profile or anyone else tries to view these files via shared folders, they can't see them.  I'm putting them into a folder I created on "Macintosh HD".  The folder that they are in has permission of:
    (Me): Read & Write
    wheel: Read only
    everyone: Read only
    Each time I import I suppose I could drop into Terminal and run a command to fix the issues but there must be a better way.
    Any ideas?  Thank you in advance.

    Got a solution using Automator.
    Create a workflow like:
    This is an Image Capture Plugin. When you open Automator select Image Capture as the type of workflow and select these two actions.
    Copy Finder Items will take the image from Image Capture and copy to your disk. Select the folder you want the image to go to in the To: pulldown. You should select the /Users/Shared folder and any subfolder you wish. I made a folder named Images.
    In the second action make sure Pass Input: is set to as arguments and then add the chmod 644
    Then exit Automator giving the workflow a name. In Image Capture you should see the workflow you just created
    in the Import To: pulldown. Select it. Now when you import the fiels wil be copied to the folder you specified and the permissions will be set to 644 rw for you r for everyone else.
    good luck. post back if you have any questions.
    (and this is in the Lion list so my question about Aperture above is meaningless! )

  • Passing parameters for a query throught XML and capturing response in the same

    Hi All,
    I have defined a RequestParameters object and i am passing paramerts for a query through XML and trying to capture the result in the same and send back to the source. In this case i am send XML from excel.
    Below is my XML format.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <Insert xmlns="http://tempuri.org/">
    <dataContractValue>
    <dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Insert</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52451</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52452</ACC_NO>
    <EMP_CITY>HYD</EMP_CITY>
    <EMP_NAME>RAKESH</EMP_NAME>
    <EMP_CONTACT>99664</EMP_CONTACT>
    <EMP_JOM>NOV</EMP_JOM>
    <EMP_SALARY>12345</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    <dsRequest>
    <SOURCE></SOURCE>
    <ACTION>Update</ACTION>
    <RequestParams>
    <RequestParams>
    <ACC_NO>52449</ACC_NO>
    <EMP_CITY>HYD1</EMP_CITY>
    <EMP_NAME>RAKESH1</EMP_NAME>
    <EMP_SALARY>1345</EMP_SALARY>
    </RequestParams>
    <RequestParams>
    <ACC_NO>52450</ACC_NO>
    <EMP_CITY>HYDer</EMP_CITY>
    <EMP_NAME>RAKEH</EMP_NAME>
    <EMP_SALARY>1235</EMP_SALARY>
    </RequestParams>
    </RequestParams>
    </dsRequest>
    </dsRequest>
    </dataContractValue>
    </Insert>
    </s:Body>
    </s:Envelope>
     Where i have a List of dsRequest and RequestParams, where i can send any number of requests for Insert,Update. I have two a XML element defined in RequestParams "RowsEffected","error" where the result will be caputred and is updated
    to the response XML.
    I have 6 defined in RequestParams
    EMP_SALARY(int),ACC_NO(int),EMP_CITY(string),EMP_NAME(string),EMP_CONTACT(string),EMP_JOM(string)
    My Question is:
    When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
                    ResponseParams.Add(
    newdsResponse()
                        ACTION = OriginalParams[a].ACTION,
                        SOURCE = OriginalParams[a].SOURCE,
                        Manager = OriginalParams[a].Manager,
                        RequestParams = OriginalParams[a].RequestParams
    Where the OriginalParams is dsRequest
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

    Hi Kristin,
    My project is, User will be giving the parameters in the excel, and using VBA, the values are captured and an XML is created in the above mentioned format and is send to web service for the Insert/Update.
    I created a webservice which reads the values from <datacontract> and it consist of list of <dsRequests> where any number of Insert/Upate commands can be executed, with in which it contains a list of <RequestParams> for multiple insertion/Updation.
    //function call
    OriginalParams = generator.Function(query, OriginalParams);
    where OriginalParams is List<dsRequest>
    //inside function
    command.Parameters.Add()// parameters adding
    int
    val = command.ExecuteNonQuery();
    after the execution,an XML element is added for the response part.and it is looped for all the RequestParams.
    OriginalParams[i].Result.Add(
    newResult()
    { ERROR = "No Error",
    ROWS_EFFECTEFD = 1 });
    //once all the execution is done the response building part
    for(inta
    = 0; a < OriginalParams.Count; a++)
                    ResponseParams.Add(
    newdsResponse()
                      Result = OriginalParams[a].Result
    QUEST: When i am trying to build response XML with the following code, the parameters which are not given in the Request XML are also appearing in the Response.
    Ex: In my update query i will only send three parameters, but in my response building with ablove code, i am getting all the variables defined as INT in the RequestParameters.
    Is there any way i can avoid this and build response with only the parameters given in the Request ??
    Appreciate ur help..Thanks
    Cronsey.

Maybe you are looking for