What defines a “rat race”? What makes consumption into a “rat race”?

What defines a “rat race”? What makes consumption into a “rat race”?

In: Economics

Diversity Does the growing diversity in the United States pose special challenges for law enforcement and...

Diversity Does the growing diversity in the United States pose special challenges for law enforcement and criminal justice professionals? If so, what are these challenges and what are some of your thoughts on possible solutions? What steps can be taken by individuals, CJ professionals, and by entire communities to undertake stronger human relationships and knowledge of race, gender, culture, religion, bias, stereotypes, and sexual orientation?

In: Psychology

A football player kicks the ball so that it will have a "hang time" (time of...

A football player kicks the ball so that it will have a "hang time" (time of flight) of 5.0 sec and land 50m away. If the ball leaves the player's foot 0.5 m above the ground,

(a) find the initial velocity of the ball

(b) find the velocity of the ball when it lands on the ground

In: Physics

The purpose of this exercise is to provide the Marketing department with a method to sort...

The purpose of this exercise is to provide the Marketing department with a method to sort a predefined data list by zip code, last name, first name so they can take advantage of bulk mailing rates.   
Assignment: 1. Create a table with the following fields called "Homework1Data" with (4 fields), then run the inserts below into the table (Figure 1-1). 2. Write a single SQL Query that has the following fields (6 fields so they can easily be moved around using a Mail Merge) using these names (alias); Firstname, Lastname, Address, City, State, Zip be sure to sort by zip code, last name, first name 3. Turn in a copy of your SQL Query (single statement - not a procedure)
Hint: The magic exist in the string manipulation functions (LENGTH, INSTR, SUBSTR, etc.)
Figure 1-1:

CREATE TABLE homework1data ( name VARCHAR2(30), address VARCHAR2(30), location VARCHAR2(30), zip VARCHAR2(10)); ----------------------------------------- INSERT INTO Homework1Data (Name, Address, Location, Zip) VALUES ('Ferguson, Shawn M.', '1940 Fountainview Court', 'Reynoldsburg, Ohio', '43068'); INSERT INTO Homework1Data (Name, Address, Location, Zip) VALUES ('Phillips, George', '19 Pleasant St.', 'Columbus, OH', '43231'); INSERT INTO Homework1Data (Name, Address, Location, Zip) VALUES ('Thompson, Mary', '200 E. Main St.', 'Columbus, Oh', '43215'); INSERT INTO Homework1Data (Name, Address, Location, Zip) VALUES ('Swatson, Robert', '584 Yellowstone Dr.', 'Westerville, OH', '43081'); INSERT INTO Homework1Data (Name, Address, Location, Zip) VALUES ('Banks, Heather T.', '19 Pleasant St.', 'Columbus, Ohio', '43231');

In: Computer Science

A student has two lenses, one of focal length 5.5 cm and the other with focal...

A student has two lenses, one of focal length 5.5 cm and the other with focal length 15 cm.

Find the maximum magnification produced by each of these lenses.

M1, M2?

In: Physics

Show and explain each step (neatly in complete sentences), indicate units, and specify the correct number...

Show and explain each step (neatly in complete sentences), indicate units, and specify the correct number of significant figures. A friend wants to sell you a catalyst that allows benzene to be formed by passing H2 (g) over graphite at 25 ˚C and 1 atm. Should you buy? Explain.

In: Chemistry

Amazon and Google have implemented cloud-based DBMS, what are some pros and cons? What are some...

  • Amazon and Google have implemented cloud-based DBMS, what are some pros and cons?
  • What are some of the steps that you can take to assist with cloud DBMS security for an organization?
  • Why is data security important now more than ever?
  • What are some of the steps that we can take to ensure that our database is protected and secure?
  • How can you use user views to enhance security and restrict access?

In: Computer Science

Terminology: 1.Thickness of internal coating of an analytical column (meaning, the purpose and the range of...

Terminology: 1.Thickness of internal coating of an analytical column (meaning, the purpose and the range of them (in um) 2.Carrier gas in GC and Eluent in LC ( general purpose, what is the general carrier media, gas or eluent, for GC amd LC 3. Isocratic and gradient program of HPLC 4. FID detector (full name, flow of the gases for flame, best use for what compounds)

In: Chemistry

im learning how to code and i hear what is important are data structures and algorithms....

im learning how to code and i hear what is important are data structures and algorithms. i hear its always important to know my data structures and algorithms. i wpuld like a list of all of them or maybe just the most important ones. This is to have an idea.

In: Computer Science

You have looked at the current financial statements for Reigle Homes, Co. The company has an...

You have looked at the current financial statements for Reigle Homes, Co. The company has an EBIT of $2,930,000 this year. Depreciation, the increase in net working capital, and capital spending were $229,000, $94,000, and $435,000, respectively. You expect that over the next five years, EBIT will grow at 20 percent per year, depreciation and capital spending will grow at 25 per year, and NWC will grow at 15 per year. The company currently has $15,900,000 in debt and 465,000 shares outstanding. After Year 5, the adjusted cash flow from assets is expected to grow at 3 percent indefinitely. The company’s WACC is 8.3 percent and the tax rate is 35 percent.

What is the price per share of the company's stock? (Do not round intermediate calculations and round your answer to 2 decimal places, e.g., 32.16.)

Share price            $

In: Finance

What is the circuit diagram of password based door lock system project by using interface 8088...

What is the circuit diagram of password based door lock system project by using interface 8088 microprocessor with peripherals Ics ( PPI , PIT and PIC ) and what is code by using assembly language ?

notes:
1- this question related to microprocessor Interface subject .
2- I need answer after 4 hour very necessary , please

In: Computer Science

java programming You will be given two interfaces and two abstract classes, FileTextReader, FileTextWriter, AbstractFileMonitor, and...

java programming

You will be given two interfaces and two abstract classes, FileTextReader, FileTextWriter, AbstractFileMonitor, and AbstractDictionary. Your job is to create two classes the first class should be named FileManager, the second class should be named Dictionary. The FileManager will implement the interfaces FileTextReader and FileTextWriter and extend the clas AbstractFileMonitor. Your class signature would look something like the following:

public class FileManager extends AbstractFileMonitor implements FileTextReader, FileTextWriter{...

The constructor signature of the FileManager should look like the following:

public FileManager(String filePath){...

The Dictionary will extend the abstract class AbstractDictionary. Your class signature would look something like the following:

public class Dictionary extends AbstractDictionary {...

The constructor signature of the Dictionary should look like the following:

public Dictionary(String path, FileManager fileManager) throws IOException {...

Please read the programmatic documentation of the two interfaces and abstract classes to gain an understanding of what each function should do. This assignment will test your knowledge of reading and writing to a text file, implementing interfaces, extending abstract classes, throwing exceptions and working with collections specifically sets.

This project is accompanied by two test classes, ManagerTest, and DictionaryTest. They will test the functionality of the functions in the interfaces and the abstract methods of classes. Its recommended that you implement the FileManager before working on the AbstractDictionary.

Abstract Dictionary

package homework;

import java.io.IOException;
import java.util.Objects;
import java.util.Set;


* A class that holds a collection of words read from a text file. The collection of words is used in the methods of this class
* methods provided in this class.


public abstract class AbstractDictionary {
  
   private final FileTextReader FILE_READER;
   private final Set ALL_WORDS;
  

   /**
   * Creates an abstract dictionary of words using the text file at the specified path.
   * @param path a path to a text file containing a dictionary of words
   * @param dictionaryFileReader the FileReader used to read from the text file at the specified path
   * @throws IOException thrown if there is a problem reading the file at the path
   */
  

public AbstractDictionary(String path, FileTextReader dictionaryFileReader) throws IOException {
       Objects.requireNonNull(dictionaryFileReader, "The File reader can not be null");
       Objects.requireNonNull(path, "The path can not be null");

      FILE_READER = dictionaryFileReader;

       ALL_WORDS = FILE_READER.getAllLines(path);
   }

  
   /**
   * Returns a set of all the words contained in the dictionary text file.
   * @return a set containing all the words in the dictionary file.
   */
  

public Set getAllWords(){
       return ALL_WORDS;
   }

   /**
   * Counts the number of words in this Dictionary that start with the specified prefix and have a length that is equal or greater
   * than the specified size. If size the specified size is less than 1 then word size is not taken into account.
   * @param prefix the prefix to be found
   * @param size the length that the word must equal or be greater than. If a value less than 1 is specified, all words regardless of their
   * characters size should be considered. In other words if the size parameter is < 1 word size is disregarded in the calculations.
   * @param ignoreCase if true this will ignore case differences when matching the strings. If false this considers
   * case differences when matching the strings
   * @return The number of words that start with the specified prefix
   * @throws IllegalArgumentException if the specified string is null or empty (Meaning contains no characters or only white space or blank)
   */

public abstract int countWordsThatStartWith(String prefix, int size, boolean ignoreCase) throws IllegalArgumentException;

   /**
   * Tests if this Dictionary contains at least one word with a length equal to or greater than the specified size that starts with the specified prefix.
   * If size the specified size is less than 1 then word size is not taken into account.
   * @param prefix the prefix to be found
   * @param size the length that the word must equal or be greater than. If a value less than 1 is specified, all words regardless of their
   * characters size should be considered. In other words if the size parameter is < 1 word size is disregarded in the calculations.
   * @param ignoreCase if true this will ignore case differences when matching the strings. If false this considers
   * case differences when matching the strings
   * @return The number of words that start with the specified prefix
   * @throws IllegalArgumentException if the specified string is null or empty (Meaning contains no characters or only white space)
   */
  

public abstract boolean containsWordsThatStartWith(String prefix, int size, boolean ignoreCase) throws IllegalArgumentException;
   * Returns a set of all the words within in this Dictionary that start with the specified prefix and have a length that is equal or greater
   * than the specified size. If size the specified size is less than 1 then word size is not taken into account.
   * @param prefix the prefix to be found
   * @param size the length that the word must equal or be greater than. If a value less than 1 is specified, all words regardless of their
   * characters size should be considered. In other words if the size parameter is < 1 word size is disregarded in the calculations.
   * @param ignoreCase if true this will ignore case differences when matching the strings. If false this considers
   * case differences when matching the strings
   * @return A list of all strings that start with the specified prefix
   * @throws IllegalArgumentException if the specified string is null or empty (Meaning contains no characters or only white space)

   public abstract Set getWordsThatStartWith(String prefix, int size, boolean ignoreCase) throws IllegalArgumentException;
}

AbstractFileMonitor

package homework;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.security.DigestInputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
* A class with methods to monitor a text file.

public abstract class AbstractFileMonitor {

   private MessageDigest messageDigest;
   private int currentCheckSum;
   private boolean hasChanged = false;
   private long nextUpateTime = 0;
  
   public AbstractFileMonitor(String path){
setFilePath(path);
}

   * Updates the variables that correspond to the file being monitored
   * This function has been throttled such that it will only update values every 250 ms. In other words successive calls to this
   * function in time intervals that are less than 250 ms will yield no change.
   * @throws IOException Thrown if any type of I/O exception occurs while writing to the file
   * @throws IllegalStateException If the {@link #setFile(String)} method in not invoked with a proper file prior to invocation of this
   * @throws NoSuchAlgorithmException If the computer's OS is missing the SHA-256 hashing algorithm
   * method. In other words if no file is currently set to be monitored.

   public void update() throws IOException, IllegalStateException, NoSuchAlgorithmException {

      if(messageDigest == null){
           messageDigest = MessageDigest.getInstance("SHA-256");
       }
      
       if(nextUpateTime > System.currentTimeMillis()) {
           hasChanged = false;

          
          return;
       }

      
      nextUpateTime = System.currentTimeMillis() + 250;
      
       File file = new File(getFilePath());
      
       if(!file.exists()) return;

      
try (DigestInputStream dis = new DigestInputStream(new FileInputStream(getFilePath()), messageDigest)) {
while (dis.read() != -1) ;
messageDigest = dis.getMessageDigest();
}

StringBuilder result = new StringBuilder();
for (byte b : messageDigest.digest()) {
result.append(String.format("%02x", b));
}
  

hasChanged = currentCheckSum != result.toString().hashCode();
  
currentCheckSum = result.toString().hashCode();

   }
   * Tests if the file being monitored has changed since the last time {@link #update()} was invoked
   public boolean hasChanged(){
       return hasChanged;
}
   public abstract void setFilePath(String path);
   public abstract String getFilePath() throws IllegalStateException;
}

FileTextReader

package homework;

import java.io.IOException;
import java.util.Collection;
import java.util.List;
import java.util.Set;


public interface FileTextReader{
   public String readText(String path) throws IOException;

   * @throws IOException Thrown if any type of I/O exception occurs while writing to the file

public Set getAllLines(String path) throws IOException;
   * @throws IOException Thrown if any type of I/O exception occurs while writing to the file
public String getLastLine(String path) throws IOException;
}

FileTextWriter

package homework;

import java.io.IOException;


public interface FileTextWriter {
   * @throws IOException Thrown if any type of I/O exception occurs while writing to the file
   * @throws IllegalArgumentException if the specified string is null or empty (Meaning contains no characters or only white space)
   public void writeToFile(String string, String path) throws IOException, IllegalArgumentException;
}

In: Computer Science

Why is it significant that arginine vasopressin is expressed in squirrel monkeys and the amino acid...

Why is it significant that arginine vasopressin is expressed in squirrel monkeys and the amino acid sequence is identical to humans?

In: Biology

In the sigma-model of spontaneous symmetry breaking, we have degenerate vacuum states. But if we don't...

In the sigma-model of spontaneous symmetry breaking, we have degenerate vacuum states. But if we don't pick up a particular value of VEV, we won't have any symmetry breaking. As I read from a book, in field theory at finite volume, there would be no problem; but at infinite volume, we are forced to choose a value of the ? field. But why?

In: Physics

Calculate the Kovats retention index for an unknown using the following retention times: 1.8 min for...

Calculate the Kovats retention index for an unknown using the following retention times: 1.8 min for CH4, 11.7 min for octane, 14.4 min for the unknown, and 18.5 min for nonane.

In: Chemistry