Hi,
I have been trying with no success to create a java kde project in kdevelop
(kde 3.3 - suse 9.0)
It aborts with "can't create file subdirs" message.
Any clues?
Thanks in advance!!
Hi,
I'm speech recognition researcher not so fond of newer Linux systems. I have
some old ansi C code that I used to run under Debian 2.0.
Now I transferred code to Suse 9.0, compile it without any errors (some
warnings) but get segmentation faults in runtime.
One particular error is (I get this when run in ddd):
Program received signal SIGSEGV, Segmentation fault.
0x400b90af in fflush() from /lib/libc.so.6
----------------
My C knowledge is rusty (I checked up this code long time ago) so I'd kindly
ask for some quick guidance, how to deal with such segfaults. If I remember
right there were some tools that could help in debugging memory accesses
(efence or something like that) - I guess tools are now much more advanced -
but I don't know which one to use...
Also any advice on this particular error would be appreciated.
Thanks in advance,
regards,
Robert.
Dear my friends...
I use SuSE 9.1 and Qt 3.2 . I am writing a database
program with Qt.
I have an image file named "1.png", I want this image
file displayed in a Dialog Form.
Anybody would be so generous to give me a very simple
sample code how to display an image file into a Dialog
Form with QImage?
All I know only this step :
QImage::QImage("images/1.png");
Please give me a very simple sample code.
Thank you very much in advance.
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
I am trying to make a few modifications to Maelstrom I have applied all
the patches from suse to the Maelstrom code and get the following error
during configure.
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.0.0 not found!
I also thought the following output might help to figure out the problem
> rpm -qa|grep SDL
SDL-1.2.5-259
SDL_ttf-2.0.6-105
SDL_perl-1.20.0-236
SDL_image-1.2.3-105
SDL_mixer-1.2.5-90
SDL_net-1.2.5-103
> rpm -ql SDL
/usr/lib/libSDL-1.2.so.0
/usr/lib/libSDL-1.2.so.0.0.5
This is on an suse 9.0 installation. I am not very familiar with all
the compiler tools so I could really use some help here.
--
Chris W
Bring Back the HP 15C
http://hp15c.org
Not getting the gifts you want? The Wish Zone can help.
http://thewishzone.com
Jerry Feldman wrote:
>> 1. mutexed blocks (why does java call them 'synchronized' when they
>> can't happen at the same time?)
> Mutex is simply one terminology for a "synchronization primitive".
> Semaphore is also used. There are other terminologies used in various
> other implementations of things.
I was just being ironic. Java is a moralistic language and insists on
using final instead of const to avoid the oxymoron of a constant
variable; so I think it ought to use asynchronized instead of
synchronized to avoid the oxymoron of a synchronized block that cannot
be run at the same time as any other synchronised block. I accept of
course, that it's common practice to use such expressions. Hotplugging
is another term that comes to mind.
I know you can emulate this using a base class like the following, but
it's still a bit clunky and error prone:
class Monitor {
public:
Monitor(){
mutex = (pthread_mutex_t*)malloc( sizeof(pthread_mutex_t) );
pthread_mutex_init( mutex, 0 );
}
virtual ~Monitor() = 0;
void lock() const { pthread_mutex_lock( mutex ); }
void unlock() const { pthread_mutex_unlock( mutex ); }
private:
mutable pthread_mutex_t* mutex;
};
Monitor::~Monitor(){ free(mutex); }
I like the idea of GC in C++ and IIRC an compiler implememntation may
use GC.
--
JDL
Dear my beloved friends...
Anybody would be so nice to tell me the mailing list
of GCC? I want to practice this programming language
deeper.
Thank you very much in advance.
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
This compiles and works under gcc 3.3.3, but I suspect it's not legal
because I'm giving a default argument to a pointer to a function. Can
anyone tell me if I'm right or wrong?
#include<iostream>
double function( double x, double y = 0 ){ return x * (x + y); }
int main() {
double (*function)( double, double = 0 ) = ::function;
std::cout << function( 4 ) << std::endl;
exit( 0 );
}
--
JDL
Dear my friends...
I retrieve a list of customer that the sales of my
company have to be followed up by the sales. This
retrievement is done in the funonseqForm.ui. and the
object which does this task is QDataBrowser
(custdataBrowser).
I created a form to make a selection mechanism for a
the funonseqForm is from caricustForm.ui .
the caricustForm generate the sql string for
custdataBrowser. The SQL String (QString myfilter)
should be passed to the funonseqForm as the filter of
custdataBrowser (
custdataBrowser->setfilter(myfilter); ).
Firstly I did like this :
funonseqForm::custdataBrowser->setFilter(kalimat);
But of course it's wrong. I got problem in compiling
process.
I am looking for the procedure/method how the ui forms
communicating each other to handle the variable value
from another ui form (passing or getting the value of
a varible from another ui form).
Thank you very much in advance.
=====
void caricustForm::cariSlot()
{
QString pilih, kalimat;
QString prsh = prshlineEdit->text();
QString salut = salutcomboBox->currentText();
QString title = titlelineEdit->text();
QString fn = firstnamelineEdit->text();
QString ln = lastnamelineEdit->text();
QString alamat = addresslineEdit->text();
QString kodepos = postcodelineEdit->text();
QString kota = kotalineEdit->text();
QString kodekota = areacodelineEdit->text();
QString telepon = teleponlineEdit->text();
QString hp = hplineEdit->text();
QString fax = faxlineEdit->text();
QString email = emaillineEdit->text();
if ( prsh.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " company like '%";
kalimat += QString("%1").arg(prsh);
kalimat += "% ";
}
if ( salut.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " salutation like '%";
kalimat += QString("%1").arg(salut);
kalimat += "% ";
}
if ( title.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " title like '%";
kalimat += QString("%1").arg(title);
kalimat += "% ";
}
if ( fn.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " firstname like '%";
kalimat += QString("%1").arg(fn);
kalimat += "% ";
}
if ( ln.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " lastname like '%";
kalimat += QString("%1").arg(ln);
kalimat += "% ";
}
if ( alamat.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " address like '%";
kalimat += QString("%1").arg(alamat);
kalimat += "% ";
}
if ( kodepos.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " postcode like '%";
kalimat += QString("%1").arg(kodepos);
kalimat += "% ";
}
if ( kota.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " city like '%";
kalimat += QString("%1").arg(kota);
kalimat += "% ";
}
if ( kodekota.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " areacode like '%";
kalimat += QString("%1").arg(kodekota);
kalimat += "% ";
}
if ( telepon.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " phone like '%";
kalimat += QString("%1").arg(telepon);
kalimat += "% ";
}
if ( hp.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " mobilephone like '%";
kalimat += QString("%1").arg(hp);
kalimat += "% ";
}
if ( fax.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " fax like '%";
kalimat += QString("%1").arg(fax);
kalimat += "% ";
}
if ( email.length() > 0 ){
if (kalimat.length() > 0){
kalimat += " or ";
}
kalimat += " email like '%";
kalimat += QString("%1").arg(email);
kalimat += "% ";
}
liattextEdit->setText(kalimat);
funonseqForm::custdataBrowser->setFilter(kalimat);
}
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Is there a similar facility in Linux for exception "exception registration"?
http://www.codeproject.org/cpp/exceptionhandler.asp#xx515459xx
For this discussion, I will consider exceptions to be those that are
explicitly thrown or occur due to conditions like divide by zero or null
pointer access. When exception occurs, interrupt is generated and control is
transferred to the operating system. Operating System, in turn, calls the
exception handler that inspects the function call sequence starting from the
current function from where the exception originated, and performs its job of
stack unwinding and control transfer. We can write our own exception handler
and register it with the operating system that it would call in the event of
an exception.
Windows defines a special structure for registration, called
EXCEPTION_REGISTRATION:
--
Regards,
Steven
Dear my friends...
I am using SuSE 9.1 and Qt 3.2.
I wrote a program. compiled successfully. But it
doesn't run more than 3 minutes. It simply crashed
after around 3 minutes.
I use "ddd" to find where it crashes.
Here is the output of my ddd:
Dump of assembler code for function
_ZNK12QSqlDatabase6isOpenEv:
0x405019f0 <QSqlDatabase::isOpen() const+0>:
push %ebp
0x405019f1 <QSqlDatabase::isOpen() const+1>:
mov %esp,%ebp
0x405019f3 <QSqlDatabase::isOpen() const+3>:
push %ebx
0x405019f4 <QSqlDatabase::isOpen() const+4>:
sub $0x4,%esp
0x405019f7 <QSqlDatabase::isOpen() const+7>:
mov 0x8(%ebp),%eax
0x405019fa <QSqlDatabase::isOpen() const+10>:
call 0x401e0beb <__i686.get_pc_thunk.bx>
0x405019ff <QSqlDatabase::isOpen() const+15>:
add $0x2054f5,%ebx
0x40501a05 <QSqlDatabase::isOpen() const+21>:
mov 0x28(%eax),%eax
0x40501a08 <QSqlDatabase::isOpen() const+24>:
mov (%eax),%eax
0x40501a0a <QSqlDatabase::isOpen() const+26>:
mov %eax,(%esp)
0x40501a0d <QSqlDatabase::isOpen() const+29>:
call 0x401b8e14 <_init+47544>
0x40501a12 <QSqlDatabase::isOpen() const+34>:
pop %ecx
0x40501a13 <QSqlDatabase::isOpen() const+35>:
movzbl %al,%eax
0x40501a16 <QSqlDatabase::isOpen() const+38>:
pop %ebx
0x40501a17 <QSqlDatabase::isOpen() const+39>:
pop %ebp
0x40501a18 <QSqlDatabase::isOpen() const+40>:
ret
0x40501a19 <QSqlDatabase::isOpen() const+41>:
nop
0x40501a1a <QSqlDatabase::isOpen() const+42>:
lea 0x0(%esi),%esi
End of assembler dump.
The error message is :
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 4934)]
0x40501a08 in QSqlDatabase::isOpen () from
/usr/lib/libqt-mt.so.3
I found from ddd the crash happened on this line
"
Current program counter (stopped by signal) :
0x40501a08 <QSqlDatabase::isOpen() const+24>: mov
(%eax),%eax
"
Why is it happenned?
Please tell me.
===========
#Here is my code where the crash
bool depanForm::cariappSlot()
{
int sid, cid;
QString applist, pesan;
unsigned int noapp;
//if ( ! db->isOpen() ){
// konekSlot();
//}
if ( !un ){
QString lines;
QFile file( "otentik.txt" );
if ( file.open( IO_ReadOnly ) ) {
QTextStream stream( &file );
QString line;
//int i = 1;
while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text
excluding '\n'
//printf( "%3d: %s\n", i++, line.latin1()
);
lines += line;
}
file.close();
}
//baca username dan paswordnya
extunpwSlot(lines);
}
QSqlDatabase * db =
QSqlDatabase::addDatabase("QPSQL7", "OTHER");
db->setHostName("192.168.23.1");
db->setDatabaseName("kv");
db->setUserName("postgres");
db->setPassword("honestly");
if ( ! db->open() )
{
db->lastError().showMessage();
return false;
}
QSqlQuery query(db);
QString sqloten = QString("select SalesID from
useraccount where Username='%1' and Password='%1'")
.arg(un)
.arg(pw);
query.prepare(sqloten);
query.exec();
if ( ! query.isActive() ){
query.lastError().showMessage();
return false;
}else{
while ( query.next() ){
sid = query.value(0).toInt();
}
}
appdate = QDate::currentDate();
apptime = QTime::currentTime();
applist = QString("v_applist_%1").arg(un);
sqlcekapp = QString("select noapp, custid from %1
where salesid='%1' and date='%1' and time='%1' and
warned='N' limit 1")
.arg(applist)
.arg(sid)
.arg(appdate.toString("yyyy-MM-dd"))
.arg(apptime.toString("hh:mm:ss"));
QSqlQuery querycekapp(db);
querycekapp.prepare(sqlcekapp);
querycekapp.exec();
if ( ! querycekapp.isActive() ){
querycekapp.lastError().showMessage();
return false;
}
if ( querycekapp.next() ){
noapp = querycekapp.value(0).toInt();
cid = querycekapp.value(1).toInt();
pesan = QString("Sie haben ein Termin mit
Kundennummer : %1")
.arg(cid);
QMessageBox::warning(this, "Achtung !", pesan);
updatewarnedSlot(noapp);
}else{
//if ( ! db->isOpen() ){
// konekSlot();
//}
appdate = QDate::currentDate();
apptime = QTime::currentTime();
sqlcekapp = QString("select noapp, custid from %1
where salesid='%1' and (date<='%1' or ( date = '%1'
and time<='%1' )) and warned='N' limit 1")
.arg(applist)
.arg(sid)
.arg(appdate.toString("yyyy-MM-dd"))
.arg(appdate.toString("yyyy-MM-dd"))
.arg(apptime.toString("hh:mm:ss"));
QSqlQuery querycekapp(db);
querycekapp.prepare(sqlcekapp);
querycekapp.exec();
if ( ! querycekapp.isActive() ){
querycekapp.lastError().showMessage();
return true;
}
if ( querycekapp.next() ){
noapp = querycekapp.value(0).toInt();
cid = querycekapp.value(1).toInt();
pesan = QString("Sie haben ein Termin mit
Kundennummer %1 verpassen")
.arg(cid);
QMessageBox::warning(this, "Achtung !", pesan);
updatewarnedSlot(noapp);
}
}
return true;
}
_______________________________
Do you Yahoo!?
Shop for Back-to-School deals on Yahoo! Shopping.
http://shopping.yahoo.com/backtoschool