General programing question

I made the download of NetBeans IDE 4.0 and it doesn't recognise the TextIO.
EX:
int abc = TextIO.getInt();What do I do ?
Is there any other way to input text ?

Well, considering TextIO not being part of the Java standard API, that is not very strange. I guess TextIO is some class that reads values from the keyboard using a BufferedReader or something.
Read more about how to read keyboard input here:
http://javafaq.mine.nu/lookup?69

Similar Messages

  • A general programation question

    I have a ProductQuantity with a product and a quantity fields. According to good programation tecniques, should I use it just like that or should I put a getProduct, and a getQuantity methods, and make product and quantity private?
    Thanks.
    class ProductQuantity{
         Product product;
         int quantity;
         ProductQuantity(Product getProduct, int getQuantity){
              product = getProduct;
              quantity = getQuantity;
    }

    because english is many times not a choice, but still we need
    to use it, and I am still right that people can understand me, despite my errors.Indeed. Like I said, you're free to ignore anything you read in this forum, Java or otherwise.
    But why should English be any different from Java? You come here to improve your Java. You wouldn't accept errors in your programming. Why not take the same attitude towards language?
    I would agree with you if I was running down the OP or anyone else about an error like this. But simply pointing it out doesn't seem rude to me.
    yes, there is a classic most times when i post in english forums: "Excuse me for my bad english. :-("It's very unfortunate, but nowadays these kinds of errors are even common to folks who use English only. The Web and AOL's Instant Messenger have encouraged a kind of shorthand and fuzzy thinking that is appalling. How many people screw up "its" and "it's"? Or use "ur" as shorthand for "you are"? Understandable, yes; harmless, perhaps. But I can guarantee you that if that kind of sloppiness leaks into your formal writing on a resume or business letter that you won't get the job. Better to develop good habits.

  • Maintain the general program errors

    hi all,
    i have problem while printing the customized layout for PO with message.
    Sytem message 038 from work area SSFCOMPOSER does not exist.
    Message 038 from work area SSFCOMPOSER was not defined.
    You have to maintain this message in the system.  If you have
    authorization for Customizing, maintain the general program errors.
    Otherwise, please inform your system administrator.
    Is it possible to maintain using SE91. if not, how to free from this message.
    Thanks in advance for ur valuable time.
    Regards,
    reji.

    hi anji,
    thanks for ur reply,
    But it works fine in development client but not in test client both clients are in the same server, how this happens?
    regards,
    prabhu

  • I have a programming question

    Hi
    I have a programming question here. I spent a lot of time doing it, but I still can't get it. Here is the question :
    Write a method called countTo that takes one integer as a parameter and prints a
    comma-separated list of the numbers from 1 to the value of the parameter, or an
    appropriate error message if the parameter is less than one. In either case (if a list
    of numbers is printed, or an error message is printed), after printing, the cursor
    should be advanced to the next line.
    For example, if the parameter has a value of 1, the method should just print the
    the value 1 to the screen followed by a new-line character. If parameter has a value
    of 5, the method should print the following (exactly as shown, make sure there is
    no comma after the last value, and that all values are on one line with no spaces
    between them):
    1,2,3,4,5
    This method should only print to the screen, and should not return a value.

    I have a programming question here. I spent a lot of
    time doing it, but I still can't get it. Please post what you have done so far.

  • General dreamwevaer question

    hello dreamweavers.
    im a newbie going to use dreamweaver from next week and beyond,so id like to ask the following:
    should i design the website in photoshop and then import it into dreamwevaer,in order to code it?
    is dreamwevaer flexible in design point of view,or is it mostly getting finished designs such as headers,footers,flash banners,
    and then building up the site where things so and such.
    thank you.

    Hello Nancy.
    seems like an informative website,i can see it is easy to understand the
    basics.
    Στις 23 Μαρτίου 2012 4:29 π.μ., ο χρήστης Nancy O. <[email protected]>έγραψε:
       Re: general dreamwevaer question  created by Nancy O.<http://forums.adobe.com/people/Nancy+O.>in
    Dreamweaver - View the full discussion<http://forums.adobe.com/message/4283588#4283588

  • General programming practice question (possibly re: clusters)

    I apologize for this probably being an old topic or something I should have found elsewhere, but I simply didn't know what to search for.
    I am tackling my first labview program of significant scale, and quickly discovering that the difficulty of wiring scales exponentially with the number of things you're trying to do.  I marvel at the short and sweet pieces of code people post on here, and try my hardest to replicate the style to no avail.
    If I've missed a good guide for good organizational practices when programming, please point the way!
    Essentially, I'm grabbing info from a video signal via a daq card, using this to compute the location of objects in the video, and sending instructions to a robot to control its movement-- this means I have the image wires, serial wires, integer wires for pixel values, real wires for coordinates coordinates, and error wires flying around.  It's not an extraordinary amount of data but it seems to be an extraordinary amount of scooting things around to make things look pretty and/or readable, every time I make a change.
    Clearly use of subVIs is the way to go for each of the tasks, but I still have several pieces of data that need to be communicated from each task to the next.
    Is it common practice to cluster the data even if it's unrelated, just to simplify the wiring?  Is there significant overhead if you're unclustering and re-clustering it in each subVI?  (I tried to write a quick benchmark program but I couldn't quite figure out how to use the profiler)
    Any general veteran tips would be much appreciated!

    Check out the following links: -
    http://www.bloomy.com/resources/index.php#pres
    Specifically here the Powerpoint presentations (five_techniques_for_better_labview_code.pps)
    Some additional pointers/ resources below: -
    http://forums.ni.com/ni/board/message?board.id=LVETF&message.id=1
    http://zone.ni.com/devzone/cda/tut/p/id/4434
    http://openg.org/tiki/tiki-index.php?page=Style%20Guide
    There is a host of other information out there as well, try Google and use the term 'LabView style guide'.
    Hope this helps put you on the right track.

  • General Game Programming Questions

    Hey All,
    I'm a reformed C# / VB.Net MMOPG game programmer who want's to take a crack at making MMORPG's using Java. Mainly because I'm tired of paying the big $$$ for M$'s products when I'm finding Java has a nice assortment of high quality RAD tools and the such for next to nothing, if not free. The only free IDE's for the .Net platform at the moment is a still too early in beta (buggy) to be productive with. Anyways after buying a couple of Java books and knocking them out in a week's time, I'm feeling pretty confident about making Java work for me. I do however have a few questions that the books I purchased failed to answer so here they are..
    Is it possible to compile Java applications (game clients in my case) in a stand alone executable form? I would like a install system where users can just install my game client without them having to worry about having the latest versions of Java ,etc, ie.. I want it to be a easy one click install application.. Does Java offer this? That was another thing that turns me off about the .Net platform, many people don't want to take the time to install the .Net runtime just to check out my game applications...
    I was wondering how Java handles Images, Does Java package up all your images into a .Jar file? A game client can have 100's of sprite sheets, mesh's, skins, etc, ie.. Say I were too make a Applet game client, how would java handle all the images? Would the players download the images while the applet loads?
    Well thats really all I wanted to know.... Thanks In Advanced...

    If you do a search on the forums for "java exe" or something similar, you will probably find about a billion posts asking and answering the same question. The answer is yes, but you will of course make the game windows dependent. Also I think the executable turns out to be quite large and doesn't work without its quircks... a better approach is to install the java runtime with the install of your game. User would never even notice.
    As far as how java handles images, for an applet the images will be downloaded with the applet, but will not be loaded until called upon in the program. You can package all the images into a jar file, or you can just leave them in a directory/directories, although packaging them into one jar would be faster due to downloading only one file and compression.

  • General java programming question.

    i have trouble knowing when something is referred to in contrast to something being copied.
    in this case, the array has changed, but not the character.
    public class ReturnArray2
         public static int[] getArray()
              int a[] = new int[3];
              a[0] = 2;
              a[1] = 4;
              a[2] = 6;
              return a;
         public static void mystery(int[] b, char r)
              r = 'Q';
              for(int i = 0; i < b.length; i++)
                   b[i] = b[i] + 5;
              System.out.println("array b contains: ");
                   for(int i = 0; i < 3; i++)
                        System.out.println(b[i] + " ");
         public static void main(String args[])
              int scores[];
              char x = 'L';
              scores = getArray();
              System.out.println("Array in main.");
              for (int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
              mystery(scores, x);
              System.out.println("After return from mystery.");
              System.out.println("character is " + x);
              for(int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
    Array in main.
    2
    4
    6
    array b contains:
    7
    9
    11
    After return from mystery.
    character is L
    7
    9
    11
    */and in this case, why didn't the array change?
    public class ReturnArray2
         public static int[] getArray()
              int a[] = new int[3];
              a[0] = 2;
              a[1] = 4;
              a[2] = 6;
              System.out.println("array in function");
              for(int i = 0; i < 3; i++)
                   System.out.println(a[i] + " ");
              return a;
         public static void mystery(int[] b)
              for(int i = 0; i < b.length; i++)
                   b[i] = b[i] * 2 + 5;
              int[] c = new int [3];
              c[0] = 55;
              c[1] = 44;
              c[2] = 33;
              System.out.println("array c contains: ");
              for (int i = 0; i < 3; i++)
                   System.out.println(c[i] + " ");
              b = c;
              System.out.println("array b contains: ");
                   for(int i = 0; i < 3; i++)
                        System.out.println(b[i] + " ");
         public static void main(String args[])
              int scores[];
              scores = getArray();
              System.out.println("Array in main.");
              for (int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
              mystery(scores);
              System.out.println("After return from mystery.");
              for(int i = 0; i < 3; i++)
                   System.out.println(scores[i] + " ");
    array in function
    2
    4
    6
    Array in main.
    2
    4
    6
    array c contains:
    55
    44
    33
    array b contains:
    55
    44
    33
    After return from mystery.
    9
    13
    17
    */

    i have trouble knowing when something is referred to
    in contrast to something being copied.Java has only one passing mode: pass-by-value. The value, whether it be of an int or a reference, is always copied.
    in this case, the array has changed, but not the
    character.A reference has a value, that value is either null or the address of an Object. The value of scores is the address of the array returned by getArray(). When you pass scores to mystery() the value of scores is copied to a new reference called b on the local stack frame. The value of b is the same as the value of scores, but they are two different references. However, since the value is the same they both contain the same address which is the address of the array. When you modify the array you are modifying the array at the address that b has as it's value. Since scores has that same address as it's value, in other words they both point to the same array, you will see it modified in both places. When you passed the char the value (L) was copied to the local stack frame. Your copy r now has the value L. Modifying r modifies the value at r, which is independent of the value at x.
    So, with the char you changed the value at the address. With the reference you changed the value at the address the reference contained as it's value.
    and in this case, why didn't the array change?You didn't modify the array, you simply printed it's contents concatenated with an empty String.

  • General BADi question:Call BADi in background job/batch input. Possible?

    Hi out there,
    i'm using thoe following BADi: /SAPSLL/CTRL_SD0C_R3 (Global Trade Service).
    But also, this question is a general question.
    If we are calling on screen the transaction VF01, the BADi is called correctly.
    But unfortunately it seemes that the BADi is NOT called (im not really sure, cause i can't debug the background task) when we are calling a batch input sequence wth f.e. form bdc_transaction VF01 nothing happens.
    Maybe BADi cannot be called in a background task? If it's possible, how could it be monitored. Thare isw no spool entry or anything like that!
    Any answer can help.
    Thank you in advance!
    Regards,
    Timo
    Edited by: Timo Ehl on Apr 14, 2009 7:27 PM

    Hi,
    generally BADIs are called in background mode. You can use the following trick to debug your BADI. You just need to create an infinite loop in your BADI implementation. Something like this.
    DATA: l_a TYPE c.
    WHILE l_a IS INITIAL.
    ENDWHILE.
    Obviously when your BADI is called in background mode then program will get into infinite loop. You can easily connect and debug running programs from transaction SM50. You need to select your background process and go to Program/Session -> Program -> Debugging. You will jump directly into your BADI methos with infinite loop. Then you will just set value to l_a and you will start debugging your BADI. If you can not find any process then your BADI is not called in background mode.
    Cheers

  • Some General Slowness Questions

    Hi there,
    I've had my MacBook Pro since August 2006. I love it dearly, but in the past couple months (especially since I've upgraded to Leopard) it has been so, so, so slow. Dock taking forever to open programs, frequent appearances of the rainbow wheel of death, I've been needing to use Force Quit a lot due to frozen screens. I don't know much technical information about computers, so I've been at a loss to try to solve this problem. Some questions:
    -As an insane college student, I tend to leave my computer on all night, and most of the time in general. I've heard differing opinions on whether this is good or bad. Should I be shutting down every night? Could this be a cause of the slowdown?
    -Could it simply be a space issue? I'm using 60 of 74 available GB. iPhoto and iTunes in particular are slow and freeze a lot. I've tried looking at Activity Monitor, but I can't really figure out how to interpret its data. Looking at its processes list, Microsoft Office seems to be taking up a lot of work just when I have it open...right now Excel is using 38 MB (Real) and 1 GB (Virtual) of Memory. Firefox is using 885 GB of Virtual memory. It also seems that I have the PowerPC version of Office, not the Intel version (which is confusing because I bought Office with the computer)--could that be a problem?
    -I downloaded an application called Cocktail and have been running it, I guess it's supposed to be a general cleanup type app, not sure if it's making any difference though.
    -Sorry, I'm obviously pretty clueless at these things! Thanks for anyone who took the time to read this.

    Okay, 512MB RAM, is your issue, you need at least 1GB to run OSX with any resemblance of snappiness. Using 80% of your drive is a fair bit, but not bad. Its good to have 10% of your drive free at any given time (the system will at times use about that much for virtual memory, although maybe more in your case since you have so little RAM). You might want to start looking through your files and see what you do an don't need, since you can fill up a few GBs fast in some situations (such as installing new programs, etc.)
    Message was edited by: PB PM

  • Misc Basic PL/SQL Application Design/Programming Questions 101 (101.1)

    ---****** background for all these questions is at bottom of this post:
    Question 1:
    I read a little on the in and out parameters and that IN is "by reference" and OUT and IN-OUT are by value. To me "by reference" means "pointer" as in C programming. So it seems to me that I could call a function with an IN parameter and NOT put it on the right side of an assignment statement. In other words, I'm calling my function
    get_something(IN p_test1 varchar2) return varchar2;
    from SP1 which has a variable named V_TEST1.
    So.... can I do this? (method A):
    get_something(V_TEST1);
    or do I have to do this (method B):
    V_TEST1 := get_something(V_TEST1);
    Also, although this may muddy the thread (we'll see), it seems to me that IN, since its by reference, will always be more efficient. I will have many concurrent users using this program: should this affect my thinking on the above question?
    -- ******* background *******
    So Far:<< I've read and am reading all over the net, read and reading oracle books from oracle (have a full safari account), reading Feurstein's tome, have read the faq's here.
    Situation Bottom Line:<< Have an enormous amount to do in a very little time. Lots riding on this. Any and all pointers will be appreciated. After we get to some undetermined point I can re-do this venture as a pl/sql faq and submit it for posting (y'alls call). Some questions may be hare brained just because I'm freaking out a little bit.
    Situation (Long Version):<< Writing a pl/sql backend to MS Reporting Services front end. Just started doing pl/sql about 2 months ago. Took me forever to find out about ref-cursor as the pipe between oracle and all client applications. I have now created a package. I've been programming for 20 years in many languages, but brand new to pl/sql. However, pl/sql sql has freed me from myriad of limitations in MS RS's. My program is starting to get big (for me -- I do a lot in a little) pks is currently 900 lines with 15 functions so far. Currently SP (pls) is back up to 800 lines. I get stuff working in the sp then turn it into a function and move it to the package.
    What does application do?:<<<< Back End for MS Reporting Services Web front end. It will be a very controlled "ad-hoc" (or the illusion of ad-hoc) web interface. All sql queries are built at run-time and executed via "open ref cusor for -- sql statement -- end;" data returned via OUT ref_cursor. Goal is to have almost 100% of functionality in a package. Calling SP will be minimalist. Reporting Services calls the SP, passes X number of parameters, and gets the ref_cursor back.
    Oracle Version: 10.2 (moving to 11g in the next 3 months).Environment: Huge DW in a massively shared environment. Everything is locked down and requires a formal request. I had to have my authenticated for a couple dbms system packages just to starting simple pl/sql programs.

    Brad Bueche wrote:
    Question 1:
    I read a little on the in and out parameters and that IN is "by reference" and OUT and IN-OUT are by value. To me "by reference" means "pointer" as in C programming. So it seems to me that I could call a function with an IN parameter and NOT put it on the right side of an assignment statement. The IN parameter is not passing by reference. It is passing by value. This means variable/value of the caller used as parameter, is copied to the (pushed) stack of code unit called.
    An OUT parameter means that the value is copied from the called unit's stack to the caller (and the current value of the caller's variable is overwritten).
    To pass by reference, the NOCOPY clause need to be used. Note that is not an explicit compile instruction. The PL/SQL engine could very well decide to pass by value and not reference instead (depending on the data type used).
    Note that the ref cursor data type and the LOB data types are already pointers. In which case these are not passed reference as they are already references.
    The NOCOPY clause only make sense for large varchar2 variables (these can be up to 32KB in PL/SQL) and for collection/array data type variables.
    As for optimising PL/SQL code - there are a number of approaches (and not just passing by reference). Deterministic functions can be defined. PL/SQL code can be written (as pipelined tables) to run in parallel using the default Oracle Parallel Query feature. PL/SQL can be manually parallelised. Context switches to the SQL engine can be minimised using bulk processing. Etc.
    Much of the performance will however come down to 2 basic issues. How well the data structures being processed are designed. How well the code itself is modularised and written.

  • XML BURSTING PROGRAM QUESTION

    Hello All,
    I have customized an oracle application program with xml publisher.The program prints the report in PDF format.
    My questions is where this output copied in the server .I am not able to find the pdf report in $APPLCSF/out/.
    Do i need to use XML bursting program to achieve this?If yes i am new to xml coding can anyone help in creating busting control file.
    My object is to print the pdf report to unix server directory
    THanks

    Pl post details of OS, database and EBS versions.
    >
    My questions is where this output copied in the server .I am not able to find the pdf report in $APPLCSF/out/.
    >
    The xml and PDF output of concurrent programs should be available in $APPLCSF/$APPLOUT directory.
    >
    Do i need to use XML bursting program to achieve this?If yes i am new to xml coding can anyone help in creating busting control file.
    >
    Pl see if these links can help
    http://blogs.oracle.com/xmlpublisher/2007/04/bursting_with_bip.html
    http://blogs.oracle.com/xmlpublisher/2007/04/e_business_suite_bursting.html
    >
    My object is to print the pdf report to unix server directory
    >
    Pl clarify what you mean by this.
    HTH
    Srini

  • Calendar Program Question

    Hello! Among the lab assignments I have done for my class, I have this calendar project I've been working on for a good while now. My only question is how do I set the days of the month properly with the empty columns I have encoded in the program? This is a long program and I really haven't put any time into making it look neat, so bare with me!
    What I get so far in the interaction pane is:
    March  2008
                  1  2  3
      4  5  6  7  8  9 10
    11 12 13 14 15 16 17
    18 19 20 21 22 23 24
    25 26 27 28 29 30 31
    and what I'm looking for, obviously, is:
    March  2008
                        1
      2  3  4  5  6  7  8
      9 10 11 12 13 14 15
    16 17 18 19 20 21 22
    23 24 25 26 27 28 29
    30 31> Sometimes I over look something minor, but I'm stumped and this is the ONLY thing I have to do to finish this project!
    /* Calendar Program that displays the days of the
    * month between January 1800 to December 2099
    import javax.swing.JOptionPane;
    public class CalendarProgram
      public static void main(String[] args)
        String monthStr, yearStr, displayStr;
        int year, firstTwoYear, lastTwoYear;
        int daysinMonth = 0, dayofWeek = 0;
        int firstDayofMonth = 1;
        //asks user for input, and then checks if monthStr matches with the user, then displays it.
        monthStr = JOptionPane.showInputDialog(null, "Please enter the month (e.g. January):");
        if(monthStr.equals("January"))
            displayStr = monthStr;     
        else    
        if(monthStr.equals("February"))
            displayStr = monthStr;
        else
        if(monthStr.equals("March"))
            displayStr = monthStr;
        else
        if(monthStr.equals("April"))        
            displayStr = monthStr;
        else
        if(monthStr.equals("May"))
            displayStr = monthStr;
        else
        if(monthStr.equals("June"))
            displayStr = monthStr;
        else
        if(monthStr.equals("July"))
            displayStr = monthStr;
        else
        if(monthStr.equals("August"))
            displayStr = monthStr;
        else
        if(monthStr.equals("September"))
            displayStr = monthStr;
        else
        if(monthStr.equals("October"))
            displayStr = monthStr;
        else
        if(monthStr.equals("November"))
            displayStr = monthStr;
        else
        if(monthStr.equals("December"))
            displayStr = monthStr;
        //asks for the year from user
        yearStr = JOptionPane.showInputDialog(null, "Please enter the year between 1800 and 2099:");
        year = Integer.parseInt(yearStr);    
        //displayStr that displays the user's month and year.
        displayStr = monthStr + "  " + yearStr + "\n";
        System.out.print(displayStr);
        //computation of the first two digits and last two digits of the year.
        firstTwoYear = year / 100;
        lastTwoYear = year % 100;
        //HUGE computation to check the dayofWeek variable. This should compute where the first day of the month will display on the calendar.
        if ((lastTwoYear >= 0) && (lastTwoYear <= 99))
         dayofWeek = lastTwoYear * (1/4);
        if (firstTwoYear == 18)
          dayofWeek = dayofWeek + 2;
        else if (firstTwoYear == 19)
          dayofWeek = dayofWeek;
        else if (firstTwoYear == 20)
          dayofWeek = dayofWeek + 6;
        //Checks to see if a given year has a leap year or not.
        boolean leapYear =
          (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
        if(monthStr.equals("January"))
          daysinMonth = 31;
          if(leapYear)
             dayofWeek = dayofWeek + 6;
           else
             dayofWeek = dayofWeek + 1;
        else    
        if(monthStr.equals("February"))
           if(leapYear)
             dayofWeek = dayofWeek + 3;
             daysinMonth = 29;
           else
             dayofWeek = dayofWeek + 4;
             daysinMonth = 28;
        else
        if(monthStr.equals("March"))
             dayofWeek = dayofWeek + 4;
             daysinMonth = 31;
        else
        if(monthStr.equals("April"))
             dayofWeek = dayofWeek;
             daysinMonth = 30;
        else
        if(monthStr.equals("May"))
             dayofWeek = dayofWeek + 2;
             daysinMonth = 31;
        else
        if(monthStr.equals("June"))
             dayofWeek = dayofWeek + 5;
             daysinMonth = 30;
        else
        if(monthStr.equals("July"))
              dayofWeek = dayofWeek;
              daysinMonth = 31;
        else
        if(monthStr.equals("August"))
              dayofWeek = dayofWeek + 3;
              daysinMonth = 31;
        else
        if(monthStr.equals("September"))
              dayofWeek = dayofWeek + 6;
              daysinMonth = 30;
        else
        if(monthStr.equals("October"))
              dayofWeek = dayofWeek + 1;
              daysinMonth = 31;
        else
        if(monthStr.equals("November"))
              dayofWeek = dayofWeek + 4;
              daysinMonth = 30;
        else
        if(monthStr.equals("December"))
              dayofWeek = dayofWeek + 6;
              daysinMonth = 31;
        dayofWeek = dayofWeek + firstDayofMonth;
        dayofWeek = dayofWeek % 7;
        //this checks if dayofWeek equals 0, it will be placed on the 7th column (Saturday)
        //else the dayofWeek will enter 1-6 like normally (Sunday-Friday)
        int colnum;
        if (dayofWeek == 0)
          colnum = 7;
        else
          colnum = dayofWeek;
        for(int i = 0; i < colnum; i++)
          System.out.print("   ");
        //Displays days of the month and inserts empty columns before 1st day
        for(int day = 1; day <= daysinMonth; day++)
       if (day < 10)
         System.out.print("  " + day);
       else
         System.out.print(" " + day);
       if ((colnum + day) % 7 == 0)
         System.out.println();

    Well, I could move the displayStr = monthStr into the other section of the code where the months are at, but as far as using java.util.Calendar/GregorianCalendar classes the professor made no recommendation of it (though it would be easier no doubt.) That's what he told us to use to display the month properly. I did look in the web for other examples and they did use the java.util.Calendar/GregorianCalendar classes, but I have no idea how to properly implement it. Besides, I was not asking about redundancy.
    After I made the thread, I did work on it a little bit more, and I changed:
       if ((lastTwoYear >= 0) && (lastTwoYear <= 99))
         dayofWeek = lastTwoYear * (1/4); into:
    if ((lastTwoYear >= 00) && (lastTwoYear <= 99))
         dayofWeek = (int) (lastTwoYear * .25);The year 2008 was properly displaying everything on the correct dates, but the other years are off by a few days. So now its either the computation in the long sequence of dayofWeek variable, or (what the professor mentioned in the assignment) it could be:
         loop (for the number of days in the month)
           displayStr = displayStr + <digit in field width of 3>
           if last digit in row, then append �\n� to displayStr}The whole loop, including the "append "\n" to displayStr" doesn't make much sense. So that could be where I'm having problems.

  • Please answer a programming question for an admin

    I'm not a programmer (although my interest is growing), so I can't answer this question in a discussion regarding how Win32API w/OLE and COM is SO much better than programming for Unix/OS X applications.
    The original discussion was in regards to OS X's superior Unix based security, he devolved to this. Having only begun my venture into programming, his questions are a little above my head at this point. I'm also interested (as an amature programmer), how this would be accomplished in OS X/Unix.
    Thanks in advance.
    Here's his position:
    *(1st entry)*
    I have unsed Windows and many flavors of Unix and I have written programs in Assembler, Fortran, Pascal, Cobol, RPG, Smalltak, Basic, PowerBuilder, Delphi, C, C++, C#, Java, and Perl, and I have been programming for over 20 years, so I do have extensive knowledge about programming.
    So I have one question for you:
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    I make my living building complex customized business software, and Windows allow me to build these applications by myself in weeks, when it would take me and a team of programmers months to do these same things in Unix because of the lack of an the Win32 API, COM, and OLE, or I would have to BUY third party libraries that did these things, and deal with the licensing, versioning, and vendor problems that go with them, and none of those third party librabries would be close to Word, Excel, and IE in CAPABILITY!
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    Anyone who thinks a Unix has more CAPABILITIES than Windows, has never used Win32API/COM/OLE/.Net, and does not build customized complex business software for a living, because we people that do are the reason that you find some much customized business desktop software for Windows, and so little for any Unix.
    I have nothing against Unix, and it is great for simple business tasked server software, but for complex business tasked desktop software Windows with Win32API/COM/OLE/.Net wins hands down!
    *(2nd Entry)*
    A System administrators view of an operating system and an application developers view are entirely different, and the Win32API/COM/OLE/.NET simply make my job so much easier, and you simply don't understand because you do not have to deal with the "dirty' details of making what a user wants, which is why your definition of "integration" and mines are totally different!
    With the spell check you talked about, how will you keep in in synch with the dictionary in Word where the user is constantly adding and removing words?
    No, you would have the user to have to maintain two different spell check dictionaries, and you would totally ignore the grammer check requirement!
    Cutting and pasting data between applications is simple integration, and not the complex type that I am talking about.
    Can you make your application display and use the MacGourmet menus appear in its own window, and to access and use the MacGourmet functionality (ie. search for a recipe) in its own window?
    Give me one example of a Unix application that can display the menus of another application, yet alone control its features!
    Of course you can't, because you need COM and OLE!
    I am quite familiar with different flavors of Unix, but those operating systems do not have the rich API and program integration features namely COM and OLE that Windows has, because it violates the Unix idea of security by process isolation!
    Yes that idea of process isolation keeps the operating system safe from malicious code in applications and from one application taking the others down, but you lose the power of programs working together, and you simply cannot build the type of customized business applications that I build by myself, without reinventing the wheel over and over and without having a large team with lots of programmers.
    For example, my customers and millions of others spend all day working in Word and Excel, and the Windows idea that I can transparently integrate my complex business applications right in Word and Excel menu, and into their templates and macros, is why third party developers like me prefer Windows over Unix, regardless of how much better security in Unix is.
    Do not get me wrong, Java improves business application development on Unix, but unfortuantely it is not feasable to rewrite ever legacy application in Java, and Java does not integrate well with other programming languages.
    I used to code business application for both IBM MVS and Sun Solaris, and I never want to go back to those "bad" old days again, once I took the time to learn how to PROPERLY code using Win32API/COM/OLE/.NET!

    At risk of feeding the troll I'll wander in here:
    NOTE: Since this is an Apple programming boards and I have limited experience programming on traditional Unix systems (and most of that in college) I will confine my answers to the area I know.
    If you had to build a business application that has to allow users to, spell and grammer check, and perform financial calculations, and render the HTML, how would you compare the effort to do this in Windows versus that in Linux, AIX, Solaris or any other Unix operating system?
    I can make this business application have these features in ONE DAY on Windows, because COM and OLE lets me, use Word to spell and grammer check, Excel to do the financial calculations, and IE to render the HTML!
    Note that this scenario assumes the user has Microsoft office installed. The person argues that they don't have to purchase libraries to program but what they are effectively doing is simply transferring that cost to user. I don't have to purchase libraries but everyone of my users needs to. Good for you, very good for Microsoft but bad for your customer - IMHO. OK, I know "But all Windows business users have Office installed already." When it comes free with the system then I'll retract my objection.
    Under OS X and Cocoa many of these functions are intrinsic to the system layer and do not require any applications to be installed. Using Cocoa you can write a simple Word processor that has rulers, full font manipulation (including kerning, spacing and leading), Document Save and Load, Printing, Export to PDF as well as spell-checking in under 10 lines of actual code. Adding a custom file type and icon for full system integration will add another 5 minutes to your programing.
    In case you think I'm blowing smoke here is a tutorial from 2002 (yes, this has been possible for over 5 years) outlining the 8 line Word Processor build in Cocoa. http://www.stone.com/TheCocoa_Files/What_s_sofunny.html
    And yes, Cocoa also includes Webkit so I can add full HTML rendering by dragging in a WebKit window to my user interface. For an experienced Cocoa programmer this certainly sounds like less than a day of programming - in fact it sounds like a good tutorial for a middle-experienced training day or 2 day class in Cocoa.
    I won't include the link to the 1 line web browser you can build in Cocoa using Webkit because it's shorter than the description. Feel free to search for it if you want to.
    HONESTLY tell me and others reading this thread how you would go about create the customized business application I described above by yourself in a Unix instead of Windows, and tell us how many MONTHS or YEARS it would take you, or how you would have to BUY some other third party libraries to do what Word, Excel, and IE!
    BUT this is all done from the stock system that is on every OS X computer not simply those with Office installed. Obviously you'd need to add some features that were more complicated than this - because any halfway decent programmer could turn this stuff out - and polish takes a while but to meet the requirements of the challenge it would take 2 days tops.
    Is every *nix programming environment like this? I don't know I can only answer for the system that I have experience with and is the concern of this board. If you really have questions regarding *nix programming then I suggest you find an appropriate board and troll^H^H^H^H^H ask there.
    If you're ever serious about programming on the Mac feel free to stop by and actually take a look at it. I think you'll be surprised.
    =Tod

  • Apple iPod Nano replacement program - question

    Hello, Apple community,
    I have a question about the new replacement program of the iPod nano 1st gen.
    The program doesn't state whether or not you get a refund or a new iPod nano (the small squared once with touch screen).
    The program says that you'll get a replacement iPod Nano, but isn't very specific if it is the new generation.
    I apologise for any spelling mistakes and such.
    Thank you for any answer,
    Pool313

    Hi lindsayfromspencerport,
    I can say it is not a scam - Apple is definitely replacing the iPods.  Once I read the article and went to apple.com, that proved it.  Apple.com would never risk another class action lawsuit over this iPod.
    My First Generation iPod was given to me at work for being the winner of a give-away drawing and about a year or so ago it overheated and erased all the info on the iPod.  Now it will only charge and drain the battery.  It no longer allows me to store any thing on it.
    I am glad that Apple is doing this exchange.  I thought I was just out of luck and was glad I had not paid full price for it.  I love my Nano and used it constantly!!!
    Just send your's in using the box and label they send you and give them 6 weeks like the apple.com website says, Apple will make good on their product.  Millions of people don't stand in line and wait weeks/months for their new products to arrive for no reason, trust me.  Oh, by the way, I know this for sure.....I work for a wireless phone service that has been dealing with Apple for Yearsssssssssssss.....and every year the same thing.  People will give anything to get a product with that apple on it. 
    Knightmanxx

Maybe you are looking for

  • HOW TO KEEP TEXT AT BOTTOM OF PAGE USING JAVASCRIPT-ANSWERED

    UPDATE 5/12/2006: MORE COMPATIBLE CODE: Was using OnRequestEnd.cfm to load copyright info at bottom of each page but page size varied and copyright info would appear at different points on different pages. Didn't look good. Could not use tables to al

  • Issue in connection with database using SQL Developer.

    Hi, I am facing a problem in connecting to a remote oracle database, below are the configuration setting which i am trying to use in sql developer to make the connection TNS Configuration Details (SUDHIR) SUDHIR= (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP

  • JTextField in a JPanel

    It's been a couple years since I worked with GridBagLayout. I'm trying to add a JTextField to a JPanel but it does not seem to be working - it ignores the GridBagConstraints fill and anchor, changes to the JTextField are only visible when resizing th

  • Measuring Instrument Needs to be added in inspection plan for each part

    Hi How to assign the Measuring Instrument in the quality inspection plan for all the materials. Whether i need to assign as material assignment or as PRT. how to use prt to assign to the operation in the quality plan (task list) Thanks VRAJ

  • Macbook pro OS X 10.6.8 needs an update

    I have an older macbook pro with  OS X 10.6.8.  It's running super slow, and my software auto update does not recognize any newer version available.  Which update should I download?