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
| package McGriff; | |
| import java.util.ArrayList; | |
| // Justin | |
| // Course CIS217 | |
| // Project 2 | |
| // 3/5/20 | |
| // | |
| public class WageGamer { | |
| //private fields |
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
| require 'open-uri' | |
| class Bingy | |
| LANDING_PAGE = 'http://www.bing.com/translator'.freeze | |
| SPEAK_URL = LANDING_PAGE + '/api/language/Speak?locale=en-US&media=audio/mp3' | |
| def initialize(text, gender = 'male') | |
| @user_agent = 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36' | |
| @params = { text: text, gender: gender } | |
| end |
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
| CREATE OR REPLACE FUNCTION empty(TEXT) | |
| RETURNS bool AS | |
| $$ SELECT $1 ~ '^[[:space:]]*$'; $$ | |
| LANGUAGE sql | |
| IMMUTABLE; | |
| COMMENT ON FUNCTION empty(TEXT) | |
| IS 'Find empty strings or strings containing only whitespace'; |