How could this be achieved

Hey everyone,
I have information stored in side a file, it is first stored in arrays like this:
String[] cars = {"ford", "ford", "mini"}
int[] car_id = {101, 102, 103}
It is then written to a file.
I would like to make a record or my own type of some sort, that would combine these into one record like this. So the record would read this:
record 1: ford, 101
record 2: ford, 102
record 3: mini, 103
This would be easy to change the values as well, as i could just say record1 = "ford", "201" or something.
Any suggestions on how this could be achieved.

Some of this might help, courtesy of jverd:
Resources for Beginners
Sun's
basic Java tutorial
> Sun's New To Java Center.
Includes an overview of what Java is, instructions
for setting up Java, an intro to programming (that
includes links to the above tutorial or to parts of
it), quizzes, a list of resources, and info on
certification and courses.
http://javaalmanac.com[
/u]. A couple dozen code examples that
supplement
[url=http://www.amazon.com/exec/obidos/tg/detail/-/
0201752808?v=glance]The Java Developers
Almanac.
jGuru. A
general Java resource site. Includes FAQs, forums,
courses, more.
JavaRanch.
To quote the tagline on their homepage: "a friendly
place for Java greenhorns." FAQs, forums (moderated,
I believe), sample code, all kinds of goodies for
newbies. From what I've heard, they live up to the
"friendly" claim.
Bruce Eckel's
Thi
nking in Java (Available online.)
Joshua Bloch's
[url=http://www.amazon.co.uk/exec/obidos/Author=
Bloch,%20Josh]Effective Java
Bert Bates and Kathy Sierra's
[url=http://www.amazon.com/exec/obidos/tg/detail
/-/0596004656?v=glance]Head First Java.
This one has been getting a lot of very positive
comments lately.
Thanks for those great links!
I've now read up about constructors and classess again, so i'm a little more confident. I am having a little trouble printing and retreiving the information in the objects. Here is some of my code:
class Details{ //storage for cars and details
        public int customer_id; //id of customer hiring it
        public String type; //small, saloon or van
        public int rate; //rate of hire
        public int mileage;
        public boolean hired; //hired or not
        // constructor
        public Details(int id, String t, int r, int m, boolean h) {
                set_customer_id(id);
                set_car_type(t);
                set_rate(r);
                set_mileage(m);
                set_hired(h);
        // return object variables
        public int get_customer_id() { return customer_id; }
        public String get_car_type() { return type; }
        public int get_rate() { return rate; }
        public int get_mileage() { return mileage; }
        public boolean get_hired() { return hired; }
        // set object variables
        public void set_customer_id(int id) { customer_id = id; }
        public void set_car_type(String car_type) { type = car_type; }
        public void set_rate(int the_rate) { rate = the_rate; }
        public void set_mileage(int miles) { mileage = miles; }
        public void set_hired(boolean car_hired) { hired = car_hired; }
class Cars {
        public static void main(String[] args) throws IOException {
             Details[] thecars = new Details[] {new Details(1, "small car", 20, 0, true), new Details(2, "big car", 220, 3, true)};
}I'm really unsure how i could retrieve the details. I though tthis would work:
String type = thecars[0].get_car_type;
Because thecars is an array of Details[] and get_car_type returns the type of car. Any suggestions?:
Thanks.

Similar Messages

  • I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    I created an image in Photoshop and saved it as the PSD file. Now when I try and open it it says it is not compatible with my version. How could this be when I created it in this version?

    That depends on why it won't open.  Most of the time it means the file is corrupted and unlikely to be recovered. If you saved it right after adding or copying a LOT of layers - then it might just be the layer limit and we can attempt to recover it.

  • Need to pass out parameter in middle of a process. How can this be achieved

    Package test_pkg
    procedure main_prc(x_stat out varchar2)
    insert_prc(l_stat);
    x_stat:=l_stat;
    valid_prc
    end main_prc;
    procedure insert_prc(x_stat1 out varchar2)
         insert into staging table
         x_stat:='S';
    end insert_prc;
    procedure valid_prc
         validate staging table data
    end valid_prc;
    end test_pkg;
    Requirement: Need to pass out parameter in middle of a process. How can this be achieved?

    Use return at any time to get the out variable, but this will stop the process.

  • My ipad including my iphone says "unable to connect network" whenever i connect it to wifi. How could this be?

    Help anyone pls!!! My ipad including my iphone says " unable to connect network" whenever i connect it to wifi. How could this be?

    Try Settings > General > Reset > Reset Network Settings
    Then try again.

  • I updated my macbook with lion and airdrop does not show up in the finder, how could this be?

    I updated my macbook with lion and airdrop does not show up in the finder, how could this be?

    shldr2thewheel wrote:
    If this is the case: How to enable AirDrop over ethernet and AirDrop on unsupported macs running Lion  .
    http://osxdaily.com/2011/09/16/enable-airdrop-ethernet-and-unsupported-macs/
    Interesting.  Googling, I see that someone posted that on these discussions as well:
    https://discussions.apple.com/thread/3331216?start=0&tstart=0
    which mentions what I recall: that Airdrop (as implemented by Apple) would create an on-demand ad-hoc Wi-Fi connection, even if you were already connected to an access point.  Normally, you can't connect to multiple Wi-Fi networks, thus the reason for Airdrop only supported on newer Wi-Fi chips.
    And Apple's KB:
    http://support.apple.com/kb/HT4783

  • My iphone 3g show the itune logo and when I restore it, it says restore error 46? What is restore error 46? How could this be resolved?

    My iphone 3g show the itune logo and when I restore it, it says restore error 46? What is restore error 46? How could this be resolved?

    Hi! were you able to restore your phone?

  • My daughter has just purchased $1250 of "in game" credits, a) how could this occur without a pass code and b) how do I stop this from reoccuring

    My daughter was playing Pet City, somehow she purchased $1250 in credits against our credit card. How could this occur, how do I stop it from happening again
    Thanks

    Contact Apple:
    Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
    To contact product and tech support visit online support site.
    For iTunes: Apple Support for iTunes - Contact Us

  • An unknown website just appeared in my 'exceptions' list (Tools Options Security "warn me when sites try to install add-ons"-how could this happen?

    downloaded Firefox onto friends' laptop last night. Found it necessary to place two websites in the (afore-mentioned) "Exceptions" category. shut down/re-booted three-four times over the next few hours before shutting down the laptop and going to bed. Booted up this am and, WHOA!-suddenly my menu/toolbars have new, undesired toolbars(?) search boxes(?): the search box, if I remember right, was labeled "My Web Search sponsored by iwon!" Whilst eliminating the intruders I became aware that by some unknown means I had fetched up on some webpage I've never heard of and had no reason to go to-( the very top of my display (above the menu and address bar) read: 'reason upgrade Search' (separated by a line symbol I can't reproduce here), then 'Musician's Friend' ....HUH? (feeling like Dorothy w/o a tornado transport). So I finish getting rid of the invaders and check out my History to try to figure out how I wound up at this website. my history indicates the last site I visited before going to bed, then 'aclk' (www.google/aclk? followed by a string of mixed symbols letters etc. Then 'redirect' (www.rkdms.com/redirect?c=....and a string of numbers and letters. Then the website"reason upgrade Search (?) Musician's Friend " then 'redirect.jhtml' (www.search.mywebsearch.com/mywe.........) Them 'Firefox Web Browser& Thunder....' still no clue how or why I wound up at that site..didn't go there, (not of my volition, anyways!!) so im checking my security settings and in Tools>options>Security>advanced> in the "Exceptions" category of "Warn me when sites try to install add-ons" is a website I've never heard of (getpersonas.com) and DID NOT enter!!!!!!!.Need to know how this could happen, how to prevent recurrence and how hard should I hit the panic button because right now I'm totally freaked!
    == today

    These prefs get set to an empty String once the sites have been added to the whitelist if the pref is not empty if you open the exception window.
    Tools > Options > Security : "Warn me when sites try to install add-ons": Exceptions
    You can reset these prefs on the about:config page.
    xpinstall.whitelist.add - addons.mozilla.org
    xpinstall.whitelist.add.36 - getpersonas.com
    To open the ''about:config'' page, type '''about:config''' in the location (address) bar and press the Enter key, just like you type the url of a website to open a website.
    If you see a warning then you can confirm that you want to access that page.

  • Time server 1:55:50 wrong!! how could this be??

    Hello everybody,
    I am develloping an application where I get the time from a time sever and update the (embedded) system time. But I am getting from the server 1h55min minutes earlier than it should be. Most of it I think come from my GMT+0200 location but that would still leave me with a 4/5 minutes advance when corrected!!
    I got the program from somewhere around the net but it's too complex for me (okay okay, you can call me a noob) to find out if any of the byte handling could be the source of the error
    So I have 2 questions:
    1. What could be causing the illogical 11min time difference?? (I think the encodeTimestamp method is not that reliable)...
    2. How do I retrieve GMT related information to such as time zone and daylight savings time??
    This is the code:
    package general;
    import java.io.*;
    import java.util.*;
    import javax.microedition.io.*;
    import javax.microedition.midlet.*;
    import com.siemens.icm.io.*;
    public class Teste27 extends MIDlet
         private ATListener ComList = null;     
         private ATCommand ATCmd = null;
         String gprs = null;
         Calendar cal;
         Date date;
         TimeZone timeZone;
         long milliSeconds = 0;
         class ATListener implements ATCommandListener{
              public void ATEvent(String Event){System.out.println("\rURC-Event: " + Event);}
              public void RINGChanged (boolean SignalState){System.out.println("\rRING-Event: " + SignalState);}
              public void DCDChanged (boolean SignalState){System.out.println("\rDCD-Event: " + SignalState);}
              public void DSRChanged (boolean SignalState){System.out.println("\rDSR-Event: " + SignalState);}
              public void CONNChanged (boolean SignalState){System.out.println("\rCONN-Event: " + SignalState);}
         public Teste27() throws MIDletStateChangeException
              System.out.println("Constructor");
              try{
                   // Create Listener
                   ComList = new ATListener();
                   ATCmd = new ATCommand(false);
                   ATCmd.addListener(ComList);
              }catch(ATCommandFailedException e){System.out.println("\rATCommandFailedException(Teste27)" + e);
              destroyApp(true);}
         protected void startApp() throws MIDletStateChangeException
              // Address
              String address = "datagram://ntp-sop.inria.fr:123";
              System.out.println(address);
              try
                   // Configure GPRS connection
                   gprs = ATCmd.send("at^sjnet=gprs,a2bouygtel.com,\"\",\"\",\"\",0\r");
                   System.out.println(gprs);
                   // Creates Connection
                   System.out.println("Creating connection");
                   DatagramConnection connection = (DatagramConnection)Connector.open(address);
                   // Creates UDP Packet
                   System.out.println("Creating message");
                   byte[] buf = new NtpMessage().toByteArray();
                   // Sends Packet
                   System.out.println("Sending packet");
                   Datagram packet = connection.newDatagram(buf,buf.length,address);        
                   connection.send(packet);
                   // Get response
                   System.out.println("receiving connection");
                   Datagram response = connection.newDatagram(512);
                   connection.receive(response);
                   System.out.println("Obtained");
                   NtpMessage msg = new NtpMessage(response.getData());
                   System.out.println(msg.toString());
                   System.out.println(msg.transmitTimestamp);
                   destroyApp(true);
              } catch(IOException ioe){ioe.printStackTrace();}
              catch(Exception e){System.out.println("Exception(configureSocketService): " + e);}
         protected void pauseApp()
              System.out.println("pauseApp");
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException
              System.out.println("destroyApp");
              this.notifyDestroyed();
    }And this is the NtpMessage Class:
    package general;
    import java.util.Date;
    import java.util.Random;
    * @author Adam Buckley
    public class NtpMessage
         public byte leapIndicator = 0;
         public byte version = 3;
         public byte mode = 0;
         public short stratum = 0;
         public byte pollInterval = 0;
         public byte precision = 0;
         public double rootDelay = 0;
         public double rootDispersion = 0;
         public byte[] referenceIdentifier = {0, 0, 0, 0};
         public double referenceTimestamp = 0;
         public double originateTimestamp = 0;
         public double receiveTimestamp = 0;
         public double transmitTimestamp = 0;
          * Constructs a new NtpMessage from an array of bytes.
          */     public NtpMessage(byte[] array)
              // See the packet format diagram in RFC 2030 for details
              // BYTE 1
              leapIndicator = (byte) ((array[0] >> 6) & 0x3);
              version = (byte) ((array[0] >> 3) & 0x7);
              mode = (byte) (array[0] & 0x7);
              // BYTE 2
              stratum = unsignedByteToShort(array[1]);
              // BYTE 3
              pollInterval = array[2];
              // BYTE 4
              precision = array[3];
              // BYTES 5->8
              rootDelay = (array[4] * 256.0) +
                   unsignedByteToShort(array[5]) +
                   (unsignedByteToShort(array[6]) / 256.0) +
                   (unsignedByteToShort(array[7]) / 65536.0);
              // BYTES 9->12
              rootDispersion = (unsignedByteToShort(array[8]) * 256.0) +
                   unsignedByteToShort(array[9]) +
                   (unsignedByteToShort(array[10]) / 256.0) +
                   (unsignedByteToShort(array[11]) / 65536.0);
              // BYTES 13->16
              referenceIdentifier[0] = array[12];
              referenceIdentifier[1] = array[13];
              referenceIdentifier[2] = array[14];
              referenceIdentifier[3] = array[15];
              // BYTES 17->24
              referenceTimestamp = decodeTimestamp(array, 16);
              // BYTES 25->32
              originateTimestamp = decodeTimestamp(array, 24);
              // BYTES 33-40
              receiveTimestamp = decodeTimestamp(array, 32);
              // BYTES 41-48
              transmitTimestamp = decodeTimestamp(array, 40);
          * Constructs a new NtpMessage in client -> server mode, and sets the
          * transmit timestamp to the current time.
         public NtpMessage()
              // Note that all the other member variables are already set with
              // appropriate default values.
              this.mode = 3;
              this.transmitTimestamp = (System.currentTimeMillis()/1000.0) + 2208988800.0;
          * This method constructs the data bytes of a raw NTP packet.
          */     public byte[] toByteArray()
              // All bytes are automatically set to 0
              byte[] p = new byte[48];
              p[0] = (byte) (leapIndicator << 6 | version << 3 | mode);
              p[1] = (byte) stratum;
              p[2] = (byte) pollInterval;
              p[3] = (byte) precision;
              // root delay is a signed 16.16-bit FP, in Java an int is 32-bits
              int l = (int) (rootDelay * 65536.0);
              p[4] = (byte) ((l >> 24) & 0xFF);
              p[5] = (byte) ((l >> 16) & 0xFF);
              p[6] = (byte) ((l >> 8) & 0xFF);
              p[7] = (byte) (l & 0xFF);
              // root dispersion is an unsigned 16.16-bit FP, in Java there are no
              // unsigned primitive types, so we use a long which is 64-bits
              long ul = (long) (rootDispersion * 65536.0);
              p[8] = (byte) ((ul >> 24) & 0xFF);
              p[9] = (byte) ((ul >> 16) & 0xFF);
              p[10] = (byte) ((ul >> 8) & 0xFF);
              p[11] = (byte) (ul & 0xFF);
              p[12] = referenceIdentifier[0];
              p[13] = referenceIdentifier[1];
              p[14] = referenceIdentifier[2];
              p[15] = referenceIdentifier[3];
              encodeTimestamp(p, 16, referenceTimestamp);
              encodeTimestamp(p, 24, originateTimestamp);
              encodeTimestamp(p, 32, receiveTimestamp);
              encodeTimestamp(p, 40, transmitTimestamp);
              return p;
          * Returns a string representation of a NtpMessage
          */     public String toString()
              return "Leap indicator: " + leapIndicator + "\r\n" +
                   "Version: " + version + "\r\n" +
                   "Mode: " + mode + "\r\n" +
                   "Stratum: " + stratum + "\r\n" +
                   "Poll: " + pollInterval + "\r\n" +
    //               "Precision: " + precision + " (" + precisionStr + " seconds)\r\n" +
    //               "Root delay: " + new DecimalFormat("0.00").format(rootDelay*1000) + " ms\r\n" +
    //               "Root dispersion: " + new DecimalFormat("0.00").format(rootDispersion*1000) + " ms\r\n" +
                   "Reference identifier: " + referenceIdentifierToString(referenceIdentifier, stratum, version) +
    "\r\n" +
                   "Reference timestamp: " + timestampToString(referenceTimestamp) + "\r\n" +
                   "Originate timestamp: " + timestampToString(originateTimestamp) + "\r\n" +
                   "Receive timestamp:   " + timestampToString(receiveTimestamp) + "\r\n" +
                   "Transmit timestamp:  " + timestampToString(transmitTimestamp);
          * Converts an unsigned byte to a short.  By default, Java assumes that
          * a byte is signed.
          */     public static short unsignedByteToShort(byte b)
              if((b & 0x80)==0x80) return (short) (128 + (b & 0x7f));
              else return (short) b;
          * Will read 8 bytes of a message beginning at <code>pointer</code>
          * and return it as a double, according to the NTP 64-bit timestamp
          * format.
         public static double decodeTimestamp(byte[] array, int pointer)
              double r = 0.0;
              for(int i=0; i<8; i++)
    //               r += unsignedByteToShort(array[pointer+i]) * Math.pow(2, (3-i)*8);
                double tmp = unsignedByteToShort(array[pointer+i]);           
                for(int k=0;k<(3-i)*8;k++)
                    tmp *= 2;
                r += tmp;
              return r;
          * Encodes a timestamp in the specified position in the message
         public static void encodeTimestamp(byte[] array, int pointer, double timestamp)
              // Converts a double into a 64-bit fixed point
              for(int i=0; i<8; i++)
                   // 2^24, 2^16, 2^8, .. 2^-32
    //               double base = Math.pow(2, (3-i)*8);
                   double base = 1;      
                   for(int k=0;k<(3-i)*8;k++)
                       base *= 2;
                   // Capture byte value
                   array[pointer+i] = (byte) (timestamp / base);
                   // Subtract captured value from remaining total
                   timestamp = timestamp - (double) (unsignedByteToShort(array[pointer+i]) * base);
              // From RFC 2030: It is advisable to fill the non-significant
              // low order bits of the timestamp with a random, unbiased
              // bitstring, both to avoid systematic roundoff errors and as
              // a means of loop detection and replay detection.
    //          array[7] = (byte) (Math.random()*255.0);
            array[7+pointer] = (byte) (new Random(System.currentTimeMillis()).nextDouble()*255.0);
          * Returns a timestamp (number of seconds since 00:00 1-Jan-1900) as a
          * formatted date/time string.
         public static String timestampToString(double timestamp)
              if(timestamp==0) return "0";
              // timestamp is relative to 1900, utc is used by Java and is relative
              // to 1970
              double utc = timestamp - (2208988800.0);
              // milliseconds
              long ms = (long) (utc * 1000.0);
              // date/time
    //          String date = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss").format(new Date(ms));
            String date = new Date(ms).toString();
              // fraction
    //          double fraction = timestamp - ((long) timestamp);
    //          String fractionSting = new DecimalFormat(".000000").format(fraction);
    //          String fractionString = new
    //          return date + fractionSting;
            return date;
          * Returns a string representation of a reference identifier according
          * to the rules set out in RFC 2030.
         public static String referenceIdentifierToString(byte[] ref, short stratum, byte version)
              // From the RFC 2030:
              // In the case of NTP Version 3 or Version 4 stratum-0 (unspecified)
              // or stratum-1 (primary) servers, this is a four-character ASCII
              // string, left justified and zero padded to 32 bits.
              if(stratum==0 || stratum==1)
                   return new String(ref);
              // In NTP Version 3 secondary servers, this is the 32-bit IPv4
              // address of the reference source.
              else if(version==3)
                   return unsignedByteToShort(ref[0]) + "." +
                        unsignedByteToShort(ref[1]) + "." +
                        unsignedByteToShort(ref[2]) + "." +
                        unsignedByteToShort(ref[3]);
              // In NTP Version 4 secondary servers, this is the low order 32 bits
              // of the latest transmit timestamp of the reference source.
              else if(version==4)
                   return "" + ((unsignedByteToShort(ref[0]) / 256.0) +
                        (unsignedByteToShort(ref[1]) / 65536.0) +
                        (unsignedByteToShort(ref[2]) / 16777216.0) +
                        (unsignedByteToShort(ref[3]) / 4294967296.0));
              return "";
    }   Thank you (if you got this far... =s)

    i forgot to mention one thing in my previous post..
    my server starts up sometimes without giving me any problems. that is, when i face this problem, all i do is shut down the server and then wait for abt 10-15 minutes and try starting it again..sometimes this gap of 15 min helps a lot coz the server starts up properly and the connection exception does not occur. Also,the web app also works perfectly. But this wasnt the case abt 2 months back. prior to this problem, my server would never give me a problem and i could start and stop it at will...i used to start and stop the server almost 3-4 times a day (when i made changes to java files and wanted the server to read the latest class files..).it was only 2 months back that this problem arose and ever since then, all i would do is wait for 10-15 minutes if the server doesnt start up and then try my luck again. Even if i wait for 15 min, there are days when the server doesnt start properly all day long !
    Another issue is that even when the server starts properly(without giving the connection exception) it sometimes does not load the web application correctly. It displays a "Page cannot be found" error. But waiting for abt 10-15 minutes again removes this problem and i am again able to use the application.
    I am a newbie to JAVA and do not know much abt application servers. I had read through the Apache tomcat documentation which told me abt JNDI realm and the 389 port to which connection is made. I could not understand much and thats why i posted the problem on this forum.
    This whimsical behaviour is what has delayed my work and i am not being able to deliver on deadlines.Needless to say, any help would be appreciated. :)
    Regards,
    Shankar

  • How can this be achieved in SQL???????

    Hi Guys,
    This is my query:
    SELECT  distinct iy.trial_no,
           iypa.amendment_no,
           iy.country_code,
           iy.country_desc,
           iypa.amend_reg_submission_date,
           iypa.amend_reg_approval_date,
           iypa.amend_reg_comments,
           iyea.ea_amendment_submission_date,
           IYEA.ea_amendment_approval_date,
           iyea.ea_amendment_expiry_date,
           iyea.ea_approval_comments,
        iyea.master_approval_flag      
    FROM   irt_trc_protocol_amendment iypa,
           irt_trc_ethical_approvl_amend iyea,
           irt_trial_country iy
    WHERE  iypa.trial_no = iyea.trial_no
    AND    iypa.amendment_no = iyea.amendment_no
    AND    iypa.country_code = iyea.country_code
    AND    iypa.trial_no=101416
    AND    iy.trial_no= iypa.trial_no
    AND    iypa.country_code = 'GBR'
    AND    iypa.country_code = iy.country_code 
    AND    iyea.amendment_no = 4
    AND    IYEA.master_approval_flag = 1 The above query will only ever return one row because only one record can have it's master_approval_flag set to 1. However multiple records can have a master_approval_flag set to 0.
    This is what I want my query to acheive:
    Select the one row where master_approval_flag = 1. If there is no record where master_approval_flag = 1, then still only display one row but ommit the details from the IYEA table and only include
    the data from the IYPA table - Such that the output will only ever return one row....
    How can I do this?
    Thanks!

    This should work:
    select t.*
    SELECT  distinct
           iy.trial_no,
           iypa.amendment_no,
           iy.country_code,
           iy.country_desc,
           iypa.amend_reg_submission_date,
           iypa.amend_reg_approval_date,
           iypa.amend_reg_comments,
           iyea.ea_amendment_submission_date,
           IYEA.ea_amendment_approval_date,
           iyea.ea_amendment_expiry_date,
           iyea.ea_approval_comments,
           iyea.master_approval_flag
          ,row_number() over (order by iyea.Master_Approval_Flag desc) rn
    FROM   irt_trc_protocol_amendment     iypa,
           irt_trc_ethical_approvl_amend  iyea,
           irt_trial_country              iy
    WHERE  iypa.trial_no                  = iyea.trial_no
    AND    iypa.amendment_no              = iyea.amendment_no
    AND    iypa.country_code              = iyea.country_code
    AND    iypa.trial_no                  = 101416
    AND    iy.trial_no                    = iypa.trial_no
    AND    iypa.country_code              = 'GBR'
    AND    iypa.country_code              = iy.country_code 
    AND    iyea.amendment_no              = 4
    ) t
    where rn = 1You could possibly remove the DISTINCT and specify
          ,row_number() over (order by iyea.Master_Approval_Flag desc, iy.Tria_No, iy.Amendment_No) rn
    -- instead of
    ,row_number() over (order by iyea.Master_Approval_Flag desc) rnSince you are guranteed to always return a single row there may be no reason to use DISTINCT, which would probably slow the query down somewhat.

  • While trying to delete an image or header on Index page, Index..html disappeared--how could this have happened?

    Windows 7, Adobe CS6
    In Dreamweaver, from files located on a USB, on the Index screen, I was trying to  1) delete an Image in order to insert a different one and link it to a page; 2) delete the Header in order to insert a border and then replace the Header.
    I seem to have succeeded with the Image rollover replacement and link. Clicking on the Header should have activated it so that I could delete it; but it didn't.
    All of the images and links are intact; I just can't open the Index page, since I can't find the Index.html file.  The last time I copied the USB files onto my C: drive was 3 weeks ago.
    1.  What might I have done accidentally to cause the Index.html file to be deleted?
    2.  Exactly what does the Index.html file contain?  Would the one that's 3 weeks old work?  No, I'm thinking, since some changes were made in the html coding in the meantime?

    Lelia150 wrote:
    I was trying to  1) delete an Image in order to insert a different one and link it to a page; 2) delete the Header in order to insert a border and then replace the Header.
    I seem to have succeeded with the Image rollover replacement and link. Clicking on the Header should have activated it so that I could delete it; but it didn't.
    This is the problem with working in Design View only.  You really need to work in Split View so you can see the code that DW creates/selects for you.  Often times, selecting elements in Design View will capture too much or too little code.  When you  hit delete, you may have deleted much more code than was needed.   The result is invalid code, unbalanced tags, etc.. all of which might explain why your page is blank in Design View.
    Switch to code view.  Copy & paste the remaining code into a web forum reply (do not use e-mail, it won't come through).  If we can see the code you have to work with, we might be able to help you repair it.
    Nancy O.

  • Publishing Just One Site...How Could This Even Be An Issue?

    I have been checking the discussion boards looking for an answer to what appears to be a serious design flaw. All I want to do is publish one of the two sites I have created on iWeb. From what I read, the only option I have is to use a freeware program called "iWebsites". Is this true? I can't believe there isn't another reasonable workaround. Someone....a little help please?

    There are lots of posts on this subject. The way I do iit is to create indivual domain files in iweb. Once you have created the first move the domain file out of the user library/application support/iweb folder and then click on iweb it will prompt you to open an existing site or to create a new one. Back up the domain file before doing anything, and then keep each domain file as a separate entity. I rename my domains so I know what they are.
    To split your existing site make 2 copies of the domain file - make a backup first and move it to an external drive if you can.
    Open the 1st copy and delete one of the sites - save and then repeat with the 2nd copy and delete the other site. Now you should have 2 separate domain files. Make sure you have the files in different places before saving - the best way is to move them to an external drive then you can't over write them.
    Hope that makes sense - there are some clever people on here how may well put it in better language.

  • Since a few days i receive each e-mail two times, what is wrong and how could this stopped?

    I appretiere tips to solve that Problem.
       Thank you very much for you help.
             Horst P.H.

    Did you resolve this issue? I finally upgraded my iMac to Mountain Lion and it has stopped connecting to my own website & email (same domain) via safari/mail respectively.
    Yet, connecting to both on my MacBook Air on the same network is fine. Also running 10.8.4.

  • How could this query be coded?

    I'm racking my brain trying to figure this one out...this is an old query of mine being retooled...
    DB has a field for MONTH and a field for YEAR...as well as HOURS for each record.
    This query is pulling a sum of hours for a date range, that will be a year from Oct to Sep.
    So I want a query that says:
    Select * from October to December of Last Year, AND all months from January of the current year up to a "selected" month.
    I have setup for current year, prior year, and selected month (from a dropdown list).
    I've already tried something like:
    SELECT SUM(hours) AS Total FROM TABLENAME
    WHERE service_year = #session.prior_year# AND service_month >= 10 AND service_month <=12 AND service_year = #session.selected_year# AND service_month >= 1 AND service_month <= #session.selected_month#
    No dice of course, logically that doesn't work anyway after looking at it.
    Any ideas?  I've tried various forms of evaluation levels of operators, no dice.
    Thanks in advance!

    Maybe:
    WHERE
    (service_year = #session.prior_year# AND service_month >= 10)
    OR (service_year = #session.selected_year# AND service_month <= #session.selected_month#)

  • How could this upgrade be so flaky

    I have a bog-standard Adobe CC setup on a 2012 Mac Pro.    I install the 2014 version and it won't load pre-2014 projects.  It just hangs.   I try launching a new project in Premiere CC 2014.  Nothing...system freeze.   Surely this new version would have been tested to death before release.  It's not working here.   Seems crazy to me.

    Maybe:
    WHERE
    (service_year = #session.prior_year# AND service_month >= 10)
    OR (service_year = #session.selected_year# AND service_month <= #session.selected_month#)

Maybe you are looking for

  • How do I use the OCR feature in Acrobat 9?

    Does Acrobat 9 have the OCR feature?  If so, where do I find it?  In Acrobat 8, one would go to Document, OCR Text Recognition, Recognize Test Using OCR, OK.  I specifically want to know how to apply OCR to a scanned document in order to use the Find

  • Query  Regarding Updation/Migration of ODI 10g To ODI 11g.

    Hi All, Currently I am using ODI 10g Version & Repositories ( Work & Master) have been installed on Oracle database version "Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi" We are thinking to migrate from ODI 10g to ODI 11g Version

  • New officejet 6600 - Can't scan or fax, printing A-ok. Using wireless.

    Hi I have read and tried every thread on this topic. it is now 6 hours later and about 30 restarts, installs, re-installs and re-re installs, oh and full uninstalls, each time turing off firewall and anti-virus. Microsoft paint won't work either, but

  • How to move a sequence, and only the media in the sequence?

    I need to move a 30 min. sequence, and associated media, to work on a different, remote editing system. I'd like to just get the media in the sequence with maybe 5 sec. handles. Every test I've run through Media Manager has copied each, complete, ori

  • How to forbid window title bar to be draged?

    If a top level vi has the window title bar,how to forbid user to drag the title bar to change window's position? P.S. vi's property "Allow user to resize window" has been forbidden. LabVIEW 8.6