PostgresSQL JDBC connection URL
jdbc:postgresql:template1
org.postgresql.Driver
MySQL JDBC connection URL
| /* List all session, except background processes*/ | |
| SELECT s.username, | |
| s.osuser, | |
| s.sid, | |
| s.serial#, | |
| p.spid, | |
| s.status, | |
| s.machine, | |
| s.program, | |
| TO_CHAR(s.logon_Time,'DD-MON-YYYY HH24:MI:SS') AS logon_time |
| /* List active sessions */ | |
| select datname, | |
| procpid, | |
| usename, | |
| application_name, | |
| client_addr, | |
| client_hostname, | |
| backend_start | |
| from pg_stat_activity; |
| public void redirect(String path) throws Exception { | |
| FacesContext ctx = FacesContext.getCurrentInstance(); | |
| ExternalContext extContext = ctx.getExternalContext(); | |
| String url = extContext.encodeActionURL(ctx.getApplication().getViewHandler().getActionURL(ctx, path)); | |
| extContext.redirect(url); | |
| } |
| Contributing | |
| 1. Fork it | |
| 2. Create your feature branch (git checkout -b my-new-feature) | |
| 3. Commit your changes (git commit -am 'Added some feature') | |
| 4. Push to the branch (git push origin my-new-feature) | |
| 5. Create new Pull Request |
| GRANT CONNECT ON DATABASE $dbName TO $user; | |
| GRANT USAGE ON SCHEMA $schema TO $user; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA $schema TO $user; | |
| Default privileges | |
| ALTER DEFAULT PRIVILEGES IN SCHEMA $schema | |
| GRANT SELECT ON TABLES TO $user; | |
| see more at http://www.postgresql.org/docs/9.0/static/sql-alterdefaultprivileges.html |
| {$IFDEF VER80} ShowMessage('Delphi 1');{$ENDIF} | |
| {$IFDEF VER90} ShowMessage('Delphi 2');{$ENDIF} | |
| {$IFDEF VER100} ShowMessage('Delphi 3');{$ENDIF} | |
| {$IFDEF VER120} ShowMessage('Delphi 4');{$ENDIF} | |
| {$IFDEF VER130} ShowMessage('Delphi 5');{$ENDIF} | |
| {$IFDEF VER140} ShowMessage('Delphi 6');{$ENDIF} | |
| {$IFDEF VER150} ShowMessage('Delphi 7');{$ENDIF} | |
| {$IFDEF VER160} ShowMessage('Delphi 8');{$ENDIF} | |
| {$IFDEF VER170} ShowMessage('Delphi 2005');{$ENDIF} | |
| {$IFDEF VER180} ShowMessage('Delphi 2006');{$ENDIF} |
| procedure BubbleSort(var Vetor: Array of Integer); | |
| var | |
| i, temp: Integer; | |
| changed: Boolean; | |
| begin | |
| changed := True; | |
| while changed do | |
| begin | |
| changed := False; |
| {$Message Hint 'Feed the cats'} //emits a hint | |
| {$MessaGe Warn 'Looks like rain.'} //emits a warning | |
| {$Message Error 'Not implemented'} //emits an error, continues compiling | |
| {$Message Fatal 'Bang. Yer dead.'} //emits an error, terminates compiler |
| Agregação | |
| Os objetos contidos podem existir sem serem parte do objeto que os contém. Exemplo: Carro -> Rodas. Você pode tirar as rodas do carro antes de destruí-lo e elas podem ser colocadas em outro carro. | |
| Composição | |
| Os objetos contidos não fazem sentido fora do contexto do objeto que os contém. | |
| Exemplo: Pedido -> Itens. Se você destruir o pedido, os itens são destruidos junto, eles não tem sentido fora do pedido. |
PostgresSQL JDBC connection URL
jdbc:postgresql:template1
org.postgresql.Driver
MySQL JDBC connection URL