comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Can Java Programmer Learn C++ Quickly? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c7a28aa864e41ec * Simple problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/78e14eea63ba6eea * NoSuchMethodException when reflecting ServletContext as a parameter - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a447e67bb400d60c * execution speed java vs. C - 4 messages, 4 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e8713e999b13b7d1 * interface design question - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d83b38c5dae9f704 * Interesting design question involving ZIPs and servers - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d93856e0b568e2e4 * CVS connection problem in Eclipse using ext or extssh - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f210a50f0bbbf32b * Java program is not evaluating String value correctly... - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5d457b2bb465740e * suggestions for user filters mapped to sql - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d0cb3f3cd4574374 * Add bytes - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8dcbf5d8bfd2f823 * [Job-SF, CA] Application Server Architect & Engineer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2f6938b45979846 * Custom Events Question - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2cd191f2e00177bb * [Job-SF, CA] Web Framework Architect & Engineer - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1c596c62c43a5159 * [Job-SF, CA] QA and Build Sr. Engineer - App Server - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/509e0711197b582a * Another simple problem - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3052e16ead05747 * "static" prefix - to parallel "this" prefix - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 ============================================================================== TOPIC: Can Java Programmer Learn C++ Quickly? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c7a28aa864e41ec ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 5:31 pm From: Dimitri Maziuk Ian T sez: > Chris Smith wrote: > >> Ian T <[EMAIL PROTECTED]> wrote: > >>>Please point out where I said it would take months to 'get' pointer >>>arithmetic. >> >> >> I don't believe you did. I'm responding to the general idea, expressed >> at several points in this thread, that it would take months (or even >> years) to understand this stuff. >> > Right. I think it takes months (or years) to write robust code and for > it to be second nature, but understanding and doing are two different > things. The problem is the Java is a platform -- it says so right in the name. To learn C++ one has to first learn about the basic platform under modern stack-based languages, in particular memory management concepts that Java platform hides from you (including the whole idea of stack vs. heap). Then you learn the language, including several incompatible standards. Then you learn the details of your target OS platform. And if you want to write protable code, you learn the details of several other OS platforms and mutually incompatible "features" of several popular compilers. Pointer arithmetics is simple. It's all the other stuff you need to know to understand pointer arithmetics that makes it hard. Dima -- Riding roughshod over some little used trifle like the English language is not a big deal to an important technology innovator like Microsoft. They did just that by naming a major project dot-Net (".Net"). Before that, a period followed by a capital letter was used to mark a sentence boundary. --T. Gottfried, RISKS 21.91 ============================================================================== TOPIC: Simple problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/78e14eea63ba6eea ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 7:10 pm From: Paul van Rossem On 09-12-2004 16:33, stud wrote: > error: > '{' expected > '}' expected > what's wrong with my code? > Thanks!! > > class insertFailException(String reason) extends SQLException > { > public insertFailedException(String reason) > { > super (reason); > } > public insertFailedException() > { > super(); > } > } > Actually, there 2 errors in this piece of code: 1) The class declaration can't have a parameter. 2) The constructor names should be equal to the class name. Paul. ============================================================================== TOPIC: NoSuchMethodException when reflecting ServletContext as a parameter http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a447e67bb400d60c ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 7:11 pm From: "Nicky" Hi Try using getMethod(methodName, parameterTypes) instead of getDeclaredMethod(methodName, parameterTypes). getDeclaredMethod only searches in the actual class of the object, but not in the superclasses. "natG" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi; > I am not new to reflection, but due to events, I feel new:). > > When passing a ServletContext as a parameter to the reflected method, it > throws the NoSuchMethodException. > > Here is the exact simplified code that produces it. (Please excuse the > extra Invoker class, I use it to test non-servlet related reflection.) > > [code] > package ez.test; > > import javax.servlet.ServletContext; > > public class StaticMethodClass { > > public static void methodA(String s1, String s2){ > System.out.println("Hello from methodA: s1 s2. You passed "+ s1 + > " " + s2); > } > public static void methodA(ServletContext ctx, String s2){ > System.out.print("Hello from methodA: ctx s2 . You passed "+ s2); > System.out.println(" from ServletContext: " + ctx.toString()); > } > } > > package ez.test; > > import java.lang.reflect.InvocationTargetException; > import java.lang.reflect.Method; > > public class Invoker { > > Method m = null; > > public Invoker(String methodName, Object[] methodParameters){ > runCustomMethod(methodName,methodParameters); > } > > public void runCustomMethod(String methodName, Object[] methodParams){ > Class c = StaticMethodClass.class; > Method m = null; > Class[] parameterTypes = null; > if (methodParams!=null){ > parameterTypes = new Class[methodParams.length]; > for (int i=0;i<methodParams.length;i++){ > parameterTypes[i] = methodParams[i].getClass(); > } > } > try { > m = c.getDeclaredMethod(methodName,parameterTypes); > m.invoke(null,methodParams); > } catch (SecurityException e) { > System.out.println("Problem with *Security* in " +methodName > +"."); > //e.printStackTrace(); > } catch (NoSuchMethodException e) { > System.out.println("Error with the reflective > method."+methodName + "."); > //e.printStackTrace(); > } catch (IllegalArgumentException e1) { > e1.printStackTrace(); > } catch (IllegalAccessException e1) { > e1.printStackTrace(); > } catch (InvocationTargetException e1) { > e1.printStackTrace(); > } > } > > public static void main(String[] args) { > new Invoker("methodA", new Object[]{"String-0","String-1"}); > } > } > > //now the real guy, the servlet. > > /* Date: 08/12/2004 14:08:57 */ > package test; > > import ez.test.Invoker; > > import java.io.IOException; > import java.io.PrintWriter; > > import javax.servlet.ServletContext; > import javax.servlet.ServletException; > import javax.servlet.http.HttpServlet; > import javax.servlet.http.HttpServletRequest; > import javax.servlet.http.HttpServletResponse; > > /** > * @author Nat > * @version 0.01 > * 08/12/2004 14:08:57 > */ > public class InvokeMethodServlet extends HttpServlet { > > ServletContext ctx = null; > > public void doGet(HttpServletRequest request, HttpServletResponse > response) throws ServletException, IOException { > > String s0 = "StringFromServlet-0", s1= "StringFromServlet-1"; > response.setContentType("text/html"); > PrintWriter out = response.getWriter(); > out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 > Transitional//EN\">"); > out.println("<HTML>"); > out.println(" <HEAD><TITLE>Test Reflection > Servlet.</TITLE></HEAD>"); > out.println(" <BODY>"); > out.println("<p>This servlet simply tests reflection calls.</p>"); > out.println("Check server log for output from strings: " + s0 + " > " + s1); > out.println("Also Check server log for output from CTX & string: " > + s1); > out.println(" </BODY>"); > out.println("</HTML>"); > out.flush(); > out.close(); > new Invoker("methodA", new Object[]{s0,s1}); //this works ok. > new Invoker("methodA", new Object[]{ctx,s1}); //this does NOT. > } > public void init() throws ServletException { > ctx=getServletContext(); > } > } > [/code] > > Thank you, in advance. > -nat ============================================================================== TOPIC: execution speed java vs. C http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e8713e999b13b7d1 ============================================================================== == 1 of 4 == Date: Thurs, Dec 9 2004 10:30 am From: [EMAIL PROTECTED] The following Fortran 95 code below, which multiplies two 800x800 double precision matrices, is shorter and faster than the Java and C codes. On a 2.8GHz Pentium Pro machine, compiled with Compaq Visual Fortran 6.6 with full optimization, it takes 1.0 s. Accounting crudely for the difference in clock speeds, that's a speed factor of (45/1.0)/(2.8/1.33) = 21 over Java. The Intel Fortran compiler may be even faster. Fortran 95, with its array operations and elemental functions, is a higher level language for numerical work than Java, C, or C++, and numerical codes should be faster both to write and to run using it. The recently finalized Fortran 2003 standard adds support for OOP with inheritance. program xmatmul_time implicit none integer, parameter :: n = 800 real(kind=8) :: xx(n,n),yy(n,n) real :: t1,t2,xsum call random_seed() call random_number(xx) call random_number(yy) call cpu_time(t1) xsum = sum(matmul(xx,yy)) call cpu_time(t2) print*,1000*(t2-t1),xsum end program xmatmul_time == 2 of 4 == Date: Thurs, Dec 9 2004 11:41 am From: "Chris Uppal" [EMAIL PROTECTED] wrote: > The following Fortran 95 code below, which multiplies two 800x800 > double precision matrices, is shorter > and faster than the Java and C codes. Interesting example. I'm pleased to see that the traditional superiority of Fortan still holds. (Not that I'm a Fortran programmer myself). Presumably a 32-bit integer version would perform about the same ? Or would it be twice as fast ? > On a 2.8GHz Pentium Pro machine, > compiled with Compaq Visual Fortran 6.6 with full optimization, it > takes 1.0 s. Accounting crudely for the difference in clock speeds, > that's a speed factor of (45/1.0)/(2.8/1.33) = 21 over Java. The Intel > Fortran compiler may be even faster. Um, since Java will do the 32-bit int version in ~5 seconds on my 1.3 GHz machine, I think you'll find that the real ratio is more like 2x, or even 4x, than 21x. Presumably the Fortan implementation uses a library multiplication that has been carefully tuned to get maximum benefit from cache effects. It's be interesting to know how the equivalent code expressed in Java (or C) would perform. -- chris == 3 of 4 == Date: Thurs, Dec 9 2004 12:19 pm From: [EMAIL PROTECTED] Skip wrote: > after enableding the -server in java commandline 5.9s (you need the java SDK > for that) Do you happen to know whether the java that's shipped with OS X (10.3.6) comes with the SDK? Java claims to know about the "-server" option, but when I run the matrix multiply with it there is virtually no improvement in runtime. nick == 4 of 4 == Date: Thurs, Dec 9 2004 12:12 pm From: "[EMAIL PROTECTED]" "Chris Uppal" <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: > >> The following Fortran 95 code below, which multiplies two 800x800 >> double precision matrices, is shorter >> and faster than the Java and C codes. > >Interesting example. I'm pleased to see that the traditional superiority of >Fortan still holds. (Not that I'm a Fortran programmer myself). Presumably a >32-bit integer version would perform about the same ? Or would it be twice as >fast ? The 32-bit integer version also takes 1.0 s. Using 64-bit integers, by changing (kind=4) to (kind=8) in the program below, increases the run time to 21.4 s. To optimize performance on Intel hardware one should probably use the Intel Math Kernel Library http://www.intel.com/software/products/mkl/ , which is callable from C or Fortran. The matmul function I used is an intrinsic function of F95. Here is the Fortran 95 code for multiplying integer matrices. program xmatmul_int_time implicit none integer, parameter :: n = 800,icalc=3, iscale = 10 real :: x real :: t1,t2 integer(kind=4) :: i,j,ix(n,n),iy(n,n),isum real , parameter :: shift_ran = 0.5 call cpu_time(t1) call random_seed() do i=1,n do j=1,n call random_number(x) ix(i,j) = iscale*(x-shift_ran) call random_number(x) iy(i,j) = iscale*(x-shift_ran) end do end do isum = sum(matmul(ix,iy)) call cpu_time(t2) print*,1000*(t2-t1),icalc,isum end program xmatmul_int_time ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- ============================================================================== TOPIC: interface design question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d83b38c5dae9f704 ============================================================================== == 1 of 4 == Date: Thurs, Dec 9 2004 1:29 pm From: Rajarshi Guha Hi I have an interface : public interface Model { public void build() throws ModelException; public void predict() throws ModelException; } Now i have a set of classes which are really specializations of this interface. That is all classes will need to implmenent an extra function (say initModel()). So I defined a new interface inheriting from the above: public interface RModel extends Model { public void build() throws ModelException; public void predict() throws ModelException; Object initModel(); } However what I really want is that initModel() is to *only* be called in the constructor of these classes - so ideally initModel() should be private. However Java does not allow me to do this. Is there a better way to achieve this? I thought of creating an base class, say RBase, which will have the above methods. So it would look like: public class RBase implements Model { private initModel() { // do stuff } RBase() { initModel(); } void build() { // do stuff } void predict() { // do stuff } } Then all the other classes would be subclasses of this and their constructors would make a call to super(). However if a subclass calls the constructor of the superclass will control be returned to the subclass after this? That is should a call to super() be the last statment is a subclasses constructor? == 2 of 4 == Date: Thurs, Dec 9 2004 10:54 am From: "Yamin" Rajarshi Guha wrote: <snip> > > Then all the other classes would be subclasses of this and their > constructors would make a call to super(). > > However if a subclass calls the constructor of the superclass will > control be returned to the subclass after this? That is should a call to > super() be the last statment is a subclasses constructor? On the contrary, a subclass should call super() as the first statement in its constructor. Since the subclass depends on the base class would it not make sense to initialize the base class first? The baseclass method is probably the best way to go. Yamin == 3 of 4 == Date: Thurs, Dec 9 2004 11:47 am From: [EMAIL PROTECTED] A call to a superclass constructor must occur as the first executable line of a subclass constructor. If no call is made, then implicilty super() is called. The call to the superclass constructor initializes the portion of the subclass which is inherited, and the remainder of the subclass constructor will initialize the variables that have added to the subclass. == 4 of 4 == Date: Thurs, Dec 9 2004 1:10 pm From: Rajarshi Guha On Thu, 09 Dec 2004 13:29:09 -0500, Rajarshi Guha wrote: > Hi I have an interface : > > public interface Model { > public void build() throws ModelException; > public void predict() throws ModelException; > } > > Now i have a set of classes which are really specializations of this > interface. That is all classes will need to implmenent an extra function > (say initModel()). So I defined a new interface inheriting from the above: > > public interface RModel extends Model { > public void build() throws ModelException; > public void predict() throws ModelException; > Object initModel(); > } > Thanks for the pointers ============================================================================== TOPIC: Interesting design question involving ZIPs and servers http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d93856e0b568e2e4 ============================================================================== == 1 of 2 == Date: Thurs, Dec 9 2004 10:41 am From: [EMAIL PROTECTED] > > It doesn't scale. Unless you /know/ that you can only ever have a (fairly > tiny) number of (fairly small) reports, then sooner or later you will run out > of memory. What you want is a /cache/ of the reports, so that you can access > (some of) them efficiently, but in a limited amount of space. As it happens, > operating-systems (and disk sub-systems) are good a caching frequently-used > data from files, so I would recommend that you give up on the idea of doing > your own caching in addition, and just read the data from file as you need it. Thanks for the comments. Well, so there are two options that I have with my program. 1.) Load all of the completed reports into memory at startup; either just the XML Text, XML Text compressed with ZIP, or my final ReportObject (the object version of the parsed XML Text). or 2.) Keep all the completed reports offline on disk and read/parse the XML report when its needed. The only thing is, when a user does a keyword search of all completed reports, the program will have to scan/load EVERY report file on disk looking for those keywords. So there is no pre-loading in this scheme, but every report file still has to be opened/scanned each time a search is requested. This seems very inefficient, but I suppose it's as much work as decompressing a ZIP'ed byte buffer each time. Thanks == 2 of 2 == Date: Thurs, Dec 9 2004 11:43 am From: "Chris Uppal" [EMAIL PROTECTED] wrote: > or 2.) Keep all the completed reports offline on disk and read/parse > the XML report when its needed. > > The only thing is, when a user does a keyword search of all completed > reports, the program will have to scan/load EVERY report file on disk > looking for those keywords. So there is no pre-loading in this scheme, > but every report file still has to be opened/scanned each time a search > is requested. Well, either all the data fits in memory or it doesn't. If it does (and you /know/ that will still be true in <N> months/years time), then there's really nothing to worry about. If you use a cache in your program then the data will be held in memory. If you read the data off-disk on demand then the data will /still/ be held in memory (by the OS). It's only if there is too much data to fit in RAM that disk access (obviously much slower) becomes an issue. Using compression only allows you to fit a small increment (x2 or x4, say) more data into RAM before you /have/ to put stuff on-disk. So it's almost certain that compression won't be enough to avoid the crunch (though it's always worth investigating whether compressing data on-disk will save you more in I/O bandwidth than it looses in extra load on the CPU). So what you need is probably some sort of on-disk index of the data that is rich enough to allow you to perform free-text searches without scanning every byte of every report. You might find that a free-text search engine such as Jakarta Lucene: http://jakarta.apache.org/lucene/ would be useful here (I should have thought to mention that before). Lucene is only one of many alternatives, some commercial, some free, which (in one way or another) build an index of the searchable data. They differ in what kind of index they build, what kind of data they "understand", and how clever they are about how they locate the data the user is looking for. -- chris ============================================================================== TOPIC: CVS connection problem in Eclipse using ext or extssh http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f210a50f0bbbf32b ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 7:08 pm From: "Tilman Bohn" On Wed, 08 Dec 2004 04:53:37 -0800, fivepopes wrote: [...] > When I try to add a new location (filling out the form properly, I'm > quite convinced), So you are saying you can definitely log in via ssh with the credentials you specified in the form, and you are definitely getting a valid shell on the target system that way? > I get the message: "Error validating location "". > Keep location anyway?" > > Somehow, it seems that the repository path isn't read. When I try to > add the same connection with pserver, everything works fine. Pserver uses its own authentication with separate credentials. You don't need a valid system account to be able to access cvs via pserver. Cheers, Tilman -- `Boy, life takes a long time to live...' -- Steven Wright ============================================================================== TOPIC: Java program is not evaluating String value correctly... http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5d457b2bb465740e ============================================================================== == 1 of 2 == Date: Thurs, Dec 9 2004 11:59 am From: "Shelly" I have code where I get a string value from a file which contains the State Abbreviation and compare it for state specific programming. When it wasn't falling through the correct code, I put statements in to prompt and tell me what was coming back in that field before it hit the condition. The weird thing is, is that it is correct (no extra spaces--nothing), but it doesn't like it. For further troubleshooting purposes I set the field to what I wanted right before the condition and then it works. The way I'm filling the state abbreviation string (via a cell in an Excel Spreadsheet) is being used throughout the program for other variable strings as well and is working just fine. Here is the code... *********************************************************************** ** The ini.stateAbbr when checked here is WI no spaces or extra chars * ** But it goes to the "else" of this first condition. * ** Even if you can tell me other things to check would be great * ** because I'm looking at brick wall here. * *********************************************************************** if (ini.stateAbbr == "WI") { if (groupToPrint.masterNumber == "0") { usablePath = groupToPrint.eMailAddress.trim() + " " + groupToPrint.stringGrNo + groupToPrint.masterNumber + groupToPrint.locNumber + groupToPrint.subNumber + groupToPrint.poolNumber + " " + groupToPrint.descriptiveName + theDate + theTime; } else { usablePath = groupToPrint.eMailAddress.trim() + " " + groupToPrint.masterNumber + groupToPrint.stringGrNo + groupToPrint.locNumber + groupToPrint.subNumber + groupToPrint.poolNumber + " " + groupToPrint.descriptiveName + theDate + theTime; } } else { if (groupToPrint.masterNumber == "0") { usablePath = groupToPrint.stringGrNo + groupToPrint.masterNumber + groupToPrint.locNumber + groupToPrint.subNumber + groupToPrint.poolNumber + groupToPrint.timePeriod + groupToPrint.descriptiveName + theDate + theTime; } else { usablePath = groupToPrint.masterNumber + groupToPrint.stringGrNo + groupToPrint.locNumber + groupToPrint.subNumber + groupToPrint.poolNumber + groupToPrint.timePeriod + groupToPrint.descriptiveName + theDate + theTime; } } == 2 of 2 == Date: Thurs, Dec 9 2004 12:07 pm From: Sudsy Shelly wrote: <snip> > *********************************************************************** > ** The ini.stateAbbr when checked here is WI no spaces or extra chars * > ** But it goes to the "else" of this first condition. * > ** Even if you can tell me other things to check would be great * > ** because I'm looking at brick wall here. * > *********************************************************************** > > if (ini.stateAbbr == "WI") { > if (groupToPrint.masterNumber == "0") { <snip> Your comparison is wrong: you should be using String#equals, i.e. if( ini.stateAbbr.equals( "WI" ) ) { -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ============================================================================== TOPIC: suggestions for user filters mapped to sql http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d0cb3f3cd4574374 ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 11:35 am From: [EMAIL PROTECTED] Hi, I would like to ask if anyone here can provide some links to packages that supply the ability to get a filter from a user (that is, natural as much as possible, withought DB knowledge, or the specific schema) and convert it to sql? thanx, ittay ============================================================================== TOPIC: Add bytes http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8dcbf5d8bfd2f823 ============================================================================== == 1 of 2 == Date: Thurs, Dec 9 2004 11:42 am From: [EMAIL PROTECTED] (Fran Garcia) I´m trying to do a concatenator of wav files and I´ve the next problem: The wav files have a header with 44 bytes and the bytes from 40 to 43 represents the length of the wav samples. Now, I want to add this portion of header of two files but I don´t know how to do it. Can anybody help me? |0|1|2|........|40|41|42|43| --> wav file1 |0|1|2|........|40|41|42|43| --> wav file2 ------------------------------------------------------------------- |0|1|2|........|40|41|42|43| --> wav union Thanks in advance Fran García == 2 of 2 == Date: Thurs, Dec 9 2004 12:27 pm From: Chris Smith Fran Garcia <[EMAIL PROTECTED]> wrote: > I=3Fm trying to do a concatenator of wav files and I=3Fve the next > problem: The wav files have a header with 44 bytes and the bytes from > 40 to 43 represents the length of the wav samples. Now, I want to add > this portion of header of two files but I don=3Ft know how to do it. Can > anybody help me? Sure. Assuming both wav files use the same audio format (e.g., sampling frequency and such), you would need to find the length of both streams, add the given 32-bit values, write the new header, then write the audio data sequentially. There isn't anything too difficult about this. On the other hand, if the wav files are in different formats, then you need to convert them, and that can be hard. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ============================================================================== TOPIC: [Job-SF, CA] Application Server Architect & Engineer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2f6938b45979846 ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 1:14 pm From: "hiTECH.RECRUIT" Hi all, Our client is a leading enterprise software company in San Francisco - App Server/Application Development & Devployment Platform. They're currently growing their Technical team, and would like to hear from all of you talented engineers out there. Below is a description of the opportunity. To express interest, please contact/send resume to [EMAIL PROTECTED] --Application Server Architect & Engineer-- Location: San Francisco, CA Our client's solutions empower enterprise developers to rapidly create composite, event-driven applications that inherently deploy to horizontally scaled, commodity computing environments. Responsibilities: " Create a next generation application server leveraging open source components. " Implement load balancing across super clusters of servers. " Implement dynamic application distribution across super clusters of servers. " Support peer-to-peer server registration. " Support distributed session replication. Requirements: " Outstanding, accomplished coder. " 5-10 years experience in the areas described. " Infrastructure software (BEA, IBM WebSphere, Borland, etc.) " Excellent People Skills " Excellent problem solving capabilities " Able to succeed in a fast-paced start-up environment ============================================================================== TOPIC: Custom Events Question http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2cd191f2e00177bb ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 1:12 pm From: "sanjay manohar" I guess it has become useful with IDEs that automate event handling - so the IDE recognises immediately which routines/classes are event handlers. ============================================================================== TOPIC: [Job-SF, CA] Web Framework Architect & Engineer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1c596c62c43a5159 ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 1:11 pm From: "hiTECH.RECRUIT" Hi all, Our client is a leading enterprise software company in San Francisco - App Server/Application Development & Devployment Platform. They're currently growing their Technical team, and would like to hear from all of you talented engineers out there. Below is a description of the opportunity. To express interest, please contact/send resume to [EMAIL PROTECTED] --Web Framework Architect & Engineer-- Location: San Francisco, CA Our client's solutions empower enterprise developers to rapidly create composite, event-driven applications that inherently deploy to horizontally scaled, commodity computing environments. Responsibilities: " Create a new declarative web framework based on emerging XML standards. " Integrate with and Define requirements for tools and database libraries. " Support rich client capabilities such as DHTML. Requirements: " Motivated and stellar coder. " 5-10 years experience in the areas described. " Infrastructure software (BEA, IBM WebSphere, Borland, etc.) and non-dotcom startup experience. " Experience creating web frameworks such as JSF, Cocoon, WebWare, etc. ============================================================================== TOPIC: [Job-SF, CA] QA and Build Sr. Engineer - App Server http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/509e0711197b582a ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 1:07 pm From: "hiTECH.RECRUIT" Hi all, Our client is a leading enterprise software company in San Francisco - App Server/Application Development & Devployment Platform. They're currently growing their Technical team, and would like to hear from all of you talented engineers out there. Below is a description of the opportunity. To express interest, please contact/send resume to [EMAIL PROTECTED] -- QA and Build Sr. Engineer - App Server -- Location: San Francisco, CA Our client's solutions empower enterprise developers to rapidly create composite, event-driven applications that inherently deploy to horizontally scaled, commodity computing environments. Responsibilities: " Set up cluster of test machines for load testing. " Build regression load testing suites. " Build regression UI testing suites. " Provide performance characterizations of our application server. " Maintain CVS/Bugzilla environment. " Create builds. Requirements: " Motivated and stellar engineer. " 5-10 years experience in the areas described. " Infrastructure software (BEA, IBM WebSphere, Borland, etc.) and non-dotcom startup experience. ============================================================================== TOPIC: Another simple problem http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3052e16ead05747 ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 12:57 pm From: "stud" ERROR: invalid method declaration; return type required invalid method declaration; return type required what's wrong here? class insertFailException extends SQLException { public insertFailedException(String reason) { super (reason); } public insertFailedException() { super(); } } ============================================================================== TOPIC: "static" prefix - to parallel "this" prefix http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157 ============================================================================== == 1 of 1 == Date: Thurs, Dec 9 2004 12:58 pm From: Tim Tyler Darryl L. Pierce <[EMAIL PROTECTED]> wrote or quoted: > Tim Tyler wrote: > > Java's "static" context is an irregularitly - and an unnecessary one. > > > > If - for whatever arcane security reason, class members can't be > > associated directly with the class objects, they ought at least to > > be associated with *some* object. > > > > Otherwise you wind up with the Java situation - where there's a > > whole bunch of extra material in the JLS to deal specifically > > with static entities, how they are (or aren't) inherited - what > > happens when a member variable overrides a static one in an > > inherited class - and so on - all pointless irregularity that > > makes the langage harder to learn, and makes parsers and compilers > > more difficult to write. > > That scenario is already specifically handled: the descendant class's > variable *hides* the parent class's variable, just as it would with a > method. You don't inherit static fields or methods: they are explicitly > tied to the class in which they're defined. I didn't claim that it didn't work - or that I didn't know how it worked. My claim is that the specification of how static objects behaves is irregular, needs explicit support from the JLS, and makes the language harder to learn, parse and use. In particular, sections: http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#37544 http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#229128 http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#246853 http://java.sun.com/docs/books/jls/second_edition/html/classes.doc.html#39245 ...are largely unnecessary. Smalltalk has an altogether more sensible approach: "static" methods are ordinary instance methods of the object representing the class. -- __________ |im |yler http://timtyler.org/ [EMAIL PROTECTED] Remove lock to reply. ============================================================================== You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer" group. To post to this group, send email to [EMAIL PROTECTED] or visit http://groups-beta.google.com/group/comp.lang.java.programmer To unsubscribe from this group, send email to [EMAIL PROTECTED] To change the way you get mail from this group, visit: http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe To report abuse, send email explaining the problem to [EMAIL PROTECTED] ============================================================================== Google Groups: http://groups-beta.google.com
