Draw image using paint() only once.
I am having performance issues with my application. It is creates a graph like data display. The display is static. However each time paint is called the image is re-rendered. I want it only rendered once to improve performance, I tried to do this using the following code:
public void paint(Graphics g){
if (alreadyRun) return;
//super.paint(g);
alreadyRun = true;
// draw graphics code
}Unfortunately the required image appears for a moment then disappears. Is there any way to render the image only once? Also, are there any other performance improving measures I can take? I was thinking of rendering only the part of the image that appears on screen (my graphics display is usually bigger than the actual screen size)
The common way to deal with performance like this is to draw the graph (or whatever) onto a BufferedImage then have the paint (or paintComponent in Swing) simply draw the image. The single draw image is quite fast and keeps the pixel values persistant across paints. If you already have a single image as the thread title hints, the paint shouldn't create much of a performance hit. The reason you are seeing your image disappear is that any time a window is resized, repacked, moved, covered up, or a multitude of other reasons, it calls paint again, so even with static data, there will be times the paint method is called again, causing your drawing to disappear.
Similar Messages
-
Loading image from jars only once in oracle forms 10g
Hi,
I have an oracle forms 10g application which loads image from a jar. Every time i click on a button "A" that loads the image "image" on another button "B" in the same screen, a message is displayed in the java console "Loaded image: jar:https://+IP+/forms/java/+myjar+.jar!/image.gif". So after 10 clicks, i get the same message displayed 10 times. In the form, i've called:
SET_CUSTOM_PROPERTY(p_object_name, 1, 'IMAGE_NAME_ON', '/'||p_image_name);My question is the following:
- is there a way to load this image once and use it later without having to load it every time i clik on "A"? if yes, how?
P.S.: if this thread shouldn't be posted in this forum, please redirect me to the right one.
Thanks in advanceAh okay.
I'm using the rolloverbutton.jar (RollOver Button PJC) [RolloverButton.java -> authors: Steve Button, Duncan Mills].
Here is the part concerning the IMAGE_NAME_ON function:
// make sure we are in rollover mode
enableRollover();
log("setProperty - IMAGE_NAME_ON value=" + value.toString());
// load the requested image
m_imageNameOn = (String) value;
loadImage(ON,m_imageNameOn);
// reset the currrently drawn image if needed
setImage(ON,m_state);
return true;where loadImage function is:
URL imageURL = null;
boolean loadSuccess = false;
//JAR
log("Searching JAR for " + imageName);
imageURL = getClass().getResource(imageName);
if (imageURL != null)
log("URL: " + imageURL.toString());
try
m_images[which] = Toolkit.getDefaultToolkit().getImage(imageURL);
loadSuccess = true;
log("Image found: " + imageURL.toString());
catch (Exception ilex)
log("Error loading image from JAR: " + ilex.toString());
else
log("Unable to find " + imageName + " in JAR");
//DOCBASE
if (loadSuccess == false)
log("Searching docbase for " + imageName);
try
if (imageName.toLowerCase().startsWith("http://")||imageName.toLowerCase().startsWith("https://"))
imageURL = new URL(imageName);
else
imageURL = new URL(m_codeBase.getProtocol() + "://" + m_codeBase.getHost() + ":" + m_codeBase.getPort() + imageName);
log("Constructed URL: " + imageURL.toString());
try
m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent());
loadSuccess = true;
log("Image found: " + imageURL.toString());
catch (Exception ilex)
log("Error reading image - " + ilex.toString());
catch (java.net.MalformedURLException urlex)
log("Error creating URL - " + urlex.toString());
//CODEBASE
if (loadSuccess == false)
log("Searching codebase for " + imageName);
try
imageURL = new URL(m_codeBase, imageName);
log("Constructed URL: " + imageURL.toString());
try
m_images[which] = createImage((java.awt.image.ImageProducer) imageURL.getContent());
loadSuccess = true;
log("Image found: " + imageURL.toString());
catch (Exception ilex)
log("Error reading image - " + ilex.toString());
catch (java.net.MalformedURLException urlex)
log("Error creating URL - " + urlex.toString());
if (loadSuccess == false)
log("Error image " + imageName + " could not be located");In this case, what shall i modify?
Thanks in advance -
Allow mail to sign using privateKey only once
I have my private key for signing and encrypting mail in a separate keychain from the login keychain. I want Mail to ask me every time whether it can use the private key, and up to now it has done so. First, I receive the prompt to enter the password for the separate keychain, then I'm asked whether I want to allow Mail to use the key just once, or every time. Recently, however, the second prompt hasn't been appearing. I think I must have clicked "Always Allow" once. I've looked through the keychains using Keychain Access but can't find what to modify to get things working as before. Does anybody know which key's access I have to modify?
Thanks,
RichardYes, I assumed that there is a key (as opposed to a password or certificate) in my login keychain or in my certificates keychain, which requires a separate password from that of my login, that Mail is using to digitally sign my email. Furthermore, that key's Access Control tab would contain an entry to the effect that Mail is always allowed access to the key. Then I would only have to delete the entry that always grants Mail access, and I would be back where I wanted to be, i.e., Mail would always ask to use the key. Unfortunately, although I could find a private key, it contained no entries for Mail.
At any rate, the problem disappeared as quickly as it had appeared. I quit Mail, then started it agin, and everything worked as before. I cannot explain why this happened.
MacBook Pro Core 2 Duo 2.33 GHz 17" glossy screen, MacBook Core 2 Duo 2 GHz Mac OS X (10.4.9) 2GB RAM -
Draw image using headless mode
We use a 3rd-party swing chart package to draw chart on the backend. Basically what we did is to add the chart(JComponent) to a JFrame, and take a snapshot. In the normal case with display device available, it works ok. If we use headless mode, it throws HeadlessException, and the frame is null.
Besides Xvfb, is there any simple way to generate JComponent image on the backend? Or can I render the chart in different container to generate the image?
Thanksyou need to override one of the container class where you put your graph component such that it works with default values or uses variable values for its methods from alternate sources.
-
Is it possible to draw image ouside Paint?
i m working j2me midp1.0, i want to draw an image directly from method call by pasing required arguments. Wat is way to do that.
Also tel me how to do the same in midp2.0. send me some code example if you have.is it possible to delete a he last line in a text area? this is my code , the problem is i cannot delete the last word i entered in the text field
import javax.swing.*;
//import javax.swing.text.*;
import java.awt.*; //for layout managers and more
import java.awt.event.*; //for action events
import java.awt.Color;
public class WordMorph extends JPanel implements ActionListener{
private final static String newline = "\n";
protected JTextField answer;
protected JTextArea a;
private JLabel name;
private JLabel time;
private JCheckBox stopButton;
private JLabel ans;
private JButton delete;
private JLabel word;
private JScrollPane scrollPane;
private JLabel lastword;
private JButton submitButton;
private JTextArea show;
public WordMorph(){
setLayout(null); //set the layout to null
//creating label and adding it to the container
name = new JLabel("GOT THE WORD GAME");
name.setFont(new Font("Serif", Font.ITALIC, 16));
add(name);
//creating label and adding it to the container
time = new JLabel("Time:");
add(time);
//creating checkbox and adding it to the container
stopButton = new JCheckBox("Stop the Time");
add(stopButton);
//creating label and adding it to the container
ans = new JLabel("ENTER ANSWER");
add(ans);
//creating textfield and adding it to the container
answer = new JTextField(10);
add(answer);
answer.addActionListener(this);
//creating button and adding it to the container
delete = new JButton("Remove the last Entry");
add(delete);
delete.addActionListener(this);
//creating label and adding it to the container
word = new JLabel("HEAD");
add(word);
//creating textarea and adding it to the container
a = new JTextArea(10,8);
add(a);
a.setEditable(false);
a.setBackground(Color.yellow);
scrollPane = new JScrollPane(a);
add(scrollPane);
//creating the label and adding it to the container
lastword = new JLabel("FOOT");
add(lastword);
//creating the submitButton and adding it to the container
submitButton = new JButton("Submit");
add(submitButton);
show = new JTextArea(10,15);
add(show);
//sets the location of the label for the title
Insets insets = getInsets();
Dimension size = name.getPreferredSize();
name.setBounds( 100+ insets.right, 5 + insets.top, size.width, size.height);
//sets the location of the time
size = time.getPreferredSize();
time.setBounds(25 + insets.left, 31 + insets.top,size.width, size.height);
//sets the location of the stopButton
size = stopButton.getPreferredSize();
stopButton.setBounds(150 + insets.left, 30 + insets.top,size.width, size.height);
//sets the location of the label
size = ans.getPreferredSize();
ans.setBounds(25 + insets.left, 55 + insets.top, size.width, size.height);
//sets the location of the textfield for the answer
size = answer.getPreferredSize();
answer.setBounds(25 + insets.left, 75 + insets.top, size.width, size.height);
//sets the location of the deleteButton
size = delete.getPreferredSize();
delete.setBounds(150 + insets.left, 70 + insets.top,size.width, size.height);
//sets the location of the label
size = word.getPreferredSize();
word.setBounds(25 + insets.left, 95 + insets.top,size.width, size.height);
//sets the location of the textarea
size = a.getPreferredSize();
a.setBounds(25 + insets.left, 115 + insets.top,size.width, size.height);
size = scrollPane.getPreferredSize();
scrollPane.setBounds(25 + insets.left, 115 + insets.top,size.width, size.height);
//sets the location of the lastword
size = lastword.getPreferredSize();
lastword.setBounds(25 + insets.left, 280 + insets.top,size.width, size.height);
//sets the location of the submitButton
size = submitButton.getPreferredSize();
submitButton.setBounds(25 + insets.left, 310 + insets.top,size.width, size.height);
//sets the location of the textArea
size = show.getPreferredSize();
show.setBounds(150 + insets.left, 115 + insets.top,size.width, size.height);
public void actionPerformed(ActionEvent evt) {
String text = answer.getText();
a.append(text + newline);
answer.selectAll();
//Make sure the new text is visible, even if there
//was a selection in the text area.
// a.setCaretPosition(a.getDocument().getLength());
if (evt.getSource() == delete)
removeAnswer(text, 0, 4);
//method for delete
public void removeAnswer(String s, int i, int j){
try { s = " ";
a.replaceRange(" ", 0, 4);
}catch (IllegalArgumentException e){}
private static void createAndShowGUI() {
//Create and set up the window.
JFrame frame = new JFrame("Word Morph");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Add contents to the window.
frame.add(new WordMorph());
//Display the window.
frame.pack();
frame.setVisible(true);
//Size and display the window.
Insets insets = frame.getInsets();
frame.setSize(350 + insets.left + insets.right,
350 + insets.top + insets.bottom);
frame.setVisible(true);
public static void main(String[] args) {
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
can some one help me regarding my problem? -
Hello y'all,
I don't mean to bother everyone with this issue, but usually immediately after plugging my iPhone into my computer it starts to sync and everything. Well now for some reason it doesn't erase the photos from the iPhone like it used to. How do I fix this???rabidrabbit wrote:
Can I back up my iPhone 4S to my ipad 3 (64 gb)?
no
rabidrabbit wrote:
However, now I don't have enough space in iCloud to backup either device. Why not?
iCloud only give so much space for free storage, then if you exceed the limit of 5gb you have to pay for additional storage. -
Have a app store gift card use it once, have a balance. Need a code for this card
If you've already redeemed the card then it's balance should be on your account, you shouldn't need to-enter it - I've never had to re-enter any of mine.
-
Problem in creating 1 image using differnt images
Dear Fellows I want to create an image by using different images in byte array format. Images may be transparent or normal images. I want final result in byte array. I am using the following technique which is working fine but the problem with this technique is that it takes too much time to create an image. This is because I am using MediaTraker. If I delete the code of MediaTracker then program have undeterministic behavior i.e, sometimes it create the final image properly and sometimes nothing is displayed in final image.
I need some help from you. If anyone of you know the technique to draw image using different images without using mediaTracker kindly let me know.
Early replies will be appreciated
// here is the sample code which i m using for creating image
byte[] backgroundImage= // read 800 X 600 image from disk and convert it in to byte array
byte[] image1 = // read 200 X 200 image from disk and convert it in to byte array
byte[] transparentImage // read 300 X 300 transparent image from disk and convert it in to byte array
Image img=null;
Frame frame =new Frame();
frame.addNotify();
//creating BufferedImage object to store Final image
BufferedImage requiredImage= new BufferedImage(800,600,BufferedImage.SCALE_SMOOTH);
//get Graphics of BufferedImage created above
Graphics2D g=(Graphics2D) requiredImage.getGraphics();
///// begin draw back ground image
img=Toolkit.getDefaultToolkit().createImage(backgroundImage);
try
MediaTracker mt = new MediaTracker(frame);
mt.addImage(img, 0); // adds image with ID 0
mt.waitForID(0);
}catch(Exception myex)
myex.printStackTrace();
//draw background starting from x=0, y=0 with 800 X 600 dimentions
g.drawImage(img,0,0,800,600,null);
////////// end draw background image
////////// begin draw image1
img=Toolkit.getDefaultToolkit().createImage(image1);
try
MediaTracker mt = new MediaTracker(frame);
mt.addImage(img, 0); // adds image with ID 0
mt.waitForID(0);
}catch(Exception myex)
myex.printStackTrace();
//draw image1 starting from x=10, y=10 with 200 X 200 dimentions
g.drawImage(img,10,10,200,200,null);
//////////// end draw image1
//////begin transparentImage
img=Toolkit.getDefaultToolkit().createImage(backData);
try
MediaTracker mt = new MediaTracker(frame);
mt.addImage(img, 0); // adds image with ID 0
mt.waitForID(0);
}catch(Exception myex)
myex.printStackTrace();
//draw transparentImage starting from x=400, y=0 with 300 X 300 dimentions
g.drawImage(img,400,0,300,300,null);
///end draw transparent image
byte []finalResult = //convert requiredImage into byte array;
you can mail me the solution on my email address [email protected]
thanks with best regards
and waiting for someone to reply
kamran zameeris there anyone on this forum to help me??????
regards,
kamran zameer -
Ok, I am basically making an arena for a local multiplayer game for my friends, and across the top of the screen is a title ... lets call the title "Game Title". The entire game is contained in 1 JFrame, including the title, sidebars, and the actual "game" part in the middle. I paint all of the objects in the game by painting them in the JFrame's Graphics when the paint() method is called.
Basically, the window looks like this:
| /\./\./\./\./\....Game Title..../\./\./\./\./\ |
|...........______________..............|
|...........|.--.game area.--..|..............|
|...........|_____________|..............|
Where the /\./\./\'s are animated flames. I have tried to just make them as ImageIcons in JLabels, but no matter what I paint() after the labels are added, the window looks like this:
| /\./\./\./\./\ .......................... /\./\./\./\./\ |
|.........................................................|
|.........................................................|
|.........................................................|
Where the flames are animated, but the "background" is always gray. I then tried to paint them as Images (g.drawImage(new ImageIcon(url).getImage(),0,0,null), but that only leaves the first frame of the animated GIF (in other words, its not animated).
What do I do? I have been reading around the forums, but I cannot find a case where somebody needed the GIF inside a Component that they used for painting...
Thanks for any help that you give!If you're going to paint use a graphic component to do your painting in and don't add any components to it. The 'paint' method in JFrame is called by swing to draw the JFrame and its components. Using it to do custom painting is tricky. You'll need to call 'super.paint' to allow the container to paint its children. See the method detail in the JFrame api (link is in the Container section of the api). Also check the 'paintComponent' and 'paint' methods in the JComponent api method details section.
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.*;
public class Painting extends JPanel
BufferedImage image;
public Painting(BufferedImage image)
this.image = image;
protected void paintComponent(Graphics g)
super.paintComponent(g);
g.drawImage(image, 125, 175, this);
private JPanel getTitlePanel()
JLabel title = new JLabel("Game Title", JLabel.CENTER);
JLabel flame1 = new JLabel("flames");
JLabel flame2 = new JLabel("flames");
JPanel panel = new JPanel(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
gbc.weightx = 1.0;
panel.add(flame1, gbc);
panel.add(title, gbc);
panel.add(flame2, gbc);
return panel;
public static void main(String[] args) throws IOException
String path = "images/Bird.gif";
BufferedImage bi = ImageIO.read(Painting.class.getResource(path));
Painting painting = new Painting(bi);
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(painting.getTitlePanel(), "North");
f.getContentPane().add(painting);
f.setSize(400,400);
f.setLocation(200,200);
f.setVisible(true);
} -
Using an NDS statement for a SQL stament run only once in a proceudure
Hi,
We're using Oracle 11.1.0.7.0.
I'm going through code written by someone else. In this package they're using NDS for every SQL call whether it gets called multiple times or just once. Is that a good thing?
I thought NDS was only reserved for SQL statements that get called over and over again in a procedure with possible varying 'WHERE clause' variables and so on...
Is there ANY benefit to using NDS for SQL queries called only once in a procedure?
ThanksThere is no benefit unless you want to turn PL/SQL into SQL*Plus (parse once, run once)
Procedures exist to make sure : parse at compile time, run many times.
The code is shooting itself in its own foot.
Or the developer must have got hold of Tom Kyte's unpublished one chapter book 'How to write unscalable applications'.
Sybrand Bakker
Senior Oracle DBA -
Hi All,
I am trying to execute the below code as provided from one of the blogs. i am able to run the job only once based on a file watcher object(i.e. for very first time) and after that the job is not running at all and if i schedule the job to run automatically based on interval of 10 or more minutes it is executing properly). Please let me know or guide me if i have missed any step or configuration.that is needed.
Version of Oracle 11.2.0.1.0
OS : Windows 7 Prof
Given all the necessary privileges
BEGIN
DBMS_SCHEDULER.CREATE_CREDENTIAL(
credential_name => 'cred',
username => 'XXXX',
password => 'XXXX');
END;
CREATE TABLE ZZZZ (WHEN timestamp, file_name varchar2(100),
file_size number, processed char(1));
CREATE OR REPLACE PROCEDURE YYYY
(payload IN sys.scheduler_filewatcher_result) AS
BEGIN
INSERT INTO ZZZZ VALUES
(payload.file_timestamp,
payload.directory_path || '/' || payload.actual_file_name,
payload.file_size,
'N');
END;
BEGIN
DBMS_SCHEDULER.CREATE_PROGRAM(
program_name => 'prog1',
program_type => 'stored_procedure',
program_action => 'YYYY',
number_of_arguments => 1,
enabled => FALSE);
DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
program_name => 'prog1',
metadata_attribute => 'event_message',
argument_position => 1);
DBMS_SCHEDULER.ENABLE('prog1');
END;
BEGIN
DBMS_SCHEDULER.CREATE_FILE_WATCHER(
file_watcher_name => 'file_watcher1',
directory_path => 'D:\AAAA',
file_name => '*.txt',
credential_name => 'cred',
destination => NULL,
enabled => FALSE);
END;
BEGIN
DBMS_SCHEDULER.CREATE_JOB(
job_name => 'job1',
program_name => 'prog1',
queue_spec => 'file_watcher1',
auto_drop => FALSE,
enabled => FALSE);
DBMS_SCHEDULER.SET_ATTRIBUTE('job1','PARALLEL_INSTANCES',TRUE);
END;
EXEC DBMS_SCHEDULER.ENABLE('file_watcher1,job1');
Regards,
kumar.Please post a copy and paste of a complete run of a test case, similar to what I have shown below.
SCOTT@orcl12c> SELECT banner FROM v$version
2 /
BANNER
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
5 rows selected.
SCOTT@orcl12c> CONN / AS SYSDBA
Connected.
SYS@orcl12c> -- set file watcher interval to one minute:
SYS@orcl12c> BEGIN
2 DBMS_SCHEDULER.SET_ATTRIBUTE
3 ('file_watcher_schedule',
4 'repeat_interval',
5 'freq=minutely; interval=1');
6 END;
7 /
PL/SQL procedure successfully completed.
SYS@orcl12c> CONNECT scott/tiger
Connected.
SCOTT@orcl12c> BEGIN
2 -- create credential using operating system user and password (fill in your own):
3 DBMS_SCHEDULER.CREATE_CREDENTIAL
4 (credential_name => 'cred',
5 username => '...',
6 password => '...');
7 END;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- create table to insert results into:
SCOTT@orcl12c> CREATE TABLE ZZZZ
2 (WHEN timestamp,
3 file_name varchar2(100),
4 file_size number,
5 processed char(1))
6 /
Table created.
SCOTT@orcl12c> -- create procedure to insert results:
SCOTT@orcl12c> CREATE OR REPLACE PROCEDURE YYYY
2 (payload IN sys.scheduler_filewatcher_result)
3 AS
4 BEGIN
5 INSERT INTO ZZZZ VALUES
6 (payload.file_timestamp,
7 payload.directory_path || '/' || payload.actual_file_name,
8 payload.file_size,
9 'N');
10 END;
11 /
Procedure created.
SCOTT@orcl12c> -- create program, define metadata, and enable:
SCOTT@orcl12c> BEGIN
2 DBMS_SCHEDULER.CREATE_PROGRAM
3 (program_name => 'prog1',
4 program_type => 'stored_procedure',
5 program_action => 'YYYY',
6 number_of_arguments => 1,
7 enabled => FALSE);
8 DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
9 program_name => 'prog1',
10 metadata_attribute => 'event_message',
11 argument_position => 1);
12 DBMS_SCHEDULER.ENABLE ('prog1');
13 END;
14 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> BEGIN
2 -- create file watcher:
3 DBMS_SCHEDULER.CREATE_FILE_WATCHER
4 (file_watcher_name => 'file_watcher1',
5 directory_path => 'c:\my_oracle_files',
6 file_name => 'f*.txt',
7 credential_name => 'cred',
8 destination => NULL,
9 enabled => FALSE);
10 END;
11 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> BEGIN
2 -- create job:
3 DBMS_SCHEDULER.CREATE_JOB
4 (job_name => 'job1',
5 program_name => 'prog1',
6 queue_spec => 'file_watcher1',
7 auto_drop => FALSE,
8 enabled => FALSE);
9 -- set attributes:
10 DBMS_SCHEDULER.SET_ATTRIBUTE ('job1', 'PARALLEL_INSTANCES', TRUE);
11 END;
12 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- enable:
SCOTT@orcl12c> EXEC DBMS_SCHEDULER.enable ('file_watcher1, job1');
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- write file (file must not exist previously):
SCOTT@orcl12c> CREATE OR REPLACE DIRECTORY upncommon_dir AS 'c:\my_oracle_files'
2 /
Directory created.
SCOTT@orcl12c> declare
2 filtyp utl_file.file_type;
3 begin
4 filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file1.txt', 'W', NULL);
5 utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
6 utl_file.fclose (filtyp);
7 end;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- check for results:
SCOTT@orcl12c> SELECT * FROM zzzz
2 /
WHEN
FILE_NAME
FILE_SIZE P
22-OCT-13 10.12.28.309000 PM
c:\my_oracle_files/file1.txt
57 N
1 row selected.
SCOTT@orcl12c> declare
2 filtyp utl_file.file_type;
3 begin
4 filtyp := utl_file.fopen ('UPNCOMMON_DIR', 'file2.txt', 'W', NULL);
5 utl_file.put_line (filtyp, 'File has arrived ' || SYSTIMESTAMP, TRUE);
6 utl_file.fclose (filtyp);
7 end;
8 /
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- wait long enough (may take more than one minute) for job to run:
SCOTT@orcl12c> EXEC DBMS_LOCK.SLEEP (100)
PL/SQL procedure successfully completed.
SCOTT@orcl12c> -- check for results:
SCOTT@orcl12c> SELECT * FROM zzzz
2 /
WHEN
FILE_NAME
FILE_SIZE P
22-OCT-13 10.12.28.309000 PM
c:\my_oracle_files/file1.txt
57 N
22-OCT-13 10.14.08.580000 PM
c:\my_oracle_files/file2.txt
57 N
2 rows selected. -
Can I chat or talk with a human on the phone? I have an Adobe ExportPDF Annual. So, if I cancel today, I still have to pay half of the fee? I only used the service once or twice. I was looking for a phone number to call. But, I seemed to have been in a loop. I kept getting directed to this forum. I would have really appreciated a quick link to a phone number. Much more efficient on my end.
I expected to be canceled in a few short minutes via a phone call. Instead of have been in this endless and frustrating loop to this forum.
Help please.Phone support | Orders, returns exchanges
http://helpx.adobe.com/x-productkb/global/phone-support-orders.html
Chat support - For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
Creative Cloud support (all Creative Cloud customer service issues)
http://helpx.adobe.com/x-productkb/global/service-ccm.html ( http://adobe.ly/19llvMN ) -
I have Lightroom 4 purchased in disk download format. I am considering purchasing a MacBook Pro but this doesn't have a CDRom. Can I use the serial code to download on to MacBook via the internet? I have only used the disks once for my iMac.
you need a lr serial for mac. the serial number for pc and mac are different.
you can download a trial lr 4 for your mac but you need a mac serial number to install.
Downloadable installation files available:
Suites and Programs: CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
Acrobat: XI, X | 9,8 | 9 standard
Premiere Elements: 13 |12 | 11, 10 | 9, 8, 7
Photoshop Elements: 13 |12 | 11, 10 | 9,8,7
Lightroom: 5.7.1| 5 | 4 | 3 | 2.7(win),2.7(mac)
Captivate: 8 | 7 | 6 | 5
Contribute: CS5 | CS4, CS3
Download and installation help for Adobe links
Download and installation help for Prodesigntools links are listed on most linked pages. They are critical; especially steps 1, 2 and 3. If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.
window using the Lightroom 3 link to see those 'Important Instructions'. -
Hello all,
I bought an iPhone 5 in the US and brought it back to Brasil. Now I'm trying to use Siri, but once I press the "home" button "voice control" appears and it only works for me to call my contacts. The manual guide tells me to go to Settings>General>Siri. At the General menu "Siri" doesn't appear. What should I do to set Siri up if it doesn't appear at settings>general?
Thank you,
Melanie.Go to Settings>General>Restrictions and make sure Siri is set to On.
-
How to use postback property for JSF to reneder a popup only once
Hi All,
I'm using java script function to show a JSF page as popup. I have called the javascript function on page load of another JSF page.
How do i make sure that the popup is getting rendered only once and not everytime the page is getting refreshed .
Can i use postback property in JSF page for this purpose ?
Thanks in Advance.try postback..
Boolean postBackValue = (Boolean)resolveExpression("#{adfFacesContext.postback}");
Boolean defaultBooleanValue = new Boolean("false");
if (postBackValue.equals(defaultBooleanValue)) {
public static Object resolveExpression(String expression) {
FacesContext ctx = FacesContext.getCurrentInstance();
Application app = ctx.getApplication();
ExpressionFactory elFactory = app.getExpressionFactory();
ELContext elContext = ctx.getELContext();
ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
return valueExp.getValue(elContext);
}
Maybe you are looking for
-
I'm using RH 8.0.2.208 (both patches applied). This project is a child project in a merged project structure and it is the only one that I am having problems publishing. I've tried deleting the CPD file and creating a new layout, but the error still
-
Exporting reports form SAP to MS Excel file
Dear All Our material number logic is like that having 18 digits "801062004767100001". 1. When we are exporting any std report or zreports to excel through Export to excel all the numbers are converting in to text and saving in excel file as it is d
-
Problem in finding java class file
I am writting an application using servlets , JSP and a simple java classfile. The simple java class file is for connection pool and the name of connection pool class is DBConnectionManager . I am using JavaWebserver2.0 and I have placed this class f
-
in my problem some one please tell me what should i do.
-
How can I connect ipad 3 to win7 home group?
Wie kann ich mein Ipad3 (neu) mit ios 5 in das windows7 Heimnetzwerk einbinden? How can I connect my i-pad 3 (new) ios5 with win7 homenet?