stephen84s 550 Nearly a Posting Virtuoso Featured Poster

.rpm works only on Red Hat Based systems, Ubuntu is based on Debian so it uses to .deb versions.

For you currently it is no longer possible to upgrade to a newer version of Ubuntu by directly invoking

apt-get upgrade

cause your version is too old.
In case you need to use MySQL also, I suggest you download the latest version from the Ubunu site

Cause otherwise u would need to manually compile and install all the software you need.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Thats cause your Ubuntu version is too old and the repositories are no longer supported, U will need to upgrade to a more recent version (@least 6.04) use for installing software via apt,

or do a manual install by downloading jdk from here

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Note the semicolon next to the while loop,

while(getc(pFile)!=' ');

Thanks to that, your while continues to run and skip all the characters on the line until it finds a ' ' <space>.

Just remove that semincolon and try.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

yep.. it does increase the "Solved Threads" count next to our names

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Since you are running Ubuntu you can install the Sun JRE directly by issuing:

apt-get install sun-java6-jre

in your terminal.

But if you plan on doing some Java developement you should install the java SDK instead,
to do so just issue the following command in your terminal

apt-get install sun-java6-jdk

But first I suggest you check whether all the required Jars/classes are included in your classpath as jwenting mentioned

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I just checked " Var " and " Var2 " are both "char" types, I think you can use " == " directly for checking for equality.

Following is the signature for strcmp ->

int strcmp( const char *str1, const char *str2 );

so I don't think strcmp (Var1, Var2) will work

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Have u added #included<cstring> in the file which contains your class definition(ppoly.h).
you will need it for the strcmp() function which is on Line 51

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

A cockroach can live for well over 2 weeks without a head, not bad for only living 48 hours.....Check your facts!!!

Yep the only reason a headless cockroach dies is cause he cant feed, the headless body in fact even retains a certain degree of learning ability !!!

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Adolf Hitler's mother seriously considered having an abortion but was talked out of it by her doctor.

I dont think so,
Adolf Hitler was born in Austria in 1889. His mother, Klara, had previously given birth to two boys and one girl, all of whom had died. I don't think this would lead Klara, his mother to consider having an abortion. In fact Hitler’s mother is supposed to have lavished affection on him

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I've herd its possible using Mono Neva tried it though.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

How are u trying to connect to the SQL server database, using which protocol ?
TCP/IP or via NamedPipes,
Check whether the method u r trying is enabled on the SQL Server you are trying to connect to.

Sorry had not read the complete post !!!

when i execute netstat on dos prompt no protocol or socket no is listed.
when i use telnet(computername) 1433 , it cannot make connection.

Try using namedPipes, instead of TCP connection (its supposed to be faster if your server is on the same machine as it would bypass the network layer) for connecting to your SQL Server.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

How are u trying to connect to the SQL server database, using which protocol ?
TCP/IP or via NamedPipes,
Check whether the method u r trying is enabled on the SQL Server you are trying to connect to.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This is a Java forum and Javascript seems off topic here,

Anyways in your validation function when you find no errors, just tell java script to submit your form by mentioning:-

document.<your form name>.submit();

Provided you have set the action property of your form tag, else set the action property first by issuing

document.<your form name>.action="relative/absolute url of next page";
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Try looking at sem_init ,
I think it seems to be what you are looking for.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

This is happening cause you are using GCJ which does not support all classes mentioned in the official J2SE specifications.
Most probably on Windows you are using the JRE from Sun, I suggest you install the same on your Linux machine.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

I searched every where I didn't find the answer.

Without taking inputs from others how can we improve our knowledge.

How you learned java your own, you also studied some books or else by berth you know java.

I faced so many questions in that interview but I didn't answer this correctly.

Any way, I just want to know the answer.

If any one knows Please tell why we can not serialize some classes.

Read the actual use of those classes, why they exist and exactly what is serialization used for and you will get your answers.
And obviously you have not been searching everywhere or at least the right places else you would have found it.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You need to compile C++ programs in GCC using g++ and not gcc.

g++ filename
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

if the jar you have is an executable jar, just doubling clicking on it should make it run, However if that doesn't work the at the command line type:

java -jar filename.jar

If that too doesn't work (which means the manifest file was not properly included with the jar), you will have to give specify the Main class of your jar. For example if the main class is Alpha inside the package "daniweb" which in turn is inside the package "com", you will have to type:

java -cp filename.jar com.daniweb.Alpha

Also here is the chapter from The Java Tutorials covering the basics and uses of Jar files.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hi Yuichi,
My suggestion is almost similar to Alex's, only looking at your prigram I think you should not only declare your array which which is holding the queue as global, but also a variable which holds your actual queue size (i.e no of elements currently in the queue and not the size of the array).
Something like

using namespace std;

int queue[10];
int lastElementIdx=-1;

So when you want to add just one element to the queue you have to :

queue[++lastElementIdx]=...

instead of the for loop.
and to delete the last element from the queue just decrement the variable "lastElementIdx" and of course check to ensure you do not delete an element from empty queue etc.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Hi Alex,
I see the problem you are facing, and have been there..
In Java when you are typing in a regex you need to understand that a simple "\" stands for indicating escape characters inside your string (Hence the error when you mention "\+" as there no such escape character in Java).
But you need to indicate an escape character in your regex so you need to mention it as "\\+", the first back slash tells the compiler to treat the next backslash as a normal backslash which in tells your regex evaluator that the next "+" is just a normal character and not a quantifier.

So in case you wish to search for a "\" in your regex you would have to type in "\\\\"

The back slashes in red are used by the compiler as an indication for an escape sequence
The back slash in green is used by your regex evaluator as the start of an escape sequence.
The final back slash is what is taken by the regex evaluator as a normal character.

Similarly if you wanted your regex to search for a "+" it would become : "\\+"

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Have you considered using a do{}while(); loop, where at the end of the loop you ask input from the user if he wishes to continue and check the same inside "while"

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You can try out using "fscanf" to read your matrix elements from files, or if you prefer going purely the C++ way I suggest looking at "ifstream" class

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

"graphics.h" file if I am not wrong is associated with Borland's Turbo C++ compiler,
I do not think there is a graphics.h file for VC++, just like we dont have one for GCC

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

http://curl.haxx.se/libcurl/
Would take care of a lot of the lower level details of HTTP.

Yep the cURL API will make ur job more easier by handling lower level tasks

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Those declarations are only equivalent as function parameters. The buggiest difference is that initializing the pointer points it to a read-only string literal while the array gets a writable copy of it.

Cool tried it out !!! Never knew about this !!!

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Should'nt declaring the object in C++ be like

int *t=...;
.
.
.
CSafePtr<int> myobject(t);

Rather than:

CSafePtr<int> myobject(int *t)
stephen84s 550 Nearly a Posting Virtuoso Featured Poster

In C++

char FilePath[]="...

is equivalent to :-

char *FilePath="..

so when you are passing the variable "FilePath" to a function, the function needs to accept a "char* "(or char variable_name[]) as an argument and not just "char".

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

Dear All,
I am new to Daniweb community. I am a business man in India and not a technical person anyhow. I want to create a SMS Gateway to send bulk SMS. For this I need to have all the technical know how about the same. I also want to know that is there any role of a telecom company in sending bulk SMS. If yes, what exactly it is? What is an SMS Gateway exactly. I want to use a website to allow access to my executives and clients to send bulk sms. PLEASE HELP ME OUT.

Regards,

Kawaljeet.

An SMS Gateway is a pretty big piece of Software, if you are not technical, rather than making one which would take quite a while I suggest you purchase one or check for free version with support.

stephen84s 550 Nearly a Posting Virtuoso Featured Poster

You do not need to use "split()" in a for loop

<%	
	String info;
	String line = cacheManager.getCache(info);
	for(j = 0; j < parts.length; j++) {
	String [] parts = line.split(" ");
	}
%>

Just use this code instead:-

<%	
	String info;
	String line = cacheManager.getCache(info);
	//for(j = 0; j < parts.length; j++) {
	String [] parts = line.split(" ");
	//}
%>

Note:-
I have commented out the for loop here
And by the have you noticed how you are using the "parts" object(in the for loop) before actually declaring it (which is inside the loop).