to generate uid or GUID with delphi:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
program Guid; {$APPTYPE CONSOLE} uses SysUtils; var Uid: TGuid; Result: HResult; begin Result := CreateGuid(Uid); if Result = S_OK then WriteLn(GuidToString(Uid)); end. |
Come tutti sappiamo, creare un webServer con Delphi è semplicissimo, cosa meno banale è invece decodificare una post che che contiene un multipart/form-data. Quando una paginetta http esegue una http submit da un form in metodo post, magari con un file in upload il browser genera uno stream codificato in UTF8 in cui ci sono…
Leggi tutto
Con FastReport 4 esportare un report in PDF su stream è semplicissimo, bastano 5 minuti … peccato che non è spiegato nella documentazione, quindi per capire come funzionava l’arcano ci ho perso due ore… di seguito una porzione di codice come esempio: procedure TForm1.Button3Click(Sender: TObject); var st : TMemoryStream; begin st := TMemoryStream.Create; Try TBlobField(csReports.FieldByName(‘Report’)).SaveToStream(st);…
Leggi tutto
Il famoso report designer per C++, Delphi e DotNet è ora disponibile nella varsione per il framework grafico Firemonkey. Grazie a quest’estensione di Fast-Report è possibile combinare designer e engine-report in applicazioni cross-platform. Il nome del progetto è appunto fastreportFMX , questo tool è ovviamente compatibile con le versioni di rad-studio dalla XE2 in su.…
Leggi tutto
A very simple way to search, select and import contact information from your phone (Android Contacts) to your android app is: 1) Send the specific android intent “ACTION_PICK”:
1 2 3 4 5 |
private void startContactPicker() { Intent contactPickerIntent = new Intent(Intent.ACTION_PICK, Contacts.CONTENT_URI); startActivityForResult(contactPickerIntent, CONTACT_PICKER_REQ_CODE); } |
This intent will do for us and “for free” the operation of opening the contacts list and select the contact to import. 2) Simply manage the…
Leggi tutto
Those sections of C++ tutorials are very simple. Otherwise they explain the differences between Delphi (pascal) language and C++. Good job: Session 1: Session 2: