Is it possible to ignore some events, while executing some code?

The problem is following: imagine the interface, consisting of three buttons - start, stop, save and one graph indicator. When one press start button some sequence of events is fired, and some data is shown on the graph (this sequence can be prolonged in time for a few hours). After completion of sequence one can save data. All is good except one thing: what will happen if start button have been pressed while execution? Start sequence will be fired again and previously acquired data will be lost. So the question is following: is it possible to erase (or ignore) some events from events stack?
Locking front panel is not good idea, because some other controls (for example stop) might be needed.
Making start
button disabled and grayed out is not good idea because user can click on that button (thus generate events) a lot of times before the disabling will occur.
Creation of data buffer for storing graphs is not good idea as well because it do not solves the problem.
www.xinstruments.com
Custom Software for Industrial Automation
www.hdrconverter.com
Picture processing made easy

In newer version of LabVIEW, you can use dynamic event registration. What is your version?
I would add e.g. a shift registers that keeps track of the state, then you can query it in each event case. Each event case will have a case structure inside wired to the state. States could be (0: new, 1: data has bee acquired, 2: all is saved, etc.). "Start" would only work if state is 0 or 2, "save" would only work if state is 1, etc.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • 'Time Our Error while executing some BW reports.'

    Hello BW experts ,
    We are getting the 'Time Our Error while executing some BW reports.'
    Could anyone help us to solve the above issue.
    regards,
    Amol.

    hi Amol,
    it may query performance problem,
    try to execute from RSRT,
    and click 'properties' from rsrt and try to set read mode = H query to read ... navigate or expand hierarchy
    and cache mode = 1.
    take a look following
    oss note
    557870 'FAQ BW Query Performance'
    and 567746 'Composite note BW 3.x performance Query and Web'.
    Prakash's weblog
    /people/prakash.darji/blog/2006/01/27/query-creation-checklist
    /people/prakash.darji/blog/2006/01/26/query-optimization
    BW Performance Tuning Knowledge Center - SAP Developer Network (SDN)
    Business Intelligence Performance Tuning [original link is broken]
    performance docs on query
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3f66ba90-0201-0010-ac8d-b61d8fd9abe9
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/cccad390-0201-0010-5093-fd9ec8157802
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ce7fb368-0601-0010-64ba-fadc985a1f94
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c8c4d794-0501-0010-a693-918a17e663cc
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/064fed90-0201-0010-13ae-b16fa4dab695

  • Client not modifiable message while executing t-code ops7 and ops6

    Hi Guru's,
    I am getting "Client not modifiable message while executing t-code ops7 and ops6" in Unit test and Quality client.
    Pleae help me to resolve the error.
    Regards
    Sasikanth Reddy

    Hi
    Copy of the information I found regarding this issue:
    It is possible to allow the maintenance of 'Customizing'-tables in a       
    production client, even if the client is set to 'not modifiable'.          
    Normally this should be the case for tables TCJ04 (responsible person)     
    and TCJ05 (applicant).                                                                               
    Please could you check the settings in your system and change it if        
    necessary:                                                                               
    Transaction SE11:                                                                               
    Table TCJ04: delivery class should be set to 'C'                           
          TCJ05: delivery class should be set to 'C'                                                                               
    Transaction SOBJ -> Maintain                                                                               
    Position on V_TCJ04: Category should be 'CUST' field 'current settings'    
    should be marked.                                                                               
    Position on V_TCJ05: Category should be 'CUST' field 'current settings'                                                                               
    Please also check that your client is defined as 'PRODUCTIVE' via          
    transaction SCC4 (field client role).                                                                               
    I would also recommend that you review the attached notes with reference   
    to the usage of customizing setting "current settings": Nr. 77430,         
    Nr. 135028, Nr. 356483. These are also relevant for your release.          
    Kind regards,
    Zhenbo

  • System is asking for password while executing t.code RSUDO

    Hi
    While executing t.code RSUDO ( Execute as user with restricted authorizations) on behalf of other user, system is asking for password.
    Can you tell the reason for it?
    System is BW 731.
    Thanks
    Saurabh

    Hi
    I had the same problem.
    What solved it for me was to add authorizations in PFCG for one of my roles
    The autorisation is : "Execution of transaction RSUDO without password"
    Heres what I added in PFCG:
    Authorization obj: R_SEC
    RSECADMOBJ:   RSUDO
    RSECADMVAL:   *
    ACTVT:                16
    Hope it will solved your problem.
    Robin

  • Ignore Mouse-Events while being in screensaver

    Hi,
    i am wondering if it is possible to "somehow" ignore Mouse-Input/Events while a screensaver (maybe a special one which offers that as option) is running.
    So basically that you can stop the screensaver only using your keyboard.
    Any idea is appreciated
    Best regards
    fidel

    Why? Maybe so it doesn't kick out of the screen saver when the mouse gets bumped?
    Anyway, you said any idea is appreciated, so the only way I can think of is if the screen saver is the Slideshow screen saver using iPhoto photos. Launch iPhoto, select an event and click on Slideshow. The photos will play like the Slideshow screen saver and moving the mouse will only bring up a small control window, which goes away in about a second after the mouse stops moving.
    A low tech option would be to disconnect the mouse.

  • Some events in color some not

    I'm a bit confused with iCal.  I've used it for a long time but this issue seems to be happening only recently. 
    I add an event and choose my "calendar" for it to be on so it is color coded... sometimes the there is just a dot of color and other times the entire event is the color I've chosen for my calendar. 
    I took a screen shot I hope it shows up here (I've never tried to attach one before).
    All the green ones are various jobs I go on.  Why do some like the 24th and 25th just have green dots and the 22nd and 23rd are all green?
    I don't care which I have but I'd like them to be all the same.  It is confusing when some are dots and some are all green. 
    thanks!
    Susan

    Susan,
    The colored dots represent timed events, while the colored bars represent "all-day" events.

  • Connection to OBI Sever is lost while executing some Pivot tables.

    Hi ,
    Wheneever i try to execute some Pivot tables (not all) ,the conncection to OBI Server is lost and throwing the following error:
    "Communication error when connecting to remote end point:address=& and;port=9703.(HY000)
    Please help me out.
    And some times cube governer limit exceeded eventhough i increased the limit in the config file.
    Thanks,
    Madhukar

    Hi,
    Which version of OBIEE you are using?Actually in 10.1.3.2 there is a bug for Pivot table.You have to apply a patch for this.
    Thanks
    Sandeep

  • ABAP runtime error while executing T.code : PC00_M40_CALC

    Hi,
    I have applied SAP note 1568264 - Budget Changes 2011 as released by
    SAP and i also applied the pre-requiste SAP notes mentioned in the
    above SAP note
    1) SAP Note 1558475- Amendments to IT calculation notified under
    circular:08/2010.
    2) SAP Note 1572614- Tax calculations inconsistent for emp. without a
    vaild PAN.
    3) SAP Note 1575366- HINCALC0:Tax calculation inconsistent in case of
    invalid PAN.
    After applying the SAP notes, when i am trying to execute the T.Code :
    PC00_M40_CALC, i am getting an "Abap runtime error"
    "  Error in the ABAP Application Program
    The current ABAP program "????????????????????????????????????????" had to be
      terminated because it has
    come across a statement that unfortunately cannot be executed.
    The following syntax error occurred in program "HINCALC0 " in include "PCTAXIN0
      " in
    line 905:
    ""ENDUZ-" expected, not "EDU_""
    The include has been created and last changed by:
    Created by: "SAP "
    Last changed by: "S2K_BASIS "
    Error in the ABAP Application Program
    The current ABAP program "????????????????????????????????????????" had to be
      terminated because it has
    come across a statement that unfortunately cannot be executed.   "
    Kindly suggest me what has to be done on priority basis.
    Regards
    Vish

    The dump error is generally encountered if your system is at a lower Support Pack level. For implementing Note 1568264 (Budget Changes 2011), you need to be at the below mentioned pre-requisite level corresponding to your Release:
    Prerequisites:
       Release     Support Package
         604         HRSP29
         600         HRSP63
         500         HRSP80
         470         HRSPB4
         46C         HRSPG9
    The correct sequence to implement the Notes is:
    SAP Note 1558475- Amendments to IT calculation notified under
    circular:08/2010.
    SAP Note 1572614- Tax calculations inconsistent for emp. without a
    vaild PAN.
    SAP Note 1575366- HINCALC0:Tax calculation inconsistent in case of
    invalid PAN.
    SAP Note 1568264- Budget Changes 2011
    This should solve the issue unless there is some problem while implementing the Notes.
    Regards,
    Nishtha

  • While executing T.code F.5D system give"doc splitting is active in compcode

    Dear  Team,
    We are in ECC 6.0 and we have our business area wise balance sheet active and for some Business areas, balance sheet are not matching because of Non updation of business area in Tax line item for which we had configured OBXM settings correctly.
    While executing F.5D, F.5E system throws an message "Document splitting is active for company code XXXX".
    In order to execute these transactions how can i move ahead?
    Please reply its needed.
    Thanks & regards,
    Sandeep Jain

    hi sandeep,
    The system must have 'document split' functionality activated.
    Document split functionality replaced SAPF180* programs, so these
    programs are not allowed to be executed for doc-split active company
    code.
    For more information about the NewGL and document splitting, please
    have a look to the added notes 826357 and 741821.
    If you decide not to use document splitting functionality, you may
    turn it off at IMG:Activate Document Splitting. Here, you can also
    deactivate the functionality per company code.
    Reg
    Madhu M

  • Errror while executing transaction code ME23N

    hi,
    Errror occurs while executing the transaction code ME23N
    error message as follows:-
       YOU ARE NOT AUTHORISED TO EXECUTE PROGRAM SAPLMEPO
    PLEASE SUGGEST SOME SOLUTIONS TO IT.

    Hi,
    Execute transaction ME23N. WHen you will get message for no authorization, enter /nSU53 in command field. System will display missing authorisation object frm your roles. Give this authorisation object along with values (or provide screeprint) to security person. He/ she may provide you required authorisation.

  • Java run time error while executing JavaFX code

    Hi
    I copied the code from [http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx|http://java.sun.com/javafx/1/tutorials/ui/overview/UIControls.fx] while
    reading in [http://java.sun.com/javafx/1/tutorials/ui/overview/#controls|http://java.sun.com/javafx/1/tutorials/ui/overview/#controls] tutorial and paste it to my
    netbeans editor but i got following error.
    init:
    deps-jar:
    compile:
    jar:
    standard-run:
    # An unexpected error has been detected by Java Runtime Environment:
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d94513f, pid=5152, tid=5996
    # Java VM: Java HotSpot(TM) Client VM (1.6.0_03-b05 mixed mode, sharing)
    # Problematic frame:
    # V  [jvm.dll+0xd513f]
    # An error report file with more information is saved as hs_err_pid5152.log
    # If you would like to submit a bug report, please visit:
    #   http://java.sun.com/webapps/bugreport/crash.jsp
    BUILD FAILED (total time: 18 seconds)can anyone tell whether its netbeans fault or javaFX. I am using netbeans 6.5.1 on windows vista. I have added following plugin in netbeans for javaFX
    *JavaFX Kit
    *JavaFX SDK for Windows
    is anyone also getting this error for this code and have solution for this.

    You are correct the crash is causing due to ToggleButton and ProgessBar. the code is correct because i tried it on eclipse 3.4 and it worked fine.This is definitely netbeans error. because its giving error even if u try to execute javafx code with just one ToggleButton or ProgressBar. I tried the following simple code in netbeans 6.5
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.control.ToggleButton;
    import javafx.scene.control.ProgressBar;
    var toggle=ToggleButton {
                    translateX:50
                    translateY:50
                    text: "First"
                    width:100
                    height:20
    var progress= ProgressBar {
            progress: bind ProgressBar.computeProgress( 100, 30 )
    Stage {
        title : "Toggle Button Test"
        scene: Scene {
            width: 200
            height: 200
            content: [ toggle
    } When i just added toggle button to contents then button showed up in window but on clicking it window disappear and compiler gave crash error on the other hand when i added just progess bar it just throws the error.The same code is running fine on eclipse
    Is there any workaround in netbeans for this if its a bug and if not what should i do to correct it.

  • Problem While Executing T.CODE DP90

    Hi,
      We have Upgrade our system from 4.6C to ECC6.
      We are facing following problem while executing Resource Related Billing request 
      Through Transaction code DP90.
    Process.
    1.     We are creating Sales Order and system will create Service order automatically as per the configuration.
    2.     In service order we have External as well internal operations ,
    Internal operations will be confirmed through IW41, and External Operations we are creating Purchase Requisition then creating PO and MIRO,
    After all Operations confirmed we will make Service order status as technically completed, then we are executing DP90 for Resource Related Billing, System will determine the material, combination of Cost element and Activity Type (Which is configured in T.Code ODP1) For External Operations System is Considering Activity Type for material determination in 4.6c but it is not considering Activity Type for Material Determination in ECC6 for External Operations.
       Please Help me,
    Edited by: D B on Apr 29, 2008 6:13 PM

    Hi Prashanth,
          Thanks for your reply, but all activity are valid in current period, in our Scenario in the old system for External Operations with combination of Activity type and Cost element system is determining material but where as in the new system for external operations it is not considering the Activity type and system is determining the material in the combination of   Cost element and Blank activity type so, we are getting different material in DP90.

  • Suppressed some coloum while executing in Background mode

    Hi All
    As I am trying to execute report in foreground mode I am getting ALV output properly with all coloum while I am executing the same report in background mode I am getting same output with some of the coloum is not coming properly.
    Please guide me to resolve the above issue.
    Thanks
    KRISH

    Hi All
    I am executing the custom report in foreground mode ALV output showing all columns for that same report I am executing in background mode some of the ALV output columns are missed out
    For example:
    Standard report output showing 10 columns, but I am executing the same report in background some of the columns are suppressed only I am able to view 5 columns remaining I am not able to view.
    Please help me to resolve the above issue.
    Thanks
    KRISH

  • Problem while executing the code( that covert jpeg images to movie)

    http://java.sun.com/products/java-media/jmf/2.1.1/solutions/JpegImagesToMovie.html
    here is the code:
    * @(#)JpegImagesToMovie.java     1.3 01/03/13
    * Copyright (c) 1999-2001 Sun Microsystems, Inc. All Rights Reserved.
    * Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
    * modify and redistribute this software in source and binary code form,
    * provided that i) this copyright notice and license appear on all copies of
    * the software; and ii) Licensee does not utilize the software in a manner
    * which is disparaging to Sun.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * This software is not designed or intended for use in on-line control of
    * aircraft, air traffic, aircraft navigation or aircraft communications; or in
    * the design, construction, operation or maintenance of any nuclear
    * facility. Licensee represents and warrants that it will not use or
    * redistribute the Software for such purposes.
    import java.io.*;
    import java.util.*;
    import java.awt.Dimension;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.media.datasink.*;
    import javax.media.format.VideoFormat;
    * This program takes a list of JPEG image files and convert them into
    * a QuickTime movie.
    public class JpegImagesToMovie3 implements ControllerListener, DataSinkListener {
    public boolean doIt(int width, int height, int frameRate, Vector inFiles, MediaLocator outML) {
         ImageDataSource ids = new ImageDataSource(width, height, frameRate, inFiles);
         Processor p;
         try {
         System.err.println("- create processor for the image datasource ...");
         p = Manager.createProcessor(ids);
         } catch (Exception e) {
         System.err.println("Yikes! Cannot create a processor from the data source.");
         return false;
         p.addControllerListener(this);
         // Put the Processor into configured state so we can set
         // some processing options on the processor.
         p.configure();
         if (!waitForState(p, p.Configured)) {
         System.err.println("Failed to configure the processor.");
         return false;
         // Set the output content descriptor to QuickTime.
         p.setContentDescriptor(new ContentDescriptor(FileTypeDescriptor.QUICKTIME));
         // Query for the processor for supported formats.
         // Then set it on the processor.
         TrackControl tcs[] = p.getTrackControls();
         Format f[] = tcs[0].getSupportedFormats();
         if (f == null || f.length <= 0) {
         System.err.println("The mux does not support the input format: " + tcs[0].getFormat());
         return false;
         tcs[0].setFormat(f[0]);
         System.err.println("Setting the track format to: " + f[0]);
         // We are done with programming the processor. Let's just
         // realize it.
         p.realize();
         if (!waitForState(p, p.Realized)) {
         System.err.println("Failed to realize the processor.");
         return false;
         // Now, we'll need to create a DataSink.
         DataSink dsink;
         if ((dsink = createDataSink(p, outML)) == null) {
         System.err.println("Failed to create a DataSink for the given output MediaLocator: " + outML);
         return false;
         dsink.addDataSinkListener(this);
         fileDone = false;
         System.err.println("start processing...");
         // OK, we can now start the actual transcoding.
         try {
         p.start();
         dsink.start();
         } catch (IOException e) {
         System.err.println("IO error during processing");
         return false;
         // Wait for EndOfStream event.
         waitForFileDone();
         // Cleanup.
         try {
         dsink.close();
         } catch (Exception e) {}
         p.removeControllerListener(this);
         System.err.println("...done processing.");
         return true;
    * Create the DataSink.
    DataSink createDataSink(Processor p, MediaLocator outML) {
         DataSource ds;
         if ((ds = p.getDataOutput()) == null) {
         System.err.println("Something is really wrong: the processor does not have an output DataSource");
         return null;
         DataSink dsink;
         try {
         System.err.println("- create DataSink for: " + outML);
         dsink = Manager.createDataSink(ds, outML);
         dsink.open();
         } catch (Exception e) {
         System.err.println("Cannot create the DataSink: " + e);
         return null;
         return dsink;
    Object waitSync = new Object();
    boolean stateTransitionOK = true;
    * Block until the processor has transitioned to the given state.
    * Return false if the transition failed.
    boolean waitForState(Processor p, int state) {
         synchronized (waitSync) {
         try {
              while (p.getState() < state && stateTransitionOK)
              waitSync.wait();
         } catch (Exception e) {}
         return stateTransitionOK;
    * Controller Listener.
    public void controllerUpdate(ControllerEvent evt) {
         if (evt instanceof ConfigureCompleteEvent ||
         evt instanceof RealizeCompleteEvent ||
         evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
              stateTransitionOK = true;
              waitSync.notifyAll();
         } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
              stateTransitionOK = false;
              waitSync.notifyAll();
         } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
    Object waitFileSync = new Object();
    boolean fileDone = false;
    boolean fileSuccess = true;
    * Block until file writing is done.
    boolean waitForFileDone() {
         synchronized (waitFileSync) {
         try {
              while (!fileDone)
              waitFileSync.wait();
         } catch (Exception e) {}
         return fileSuccess;
    * Event handler for the file writer.
    public void dataSinkUpdate(DataSinkEvent evt) {
         if (evt instanceof EndOfStreamEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              waitFileSync.notifyAll();
         } else if (evt instanceof DataSinkErrorEvent) {
         synchronized (waitFileSync) {
              fileDone = true;
              fileSuccess = false;
              waitFileSync.notifyAll();
    public static void main(String args[]) {
         if (args.length == 0)
         prUsage();
         // Parse the arguments.
         int i = 0;
         int width = -1, height = -1, frameRate = 1;
         Vector inputFiles = new Vector();
         String outputURL = null;
         while (i < args.length) {
         if (args.equals("-w")) {
              i++;
              if (i >= args.length)
              prUsage();
              width = new Integer(args[i]).intValue();
         } else if (args[i].equals("-h")) {
              i++;
              if (i >= args.length)
              prUsage();
              height = new Integer(args[i]).intValue();
         } else if (args[i].equals("-f")) {
              i++;
              if (i >= args.length)
              prUsage();
              frameRate = new Integer(args[i]).intValue();
         } else if (args[i].equals("-o")) {
              i++;
              if (i >= args.length)
              prUsage();
              outputURL = args[i];
         } else {
              inputFiles.addElement(args[i]);
         i++;
         if (outputURL == null || inputFiles.size() == 0)
         prUsage();
         // Check for output file extension.
         if (!outputURL.endsWith(".mov") && !outputURL.endsWith(".MOV")) {
         System.err.println("The output file extension should end with a .mov extension");
         prUsage();
         if (width < 0 || height < 0) {
         System.err.println("Please specify the correct image size.");
         prUsage();
         // Check the frame rate.
         if (frameRate < 1)
         frameRate = 1;
         // Generate the output media locators.
         MediaLocator oml;
         if ((oml = createMediaLocator(outputURL)) == null) {
         System.err.println("Cannot build media locator from: " + outputURL);
         System.exit(0);
         JpegImagesToMovie3 imageToMovie3 = new JpegImagesToMovie3();
         imageToMovie3.doIt(width, height, frameRate, inputFiles, oml);
         System.exit(0);
    static void prUsage() {
         System.err.println("Usage: java JpegImagesToMovie -w <width> -h <height> -f <frame rate> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...");
         System.exit(-1);
    * Create a media locator from the given string.
    static MediaLocator createMediaLocator(String url) {
         MediaLocator ml;
         if (url.indexOf(":") > 0 && (ml = new MediaLocator(url)) != null)
         return ml;
         if (url.startsWith(File.separator)) {
         if ((ml = new MediaLocator("file:" + url)) != null)
              return ml;
         } else {
         String file = "file:" + System.getProperty("user.dir") + File.separator + url;
         if ((ml = new MediaLocator(file)) != null)
              return ml;
         return null;
    // Inner classes.
    * A DataSource to read from a list of JPEG image files and
    * turn that into a stream of JMF buffers.
    * The DataSource is not seekable or positionable.
    class ImageDataSource extends PullBufferDataSource {
         ImageSourceStream streams[];
         ImageDataSource(int width, int height, int frameRate, Vector images) {
         streams = new ImageSourceStream[1];
         streams[0] = new ImageSourceStream(width, height, frameRate, images);
         public void setLocator(MediaLocator source) {
         public MediaLocator getLocator() {
         return null;
         * Content type is of RAW since we are sending buffers of video
         * frames without a container format.
         public String getContentType() {
         return ContentDescriptor.RAW;
         public void connect() {
         public void disconnect() {
         public void start() {
         public void stop() {
         * Return the ImageSourceStreams.
         public PullBufferStream[] getStreams() {
         return streams;
         * We could have derived the duration from the number of
         * frames and frame rate. But for the purpose of this program,
         * it's not necessary.
         public Time getDuration() {
         return DURATION_UNKNOWN;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    * The source stream to go along with ImageDataSource.
    class ImageSourceStream implements PullBufferStream {
         Vector images;
         int width, height;
         VideoFormat format;
         int nextImage = 0;     // index of the next image to be read.
         boolean ended = false;
         public ImageSourceStream(int width, int height, int frameRate, Vector images) {
         this.width = width;
         this.height = height;
         this.images = images;
         format = new VideoFormat(VideoFormat.JPEG,
                        new Dimension(width, height),
                        Format.NOT_SPECIFIED,
                        Format.byteArray,
                        (float)frameRate);
         * We should never need to block assuming data are read from files.
         public boolean willReadBlock() {
         return false;
         * This is called from the Processor to read a frame worth
         * of video data.
         public void read(Buffer buf) throws IOException {
         // Check if we've finished all the frames.
         if (nextImage >= images.size()) {
              // We are done. Set EndOfMedia.
              System.err.println("Done reading all images.");
              buf.setEOM(true);
              buf.setOffset(0);
              buf.setLength(0);
              ended = true;
              return;
         String imageFile = (String)images.elementAt(nextImage);
         nextImage++;
         System.err.println(" - reading image file: " + imageFile);
         // Open a random access file for the next image.
         RandomAccessFile raFile;
         raFile = new RandomAccessFile(imageFile, "r");
         byte data[] = null;
         // Check the input buffer type & size.
         if (buf.getData() instanceof byte[])
              data = (byte[])buf.getData();
         // Check to see the given buffer is big enough for the frame.
         if (data == null || data.length < raFile.length()) {
              data = new byte[(int)raFile.length()];
              buf.setData(data);
         // Read the entire JPEG image from the file.
         raFile.readFully(data, 0, (int)raFile.length());
         System.err.println(" read " + raFile.length() + " bytes.");
         buf.setOffset(0);
         buf.setLength((int)raFile.length());
         buf.setFormat(format);
         buf.setFlags(buf.getFlags() | buf.FLAG_KEY_FRAME);
         // Close the random access file.
         raFile.close();
         * Return the format of each video frame. That will be JPEG.
         public Format getFormat() {
         return format;
         public ContentDescriptor getContentDescriptor() {
         return new ContentDescriptor(ContentDescriptor.RAW);
         public long getContentLength() {
         return 0;
         public boolean endOfStream() {
         return ended;
         public Object[] getControls() {
         return new Object[0];
         public Object getControl(String type) {
         return null;
    on executing with the command:
    java JpegImagesToMovie -w <width> -h <height> -f <frame rate per sec.> -o <output URL> <input JPEG file 1> <input JPEG file 2> ...
    comes this......
    Exception in thread"JMF thread:SendEventQueue:com.sun.media.processor.unknown Handler" java.lang.NullPointerException"
    plz help

    Don't forget to use the "Code Formatting Tags",
    see http://forum.java.sun.com/help.jspa?sec=formatting,
    so the posted code retains its original formatting.

  • Error while executing the code as sys user

    Hi,
    Below is the code that creates a procedure. Though the proc gets created successfully, while trying to execute it, I get the below error
    ORA-01031: insufficient privileges
    ORA-06512: at "SYS.DBMS_SESSION", line 101
    ORA-06512: at "SYS.MY_TEST_PROC", line 20
    ORA-06512: at line 1
    The proc is created by sys and executed by sys too
    create or replace procedure my_test_proc as
    TYPE CUR1 IS REF CURSOR;
    CURSOR c1 is
    select ename from SCOTT.emp where rownum <2;
    v_name varchar2(30);
    MY_CUR CUR1;
    STRQRY VARCHAR2(2000);
    L_PARAM DBMS_SQL.VARCHAR2S;
    CNT NUMBER;
    V_DATA SCOTT.EMP%ROWTYPE;
    BEGIN
    STRQRY := 'SELECT * FROM SCOTT.EMP WHERE 1 =1 and (( 1= 1) ';
    CNT := 0;
    open c1;
    loop
    fetch c1 into v_name;
    exit when c1%notfound;
    CNT := CNT + 1;
    dbms_session.set_context('MY_CTX','ENAME_' || CNT, V_NAME);
    STRQRY := STRQRY || ' OR (ENAME = SYS_CONTEXT(''MY_CTX'',''ENAME_1'')';
    end loop;
    DBMS_OUTPUT.PUT_LINE(STRQRY || ')');
    CLOSE C1;
    END my_test_proc;
    ============================================================
    EXEC my_test_proc;
    Please help.

    >
    STRQRY := 'SELECT * FROM SCOTT.EMP WHERE 1 =1 and (( 1= 1) ';
    >
    The above query won't work because there is a syntax error.
    Count the numbers of left and right parentheses.
    Edit your post and use code tags and tell us which is line #20.
    My guess is that it is this line
    dbms_session.set_context('MY_CTX','ENAME_' || CNT, V_NAME); You don't show any code for the CONTEXT procedure. DBMS_SESSION.SET_CONTEXT in the PL/SQL Packages and Types doc
    See http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_sessio.htm#i1010942
    >
    The caller of SET_CONTEXT must be in the calling stack of a procedure that has been associated to the context namespace through a CREATE CONTEXT statement. The checking of the calling stack does not cross a DBMS boundary.

Maybe you are looking for

  • How to calculate the overall outgoing call duration in a month?

    I have seen Call register & similar items in all the phones. But, in my iphone 4, there is NO OPTION for me to calculate my monthly outgoing minutes / seconds (mine is per second billing). Due to this, I exceeded my quota in my last month bill & I ha

  • Using SwingWorker more than five times

    Hi there, I'm having a problem with the SwingWorker. A SwingWorker class is called for loading a large file into the database. After I have loaded five files to the database, the sixth loading isn't working and the GUI isn't responsing anymore. Is th

  • Motion 3 rendering and Slow time Soooo frustrating..

    Hello, I recently upgraded to Motion 3. I have all my programs closed and am running a 2g 2.16mgz mac book pro. I have it attached to 1 monitor. my question is what is it that I am doing that is making it run soo slow that I want to punch the screen.

  • Limited use of indexes in XE db?

    I tried to use reverse key index in my XE database, but I cannot... is this type of indexes disabled in XE db? where can I found a list of all limitations in Express edition database?

  • NSAPI addlog example

    I have been trying unsucessfully to get the NSAPI addlog example to work correctly. Although I can sucessfully compile and link the code when I add the required elements to the config files, I get the following when trying to start the server. [28/Ja