Checking for Palindrome, is there a better way?

Hi all,
i m pasting the code which checks whether its a Palindrome or not. I am sure someone here could come up with some better way. I'll be obliged if they point out the changes.
//Class PalindromeBeta
public class PalindromeBeta{
     private static String s;
     public PalindromeBeta(){
     public static boolean isPalindrome(String as){
          s= as;
          int string_length = s.length();
          int stop_index = (int)(string_length/2);
          int start_index = 0;
          int end_index = string_length;
          int second_index = 1;
          if (string_length == 1)
          return false;
          else{
               do{
                    if(s.substring(start_index,second_index).equalsIgnoreCase(s.substring((end_index-1), end_index))){
                         start_index++;
                         end_index--;
                         second_index++;
                    else
                    return false;
               while(start_index != stop_index);
               return true;
//Class P7_16 with the main() method     
public class P7_16beta{
     public static void main(String[] args){
          ConsoleReader console = new ConsoleReader(System.in);
          PalindromeBeta pd = new PalindromeBeta();
          boolean done = false;
          do{
               System.out.println("Enter a String(Q to quit)");
               String input = console.readLine();
               if (input.equalsIgnoreCase("Q"))
               done = true;
               else if(pd.isPalindrome(input) == true)
               System.out.println("It is a Palindrome");
               else
               System.out.println("It is not a Palindrome");
          while (done == false);
//Class ConsoleReader , a hepling class for reading input
import java.io.*;
public class ConsoleReader
     private BufferedReader reader;
     public ConsoleReader(InputStream instream)
     reader = new BufferedReader(new InputStreamReader(instream));
public String readLine()
String inputLine ="";
try
          inputLine = reader.readLine();
catch(IOException e)
System.out.println(e);
System.exit(1);
return inputLine;
public int readInt()
     String inputString = readLine();
int n = Integer.parseInt(inputString);
return n;
public double readDouble()
     String inputString = readLine();
double x = Double.parseDouble(inputString);
return x;
                    

I'm posting my little code here: It compares every character in the string. It's not the faster way, but I think it's still very reliable.
import java.io.*;
class palindromo {
     public static void main (String [] args) throws Exception {
          String test = args[0];
          boolean result = true;
          if (test.length() <= 1)
               result = false;
          else {
               int end, begin;
               begin = 0;
               end = test.length() - 1;
               if ((test.length())%2 == 0) {
                    while (begin < end) {
                         if (test.charAt(begin) != test.charAt(end)) {
                              result = false;
                              break;
                         begin++;
                         end--;
               else {
                    int medio = (test.length() ) / 2 + 1;
                    while (begin < medio && end > medio) {
                         if (test.charAt(begin) != test.charAt(end)) {
                              result = false;
                              break;
                         begin++;
                         end--;
          System.out.println("The fact that the string is a palindrome is " + result);
     

Similar Messages

  • Is there any better way for updating table other than this?

    Hi all, I need to update a row in the table that require me to search for it first (the table will have more than hundred thousands of row). Now, I am using a LOV that will return the primary key of the row and put that primary key to DEFAULT_WHERE property in the block and execute query command to fetch the row that need updating. This works fine except that it require 2-query-trip per update (the lov and the execute_query). Is there any better way to doing this? This update is the main objective for my application and I need to use the most effective way to do it since we need to update many records per hour.

    Thanks Rama, I will try your method. Others, how to query row instead of primary key? I thought that querying primary key is faster due to the index?
    BTW, what people do if you need to update a table using Form? I have been using the LOV then execute query since I first developing form. But I am building a bigger database recently that I start worrying about multiple query trip to dbms.
    FYI my table will have up to million rows on it. Each row will be very active (updated) within 1-2 weeks after it creation. After that it will exist for records purposes only (select only). The active rows are probably less than 1% of all the rows.

  • Is There a Better Way to Work in the Marker List Window?

    Is there a better way to sequentially listen to phrases one-by-one in the Marker List window? What I'm doing is Auto-Marking one single long file to break out 271 bits and save each as their own file. It's WAY faster than copying and pasting bits into new files and "saving as" 217 times.
    BUT, after Auto-Marking, I have 300-400 phrases to listen to, deleting the non-keepers as I go, until I'm left with my "keeper" 271 marked phrases. But it's so tedious to move from phrase-to-phase. I have to double-click each one before I can hear it (you can move the cursor with the down-arrow, but it won't actually select the audio). So I have to use the mouse (unless I'm missing something) and double-click each of the hundreds of phrases. Then whenever I delete one (which I'll have to do about a hundred times or more to get rid of bad takes, alternates, etc.), inexplicably the cursor jumps way up the list so you have to scroll back down dozens of files to get to where you were. It took me 35 minutes to do it this last time.
    Contrast that with Reaper's audition/preview functionality (which, ironically, AA has also, but only for files already saved into a folder). Once I had all the files saved into a folder, I QC'd all 217 files in Reaper and MAN what a difference! All I had to do was use the "down" arrow to advance to the next file AND have it play automatically (Audition can do the same thing with the "Open File" feature). It literally took me 5 minutes to check all 217 files that way. If AA could add that kind of functionality to the Marker List window, or if I'm just completely missing something (very possible) I would REALLY be happy.
    Any ideas?
    Thanks again! Happy New Years again!
    Ken

    Wild Duck,
    That doesn't quite do what I need. My end-product is 271 (used to be 116) separate files created from one large file. That large one is made up of WAY more than 271 (the VO actor records different versions of some commands, makes mistakes, etc.).
    So I need the ability to listen to each marker, and then be able to delete it if need be.
    The Playlist makes this impossible in two ways. It only has 2 options for hearing each marker, and neither option allows me to delete that marker after I've heard it. It either plays them all back-to-back without stopping, or it plays each as you click the "Move Down" button. That last one would be great if showed me which marker was playing! But it doesn't, so there is no way for me to know which marker number I just heard, nor can I delete that marker after I hear it.
    Sigh.
    Thanks for the tip though:).
    Ken

  • Is there a better way to do this projection/aggregate query?

    Hi,
    Summary:
    Can anyone offer advice on how best to use JDO to perform
    projection/aggregate queries? Is there a better way of doing what is
    described below?
    Details:
    The web application I'm developing includes a GUI for ad-hoc reports on
    JDO's. Unlike 3rd party tools that go straight to the database we can
    implement business rules that restrict access to objects (by adding extra
    predicates) and provide extra calculated fields (by adding extra get methods
    to our JDO's - no expression language yet). We're pleased with the results
    so far.
    Now I want to make it produce reports with aggregates and projections
    without instantiating JDO instances. Here is an example of the sort of thing
    I want it to be capable of doing:
    Each asset has one associated t.description and zero or one associated
    d.description.
    For every distinct combination of t.description and d.description (skip
    those for which there are no assets)
    calculate some aggregates over all the assets with these values.
    and here it is in SQL:
    select t.description type, d.description description, count(*) count,
    sum(a.purch_price) sumPurchPrice
    from assets a
    left outer join asset_descriptions d
    on a.adesc_no = d.adesc_no,
    asset_types t
    where a.atype_no = t.atype_no
    group by t.description, d.description
    order by t.description, d.description
    it takes <100ms to produce 5300 rows from 83000 assets.
    The nearest I have managed with JDO is (pseodo code):
    perform projection query to get t.description, d.description for every asset
    loop on results
    if this is first time we've had this combination of t.description,
    d.description
    perform aggregate query to get aggregates for this combination
    The java code is below. It takes about 16000ms (with debug/trace logging
    off, c.f. 100ms for SQL).
    If the inner query is commented out it takes about 1600ms (so the inner
    query is responsible for 9/10ths of the elapsed time).
    Timings exclude startup overheads like PersistenceManagerFactory creation
    and checking the meta data against the database (by looping 5 times and
    averaging only the last 4) but include PersistenceManager creation (which
    happens inside the loop).
    It would be too big a job for us to directly generate SQL from our generic
    ad-hoc report GUI, so that is not really an option.
    KodoQuery q1 = (KodoQuery) pm.newQuery(Asset.class);
    q1.setResult(
    "assetType.description, assetDescription.description");
    q1.setOrdering(
    "assetType.description ascending,
    assetDescription.description ascending");
    KodoQuery q2 = (KodoQuery) pm.newQuery(Asset.class);
    q2.setResult("count(purchPrice), sum(purchPrice)");
    q2.declareParameters(
    "String myAssetType, String myAssetDescription");
    q2.setFilter(
    "assetType.description == myAssetType &&
    assetDescription.description == myAssetDescription");
    q2.compile();
    Collection results = (Collection) q1.execute();
    Set distinct = new HashSet();
    for (Iterator i = results.iterator(); i.hasNext();) {
    Object[] cols = (Object[]) i.next();
    String assetType = (String) cols[0];
    String assetDescription = (String) cols[1];
    String type_description =
    assetDescription != null
    ? assetType + "~" + assetDescription
    : assetType;
    if (distinct.add(type_description)) {
    Object[] cols2 =
    (Object[]) q2.execute(assetType,
    assetDescription);
    // System.out.println(
    // "type "
    // + assetType
    // + ", description "
    // + assetDescription
    // + ", count "
    // + cols2[0]
    // + ", sum "
    // + cols2[1]);
    q2.closeAll();
    q1.closeAll();

    Neil,
    It sounds like the problem that you're running into is that Kodo doesn't
    yet support the JDO2 grouping constructs, so you're doing your own
    grouping in the Java code. Is that accurate?
    We do plan on adding direct grouping support to our aggregate/projection
    capabilities in the near future, but as you've noticed, those
    capabilities are not there yet.
    -Patrick
    Neil Bacon wrote:
    Hi,
    Summary:
    Can anyone offer advice on how best to use JDO to perform
    projection/aggregate queries? Is there a better way of doing what is
    described below?
    Details:
    The web application I'm developing includes a GUI for ad-hoc reports on
    JDO's. Unlike 3rd party tools that go straight to the database we can
    implement business rules that restrict access to objects (by adding extra
    predicates) and provide extra calculated fields (by adding extra get methods
    to our JDO's - no expression language yet). We're pleased with the results
    so far.
    Now I want to make it produce reports with aggregates and projections
    without instantiating JDO instances. Here is an example of the sort of thing
    I want it to be capable of doing:
    Each asset has one associated t.description and zero or one associated
    d.description.
    For every distinct combination of t.description and d.description (skip
    those for which there are no assets)
    calculate some aggregates over all the assets with these values.
    and here it is in SQL:
    select t.description type, d.description description, count(*) count,
    sum(a.purch_price) sumPurchPrice
    from assets a
    left outer join asset_descriptions d
    on a.adesc_no = d.adesc_no,
    asset_types t
    where a.atype_no = t.atype_no
    group by t.description, d.description
    order by t.description, d.description
    it takes <100ms to produce 5300 rows from 83000 assets.
    The nearest I have managed with JDO is (pseodo code):
    perform projection query to get t.description, d.description for every asset
    loop on results
    if this is first time we've had this combination of t.description,
    d.description
    perform aggregate query to get aggregates for this combination
    The java code is below. It takes about 16000ms (with debug/trace logging
    off, c.f. 100ms for SQL).
    If the inner query is commented out it takes about 1600ms (so the inner
    query is responsible for 9/10ths of the elapsed time).
    Timings exclude startup overheads like PersistenceManagerFactory creation
    and checking the meta data against the database (by looping 5 times and
    averaging only the last 4) but include PersistenceManager creation (which
    happens inside the loop).
    It would be too big a job for us to directly generate SQL from our generic
    ad-hoc report GUI, so that is not really an option.
    KodoQuery q1 = (KodoQuery) pm.newQuery(Asset.class);
    q1.setResult(
    "assetType.description, assetDescription.description");
    q1.setOrdering(
    "assetType.description ascending,
    assetDescription.description ascending");
    KodoQuery q2 = (KodoQuery) pm.newQuery(Asset.class);
    q2.setResult("count(purchPrice), sum(purchPrice)");
    q2.declareParameters(
    "String myAssetType, String myAssetDescription");
    q2.setFilter(
    "assetType.description == myAssetType &&
    assetDescription.description == myAssetDescription");
    q2.compile();
    Collection results = (Collection) q1.execute();
    Set distinct = new HashSet();
    for (Iterator i = results.iterator(); i.hasNext();) {
    Object[] cols = (Object[]) i.next();
    String assetType = (String) cols[0];
    String assetDescription = (String) cols[1];
    String type_description =
    assetDescription != null
    ? assetType + "~" + assetDescription
    : assetType;
    if (distinct.add(type_description)) {
    Object[] cols2 =
    (Object[]) q2.execute(assetType,
    assetDescription);
    // System.out.println(
    // "type "
    // + assetType
    // + ", description "
    // + assetDescription
    // + ", count "
    // + cols2[0]
    // + ", sum "
    // + cols2[1]);
    q2.closeAll();
    q1.closeAll();

  • Configure Offer remote assistance removes all helpers, then re-adds. Misconfiguration? Is there a better way?

    Hi, my domain is at the 2008R2 functional level, and I have a group policy which configures the "offer remote assistance" setting (Computer Configuration>admin templates>System>Remote Assistance).  I have noticed some interesting
    behavior, and I'd like to know if there's a more efficient way to do this:   Whenever this policy gets applied, it seems as if it removes all individuals from the "Offer Remote Assistance" group, then re-adds them.  I notice this because
    when I update the group policies on the clients, I see security log event 4733 (removing the account from the "offer remote assistance group") for each defined helper, then see security log event 4732 (adding the account to the "offer remote
    assistance group") for each helper.
    Is there a better way to accomplish this without adding and removing the accounts from the "offer remote assistance" group every time the policy is refreshed?
    I ask because I'm using a SIEM for logging privileged account usage or membership changes, and the hundreds of events per day are a bit noisy.
    As always, any recommendations are greatly appreciated!
    Thanks,
    Kevin

    > the "apply without changes" setting that Martin mentioned?
    Check http://gpsearch.azurewebsites.net/#329 - enable this and do not
    set "apply without changes". But be aware that regardless of what you
    configure, security policies WILL apply every 16 hours or so in the
    background. That's a hard coded value and behavior, and this applies
    only to security settings.
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Express and Extreme - is there a better way than WDS?

    Hi all
    I have a UFO extreme (connected to the modem) and an express set up for WDS to extend the range of the network. The performance is terrible. Is there a better way to extend the network?
    Could I connect the express to the extreme via a CAT5 cable? If so would this provide better performance and - how would I set this up?
    Regards
    Stephen

    Stephen Bennett wrote:
    I have a UFO extreme (connected to the modem) and an express set up for WDS to extend the range of the network. The performance is terrible. Is there a better way to extend the network?
    Ensure that your Airport Express is placed correctly.
    Also check for interference.
    Could I connect the express to the extreme via a CAT5 cable? If so would this provide better performance
    Yes this will provide much better performance. WDS effectively halves the bandwidth and can be more susceptible to interference than a single base station.
    and - how would I set this up?
    You would create a roaming network. The remote Airport Express would be configured as a wireless bridge (not distribute IP addresses), it would (like WDS) use the same network name and wireless security as the main base station, however unlike WDS it needs to be on a different channel.
    iFelix

  • When I share a file to YouTube, where does the output file live? I want also to make a DVD. And is this a best practice or is there a better way?

    I want also to make a DVD, but can't see where the .mov files are.
    And is this a best practice or is there a better way to do this, such as with a master file?
    thanks,
    /john

    I would export to a file saved on your drive as h.264, same frame size. Then import that into youtube.
    I have never used FCP X to make a DVD but I assume that it will build the needed vob mpeg 2 source material for the disk.
      I used to use Toast & IDVD. Toast is great.
    To "see" the files created by FCP 10.1.1 for YouTube, rt. (control) click on the Library Icon in your Movies/show package contents/"project"/share.

  • Hi, I had to re install my itunes library from a hard drive to my new laptop. Now I cant sync my iphone because itunes thinks all songs are new and basically doubling all albums. Should i restore iphone or is there a better way?

    hi, i had to re install my itunes library from a hard drive to my new laptop. Now itunes thinks i am trying to add new albums and saying there isnt enoug space. should i restore or is there a better way.

    Have you tried exporting a 10 second section of the footage to see if the issue shows up once the seqeunce is actually exported from the timeline. I edit on CS5 with windows 7 pro at work quite often and have no issues so I assure you that isn't the issue. I also edit with AVCHD footage when at home and work quite freqeuntly as well so I'm positive that isn't the issue. It sounds like a GPU driver has been corrupted in the way it interacts with premiere pro. What type of GPU do you have? If it supports MPE's GPU acceleration have you tried turning it off and seeing if that makes any difference?
    Anyways though try to export a 10 second test section of your timeline to see if when the clip is exported from premiere it will play normally in windows media player or vlc or w/e media player you want to use. If it exports fine then you can almost be positive it's a corrupted video card driver. If that's the case I'd re-install your GPU's driver and also check your gpu makers website to see if they have a updated driver avaiable.

  • Is there a better way to add int arrays together?

    I'm working on a project that will add arrays of integer together...all element are nonnegative integers
    For example
    A = [0 1 2 3]
    I need to find an algorithm to find 2A= A + A, 3A = A+A+A....., hA = A +...A ( h times)
    For 2A, the result array will look like this
    2A = [ 0 1 2 3 1 2 3 4 2 3 4 5 3 4 5 6]
    Then using Array.sort(2A) i will have 2A= [ 0 1 1 2 2 2 3 3 3 3 4 4 4 5 5 6].
    Lastly I will write another code to get rid of repetitions to get the desired array 2A = [ 0 1 2 3 4 5 6]
    public static int[] hA(int[] a, int h){
       // mon = null;
       //mon = MonitorFactory.start("myFirstMonitor");
           if (h==1) return a;
           if (h==2){          
                  int[] b = new int[(a.length)*(a.length)];
               int count = 0;
               int maxa = a.length,maxb=b.length;
               for (int i = 0 ; i < maxa; i++)
               for (int j=0 ; j <maxa; j++)
                 b[count]=a[i]+a[j];
                    count++;
                return b;
               else
               return hA(a,h-1);     
           }I still don't know how to write recursive code to get it to find 3A, 4A....hA....
    is there any better way to do this?

    sorry for not defining it better
    2A ={ a + a' | a,a' E A}
    that means for A = { 0 1 3} , 2A ={ 0 1 2 3 4 6}
    but to get to [ 0 1 2 3 4 6], i don't know of any better way to achieve it.
    Also to find 3A = { a+a'+a'' |a,a',a'' E A}
    that means for A = { 0 1 3} ,3A={ 0 1 2 3 4 5 6 7 9}
    the idea is simple but to put into java code is not...at least for me

  • Is there a better way to position a flash movie than ap div?

    I'm creating a new website(not yet active) and have a great flash movie for the home page.  I've place it in an ap div and of course it moves to a different position in different browsers. Is there any way I can get it to display correctly, or is there a better way to position the movie? Thanks.

    Of course. The following code is for the home page: 
    "http://www.w3.org/TR/html4/loose.dtd">
    #page-background
    #container
    /* this image stays in internal style sheet*/
    #mainImage{
        background-image: url(images/mainImageBkgrnd.jpg);
        background-position: center top;
        background-repeat: repeat-y;
        width: 875px;
        height: 625px;
        margin: 0 auto;
        padding-left: 0px;
        padding-right: 0px;
        margin-top: 0px;
        position: relative;
    #footer{
        position: absolute;
        top: 700px;
        left: 10px;
    #serviceImage{
        position: absolute;
        top:300px;
        left: 35px;
        z-index: 0;
    #orderImage{
        position: absolute;
        top: 300px;
        right: 20px;
    #flashMovie {
        background-image: url(images/flashPix.png);
        background-position: center top;
        background-repeat: no-repeat;
        width: 700px;
        height: 300px;
        margin: 0 auto;
    .flashText p{
        width: 250px;
        padding-top: 75px;
        font-family: "Arial Narrow";
        font-size: 180%;
        line-height: 1.5em;
        color: #666;
    #vertStripe {
        position: absolute;
        top: 325px;
        left:435px;
    #serviceHeader {
        position: absolute;
        z-index : 50;
    #apDiv1 {
        position:absolute;
        left:607px;
        top:169px;
        width:700px;
        height:298px;
        z-index:2;
    html {overflow-y:hidden;}
    body {overflow-y:auto;}
    #page-background
    #content
    </style>
    <![endif]-->
    <!IE7 and lower stylesheet>
    <!>If this page is not displaying correctly, please update your browser by downloading Internet Explorer 8.<link rel="stylesheet" type="text/css" href="ie7-and-down <link rel="stylesheet" type="text/css" href="ie7-and-down.css" />  <![endif]>
    body
    font-size: 70%;
    text-align: center;
    <!begin flash Movie> 
        <!>>
          <!<![endif]>
            Content on this page requires a newer version of Adobe Flash Player.
    !http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif|height=33|alt=Ge t Adobe Flash player|width=112|src=http://www.adobe.com/images/shared/download_buttons/get_flash_player .gif!</p>
          </div>
          <!>>
        </object>
        <!<![endif]>
      </object>
    </div>
    <!end flash Movie>
    !images/waves2.png|height=100%|alt=Waves|width=100%|src=images/waves2.png!
    !images/banner_nws.gif|height=120|alt=Northwind Safety Corp.|width=875|src=images/banner_nws.gif!
    <!main Navigation menu>
    [About Us | about_us.html]
    [Services | serv_fa.html]
    [Training | train_cpr.html]
    [Products | products.html]
    First Aid
    [AEDs | aed_philips.html]
    <!end main Navigation menu>
    !images/serviceComp.png|height=250|alt=Van Serviceman|width=400|src=images/serviceComp.png!<!end serviceHeader>
    </div><!end serviceImage>
    !images/vertStripe.png|height=150|width=5|src=images/vertStripe.png!
    <!end vertical stripe>
    !images/orderComp.png|height=250|alt=Order Taker|width=380|src=images/orderComp.png!
    <!end orderImage>
    </div><!end mainImage>
    h1. Contact Us
    h1. Careers
    h3. Northwind Safety Corporation
    8425 Rausch Drive
                       Plain City, Ohio 43064
                    phone: 614-873-1000
                    fax: 614-873-1002
    [ [email protected] | mailto:[email protected]]
    <!end footer div>
    </div><!end container div>
    </div><!end body div>
    swfobject.registerObject("FlashID");
    <!end body>
    </html> 
      Thanks  

  • After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?

    After saving a pdf as Excel workbook the numbers remain text and cannot be used in calculations. Is there a better way to convert into real digital numbers?
    I have tried to convert the pdf to Word instead but same difficulty with numbers: look like numbers but not usable for calculations

    Excel has a 'text to numbers' function, I would use that.
    Convert text to numbers. Microsoft Excel.

  • Timeline not working - is there a better way?

    First, what I'm trying to accomplish:
    I have a div layer the explains how to navigate the ensuing
    page.
    I want this to display for about 25 seconds and then hide
    while the other two divs on the page become visible.
    I set up a timeline with three layers and made it
    automatically play back.
    I made the first layer visible for 25 seconds and then made
    it hidden.
    The other two divs started hidden and I made them visible
    after 25 seconds.
    It worked for a while but I went back to fine tune it but the
    timeline appeared to be blank. I tried to set it up again but now
    things are all screwed up.
    Is there a better way to show and hide divs for specific
    amounts of time?
    Are there tricks to using timelines that I'm missing?
    Thanks,
    Steve

    This doesn't really answer your question - but your post
    raises some
    other questions. If you have to explain to users how to
    navigate your
    site, isn't that a red flag that there are other more serious
    issues?
    Like making the site usable? If you still want to display
    those DIVs,
    not all people read at the same speed. After 25 or whatever
    seconds some
    people will be bored having to stare at that so long while
    others will
    not have had enough time to read it. Best to let the user
    decide when to
    close the DIV. The last thing to note is the Timeline is
    pretty awful.
    So bad in fact that it is being removed from Dreamweaver CS4.
    You might
    consider using Flash for "Timeline animations" instead.
    Alec
    Adobe Community Expert

  • Switching a panel to another panel in the same frame.Is there a better way?

        public void actionPerformed(ActionEvent e) {
            if (e.getSource() instanceof toolButton){
                westPanel.remove(optionPanel);
                westPanel.setVisible(false);
                toolButton tb = (toolButton)e.getSource();
                optionPanel = tb.getPanel();
                westPanel.add(optionPanel);
                westPanel.setVisible(true);
        }This code above is what I used to execute when one of several JButtons is being pressed.
    In this program, one of the JPanel will be automatically switched to another JPanel when you press the respective JButtons.
    Here are my questions:
    1. Right now, I use westPanel.setVisible(false) and then change some stuff and then invoke westPanel.setVisible(true) to make it visible again. Although this works, I have a feeling that this is not quite right. I feel that there should be some better way to do this, switching the panel and request the program to redraw the replacing JPanel. Is there a better way for this?
    2. Most of the time, the JPanel changes the size according to the components on it. I have tried several LayoutManager, but it seems that those components have more priority. Is there a way to completely fix the JPanel so that they stay the same size?

    Look into using a Card Layout rather than manually swapping the panels: http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html

  • Netdevice=eth0 - is there a better way?

    With the latest patches for ZFD, the imaging kernel now supports wireless drivers. Clearly, many of us are having issues because machines with WiFi adapters prompt for interface selection.
    We've temporarily settled on netdevice=eth0 in settings.txt to turn off this unheralded new feature.
    We tried using "brokenmodules" successfully, but we have quite a few different wireless adapters. Long term, that could get sticky.
    Dear Novell - is there a better way to disable WiFi in imaging? In a medical environment, there are often computers with multiple ethernet interfaces and there is no guarantee that eth0 isn't crossover connected to some piece of equipment or a printer in a lab.
    How about "brokenmodules=wifi"?
    Or, maybe... "wifi=whotheheckwantstoimageusingwirelessanywa y"

    We use
    Code:
    netsetup=dhcp,all
    And it works fine on every desktop and laptop we tried.

  • Complete Apple TV Resync when upgrading my server?  Is there a better way?

    We recently replaced our old imac that served are the ITunes library with a new one. We have two Apple TVs.
    I configured the new server using a time machine backup from my old. I de-authorized my old computer and re-authorized the new one. All of my music, movies and pictures transferred over fine. To get the Apple TVs to work (they weren't visible on the new server), I had to 'remove' them from the old computer. Then add them again be getting a code from the ATVs and typing it into the new ITunes server.
    Even though both ATVs were current with all content, they reloaded everything. I'm about 48 hours in, and it still isn't done. Was there a better way?

    No, unfortunately, it's one of the more annoying aspects of the ATV. If you replace the computer you keep your iTunes library on the ATV sees it as a different library even though it's the same library on a different computer. The hardware signature of the new computer is different, so the ATV doesn't recognize it as the same library. The same thing happens if you replace the hard drive in your computer, the ATV will no longer recognize it as the same computer. Your only option is to wait for the sync to complete.

Maybe you are looking for

  • Mandatory fields for GN_INVOICE_CREATE

    Hi, My requirement is for a given material say 'X', I want to know its netprice. I mean when I create a sales order with material 'X', I get its netprice. I want to know the netprice of this material without creating  a sales order itself. I gathered

  • How do I install adobe flash player on my samsung galaxy tablet

    How do I install adobe flash player on my samsung galaxy tablet

  • Exporting as Quicktime

    What is the best method and options to export a sequence from FCP as a Quicktime. When I export there is significant quality loss. The only way i can find is to export as uncompressed but this takes too long for my needs and the file size is too larg

  • Finder: FIXME: IOUnserialize has detected a string that is not valid UTF-8, "

    See this message a week ago in the console. I've upgrade my Macbook Pro Mid 2010 the last three years vom SL to Lion, Ml and now Mavericks. After seeing this message, I decide for a clean install. All runs fine, but the message appears in the console

  • Zenworks installation cd with PXE boot

    Hi! Excuse my english, swedish is my native language. When i use pxeboot i thought everything worked, BUT, when i think imaging is starting, following comes up: "Could not find Zenworks installation CD. Activating manual setup program". Then i cant u