How do I generate formula with column of text?

I have a list of attendees to an upcoming party. Three columns - First Name, Last Name, Attendance.
In the "Attendance" column I have created drop down menues with 4 different text values regarding their attendance (Yes, No, Maybe, No Reply).
At the top of the page I would like to have a quick list table referencing the text values and count; would look like this:
Yes - 34
No - 12
Maybe - 24
No Reply - 13
How do I create this quick list with number count since the values in the "Attendance" column are text.
Thank you kindly!

Okay hotshot, I'm stuck again.
Now I want to gather the number of "Yeses" from two different tables. This is what I have tried so far but am stuck: =COUNTIF(Terry Allen :: Attendance,Ron Allen :: Attendance,"Yes")
There error message I received was "Countif requires 2 arguments, but was given 3."
I do have a way around it; just use your previous formula to tally up the number of yeses at the bottom of each table, and then sum it all up, but I would rather just cut to the chase and have it formulate directly in my quick list table at the top of the page.
Any thoughts? Thanks.
Message was edited by: beansupreme

Similar Messages

  • How I tie the formula with conditions type?

    Hi,
    Than create the formula with tcode O3I7:
    1) how I tie the formula with conditions type?
    2) how I tie the conditions type with the formula with Calculation Schema?
    help me, please.
    thanks
    Edited by: celeste ziantoni on Feb 5, 2008 6:45 PM

    Hello,
    Pricing formula is created using transaction VOFM. It is tied to the condition types in Pricing Procedure definition in Alternate Calculation Type column. For Pricing procedure, the menu path is SPRO->Materials Management->Purchasing->Conditions->Define Price Determination Process->Define Calculation Schema.
    Thanks,
    Venu

  • How to Create a Auto Generated number with some preceding text in Sharepoint 2010

    I am trying to create a auto generated number field in Sharepoint 2010 list item. My requirement is to have the following format number generated when new request is created in Sharepoint using form. Auto generated Ticket ID should be in the following format
    "IR13000" "IR13001" "IR13002"....... Please let me know how to get this done. I tried to use combination of default ID and Characters but its not working for new requests, its only reflecting for existing uploaded requests. I
    am trying this for taking up Ticket requests by filling up some fields in the form. Any quick help is much appreciated.
    Thanx

    Here are the steps:
    1 - Open your SharePoint site in SP Designer 2010.
    2 - Click Workflows and add a List workflow. Associate this workflow on the list where you want the Random Text to be generated.
    3 - Inside the workflow editor, select the Action "Update list item"
    4 -  Select 'Current Item'.
    5 - Click Add.. and select the field which needs to be updated with the Random Text. Make sure this column is not of type "Calculated" type, otherwise you won't see it in the list of the fields within the workflow.
    6 - Click "..." button in the next textbox which will open String Builder dialog box.
    7 - Type IR and then click 'Add or Change Lookup and select ID column from "Field from source". Hit OK.
    8 - It should look like IR[%Current Item:ID%]
    9 - Hit OK.
    10 - Save and publish the workflow. (Please note that currently this workflow is not set to auto run on creating new items. That's because we want to test it at this point of time).
    11 - Go to your list in SharePoint and create a new item. After creating, select the item and click Workflows and then run this workflow.
    12 - You should be able to see the text "IR1" in the designated column.
    13 - Once you see that it's working, go to SPD and set the workflow to run automatically on creation of the new item. Save and publish and then return to your list in SharePoint.
    14 - Create a new item there and you should see the Random value in the column.
    15 - You will also see the column in the New form. In order to remove it, go to List settings > content types > Item content type > and select Hidden for this column so that it doesn't showup in any form.
    Try it and let me know how it goes.
    Thanks,
    Ashish

  • How can we generate javadocs with Jdev3

    Hello,
    I'm using JDeveloper3 to create some javabeans. I don't know how I can generate javadocs from JDeveloper3 with JDK1.2.2
    Nicolas

    With this information I don't think, that the 7334 is the right board for your application. The 7334 is a motion control board for stepper motors. As control signals it provides a step signal with variable frequency and a direction signal (high or low for fwd. or rev. direction). The step signal is generated onboard and controls the motor's trajectory (acceleration, velocity, travel distance). The duty cycle of this signal can't be changed by the control program, so this signal can't be used for your application.
    The PWM outputs provided by the 7334 is static. That means, you can set frequency and duty cycle only in software, which is quite slow and introduces significant and non-deterministic jitter (due to the asynchronous communication to the 7334 this is even true if you are using a real-time operating system). These limitations don't seem to meet your requirements.
    I still don't have a good idea about your timing requirements. If your response times requirments are in the upper milisecond regions (10 ms and above), you might be able to use the 7334. If low jitter and fast response times are important to your application, there are several alternative solutions including LabVIEW Real-Time with a multifunction data acquisition board and LabVIEW FPGA with an R-Series board.
    Regards,
    Jochen

  • How do I generate URL with multiple variables from input fields?

    I'm creating an ad with four input text fields labels fname, lname, city and prov, and I wanted to know how to generate URLs based on information entered into the fields. The text fields default to display "First Name," "Last Name," "City" and "State," respectively, but if a user does not enter information in those fields, I want the URL to behave as if those were empty, if that makes sense. The text fields are in a movie clip called "input_text" and the button is labeled "send". If any of you can provide insight, I would be greatly appreciative. Thank you.

    1. use if-statements to see if the text properties of your textfields meets your requirements for creating that url.
    2. you can use the flash string methods and properties to create your url.
    p.s.  the plus sign + can be used to concatenate strings.

  • How to create Base Dimensions with MaxL and Text File?

    Hi,
    Doing a scratch rebuild of a cube every month. Don't want to have a 'dummy' outline with base dimensions to copy over every build. Instead want to build from text file somehow. Thus my plan is to: 1) Delete the existing app/db 2) Create a new blank app/db 3) Create the base dimensions in the outline via text file and 4) Build entire outline via a text file. I'm stuck on #3 how to get the 'base dimensions' built via text file. I need:
    ACCOUNTS
    PERIOD
    VALUE
    VIEWS
    SCENARIO
    CUSTOM4
    YEAR
    CUSTOM3
    CUSTOM2
    ENTITY
    CUSTOM1
    I see this MaxL, but it uses a 'rules file' and I never have built a rules file to create base dims so I'm confused if it's possible or not...
    import database sample.basic dimensions
    from data_file '/data/calcdat.txt'
    using rules_file '/data/rulesfile.rul'
    on error append to '/logs/dimbuild.log';

    We rebuild our Departments and Organization from an enterprise hierarchy master each week.
    The way we implemented (what you call #3) was to not do #1 and #2, but to have a "destructive" load rule for each of these dimensions using a text file. (in the "Dimension Build Settings" for the load rule, select "Remove Unspecified" to make it destructive)
    The text file just has the dimension name (parent) and any children we needed defined in a parent/child relationship. For instance
    "Sales Departments" "0100-All Departments"
    This essentially works the same as deleting the app because the destructive load rules will drop all the blocks of data that were unspecified.
    Then we run our SQL load rule to build the rest of the dimensions from the Location Master.
    We perform a level-0 export prior to this process, then reload the level-0 data and execute all the consolidation scripts to get the data back (now in a current enterprise defined hierarchy)

  • Numbers: How to create a spreadsheet with columns

    I would appreciate help with something which seems quite basic, but I cannot figure it out from the manual. I need to track invoices. I would like columns with invoice number, supplier`s name, dates, and then of course numbers. I cannot see how to change a column (in blank spreadsheet) labelled as `A` to `invoice number`, for example. I am truly in the wilderness when it comes to spreadsheets! Thank you.

    vista4444,
    Welcome to Numbers. Spreadsheets (or "tables" as they are refered to in Numbers) will always show columns headed A, B, C, etc. What you want to do is type your labels in the first row (header row) under those letters. Similarly, the A column is a header column for the rows. These headers have a special function: they are used to name rows and columns and cannot contain formulas. If using formulas in other cells, columns can be identified by either letter or name in the header below. The same is true for rows.
    You will know when the these headers are active when you see them shaded over near the far right of the format bar under the media icon.
    pw

  • How to create a view with columns from multiple rows

    I have posted this in SQL/PSL forum, but I hope database experts in this group can give me ideas too, also the need is from BI reports.
    I have a table, say, project_milestones, which has these columns in concern:
    proj_id, milestone_name, actual_end_date
    with data:
    proj_id, milestone_name, actual_end_date
    ===== ================ ==============
    1001, Key Element Approve, 2009-10-02
    1001, Final Synopsis, 2009-10-07
    1001, Final Protocol Approved, 2009-10-15
    1001, FPFV, 2010-01-10
    1001, LPFV, 2010-03-12
    1002, Key Element Approve, 2008-12-02
    1002, Final Synopsis, 2009-01-07
    1002, Final Protocol Approved, 2009-01-12
    1002, FPFV, 2009-03-30
    1002, LPFV, 2009-10-04
    There are about 10 milestones in each project.
    I have to create a view to flat these data at project level, looks like this:
    proj_id, key_element_date, final_synopsis_date, final_protocol_approved_date, FPFV_date, LPFV_date, key_element_to_final_synopsis_days, final_synopsis_final_protocol_days, ....
    How can I do this?
    Thanks,

    user9175541 wrote:
    I have posted this in SQL/PSL forum, but I hope database experts in this group can give me ideas too, also the need is from BI reports.
    I have a table, say, project_milestones, which has these columns in concern:
    proj_id, milestone_name, actual_end_date
    with data:
    proj_id, milestone_name, actual_end_date
    ===== ================ ==============
    1001, Key Element Approve, 2009-10-02
    1001, Final Synopsis, 2009-10-07
    1001, Final Protocol Approved, 2009-10-15
    1001, FPFV, 2010-01-10
    1001, LPFV, 2010-03-12
    1002, Key Element Approve, 2008-12-02
    1002, Final Synopsis, 2009-01-07
    1002, Final Protocol Approved, 2009-01-12
    1002, FPFV, 2009-03-30
    1002, LPFV, 2009-10-04
    There are about 10 milestones in each project.
    I have to create a view to flat these data at project level, looks like this:
    proj_id, key_element_date, final_synopsis_date, final_protocol_approved_date, FPFV_date, LPFV_date, key_element_to_final_synopsis_days, final_synopsis_final_protocol_days, ....
    How can I do this?
    Thanks,Create a pivot table and put "milestone_name" in the Columns section under the Labels.
    Put "actual_end_date" in the Measures section and change the Aggregation Rule to "Max."
    The rest of the attributes keep in Rows section.

  • How to integrate old formula with new as needed?

    I have a report which displays /processes rows based on the 'Product Family' which we have as a 3 char code.
    stringVar  first3 ;
    first3 := Mid ({REFERRF.RFDTA},1,3);
    if isnumeric(first3) then
        Mid ({REFERRF.RFDTA},4,30)
    else
        Mid ({REFERRF.RFDTA},1,30)
    However, the current report makes it's own grouping which the user wants to keep. he does want the new groups that I can get from that table as well. how do I integrate this formula?
    also new ones are custom and need to be separate from retail. so need to process this old way first. then not process these groups again (TRR, TRC etc) when processing by getting from table.
    SELECT {Command.PROD_FAMILY}
        CASE "TRR","TRC","TRP":
            "Trophies"
        CASE "PLQ":
            "Plaques"
        CASE "SGL", "TGL":
            "Crystals"
        CASE "MDL":
            "Medals, 2 in."
        CASE "MDM":
            "Medals, Insert"
        CASE "PIN","PNI":
            "Pins"
        CASE "CAC":
            "Acrylics"
        default:
            "UNDEFINED: " & {Command.PROD_FAMILY};
    so when my table has "CAC" I need the display heading to read 'ACRYLICS' in my logic i am getting the description from the same table but he doesn't want that for the above, only for any others.
    the report looks like this> so u see for CAC they want it displayed as ACRYLICS. If I keep the current logic when i read the table i have to not read for CAC. or do this some other way.
    Acrylics
    Price Break
    Range
    Number
    of Orders
    Number
    of Units
    Total Cost
    Total Sales
    1.  1 - 5
    837
    1,642
    5,327.06
    42,384.95
    2.  6 - 9
    121
    862
    2,403.05
    20,956.90
    3.  10 - 24
    150
    2,148
    5,718.42
    44,584.85
    4.  25 - 49
    32
    1,083
    2,956.16
    22,714.85
    5.  50 - 99
    21
    1,354
    3,532.94
    24,846.30
    6.  100 - 249
    7
    868
    2,586.26
    14,712.60
    7.  250+
    2
    1,800
    2,470.17
    12,258.50
    1,170
    9757
    24,994.05
    182,458.95

    Hi,
    The standard behaviour is that new instances of the process will use the most recent version of the process that has been deployed to the database. This allows you to deploy new versions of the processes without impacting on processes which are already in progress.
    When the workflow engine determines what activity to run next in the process, the engine checks what the start date of the process instance was, so that it can check what version of the process was active at that time. If you update the start date for each running process, so that it reflects the date that you saved the most recent version of the flow, then the workflow engine will use the latest version instead of the version that it was running.
    This is not supported. I would never suggest that you do this in a production environment - it does not make sense to be making frequent changes to the process in a production environment, since there is no supported mechanism for forcing existing flows to use the new definition. The engine is designed specifically to run the same version of the process for the duration of the process instance - what you want to do is to blow this out of the water completely. If you do change this, then all timing that is recorded against the activities becomes useless, and the other impact on the workflow process us something that you would need to consider incredibly carefully before deciding whether you want to take the risk.
    HTH,
    Matt
    WorkflowFAQ.com - the ONLY independent resource for Oracle Workflow development
    Alpha review chapters from my book "Developing With Oracle Workflow" are available via my website http://www.workflowfaq.com
    Have you read the blog at http://thoughts.workflowfaq.com ?
    WorkflowFAQ support forum: http://forum.workflowfaq.com

  • How to create tree table with column headers

    hi,
    when i drag and drop a view object onto my .jspx page as a af: tree table ,
    am not able to get the column header of each column. all the columns in the table are just clubbed together not separated as in af:table.
    can anyone say how the column headers are created for the columns when we drop a view object as a tree table?

    Hi,
    this is not an option with the treeTable as it gets rendered by default when dragging and dropping the collection to the page. I haven't tried it, but I think you will have to check which node is getting rendered and based on this information add your own row layout . Sounds like a bit of coding work
    Frank

  • How can I generate AVI with this code?

    Here is the code which I got
    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 JpegImagesToMovie 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.MSVIDEO));
         // 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(".avi") && !outputURL.endsWith(".AVI")) {
         System.err.println("The output file extension should end with a .avi 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);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.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;
    when I execute this file then no error comes but the output file do not get played on any player?
    where is the error?

    here is the code with QUICKTIME
    * @(#)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 JpegImagesToMovie 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);
         JpegImagesToMovie imageToMovie = new JpegImagesToMovie();
         imageToMovie.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;
    and here is the output
    C:\>java JpegImagesToMovie -w 1024 -h 768 -f 1 -o out.mov file:/c:/images/5.jpg file:/c:/images/6.jp
    g
    - create processor for the image datasource ...
    Setting the track format to: JPEG
    - create DataSink for: file:C:\\out.mov
    start processing...
    - reading image file: file:/c:/images/5.jpg
    - reading image file: file:/c:/images/6.jpg
    Done reading all images.
    Exception in thread "JMF thread: SendEventQueue: com.sun.media.processor.unknown.Handler" java.lang.
    NullPointerException
    at com.sun.media.multiplexer.video.QuicktimeMux.writeVideoSampleDescription(QuicktimeMux.jav
    a:936)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTSD(QuicktimeMux.java:925)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeSTBL(QuicktimeMux.java:905)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMINF(QuicktimeMux.java:806)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMDIA(QuicktimeMux.java:727)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeTRAK(QuicktimeMux.java:644)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeMOOV(QuicktimeMux.java:582)
    at com.sun.media.multiplexer.video.QuicktimeMux.writeFooter(QuicktimeMux.java:519)
    at com.sun.media.multiplexer.BasicMux.close(BasicMux.java:142)
    at com.sun.media.BasicMuxModule.doClose(BasicMuxModule.java:172)
    at com.sun.media.PlaybackEngine.doClose(PlaybackEngine.java:872)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doClose(BasicPlayer.java:229)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at JpegImagesToMovie.controllerUpdate(JpegImagesToMovie.java:196)
    at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254)
    at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
    at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQueue.java:65)
    at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)

  • How to do a JList with Columns???

    Hi... I'm trying to do a Zip compressor in Java... I don't know how, but i want to do it...
    But this is not my problem.... yet...
    I want to put the selected files (files to Zip) in a JList Object... but I want to show the FileName, the Size, the Date and the FilePath...
    For this I need to create Columns in my JList, but I don't know how I can do it...
    Please help me... or sugest some similar...
    Regards... and Sorry my English...

    [url http://java.sun.com/docs/books/tutorial/uiswing/components/table.html]How to Use Tables

  • How to override generated WSDL with existing WSDL file?

    Hi there,
    I am migrating our weblogic 8.1 web services to weblogic 10.1. As documented it is not possible to start implementing the web services from WSDL if the web services are based on XML Beans. Therefore I started from scratch, using an XML Beans Utility project and a web service started from Java. This works fine.
    I now have a web service with a generated WSDL file, but there are slight differences with the existing WSDL file.
    Is it possible to stop generating the WSDL file and just point to the existing WSDL files?
    I already tried to expose the WSDL and change the WSDL location but it still returns the generated WSDL instead of the WSDL file that I want.
    Thanks in advance,
    Martijn Baels
    Software Architect
    www.leanapps.com

    The value of an element is stored in a child node of that element. For example, let's say that "e" references the node <Description> then:
    e.getFirstChild().getNodeValue() => "My Test Case"

  • SQL Developer: How do I copy data with Column Headers from the output grid?

    Hello,
    I am using Version 2.1.1.64.
    I run a SQL query, I get the results grid in the "Query Result" window down below. Say I get 10 rows returned, with 5 columns.
    I want to Copy this entire grid, plus the column headers/names, to the clipboard. So I can paste it under the original query to document the results of that query.
    I can't find any way to do this. I can copy/paste the results grid, but it doesn't copy the headers.
    The only way I see to do it is to go through numerous steps to Export to a TXT file, then paste that. Unfortunately, that is a lot of wasted steps if I need to do this over and over, plus, the output gets pasted in an ugly format with double quotes, etc.
    It seems like the simplest functionality is to copy/paste the entire results grid, and of course you might the headers. Why is this so complicated/impossible to do?
    (I believe Toad has the same problem. DBArtisan allows you to copy/paste the entire results, plus headers, though.)
    Any assistance would be appreciated!
    Thanks,
    John

    Ah, ok...
    I had tried that before, and it didn't work, it seemed to copy the path of filename I was using. But I think that was because I had clicked on a Column Header first, and it had asked me if I wanted to filter. I think then it lost track that it was in the grid. It's a little flukey.
    What I did now was to click on an individual cell in the output, then hit CTRL-A to select all, then hit SHIFT-CTRL-C. That gives me exactly what I want.
    Thanks very much for your quick solution, I appreciate it!
    John

  • How can I generate tones with usb 6008 using analog out?... tia sal2

    Greetings All
    I've been looking at the example Sim Phone.vi that comes with labview and would like to generate similar tones out of our usb 6008 device. I can get a very faint sound out of our usb 6008 using the example Gen Multi Volt Updates-SW Timed.vi Does anyone know the best way to alter Sim Phone.vi to have the sound come out of the Analog output of our usb 6008 device. ( I have a small speaker connected to the Analog out on our USB 6008)
    PS: we are using labview 7.1
    Does anyone know the Analog output frequency range of the usb-6008? Is this possible?
    TIA
    Attachments:
    Gen Mult Volt Updates-SW Timed.vi ‏78 KB

    Hi sal2,
    As stated earlier you could most certainly use the USB device to generate sound, but that would be at a max update rate of 150 Hz. While according to Nyquist theorem you could get frequency information for signals below 75 Hz, you may notice that the quality of the data in that spectrum to be very low due to having so few samples.
    While technically possible to produce you really should look for a device with a faster Analog Output update rate. I would look for a device that supports Analog Output at least 10x the maximum frequency that you want the user to hear. Some great, yet lower cost products, would be the M-Series line of products. They would give you the performance that is really needed in the type of application that you are talking about.
    If you still want to use the USB Device, then you would need to use code similar to that found in the example Gen Mult Volt Updates-SW Timed (Found here: C:\Program Files\National Instruments\LabVIEW 7.1\examples\daqmxbase\Dynamic\ao).
    Best of luck getting your system together,
    Otis
    Training and Certification
    Product Support Engineer
    National Instruments

Maybe you are looking for

  • How to Generate XML File from Java Code.

    I want to generate the xml file from the java code. Could you plz suggest any webSite address with example?

  • Signal Repeater

    Hello, I have internet but the quality is poor, so the Verizon Extender does not work for me. I was looking at just voice signal booster. Could you tell me if this would work, I know that Verizon voice freq is 800mhz(850mhz). Need someone to confirm

  • How do I make my tabs open up to a blank page?

    I accidentally downloaded something that makes my mozilla firefox tabs open up to a yahoo search engine. How do I make it so when you open a tab, it opens up to a blank tab? == This happened == Every time Firefox opened == I accidentally downloaded s

  • Scom 2012 r2 - report viewer controls are not installed

    Hi  I'm stop on this error when installing the operation console and web console  report viewer controls are not installed  OS : Windows 2008 R2  SCOM Version : SCOM 2012 R2  I installed the install Report Viewer Redistribution 2008 SP1 and install R

  • Is Excel-Addin 9.3 Compatible with Essbase 7.0.1

    Hi all, I am getting the following error when i am trying to connect System 7 Essbase database through Excel 9.3 Ad din. Unknown Command [<NewAlt] in Report The Excel-ad din 7.0.1 works fine both with system 9 and system7 Essbase database.I am able t