VM | Compiler | platform | int | float | Person |
Sun 1.0.2 Win95 | javac | Pentium 166 | 8.6 | 7.4 | Chris Paulson-Ellis |
Sun 1.0.2 Win95 | VJ++ | Pentium 166 | 8.2 | 7.0 | Chris Paulson-Ellis |
Netscape 3.0 Win95 | javac | Pentium 166 | 97 | 68 | Chris Paulson-Ellis |
Netscape 3.0 Win95 | VJ++ | Pentium 166 | 97 | 68 | Chris Paulson-Ellis |
IE 3.0 with JIT Win95 | javac | Pentium 166 | 147 | 73 | Chris Paulson-Ellis |
IE 3.0 with JIT Win95 | VJ++ | Pentium 166 | 147 | 74 | Chris Paulson-Ellis |
IE 3.0 no JIT Win95 | javac | Pentium 166 | 6.4 | 5.3 | Chris Paulson-Ellis |
IE 3.0 no JIT Win95 | VJ++ | Pentium 166 | 7.0 | 5.7 | Chris Paulson-Ellis |
Visual Cafe Win95 | Cafe | 486 66 | 12.04 | 12.06 | Brent Fulgham |
VJ++ | VJ++ | 486 66 | 15.35/TD> | Brent Fulgham | |
VJ++ | VJ++ | 486 66 | 16.87 | 16.27 | Brent Fulgham |
.exe | VJ++ | 486 66 | 16.91 | 16.27 | Brent Fulgham |
OS/2 V3.0 running JDK 1.01OCT25(JIT) | javac | Pentium 100 | 37.2 | 18.7 | Dan Crowl |
VJ++ wouldn't compile Tak.java because it didn't like the return types and static qualifer on the Tak() methods, which look like constructors, which cannot have a return type or static qualifier. I changed the method names to Tak_() to fix this. Javac didn't mind though :-)
The basic idea of this algorithm is to interpret each configuration as a particular number in a N-number system (where N is equal to the number of different chip sizes). By counting upwards in the N-number system and ignoring numbers that represent configurations already found, all the different configurations can be calculated. Each new number that has an increasing pattern of digits (read from left to right) also represents a new configuration.
Example:
Assume that the number of slots is 4 (this means that we must work with the "4-number system") and that we have 3 different chip sizes (i.e. 5, 18 and 21). The algorithm sketched here will (hopefully) produce this result:
N-number New Config? RAM-size ------------------------------------ 0000 Yes 0 0001 Yes 5 0002 Yes 18 0003 Yes 21 0010 No - 0011 Yes 10 0012 Yes 23 0013 Yes 26 0020 No - 0021 No - 0022 Yes 36 0023 Yes 39 0033 Yes 42 0100 No - 0101 No - ..... ..... 0233 Yes 60 0300 No - ..... ..... 3332 No - 3333 Yes 84/********************************************* ** NECESSARY DECLARATIONS ** *********************************************/ #define cMaxNoOfSlots ??? #define cMaxInChipSizeList ??? #define cMaxInConfigList ??? #define cMaxInNumberList cMaxNoOfSlots typedef unsigned short tNatural; typedef long tInteger; typedef enum { cFalse, cTrue } tBoolean; typedef struct { tNatural noInList; tNatural chipSize[ cMaxInChipSizeList ]; } tChipSizeList; typedef struct { tNatural noInList; tNatural config[ cMaxInConfigList ]; } tConfigList; typedef struct { tNatural noInList; tNatural number[ cMaxInNumberList ]; } tNumberList; /********************************************* ** THE SUGGESTED NON-RECURSIVE ALGORITHM ** *********************************************/ /* NB! Before the following procedure is called, the chipSizeList and noOfSlots must have been initialized correctly. In addition, chipSizeList.chipSize[0] = 0 !!! */ /********************************************************************/ void FindConfigurations( tChipSizeList chipSizeList, tNatural noOfSlots, tConfigList *configList ) { tNumberList numberList; tNatural maxNumber; tNatural i; tBoolean overflow; maxNumber = chipSizeList.noInList; numberList.noInList = noOfSlots; for ( i = 0; i < numberList.noInList; i++ ) numberList.number[i] = 0; overflow = cFalse; i = 0; while ( !overflow ) { configList->config[i] = RamSize( numberList, chipSizeList ); i++; FindNextNumber( maxNumber, &numberList, &overflow ); } configList->noInList = i; } /* FindConfigurations */ /********************************************************************/ void FindNextNumber( tNatural maxNumber, tNumberList *numberList, tBoolean *overflow ) { tNatural i; tBoolean found; *overflow = cFalse; found = cFalse; i = 0; while ( (!found) && (!*overflow) ) { numberList->number[i]++; if ( numberList->number[i] <= maxNumber ) { found = NewNumber( *numberList, maxNumber ); } else { numberList->number[i] = 0; i++; *overflow = ( i >= numberList->noInList ); } } } /* FindNextNumber */ /********************************************************************/ tBoolean NewNumber( tNumberList numberList, tNatural maxNumber ) { tBoolean newNumber; tNatural i; tNatural checkNumber; newNumber = cTrue; checkNumber = maxNumber; for ( i = 0; (i < numberList.noInList) && newNumber); i++ ) if ( numberList.number[i] <= checkNumber ) checkNumber = numberList.number[i]; else newNumber = cFalse; return newNumber; } /* NewNumber */ /********************************************************************/ tNatural RamSize( tNumberList numberList, tChipSizeList chipSizeList ) { tNatural ramSize; tNatural i; ramSize = 0; for ( i = 0; i < numberList.noInList; i++ ) ramSize =+ chipSizeList.chipSize[numberList.number[i]]; return ramSize; } /* RamSize */
Javasoft's been busy too. They released the Java Beans Specification 1.0, available from http://splash.javasoft.com/beans/; Alpha 2.1 of the JavaIDL for Sparc/Solaris and Win32/X86 at http://splash.javasoft.com/JavaIDL/pages/index.html; and a pre-beta for RMI and object serialization at http://chatsubo.javasoft.com/current/. SunTest released Jack, a parser generator written in Java which produces parsers written in Java. Jack comes with a Java grammar. See http://www.suntest.com/Jack/. These are must-have items if you're working with any of these technologies.
Asymetrix released SuperCede 1.0b1, an interactive Java development environment for Windows NT and Win95. The beta is free. It includes a flash compiler that generates true native executable files. This beta does not produce byte code files and the Supercede VM doesn't yet do any security checking, so don't throw away Sun's JDK just yet. Check it out at http://www.asymetrix.com/
Java programmers interested in network servers should check out James at http://james.vpro.nl:7007/. This is GPL'd server architecture currently in development by VPRO. It's not ready for prime time yet, but it does come with source and has a very extensible architecture. It's billed as yet another web server, but it seems to be a lot more general than that.
At http://www.devtools.apple.com/mrj/ you'll find Apple's latest Macintosh Runtime for Java, version 1.0a2. As well as fixing various bugs, this version includes a Java Console window in the Apple Applet Runner for text output from Java applets, lets you to restart and reload applets from the applet runner, and allows you to add new classes to the CLASSPATH. This release is more stable than 1.0a1, but it's only about 60% as fast as Sun's Mac JDK; and there's still no JIT.
Corel is previewing Office For Java on their web site at http://officeforjava.corel.com/index.htm. The performance is pretty poor, and it has a tendency to find bugs in your Java environment, but it's interesting nonetheless. If you're working on your own Java implementation, this makes a nice test of your machine and core packages.
Netscape released the Barium version of the Internet Foundation Classes. They are now available at http://developer.netscape.com/library/ifc/. Barium represents Netscape's 1.0 API complete candidate for IFC 1.0.
Cafe au Lait hasn't been slowing down either. There are now fifty Java mailing lists on the mailing lists page at http://sunsite.unc.edu/javafaq/mailinglists.html The FAQ list at http://sunsite.unc.edu/javafaq/javafaq.html has been updated. New questions cover communicating with CGI programs and sending email from applets. Finally, I've made the complete sets of examples, exercises, and corrections to the Java Developer's Resource available for anonymous ftp from ftp://sunsite.unc.edu/pub/languages/java/javafaq/ These files are tarred and gzipped.
public class OOPTest {
public static void main(String args[]) {
website w = new website("Cafe Au Lait",
"http://sunsite.unc.edu/javafaq/",
"Really cool!");
System.out.println(w);
}
}
Where's the call to toString()?
It's inside the println() method.
The println() method calls the toString() method of any object which is passed to it. I should have been more explicit about this in the book. If an object doesn't have its own toString() method, then the nearest toString() method in its superclasses will be called instead. Typically this is the toString() method of java.lang.Object which nearly prints the name of the class. Program 6.11 could have been written with an explicit call to toString() as shown below. However, the final result would be the same.
public class OOPTest {
public static void main(String args[]) {
website w = new website("Cafe Au Lait",
"http://sunsite.unc.edu/javafaq/",
"Really cool!");
System.out.println(w.toString());
}
}
A federal appeals court has told MICROSOFT to stop eating its cake and having it too. By a two-to-one vote in a case brought by eight current and past freelancers, the Ninth Circuit Court of Appeals, in San Francisco, ordered the software giant to pay employee benefits to hundreds of workers it had been classifying as independent contractors. The majority opinion criticized large corporations that use temps and freelancers "as a means of avoiding payment of employee benefits, and thereby increasing their profits." Microsoft said it will appeal.While it's often easier to treat parttime or even fulltime employees as "independent contractors" to avoid paperwork, that short term savings may get you in trouble with the IRS down the road. All it takes is one phone call from a disgruntled "independent contractor" for the IRS to come down on you. And they probably won't just look at that one "independent contractor's" status either, but at the status of every other freelancer you've ever hired.
You could find yourself liable for significant back taxes and penalties as well as lawyer's and accountant's fees while you try to defend yourself. You may win, but most shops in this industry are so far over the line on this issue, they really have no defense. Furthermore, given the precarious financial position of many new media shops, the IRS investigation alone might be enough to put you out of business.
It won't end there, however. Bankruptcy does not absolve you of your tax liabilities. If a company is unable to pay its payroll taxes, then the IRS will go after the board of directors and any individual who signed off on that company's tax forms.
Many people labor under the misapprehension that just because a contract says a person is an independent contractor, they are in fact an independent contractor. In reality what a contract says about a person's status has almost nothing to do with their status as an employee or freelancer. The main difference between an independent contractor and a freelancer is who directs the work. You tell an independent contractor what job you need done, but not how to do it. You tell an employee both the job you need done and how they should do it.
Some IRS guidelines for determining whether a worker is an employee or an independent contractor are available in Acrobat format at ftp://ftp.fedworld.gov/pub/irs-utl/emporind.pdf. The IRS determines worker status on a case-by-case basis, but here are a few rules of thumb that should give you an idea of whether you need to worry about this:
If you're using independent contractors as a low-cost way to check people out for a few weeks or months, before deciding whether to bring them on as employees, especially to do the same job, you're really asking for trouble. By virtue of hiring people to do the same thing as employees, you're showing the IRS that the job is in fact an employee position. And contractors who don't get hired on as employees are likely to be highly disgruntled, and therefore willing to sic the IRS on you.
(A sidebar: employee designations are almost never challenged. If you say someone's an employee, neither the employee nor the IRS is likely to come back later and say, "No, they're really independent contractors.")
SUBSCRIBE cal FirstName LastNameYou should of course replace FirstName and LastName with your real first name and last name though I won't be particularly bothered if you wish to use an alias.
To unsubscribe from the list send email to listproc@listserv.oit.unc.edu from the account you wish to unsubscribe with the following line in the BODY of your message (NOT the subject.)
unsubscribe calTo get more information on how to use this service, please send the command HELP in a line by itself in a mail message to listproc@listserv.oit.unc.edu.
You MUST follow these instructions. The list owner will not subscribe or unsubscribe you manually if you do not follow these instructions. Requests to do so will be ignored. Repeated requests will get you dumped in my kill file.
[ Cafe Au Lait | Books | Training | Links | FAQ | Tutorial | User Groups ]