This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A warning occurred (42 apples) | |
| An error occurred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /config/environments/development.rb | |
| # Gmail configuration | |
| config.action_mailer.raise_delivery_errors = true | |
| config.action_mailer.delivery_method = :smtp | |
| config.action_mailer.smtp_settings = { | |
| address: 'smtp.gmail.com', | |
| port: 587, | |
| domain: 'example.com', | |
| user_name: ENV['EMAIL_USER'], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- Read only | |
| -- | |
| -- Create a group | |
| CREATE ROLE postgres_ro_group; | |
| -- Grant access to existing tables | |
| GRANT USAGE ON SCHEMA public TO postgres_ro_group; | |
| GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $estadosBrasileiros = array( | |
| 'AC'=>'Acre', | |
| 'AL'=>'Alagoas', | |
| 'AP'=>'Amapá', | |
| 'AM'=>'Amazonas', | |
| 'BA'=>'Bahia', | |
| 'CE'=>'Ceará', | |
| 'DF'=>'Distrito Federal', | |
| 'ES'=>'Espírito Santo', | |
| 'GO'=>'Goiás', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Promise-Based Solution | |
| If prefer this approach for the elegant async/await syntax. | |
| import { first } from 'rxjs/operators'; | |
| isLoggedIn() { | |
| return this.afAuth.authState.pipe(first()).toPromise(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.security.*; | |
| import java.math.*; | |
| public class MD5 { | |
| public static void main(String args[]) throws Exception{ | |
| String s="Texto de Exemplo"; | |
| MessageDigest m=MessageDigest.getInstance("MD5"); | |
| m.update(s.getBytes(),0,s.length()); | |
| System.out.println("MD5: "+new BigInteger(1,m.digest()).toString(16)); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (api, $) { | |
| 'use strict'; | |
| api.writeText = function (x, y, text, options) { | |
| options = options || {}; | |
| var defaults = { | |
| align: 'left', | |
| width: this.internal.pageSize.width | |
| } |
NewerOlder