
Ci vediamo nel 2010!!!
package main
import "fmt";
func main()
{
var a int;
a = 10;
go thread1(&a);
}
func thread1(v * int)
{
//do nothing
fmt.Printf("Value %d",*v);
}
void parseString( void * str )
{
QString * objStr = (QString * ) str;
*objStr = (*objStr).left( CODE_LEN );
}
QFile filePtr (file);
QTextStream stream( &filePtr );
while( !stream.atEnd() )
{
line = stream.readLine();
}
void fillHashTable( QString file , void(*parser) (void * str), QHash <int , QString> * tb )
{
QHash <int , QString> table;
QFile filePtr (file);
bool fin = false;
if( !filePtr.open(QIODevice::ReadOnly | QIODevice::Text) )
{
cout<<"ERRORE nell'apertura del file"<<endl;
exit( -2 );
}
table.clear();
QTextStream stream( &filePtr );
QString line, tok01 , tok02;
QStringList tokens;
while( !stream.atEnd() || !fin )
{
line = stream.readLine();
if( line == "" )
{
fin = true;
continue;
}
tokens = line.split( " " );
tok01 = tokens[0];
parseString( &tokens[1] );
tok02 = tokens[1];
table.insert( tok01.toInt() , tok02 );
}
filePtr.close();
*tb = table;
}
int main(int argc, char *argv[])
{
QHash <int , QString> table;
table.clear();
fillHashTable( "file.txt", parseString, &table );
cout<<"Stampa della hash di dimensione "<<table.size()<<endl;
for( int i = 0; i < table.size() ; i++ )
{
cout<<i<<" : "<<table[i].toStdString()<<endl;
}
return 0;
}
As mentioned last week, -rc8 was the last -rc, and there really isn't any
point in delaying the real release any more.
I'm sure we've missed something, and I know we have some regressions
pending. At the same time, we do need the coverage of a eral release, and
on the whole it looks pretty good. We've fixed a few regressions in the
last few days, and there's always 2.6.30.x.
void MainWindow::paintEvent(QPaintEvent * event)
{
QPainter painter( this );
painter.setPen(QColor(255,0,0));
painter.drawLine(QPointF(0,0),QPointF(50,50));
QRectF rect (60,60,100,100);
QPainterPath path (QPointF(100,100));
path.addEllipse(rect);
painter.fillPath(path,QColor(0,255,0));
}
painter.setPen(QColor(255,0,0));
painter.drawLine(QPointF(0,0),QPointF(50,50));
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QtGui/QMainWindow>
#include <QtGui/QTreeWidgetItem>
#include <QtGui/QInputDialog>
namespace Ui
{
class MainWindowClass;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void on_add_bt_clicked();
void on_remove_bt_clicked();
private:
Ui::MainWindowClass *ui;
};
#endif // MAINWINDOW_H
ui->todoList->setObjectName(QString::fromUtf8("treeWidget"));
ui->todoList->setColumnCount( 1 );
ui->todoList->headerItem()->setText( 0, QApplication::translate( "widget", "Activity",
0, QApplication::UnicodeUTF8 ) );
void MainWindow::on_add_bt_clicked()
{
QList<QTreeWidgetItem *> selected = ui->todoList->selectedItems();
bool ok;
QString text = QInputDialog::getText(this,QString("Inserisci attività"),QString("Inserisci nuovo ToDo nella lista:"),QLineEdit::Normal,QString(""),&ok);
QTreeWidgetItem * i;
if(selected.length() > 0)
i = new QTreeWidgetItem(selected[0],0);
else
i = new QTreeWidgetItem(ui->todoList,0);
i->setText(0,text);
}
{
QList <QTreeWidgetItem *> selected = ui->todoList->selectedItems();
if(selected.length() > 0)
selected[0]->~QTreeWidgetItem();
}
Hi evoc_jazz,
Your free trial to Last.fm Radio is about to end. If you're enjoying it, why not
subscribe for only €3.00/month and continue listening to non-stop personalised
radio.
http://www.last.fm/subscribe
Best Regards,
The Last.fm Team
Today, we're very excited to announce the availability of a new programming language for Google App Engine. Please welcome the Java runtime!
...we're expanding the early look signups to 25,000 developers...
Avviato il Progetto Venditori Ubuntu
void on_ok_bt_clicked();
void MainWindow::on_ok_bt_clicked()
{
QString money = ui->valuta->text();
if(money == "Lira")
{
//Convertiamo le lire in euro
QString line = ui->line->text();
float numero = line.toFloat();
numero = numero / 1936.27;
QString a = QString::number(numero);
ui->line->setText(a);
ui->valuta->setText("Euro");
}
else
{
//Convertiamo gli euro in lire
QString line = ui->line->text();
float numero = line.toFloat();
numero = numero * 1936.27;
QString a = QString::number(numero);
ui->line->setText(a);
ui->valuta->setText("Lira");
}
}
14 Febbraio 2009
Il Progetto Debian è lieto di annunciare il rilascio ufficiale di Debian GNU/Linux versione 5.0 (nome in codice "lenny"), dopo 22 mesi di sviluppo costante. Debian GNU/Linux è un sistema operativo libero che supporta un totale di dodici architetture di processori e include gli ambienti desktop KDE, GNOME, Xfce e LXDE...
Thiemo Seufer, uno sviluppatore Debian deceduto il 26 dicembre 2008 in un tragico incidente d'auto. Thiemo era coinvolto in Debian in molti modi: provvedeva alla manutenzione di numerosi pacchetti ed era il sostenitore principale del port di Debian verso le architetture MIPS. Era inoltre un membro del nostro gruppo del kernel, così come del gruppo dell'installatore Debian. I suoi contributi vanno oltre il progetto Debian: ha anche lavorato sul port MIPS del kernel di Linux, sull'emulazione MIPS di qemu e a molti altri progetti minori, troppi per essere menzionati qui.come si può leggere nel solito articolo alla voce "Dedica".