Unix/Linux
Turn in the following commands and any output from the commands.
1) ll to show the original 3 files
2) run the tar command to stuff three files
3) ll to show the 'tar archive'
4) mkdir newdir to create a new directory to unstuff the 'tar
archive'
In: Computer Science
C program for copying data from one directory to another using multi threading for linux using command line arrangement.
Program will take two arguments:
1: Source
2: Destination
it will copy all the files from source to destination recursively
Deadline: 4 hours from now.
In: Computer Science
What are the steps required to be performed by the Ext2 file system subsystem to delete a file of size 72KiB? Assume you know and have in memory a copy of the inode of the directory the file is in and the inode of the file to be deleted. Also assume the block size is 1024 bytes. Either list the steps required or use a flowchart.
In: Computer Science
In an attempt to escape his island, Gilligan builds a raft and sets to sea. The wind shifts a great deal during the day, and he is blown along the following straight lines:
2.5 km 45° north of west; then
4.70 km 60° south of east; then
5.1 km straight east; then
7.2 km 55° south of west; and finally
2.8 km 10° north of east.
What is his final position relative to the island?
______ km
______ ° south of east
In: Physics
Who Pays, who Provides and who Measures US Healthcare?
The costs of healthcare are higher in the United States compared to any other developed country in the world, but this does not equate to best health status for our populations (OECD, 2018).
1. Who pays for US Healthcare?
2. Who provides US Healthcare Services?
3. Who measures healthcare service results (quality of life years
(QALY) disability of life years (DALY)?
Please cite all resources used to obtain your answers.
Resources:
CDC. (2018). Health People 2020. https://www.cdc.gov/nchs/healthy_people/hp2020.htm
CMS. (2018). CMS Innovations. https://innovation.cms.gov/
NACCHO. (2018) Directory of Public Health Services. https://www.naccho.org/membership/lhd-directory
OECD. (2018). Health at a Glance (2017). http://www.oecd.org/health/health-systems/health-at-a-glance-19991312.htm
In: Nursing
Creating a Perl Product Directory - A product "id" will be used to identify a product (the key) and the description will be stored as the value
Some code is provided to you as a template.
In: Computer Science
Go to your “Documents” directory;
a) Create a file “file1” with the text “hello” in it; Provide command and screenshot.
b) Create a hard link named “file2” linked to “file1”;
c) Create a soft link named “soft1” linked to “file1”; create another soft link named “soft2” linked to “file2”.
d) View information of the 4 files (what command should you use to produce output) – how do you verify which file is a hard link and which file is a soft link?
e) Use a text editor (Nano or VIM) to edit “soft2”: change “hello” to “hello, world”. Now, what is the content in each of the files? Provide screenshots. Are they all the same? If yes, why?
f) How do you remove all these hard and soft links? Apply the command and provide screenshots of the removal results.
In: Computer Science
In Python: how can I fix the IsADirectoryError: [Errno 21] Is a directory: ???
this is my code:
#importing sqlite and pandas
import sqlite3
import pandas as pd
#goal
print("Welcome! The goal of this assigment is to create a database to find meanings and synonyms for given phrases.")
#Connecting database
conn = sqlite3.connect("keilavaldez.db")
#Creating cursor to remove existing specified tables
cur = conn.cursor()
#creating tables
cur.execute("CREATE TABLE Synsets([SynsetID] INTEGER,[Definition] text)")
cur.execute("CREATE TABLE Phrases([SynsetID] INTEGER,[phrase] text)")
conn.commit()
#opening and reading table named "synsets"
with open("//Users//keilavaldez//Desktop//assigment 10", 'r') as f:
for line in f:
data = line.split('\t')
cur.execute('INSERT INTO synsets (SynsetID, Definition) VALUES (?, ?)', (data[0], data[1].strip()))
#opening and reading table named "phrases"
with open("//Users//keilavaldez//Desktop//assigment 10", 'r') as f:
for line in f:
data = line.split('\t')
cur.execute('INSERT INTO phrases (SynsetID, phrase) VALUES (?, ?)', (data[0], data[1].strip()))
#Asking the user to enter a phrase
#checking if the phrase its in the database
#checking phrases even if they are lower
phrase = str(input("Please enter a phrase: "))
query = 'SELECT * FROM phrases WHERE phrase=' + "'"+ phrase.lower() + "'"
df = pd.read_sql_query(query, conn)
#if phrase is not in database, asking the user to try again
if df.empty:
print("Phrase/word not found. Please try again!")
#returning output if output is in database
#printing how many meanings the phrase has
#printing synonyms, printing unique synonyms
#prinit
else:
result_query = 'SELECT DISTINCT s.SynsetID,Definition FROM phrases p INNER JOIN synsets s ON s.SynsetID=p.SynsetID WHERE phrase=' + "'"+ word.lower() + "'"
result_df = pd.read_sql_query(result_query, conn)
lst = result_df['SynsetID'].values.tolist()
query = 'SELECT DISTINCT phrase,SynsetID FROM phrases WHERE SynsetID IN (SELECT DISTINCT s.SynsetID FROM phrases p INNER JOIN synsets s ON s.SynsetID=p.SynsetID WHERE phrase=' + "'"+ word.lower() + "') AND phrase<>"+ "'"+ word.lower() + "'"
df = pd.read_sql_query(query, conn)
syn = df['phrase'].values.tolist()
print("There are "+ str(len(lst)) +" meanings and "+ str(len(syn)) +" unique synonyms")
j=1
#priniting along with the synset ID
#printing all synonyms
for i in lst:
print("The meaning of this word: ",j)
print(result_df[result_df['SynsetID']==i]["The definition of this word: "].values[0])
print("Synset ID: ")
print(i)
print("Synonyms:")
words = df[df['SynsetID']==i]['phrase'].values.tolist()
for w in words:
if w!=phrase.lower():
print(w)
j=j+1
In: Computer Science
a.)On December 31, 2019, the Notes Receivable account at P. Davis Materials Corporation had a balance of $12,000, which represented a six-month, 12 percent note received from a customer on October 1.
b. ) During the week ended June 7, 2019, McCormick Media received $32,000 from customers for subscriptions to its magazine Modern Business. On December 31, 2019, an analysis of the Unearned Subscription Revenue account showed that half of the subscriptions were earned in 2019.
C.) On November 1, 2019, Perez Realty Company rented a commercial building to a new tenant and received $43,200 in advance to cover the rent for six months. Upon receipt, the $43,200 was recorded in the Unearned Rent account.
D.) On November 1, 2019, the Mighty Bucks Hockey Club sold season tickets for 40 home games, receiving $3,200,000. Upon receipt, the $3,200,000 was recorded in the Unearned Season Tickets Income account. At December 31, 2019, the Mighty Bucks Hockey Club had played 5 home games.
For each of the above independent situations, indicate the adjusting entry that must be made on the December 31, 2019, worksheet assuming no previous adjusting entries have been made during the year
In: Accounting
4) In which of the following situations would a court hold likely hold Barney liable for copyright infringement? Explain for each one why or why not.
(a) At the library, Barney photocopies 10 pages from a scholarly journal related to a topic on which he is writing a term paper.
(b) Barney makes leather handbags and sells them in his small leather shop. He advertises his handbags as “Vutton handbags” hoping that customers might mistakenly assume that they were made by Louis Vuitton, the well-known maker of high-quality luggage and handbags.
(c) Barney owns a video store. He purchases one copy of several popular movie DVDs from various distributors. Then, using blank DVDs, he burns copies of the movies to rent or sell to his customers.
(d) Barney teaches Latin American history at a small university. He uses his very high-tech VCR to frequently tape television programs relating to Latin America. He then takes the videos to his classroom so that his students can watch them.
In: Finance