Achei aqui no meu Google Docs, uma dica que tinha guardado a muito tempo. Pode ser que seja útil pra alguém. ' Gambas class file PUBLIC combo AS ComboBox PUBLIC SUB ToggleButton1_Click() listacombo(ComboBox1, "select * from cadastro") END PROCEDURE listacombo(Combo AS ComboBox, busca AS String) DIM r AS Result DIM conta AS Integer conexao.conectar_banco r = conexao.bd.Exec(busca) r.MoveFirst Combo.Add(r!nome_cad) FOR conta = 1 TO r.Count - 1 r.MoveNext Combo.Add(r!nome_cad) NEXT END
#!/usr/bin/perl -w # # pfdel - deletes message containing specified address from # Postfix queue. Matches either sender or recipient address. # # Usage: pfdel <email_address> # use strict; # Change these paths if necessary. my $LISTQ = "/usr/sbin/postqueue -p"; my $POSTSUPER = "/usr/sbin/postsuper"; my $email_addr = ""; my $qid = ""; my $euid = $>; if ( @ARGV != 1 ) { die "Usage: pfdel <email_address>\n"; } else { $email_addr = $ARGV[0]; } if ( $euid != 0 ) { die "You must be root to delete queue files.\n"; } open(QUEUE, "$LISTQ |") || die "Can't get pipe to $LISTQ: $!\n"; my $entry = <QUEUE>; # skip single header line $/ = ""; # Rest of queue entries print on # multiple lines. while ( $entry = <QUEUE> ) { if ( $entry =~ / $email_addr$/m ) {