Chat about languages :)

Started by Mejda, May 19, 2012, 07:00:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mejda

unlike thank you for the correction I should concentrate on my mistakes in English but in tunisia we are good in french not englich. (we spreak french and arabic)
:D

Liviu Lalescu

No problem, even my English is far from perfect, and unfortunately I do not know as much French as I should, considering that it is related to Romanian :)

Mejda

 :) what is the native language in Romania you are good in what ????

Liviu Lalescu

In Romania we speak Romanian, which is my mother tongue. And generally we learn English and French early in school. French is generally regarded as related to Romanian, from the Latin origin and from XIX-th century vocabulary borrowings (we took neologisms from them at that time).

I think I know English good and a bit of French and Italian.

PS: I might consider splitting/moving part of this topic to http://lalescu.ro/liviu/fet/forum/index.php?board=3.0 , I hope you agree :)

Mejda


Liviu Lalescu

OK, I split the topic.

PS: Only Liviu should be fine :)  But as you wish :)

Mejda

I do not understand why you said "Only Liviu should be fine" for me I hope for you all hapiness ;)

Liviu Lalescu

#7
Oh, sorry, I meant "Mr. Liviu" is too much to address me; people may call me just simply "Liviu", if they want :)   (because you said "Mr. Liviu" above).

Mejda

hmmm ok I am sorry I will call you just Liviu :)

So I have a problem I do the upload of my file in the Ftp server but it is empty (in my pc contain information but the file in server is empty)
I think that is hear error


QString filename;
     QString files = QFileDialog::getOpenFileName(this, tr("Select File"),
     "D://");

     if (files.isEmpty())
     return;

     while(files.indexOf("/", i) != (-1)) //find the file name not include the full url
     i = files.indexOf("/",i) + 1;
     while(i < files.size())
     {
     filename.append(files.at(i));
     i++;
     }

     QFile *file = new QFile(filename);
     Q_ASSERT(file != NULL);

     if(!file->open(QIODevice::ReadWrite)) //finished create the file in the debug file
     {
     qDebug() << "opern err" << file->fileName();
     return;


what is you opinion :)

Liviu Lalescu

I think this should be the way (but I didn't compile or test):


#include <QFileInfo>

...

QStringList files=QFileDialog::getOpenFileNames(this, "Please select the file(s)");
foreach(QString fileName, files){
QString strippedFileName=QFileInfo(fileName).fileName();
QFile file(strippedFileName);
...open file, etc....
}


Mejda

hmm I will test this all my thanks for you

Mejda

Hi Liviu,
I want to extract nombre of hours of Tp in french(travaux pratiques) , number of hours of cour and number of hours of TD in french (Travaux dérigé) so I can determine number of Tp by this code

int nHours=0;
        foreach(Activity* act, gt.rules.activitiesList)
                if(act->active)
                        if(act->teachersNames.contains(Teachername)){

                                nHours+=act->duration;
                        }

but other informations I can't do this  :-[

and please how I insert an space I also seek and I can't identify how I do this  :)
thank you

Liviu Lalescu

#12
Hi, Mejda,

Quote
I want to extract nombre of hours of Tp in french(travaux pratiques) , number of hours of cour and number of hours of TD in french (Travaux dérigé) so I can determine number of Tp by this code


int nHours=0;
foreach(Activity* act, gt.rules.activitiesList)
if(act->active)
if(act->subjectName==QString("Tp") || act->subjectName==QString("cour") || act->subjectName==QString("TD"))
nHours+=act->duration;


Quote
and please how I insert an space I also seek and I can't identify how I do this  :)

To insert a space into a QString is very easy:


QString s=QString("Project");
s+=QString(" ");
s+=QString("started");


:)

Mejda

No Liviu I do this :
QString chaine=QString("Nombre des heurs de cour:");
chaine+=QString("  ");
chaine+=QString("  ");
chaine+=QString("  ");
chaine+=QString("  ");
chaine+=QString("Nombre des heurs de TD:");

I get usually
Nombre des heurs de cour: Nombre des heurs de TD: ( hav'nt any space )  :-[

Liviu Lalescu

Ah, you mean in the HTML output? Please try this:


QString s=QString("1");
s+=QString("&nbsp;").repeated(5);
s+=QString("2");


Please let me know.