How to load a second array?

I have this code loading a set of thumbnails. Right now the
first set of thumbs loads fine but how to load my second array in a
new row?

Well my first idea would be that somewhere you are out of
scope and therefore you are getting an undefined somewhere in your
code.
So it might be trying to pass "undefined" as your url.
I would start with the debugger and step through the code to
make sure that it is able to get all the values it needs at every
step.
A good understanding of the debugger tool will save you tons
of time.
My next idea would be to split the code up using the command
pattern.
Also, since you only have two arrays, you could put an if
statement before incrementing the arr variable.
example:
if (arr < 2){
arr++;
}

Similar Messages

  • How to handle a second array?

    Hi all,
    I tried to add in a second array, but I got an error that said "unreachable code" for each aspect I entered using array b(the second array).
    // IntegerSet.java
    public class IntegerSet {
      private int [] a;  // holds a set of numbers from 0 - 100
      private int [] b;  // also holds numbers 0 - 100
      public IntegerSet () {
        // an empty set, all a[i] are set to 0
        a = new int [101];
        b = new int [101];
      // A constructor that copies from an existing set.
      public IntegerSet (IntegerSet existingSet) {
        a = new int [101];
        b = new int [101];
        for(int i=0; i<a.length; i++)
          a[i] = existingSet.a;
    for(int i=0; i <b.length; i++)
    b[i] = existingSet.b[i];
    public void deleteElement(int i) {
    if ((i >= 0) && (i < a.length))
    a[i] = 0; // set to 1
    if ((i >= 0) && (i < b.length))
    b[i] = 0;
    public void insertElement(int i) {
    if ((i >= 0) && (i < a.length))
    a[i] = 1; // set to 1
    if ((i >= 0) && (i < b.length))
    b[i] = 1; // set to 1
    public boolean isSet(int i) {
    return (a[i] == 1);
    return (b[i] == 1);
    // The union of this set and another set
    public IntegerSet unionOfIntegerSets(IntegerSet otherSet) {
    IntegerSet newSet = new IntegerSet(this);
    // newSet is now a copy of the current set. Next we want to union with set a
    for(int i=0; i<a.length; i++) {
    if (otherSet.isSet(i))
    newSet.insertElement(i);
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i))
    newSet.insertElement(i);
    return newSet;
    // The intersection of this set and another set
    public IntegerSet intersectionOfIntegerSets(IntegerSet otherSet) {
    IntegerSet newSet = new IntegerSet(this);
    // newSet is now a copy of the current set. Next we want to intersect with set a
    for(int i=0; i<a.length; i++) {
    if (!otherSet.isSet(i))
    newSet.deleteElement(i);
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i))
    newSet.deleteElement(i);
    return newSet;
    // return true if the set has no elements
    public boolean isEmpty() {
    for (int i=0; i<a.length; i++)
    if (isSet(i)) return false;
    return true;
    for (int i=0; i<b.length; i++)
    if (isSet(i)) return false;
    return true;
    // return the 'length' of a set
    public int returnLength() {
    int count = 0;
    for (int i=0; i<a.length; i++)
    if (isSet(i))
    count++;
    for (int i=0; i<b.length; i++)
    if (isSet(i))
    count++;
    return count;
    // Print a set to System.out
    public void setPrint() {
    System.out.print("[Set:");
    if (isEmpty())
    System.out.print("---");
    for (int i=0; i<a.length; i++) {
    if (isSet(i))
    System.out.print(" " + i);
    for (int i=0; i<b.length; i++) {
    if (isSet(i))
    System.out.print(" " + i);
    System.out.print("]\n");
    // return true if two sets are equal
    public boolean isEqualTo(IntegerSet otherSet) {
    for(int i=0; i<a.length; i++) {
    if (otherSet.isSet(i) != isSet(i))
    return false;
    return true;
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i) != isSet(i))
    return false;
    return true;
    // Small test program to verify that IntegerSet works!
    public static void main (String [] args) {
    IntegerSet smallEvens = new IntegerSet();
    IntegerSet smallOdds = new IntegerSet();
    for (int i=0; i < 101; i++)
    if ((i % 2) == 0)
    smallEvens.insertElement(i);
    else
    smallOdds.insertElement(i);
    System.out.print("smallEvens: ");
    smallEvens.setPrint();
    System.out.print("smallOdds: ");
    smallOdds.setPrint();
    IntegerSet union = smallEvens.unionOfIntegerSets(smallOdds);
    System.out.print("union: ");
    union.setPrint();
    IntegerSet intersection = smallEvens.intersectionOfIntegerSets(smallOdds);
    System.out.print("intersection: ");
    intersection.setPrint();
    // Output:
    // smallEvens: [Set: 0 2 4 6 8]
    // smallOdds: [Set: 1 3 5 7 9]
    // union: [Set: 0 1 2 3 4 5 6 7 8 9]
    // intersection: [Set:---]
    I'm guessing I probably put the braces wrong or something. Any ideas on how to fix this? I appreciate any help given. Thanks.

    All right, I edited part of the code, and put in comments to where the error occurs.
    public class IntegerSet {
      private int [] a;  // holds a set of numbers from 0 - 100
      private int [] b;  // also holds numbers 0 - 100
      public IntegerSet () {
        // an empty set, all a[i] are set to 0
        a = new int [101];
        b = new int [101];
      // A constructor that copies from an existing set.
      public IntegerSet (IntegerSet existingSet) {
        a = new int [101];
        b = new int [101];
        for(int i=0; i<a.length; i++)
          a[i] = existingSet.a;
    for(int i=0; i <b.length; i++)
    b[i] = existingSet.b[i];
    public void deleteElement(int i) {
    if ((i >= 0) && (i < a.length))
    a[i] = 0; // set to 1
    if ((i >= 0) && (i < b.length))
    b[i] = 0;
    public void insertElement(int i) {
    if ((i >= 0) && (i < a.length))
    a[i] = 1; // set to 1
    if ((i >= 0) && (i < b.length))
    b[i] = 1; // set to 1
    public boolean isSet(int i) {
    return (a[i] == 1 && b[i] == 1);
    // The union of this set and another set
    public IntegerSet unionOfIntegerSets(IntegerSet otherSet) {
    IntegerSet newSet = new IntegerSet(this);
    // newSet is now a copy of the current set. Next we want to union with set a
    for(int i=0; i<a.length; i++) {
    if (otherSet.isSet(i))
    newSet.insertElement(i);
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i))
    newSet.insertElement(i);
    return newSet;
    // The intersection of this set and another set
    public IntegerSet intersectionOfIntegerSets(IntegerSet otherSet) {
    IntegerSet newSet = new IntegerSet(this);
    // newSet is now a copy of the current set. Next we want to intersect with set a
    for(int i=0; i<a.length; i++) {
    if (!otherSet.isSet(i))
    newSet.deleteElement(i);
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i))
    newSet.deleteElement(i);
    return newSet;
    // return true if the set has no elements
    public boolean isEmpty() {
    for (int i=0; i<a.length; i++)
    if (isSet(i)) return false;
    return true;
    for (int i=0; i<b.length; i++) // unreachable statement
    if (isSet(i)) return false;
    return true;
    // return the 'length' of a set
    public int returnLength() {
    int count = 0;
    for (int i=0; i<a.length; i++)
    if (isSet(i))
    count++;
    for (int i=0; i<b.length; i++) // unreachable statement
    if (isSet(i))
    count++;
    return count;
    // Print a set to System.out
    public void setPrint() {
    System.out.print("[Set:");
    if (isEmpty())
    System.out.print("---");
    for (int i=0; i<a.length; i++) {
    if (isSet(i))
    System.out.print(" " + i);
    for (int i=0; i<b.length; i++) {
    if (isSet(i))
    System.out.print(" " + i);
    System.out.print("]\n");
    // return true if two sets are equal
    public boolean isEqualTo(IntegerSet otherSet) {
    for(int i=0; i<a.length; i++) {
    if (otherSet.isSet(i) != isSet(i))
    return false;
    return true;
    for(int i=0; i<b.length; i++) {
    if (otherSet.isSet(i) != isSet(i))
    return false;
    return true;
    // Small test program to verify that IntegerSet works!
    public static void main (String [] args) {
    IntegerSet smallEvens = new IntegerSet();
    IntegerSet smallOdds = new IntegerSet();
    for (int i=0; i < 101; i++)
    if ((i % 2) == 0)
    smallEvens.insertElement(i);
    else
    smallOdds.insertElement(i);
    System.out.print("smallEvens: ");
    smallEvens.setPrint();
    System.out.print("smallOdds: ");
    smallOdds.setPrint();
    IntegerSet union = smallEvens.unionOfIntegerSets(smallOdds);
    System.out.print("union: ");
    union.setPrint();
    IntegerSet intersection = smallEvens.intersectionOfIntegerSets(smallOdds);
    System.out.print("intersection: ");
    intersection.setPrint();
    // Output:
    // smallEvens: [Set: 0 2 4 6 8]
    // smallOdds: [Set: 1 3 5 7 9]
    // union: [Set: 0 1 2 3 4 5 6 7 8 9]
    // intersection: [Set:---]

  • I have poor/no service on my iphone 6  in places that I do have service on my old iphone 5.  Takes 10 minutes to send text and webpages will not load but load within seconds on the iphone 5 and forget making a phone call.  How do i resolve this issue??

    I have poor/no service on my iphone 6  in places that I do have service on my old iphone 5.  Takes 10 minutes to send text and webpages will not load but load within seconds on the iphone 5 and forget making a phone call.  How do i resolve this issue??

    Hey kristiac,
    Thanks for the question. If I understand correctly, you have no service on the iPhone. I would recommend that you read this article, it may be able to help the issue.
    If you can't connect to a cellular network or cellular data - Apple Support
    Thanks for using Apple Support Communities.
    Have a good one,
    Mario

  • How do i load my second copy on my laptop?

    i have one copy on my desktop, but when i try to load a second copy on my laptop, the systems reports valid Id, but no valid upgrade program

    I did.  My bad because a crash took the downloaded, old product and serial number with it.  Thanks for the hint about why things don't work as expected. 

  • "how to load a text file to oracle table"

    hi to all
    can anybody help me "how to load a text file to oracle table", this is first time i am doing, plz give me steps.
    Regards
    MKhaleel

    Usage: SQLLOAD keyword=value [,keyword=value,...]
    Valid Keywords:
    userid -- ORACLE username/password
    control -- Control file name
    log -- Log file name
    bad -- Bad file name
    data -- Data file name
    discard -- Discard file name
    discardmax -- Number of discards to allow (Default all)
    skip -- Number of logical records to skip (Default 0)
    load -- Number of logical records to load (Default all)
    errors -- Number of errors to allow (Default 50)
    rows -- Number of rows in conventional path bind array or between direct path data saves (Default: Conventional path 64, Direct path all)
    bindsize -- Size of conventional path bind array in bytes (Default 256000)
    silent -- Suppress messages during run (header, feedback, errors, discards, partitions)
    direct -- use direct path (Default FALSE)
    parfile -- parameter file: name of file that contains parameter specifications
    parallel -- do parallel load (Default FALSE)
    file -- File to allocate extents from
    skip_unusable_indexes -- disallow/allow unusable indexes or index partitions (Default FALSE)
    skip_index_maintenance -- do not maintain indexes, mark affected indexes as unusable (Default FALSE)
    commit_discontinued -- commit loaded rows when load is discontinued (Default FALSE)
    readsize -- Size of Read buffer (Default 1048576)
    external_table -- use external table for load; NOT_USED, GENERATE_ONLY, EXECUTE
    (Default NOT_USED)
    columnarrayrows -- Number of rows for direct path column array (Default 5000)
    streamsize -- Size of direct path stream buffer in bytes (Default 256000)
    multithreading -- use multithreading in direct path
    resumable -- enable or disable resumable for current session (Default FALSE)
    resumable_name -- text string to help identify resumable statement
    resumable_timeout -- wait time (in seconds) for RESUMABLE (Default 7200)
    PLEASE NOTE: Command-line parameters may be specified either by position or by keywords. An example of the former case is 'sqlldr scott/tiger foo'; an example of the latter is 'sqlldr control=foo userid=scott/tiger'. One may specify parameters by position before but not after parameters specified by keywords. For example, 'sqlldr scott/tiger control=foo logfile=log' is allowed, but 'sqlldr scott/tiger control=foo log' is not, even though the position of the parameter 'log' is correct.
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\PFS2004.CTL LOG=D:\PFS2004.LOG BAD=D:\PFS2004.BAD DATA=D:\PFS2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\CLAB2004.CTL LOG=D:\CLAB2004.LOG BAD=D:\CLAB2004.BAD DATA=D:\CLAB2004.CSV
    SQLLDR USERID=GROWSTAR/[email protected] CONTROL=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CTL LOG=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.LOG BAD=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.BAD DATA=D:\GROW\DEACTIVATESTAFF\DEACTIVATESTAFF.CSV

  • How do you create an array without using a shell on the FP?

    I want to be able to read the status of front panel controls (value, control box selection, etc.) and save it to a file, as a "configuration" file -- then be able to load it and have all the controls set to the same states as were saved in the file. I was thinking an array would be a way to do this, as I have done that in VB. (Saving it as a text file, then reading lines back into the array when the file is read and point the control(s) values/states to the corresponding array element.
    So how do I create an array of X dimensions without using a shell on the front panel? Or can someone suggest a better way to accomplish what I am after? (Datalogging doesn't allow for saving the status by a filename, so I
    do not want to go that route.)

    Thanks so much m3nth! This definitely looks like what I was wanting... just not really knowing how to get there.
    I'm not sure I follow all the icons. Is that an array (top left with 0 constant) in the top example? And if so, that gets back to part of my original question of how to create an array without using a shell on the FP. Do I follow your diagram correctly?
    If I seem a tad green... well I am.
    I hope you understand the LabVIEW environment and icons are still very new to me.
    Also, I had a response from an NI app. engineer about this problem. He sent me a couple of VI's that he threw together approaching this by using Keys. (I still think you are pointing to the best solution.) I assume he wouldn't mind m
    e posting his reply and the VI's for the sake of a good, thorough, Roundtable discussion. So here are his comments with VI's attached:
    "I was implementing this exact functionality this morning for an application I'm working on. I only have five controls I want to save, but they are all of different data types. I simply wrote a key for each control, and read back that key on initialization. I simply passed in property node values to the save VI at the end, and passed the values out to property nodes at
    the beginning. I've attached my initialize and save VI's for you to view. If you have so many controls that this would not be feasible, you may want to look into clustering the controls and saving the cluster as a datalog file.
    Attachments:
    Initialize_Settings.vi ‏55 KB
    Save_Settings.vi ‏52 KB

  • How to load a boot image to cisco aironet 1140 series after missing boot image

    Hi all,
    I need a solution for this. When i switch my cisco aironet 1140 , it s blinking with red light .and gives a message "no boot image to load".
    When i tried next time, by pressing escape it shows this message that i have mentioned below.
    ap:
    ap:
    using  eeprom values
    WRDTR,CLKTR: 0x83000800 0x40000000
    RQDC ,RFDC : 0x80000035 0x00000208
    using ÿÿÿÿ ddr static values from serial eeprom
    ddr init done
    Running Normal Memtest...
    Passed.
    IOS Bootloader - Starting system.
    FLASH CHIP:  Numonyx P33
    Checking for Over Erased blocks
    Xmodem file system is available.
    DDR values used from system serial eeprom.
    WRDTR,CLKTR: 0x83000800, 0x40000000
    RQDC, RFDC : 0x80000035, 0x00000208
    PCIE0: link is up.
    PCIE0: VC0 is active
    PCIE1: link is NOT up.
    PCIE1 port 1 not initialized
    PCIEx: initialization done
    flashfs[0]: 1 files, 1 directories
    flashfs[0]: 0 orphaned files, 0 orphaned directories
    flashfs[0]: Total bytes: 32385024
    flashfs[0]: Bytes used: 1536
    flashfs[0]: Bytes available: 32383488
    flashfs[0]: flashfs fsck took 16 seconds.
    Reading cookie from system serial eeprom...Done
    Base Ethernet MAC address: 28:94:0f:d6:c8:62
    Ethernet speed is 100 Mb - FULL duplex
    The system is unable to boot automatically because there
    are no bootable files.
    C1140 Boot Loader (C1140-BOOT-M) Version 12.4(23c)JA3, RELEASE SOFTWARE (fc1)
    Technical Support: http://www.cisco.com/techsupport
    Compiled Tue 18-Oct-11 14:51 by prod_rel_team
    ap:
    So , now my question is how to load the boot image ? From where will we get this ? OR
    I m also having another Cisco aironet 1140 , Can i get bootimage from that . Kindly let me know the solution from genius ?

    Take a look at this link as it should have the info you need
    https://supportforums.cisco.com/docs/DOC-14636
    Sent from Cisco Technical Support iPhone App

  • How to load color table in a indexed mode file??

    How to load color table in a indexed mode file??
    Actually, if i opened a indexed file and want to edit color table by loading another color table from desktop (or any other location), any way to do this through java scripting??

    continuing...
    I wrote a script to read a color table from a GIF file and save to an ACT color table file. I think it might be useful for someone.
    It goes a little more deeper than the code I posted before, as it now identifies the table size. It is important because it tells how much data to read.
    Some gif files, even if they are saved with a reduced palette (less than 256), they have all the bytes for the full color palette filled inside the file (sometimes with 0x000000). But, some gif files exported in PS via "save for web" for example, have the color table reduced to optimize file size.
    The script store all colors into an array, allowing some kind of sorting, or processing at will.
    It uses the xlib/Stream.js in xtools from Xbytor
    Here is the code:
    // reads the color table from a GIF image
    // saves to an ACT color table file format
    #include "xtools/xlib/Stream.js"
    // read the 0xA byte in hex format from the gif file
    // this byte has the color table size info at it's 3 last bits
    Stream.readByteHex = function(s) {
      function hexDigit(d) {
        if (d < 10) return d.toString();
        d -= 10;
        return String.fromCharCode('A'.charCodeAt(0) + d);
      var str = '';
      s = s.toString();
         var ch = s.charCodeAt(0xA);
        str += hexDigit(ch >> 4) + hexDigit(ch & 0xF);
      return str;
    // hex to bin conversion
    Math.base = function(n, to, from) {
         return parseInt(n, from || 10).toString(to);
    //load test image
    var img = Stream.readFromFile("~/file.gif");
    hex = Stream.readByteHex(img);      // hex string of the 0xA byte
    bin = Math.base(hex,2,16);          // binary string of the 0xA byte
    tableSize = bin.slice(5,8)          // Get the 3 bit info that defines size of the ct
    switch(tableSize)
    case '000': // 6 bytes table
      tablSize = 2
      break;
    case '001': // 12 bytes table
      tablSize = 4
      break;
    case '010': // 24 bytes table
      tablSize = 8
      break;
    case '011': // 48 bytes table
      tablSize = 16
      break;
    case '100': // 96 bytes table
      tablSize = 32
      break;
    case '101': // 192 bytes table
      tablSize = 64
      break;
    case '110': // 384 bytes table
      tablSize = 128
      break;
    case '111': // 768 bytes table
      tablSize = 256
      break;
    //========================================================
    // read a color (triplet) from the color lookup table
    // of a GIF image file | return 3 Bytes Hex String
    Stream.getTbColor = function(s, color) {
      function hexDigit(d) {
        if (d < 10) return d.toString();
        d -= 10;
        return String.fromCharCode('A'.charCodeAt(0) + d);
      var tbStart = 0xD; // Start of the color table byte location
      var colStrSz = 3; // Constant -> RGB
      var str = '';
      s = s.toString();
         for (var i = tbStart+(colStrSz*color); i < tbStart+(colStrSz*color)+colStrSz; i++) {
              var ch = s.charCodeAt(i);
              str += hexDigit(ch >> 4) + hexDigit(ch & 0xF);
          return str;
    var colorHex = [];
    importColors = function (){
         for (i=0; i< tablSize; i++){ // number of colors
              colorHex[i] = Stream.getTbColor(img, i);
    importColors();
    // remove redundant colors
    // important to determine exact color number
    function unique(arrayName){
         var newArray=new Array();
         label:for(var i=0; i<arrayName.length;i++ ){ 
              for(var j=0; j<newArray.length;j++ ){
                   if(newArray[j]==arrayName[i])
                        continue label;
              newArray[newArray.length] = arrayName[i];
         return newArray;
    colorHex = unique(colorHex);
    // we have now an array with all colors from the table in hex format
    // it can be sorted if you want to have some ordering to the exported file
    // in case, add code here.
    var colorStr = colorHex.join('');
    //=================================================================
    // Output to ACT => color triplets in hex format until 256 (Adr. dec 767)
    // if palette has less than 256 colors, is necessary to add the
    // number of colors info in decimal format to the the byte 768.
    ColorNum = colorStr.length/6;
    lstclr = colorStr.slice(-6); // get last color
    if (ColorNum < 10){
    ColorNum = '0'+ ColorNum;
    cConv = function (s){
         var opt = '';
         var str = '';
         for (i=0; i < s.length ; i++){
              for (j=0; j<2 ; j++){
                   var ch = s.charAt(i+j);
                   str += ch;
                   i ++;
              opt += String.fromCharCode(parseInt(str,16));
              str = '';
         return opt
    output = cConv(colorStr);
    // add ending file info for tables with less than 256 colors
    if (ColorNum < 256){
         emptyColors = ((768-(colorStr.length/2))/3);
         lstclr = cConv(lstclr);
         for (i=0; i < emptyColors ; i++){
              output += lstclr; // fill 256 colors
    output += String.fromCharCode(ColorNum) +'\xFF\xFF'; // add ending bytes
    Stream.writeToFile("~/file.act", output);
    PeterGun

  • How to load flatfiles using Owb?

    Hai all,
    I would like to access a flat file (.csv files) using owb. I am able to import the files into source module of owb. But while executing the mapping , I got the following error...
    Starting Execution MAP_CSV_OWB
    Starting Task MAP_CSV_OWB
    SQL*Loader: Release 10.1.0.2.0 - Production on Fri Aug 11 16:34:22 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Control File: C:\OWBTraining\owb\temp\MAP_CSV_OWB.ctl
    Character Set WE8MSWIN1252 specified for all input.
    Data File: \\01hw075862\owbfiles\employee.csv
    File processing option string: "STR X'0A'"
    Bad File: C:\OWBTraining\owb\temp\employee.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 200 rows, maximum of 50000 bytes
    Continuation: none specified
    Path used: Conventional
    Table "OWNER_STG"."EMP_EXCEL", loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    "EMPNO" 1 * , CHARACTER
    "EMPNAME" NEXT * , CHARACTER
    value used for ROWS parameter changed from 200 to 96
    SQL*Loader-500: Unable to open file (\\01hw075862\owbfiles\employee.csv)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader-2026: the load was aborted because SQL Loader cannot continue.
    Table "OWNER_STG"."EMP_EXCEL":
    0 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 49536 bytes(96 rows)
    Read buffer bytes: 65536
    Total logical records skipped: 0
    Total logical records read: 0
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Fri Aug 11 16:34:22 2006
    Run ended on Fri Aug 11 16:34:22 2006
    Elapsed time was: 00:00:00.09
    CPU time was: 00:00:00.03
    RPE-01013: SQL Loader reported error condition, number 1.
    Completing Task MAP_CSV_OWB
    Completing Execution MAP_CSV_OWB
    could you please help me..
    thanks and regards
    gowtham sen.

    Thank you my friends.
    As you said, I gave the file name as wrong.
    Its solved. Thank you....
    I have another probem.
    How to load data from excel file to owb? Is it possible the way we do for flat files?
    I did using ODBC + HS Services.
    But after creating a mapping , and its deploying I got the following error.
    "error occurred when looking up remote object <unspecified>.EmployeeRange@EXCEL_SID.US.ORACLE.COM@DEST_LOCATION_EXCEL_SOURCE_LOC
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02019: connection description for remote database not found
    Could you please help me..
    Thanks and regards
    Gowtham

  • Load a second video into an applet: resize - stretch problem

    Hello!
    I have an applet that loads a movie (call it film_a.mov). The size of the movie is 320 x 240. Since I want to show it bigger, I use a BorderLayout that stretches the video depending on the size given by
    the applet. In my case I set the applet parameter to "<applet code=Simple.class width=640 height=510>". Anyway, this display area is bigger than the actuell video size, so the video will be stretched.
    Everytime a user clicks with the mouse pointer onto the video area the second movie (call it film_b.mov) replace the first movie. The setup for the BorderLayout has not be chance. I close the player before loading the second movie with a function called loadNewMovie(). I even call this.removeAll(), player.close() and player.removeControllerListener(this).
    The problem is that if the second movie is loaded and placed into the vido display area it is not alway stretched to the possible BorderLayout.CENTER area. Sometimes it is stretched sometimes it is not streched. I really do not understand such behavior. It seems to me that I forget to call a update function that tells to stretch alway any video displayed.
    Both movies have the same size. I tried to solve this problem by using setSize, setBounds, etc. on the visualComponent but this does not solve the problem. If you want to try out, here come the code:
    mport java.applet.Applet;
    import java.awt.*;
    import java.lang.String;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import javax.media.*;
    // import com.sun.media.util.JMFSecurity;
    * This is a Java Applet that demonstrates how to create a simple media player
    * with a media event listener. It will play the media clip right away and
    * continuously loop.
    * <applet code=Simple.class width=640 height=510> <param
    * name=file1 value="auto.mov"> <param name=file2 value="hongkong.mov">
    public class Simple extends Applet implements ControllerListener {
         private static final long serialVersionUID = 1L;
         // media Player
         Player player = null;
         // component in which video is playing
         Component visualComponent = null;
         // controls gain, position, start, stop
         Component controlComponent = null;
         // displays progress during download
         Component progressBar = null;
         boolean firstTime = true;
         long CachingSize = 0L;
         int controlPanelHeight = 0;
         int videoWidth = 0;
         int videoHeight = 0;
         MediaLocator mrl = null;
         String mediaFile1 = null;
         String mediaFile2 = null;
         boolean closed = false;
          * Read the applet file parameter and create the media player.
         public void init() {
              // $ System.out.println("Applet.init() is called");
              setLayout(new BorderLayout());
              setBackground(Color.red);
              if ((mediaFile1 = getParameter("FILE1")) == null)
                   Fatal("Invalid media file parameter");
              if ((mediaFile2 = getParameter("FILE2")) == null)
                   Fatal("Invalid media file parameter");
          * Start media file playback. This function is called the first time that
          * the Applet runs and every time the user re-enters the page.
         public void start() {
              // $ System.out.println("Applet.start() is called");
              // Call start() to prefetch and start the player.
              getMedia(mediaFile1);
              if (player != null)
                   player.start();
              setVisible(true);
          * Stop media file playback and release resource before leaving the page.
         public void stop() {
              // $ System.out.println("Applet.stop() is called");
              if (player != null) {
                   player.stop();
                   player.deallocate();
         public void destroy() {
              // $ System.out.println("Applet.destroy() is called");
              player.close();
         public void getMedia(String mediaFile) {
              URL url = null;
              try {
                   url = new URL(getDocumentBase(), mediaFile);
                   mediaFile = url.toExternalForm();
              } catch (MalformedURLException mue) {
              try {
                   // Create a media locator from the file name
                   if ((mrl = new MediaLocator(mediaFile)) == null)
                        Fatal("Can't build URL for " + mediaFile);
                   // Create an instance of a player for this media
                   try {
                        player = Manager.createPlayer(mrl);
                   } catch (NoPlayerException e) {
                        System.out.println(e);
                        Fatal("Could not create player for " + mrl);
                   // Add ourselves as a listener for a player's events
                   player.addControllerListener(this);
              } catch (MalformedURLException e) {
                   Fatal("Invalid media file URL!");
              } catch (IOException e) {
                   Fatal("IO exception creating player for " + mrl);
          * This controllerUpdate function must be defined in order to implement a
          * ControllerListener interface. This function will be called whenever there
          * is a media event
         public synchronized void controllerUpdate(ControllerEvent event) {
              // If we're getting messages from a dead player,
              // just leave
              if (player == null)
                   return;
              // When the player is Realized, get the visual
              // and control components and add them to the Applet
              if (event instanceof RealizeCompleteEvent) {
                   if (progressBar != null) {
                        remove(progressBar);
                        progressBar = null;
                   if ((controlComponent = player.getControlPanelComponent()) != null) {
                        controlPanelHeight = controlComponent.getPreferredSize().height;
                        add(BorderLayout.SOUTH, controlComponent);
                        validate();
                   if ((visualComponent = player.getVisualComponent()) != null) {
                        add(BorderLayout.CENTER, visualComponent);
                        validate();
                        visualComponent
                                  .addMouseListener(new java.awt.event.MouseAdapter() {
                                       public void mousePressed(
                                                 java.awt.event.MouseEvent evt) {
                                            System.out
                                                      .println("MovieStreaming: mousePressed");
                                            loadNewMovie(mediaFile2);
                                       public void mouseReleased(
                                                 java.awt.event.MouseEvent evt) {
                                       public void mouseEntered(
                                                 java.awt.event.MouseEvent evt) {
                                       public void mouseExited(
                                                 java.awt.event.MouseEvent evt) {
              } else if (event instanceof CachingControlEvent) {
                   if (player.getState() > Controller.Realizing)
                        return;
                   // Put a progress bar up when downloading starts,
                   // take it down when downloading ends.
                   CachingControlEvent e = (CachingControlEvent) event;
                   CachingControl cc = e.getCachingControl();
                   // Add the bar if not already there ...
                   if (progressBar == null) {
                        if ((progressBar = cc.getControlComponent()) != null) {
                             add(progressBar);
                             setSize(progressBar.getPreferredSize());
                             validate();
              } else if (event instanceof EndOfMediaEvent) {
                   // We've reached the end of the media; rewind and
                   // start over
                   player.setMediaTime(new Time(0));
                   player.start();
              } else if (event instanceof ControllerErrorEvent) {
                   // Tell TypicalPlayerApplet.start() to call it a day
                   player = null;
                   Fatal(((ControllerErrorEvent) event).getMessage());
              } else if (event instanceof ControllerClosedEvent) {
                   closed = true;
         public void closePlayer() {
              synchronized (this) {
                   player.close();
                   while (!closed) {
                        try {
                             wait(100);
                        } catch (InterruptedException ie) {
                   player.removeControllerListener(this);
                   System.out.println("player is shutdown");
                   closed = false;
         public void loadNewMovie(String mediaFile) {
              // remove all components
              closePlayer();
              removeAll();
              getMedia(mediaFile);
              if (player != null)
                   player.start();
              setVisible(true);
         void Fatal(String s) {
              // Applications will make various choices about what
              // to do here. We print a message
              System.err.println("FATAL ERROR: " + s);
              throw new Error(s); // Invoke the uncaught exception
              // handler System.exit() is another
              // choice.
    }As you may notice this code is basicly the SimplePlayerApplet example which I modified a bit.
    Thank you for your Help
    Matt2

    Sorry,
    Can you tell me how do you solve it because I have got the same problem.
    Can you indicate me the topic where did you find solution.
    Thank in advance.

  • How to load other obejects in flash file after intro using ActionScript 3.0

    How to load other obejects in flash file after intro using ActionScript 3.0 or any other method all in same fla file. see blow intro screen shot ,this one playing repeatedly without loading other fla pages .only way to load other pages is click on Skip intro .see second screeshot below .i need that site to load after intro .
    see codes already in
    stop();
    skipintro_b.addEventListener(MouseEvent.CLICK, skipintro_b_clicked);
    function skipintro_b_clicked(e:MouseEvent):void{
    gotoAndStop("whoweare");
    There is another script there
    /* Simple Timer
    Displays a countdown timer in the Output panel until 30 seconds elapse.
    This code is a good place to start for creating timers for your own purposes.
    Instructions:
    1. To change the number of seconds in the timer, change the value 30 in the first line below to the number of seconds you want.
    var fl_TimerInstance:Timer = new Timer(1000, 30);
    fl_TimerInstance.addEventListener(TimerEvent.TIMER, fl_TimerHandler);
    fl_TimerInstance.start();
    var fl_SecondsElapsed:Number = 1;
    function fl_TimerHandler(event:TimerEvent):void
              trace("Seconds elapsed: " + fl_SecondsElapsed);
              fl_SecondsElapsed++;
    i have no knowledge about these thing ,any help really appreciated .

    Ned Murphy Thank you very Much .It is working .Great advice

  • How to  load data into user tables using DIAPIs?

    Hi,
    I have created an user table using UserTablesMD object.
    But I don't have know how to load data into this user table. I guess I have to use UserTable object for that. But I still don't know how to put some data in particular column.
    Can somebody please help me with this?
    I would appreciate if somebody can share their code in this regard.
    Thank you,
    Sudha

    You can try this code:
    Dim lRetCode As Long
    Dim userTable As SAPbobsCOM.UserTable
    userTable = pCompany.UserTables.Item("My_Table")
    'First row in the @My_Table table
    userTable.Code = "A1"
    userTable.Name = "A.1"
    userTable.UserFields.Fields.Item("U_1stF").Value = "First row value"
    userTable.Add()
    'Second row in the @My_Table table
    userTable.Code = "A2"
    userTable.Name = "A.2"
    userTable.UserFields.Fields.Item("U_1stF").Value = "Second row value"
    userTable.Add()
    This way I have added 2 lines in my table.
    Hope it helps
    Trinidad.

  • To dewangs. How to load all descriptions (lines) into a Vector?

    Thank You dewangs!
    I am confident that Your second advice to use Vector will solve my problem. But I have two more questions.
    Let say I have used BufferedReader(new FileReader(c:/java/MyText.txt)) to read from MyText.txt file. In this case, how to load all descriptions (lines) of this file into a Vector? And how to associate each line of MyText.txt as an element of the Vector?
    I am trying to do something, but no results.
    try{
    BufferedReader reader = new BufferedReader(new FileReader("c:/java/Applications/MyText.txt"));
    String str=reader.readLine();
    JList myList = new JList();
    StringTokenizer st = new StringTokenizer(str,"\n");
    Vector vr = new Vector(25);
    while(st.hasMoreTokens()){
    String nextToken = st.nextToken();
    vr.addElement(nextToken);
    myList.setListData(vr);
    TA1.setText(TA1.getText()+
    (String)myList.getSelectedValue());
    }catch(IOException evt) {};

    My suggestion is to create a new class that has a String (for your line of text) and an Image or ImageIcon for your picture. Store the instances of this class in the vector, and then add the appropriate part of the items in the vector to your list. Then you can just get the item in the vector corresponding the to index of the selected item in the list, cast it to your new class, and grab the String or the image as needed.

  • How to load file with 500M into noncontiguous memory and visit them

    My data file consist of  a serial of 2d images. Each image is 174*130*2 butes and the total images in the file is up to 11000, which takes almost 500M bytes. I hope to load them into memory in one turn since I need to visit either image many times in random order during the data processing. When I load them into one big 3d array, the error of "out of memory" happended frequenctly.
    First I tried to use QUEUE to load big chunk of data into noncontiguous memory. Queue structure is a good way to load and unload data into noncontiguous memory. But it dosn't fit here since I may need to visit any of the all the images at anytime. And it is not pratical if I dequeue one image and enqueue it into the opposite end, since the image visited may be not in sequential order.
    Another choice is to put the whole file into multiple small arrays. In my case, I may load the data file into 11000 small 2d arrays and each array holds the data of one image. But I don't know how to visit these 2d array and I didn't get any cues in the posters here.
    Any suggestion?
    PC with 4G physical memory, Labview 7.1 and Win XP.
    Thanks.

    I'll try to get the ball rolling here -- hopefully there's some better ideas than mine out there.
    1. I've never used IMAQ, but I suspect that it offers more efficient methods than stuff I dream up in standard LabVIEW.  Of course, maybe you don't use it either -- just sayin'...
    2. Since you can't make a contiguous 11000-image 3D array, and don't know how to manage 11000 individual 2D arrays, how about a compromise?  Like, say, 11 3D arrays holding 1000 images each?   Then you just need ~50 MB chunks of contiguous memory.
    3.  I'm picturing a partially hardcoded solution in which there are a bunch of cloned "functional globals" which each hold 1000 images of data.  This kind of thing can be done using (A) Reentrant vi's or (B) Template vi's.  You may need to use VI Server to instantiate them at run-time.
    4. Then I'd build an "Action Engine" wrapper around that whole bunch of stuff.  It'd have an input for image #, for example, image # 6789.  From there it would do a quotient & remainder with 1000 to split 6789 into a quotient of 6 and remainder of 789.  Then the wrapper would access function global #6 and address image # 789 from it.
    5. Specific details and trade offs depend a lot on the nature of your data processing.  My assumption was that you'd primarily need random access to images 1 or 2 at a time. 
    I hope to learn some better ideas from other posters...
    -Kevin P.
    P.S.  Maybe I can be one of those "other posters" -- I just had another idea that should be much simpler.  Create a typedef custom control out of a cluster which contains a 2D image array.  Now make an 11000 element array of these clusters.  If I recall correctly, LabVIEW will allocate 11000 pointers.  The clusters that they point to will *not* need to be contiguous one after the other.  Now you can retrieve an image by indexing into the array of 11000 clusters and simply unbundling the 2D image data from the cluster element.

  • Does the advanced queue support setting the pay load type as array/table?

    Does the advanced queue support setting the pay load type as array/table?
    if yes, how to write the enqueue script, I tried to write the following the script to enqueue, but failed, pls help to review it . Thanks...
    ------Create payload type
    create or replace TYPE "SIMPLEARRAY" AS VARRAY(99) OF VARCHAR(20);
    ------Create queue table
    BEGIN DBMS_AQADM.CREATE_QUEUE_TABLE(
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_payload_type => 'LUWEIQIN.SIMPLEARRAY',
    storage_clause => 'PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 TABLESPACE USERS',
    Sort_list => 'ENQ_TIME',
    Compatible => '8.1.3');
    END;
    ------Create queue
    BEGIN DBMS_AQADM.CREATE_QUEUE(
    Queue_name => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_table => 'LUWEIQIN.SIMPLEQUEUE',
    Queue_type => 0,
    Max_retries => 5,
    Retry_delay => 0,
    dependency_tracking => FALSE);
    END;
    -------Start queue
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'LUWEIQIN.SIMPLEQUEUE', dequeue => TRUE, enqueue => TRUE);
    END;
    -------Enqueue
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    but when I use the following script to enqueue get error. Pls help to review. Thanks...
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    ------Get error
    Error starting at line 1 in command:
    DECLARE
    v_enqueueoptions dbms_aq.enqueue_options_t;
    v_messageproperties dbms_aq.message_properties_t;
    p_queue_name VARCHAR2(40);
    Priority INTEGER;
    Delay INTEGER;
    Expiration INTEGER;
    Correlation VARCHAR2(100);
    Recipientlist dbms_aq.aq$_recipient_list_t;
    Exceptionqueue VARCHAR2(100);
    p_queue_name VARCHAR2(40);
    p_msg VARCHAR2(40);
    p_payload LUWEIQIN.SIMPLEARRAY;
    BEGIN
    p_payload(1) := 'aa';
    p_payload(2) := 'bb';
    SYS.DBMS_AQ.ENQUEUE(queue_name => 'LUWEIQIN.SIMPLEQUEUE',enqueue_options => v_enqueueoptions, message_properties => v_messageproperties, msgid => p_msg, payload => p_payload);
    END;
    Error report:
    ORA-06550: line 17, column 3:
    PLS-00306: wrong number or types of arguments in call to 'ENQUEUE'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause: Usually a PL/SQL compilation error.
    *Action:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for