image (48)
.png
keyboard_arrow_up
School
Toronto Metropolitan University *
*We aren’t endorsed by this school
Course
318
Subject
Computer Science
Date
Oct 30, 2023
Type
png
Pages
1
Uploaded by rabik.sharif on coursehero.com
@
@
@
CoE318__
Fall
2017_Midterm;
X
|
—+
C
(D
File
|
C/Users/User/Downloads/COE318___
Fall_2017_Midterm.pdf%20(1).pdf
e
=
g
-
Y
Draw
-
&
Read
aloud
|
Ask
Bing
Al
-
+
=
1
|
of12
|
)
|
(D
Q1:
(5
marks)
="
O
Type
here
to
search
Either
indicates
that
a
compiler
error
would
occur,
or
write
the
output
on
the
line
associated
with
the
code
fragment.
class
CClass{
public
static
void
main(String
args[])
{
AClass
refl
=
new
AClass(5);
AClass
ref2
=
new
AClass
(10);
System.out.println(refl.add(ref2));
}
}
class
AClass{
private
int
x;
AClass
(int
x)
{
this.x
=
x;
}
int
add(AClass
ref)
{
return
x
+
ref.x;
}
}
Solution:
15
//"
0
or
5
marks
g
r=0e06cC
—
[m]
®
Gon
®
Q|
@z@i
L
RBO®mE
€O
QX
+
m)
@
-
@
_
5:49
PM
AN
x
9
Sunset
G
4
ENG
008
%)
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
Twitter Data:
twitter_url = 'https://raw.githubusercontent.com/Explore-AI/Public-Data/master/Data/twitter_nov_2019.csv'twitter_df = pd.read_csv(twitter_url)twitter_df.head()
Question: Write the Number of Tweets per Day
Write a function which calculates the number of tweets that were posted per day.
Function Specifications:
It should take a pandas dataframe as input.
It should return a new dataframe, grouped by day, with the number of tweets for that day.
The index of the new dataframe should be named Date, and the column of the new dataframe should be 'Tweets', corresponding to the date and number of tweets, respectively.
The date should be formated as yyyy-mm-dd, and should be a datetime object. Hint: look up pd.to_datetime to see how to do this.
arrow_forward
Create Trigger for
When a student marks are being inserted, if the marks that are inserted are greater than 50, allow the insertion, but update marks to 50.
Marks(Id , Marks) -> Table
Fill in the blanks:
___ triggerName
Before ___ ON Marks
REFERENCING
_____ AS nrow
FOR EACH ROW
WHEN (nrow.marks>50)
_____ nrow SET nrow.marks = 50;
arrow_forward
user_hashes.txt
-/labl
Open
+
Save
1 userl:saMNhdbYqwtng
2 user2:$1$saltsalt$Uf4ZS8mOUI3K0JVGdW0Gg/
3 user3:$5$saltsalt$LJ1xP2sWvlns2HXEEtjkvBBnDjVDRjIJYli9wZOF6p5
4 user4:$6$saltsalt$Fx0z1/00gd05Rhbk9mNVswJYBtw9HwOmeHAOmn9Awl.Y3Z/AOPSLja52Fx31E11qxuKl.YnTnlo0z9b21Kt7K0
5
Why didn't John the Ripper crack all of the
hashes using the above syntax? (Hint, look at
the password formats in the user_hashes.txt file.
arrow_forward
This does not work:
CREATE OR REPLACE TRIGGER trg_char_hours
AFTER INSERT ON CHARTER
FOR EACH ROW
BEGIN
UPDATE AIRCRAFT
SET
AC_TTAF = AC_TTAF + NEW.CHAR_HOURS_FLOWN,
AC_TTEL = AC_TTEL + NEW.CHAR_HOURS_FLOWN,
AC_TTER = AC_TTER + NEW.CHAR_HOURS_FLOWN
WHERE AIRCRAFT.AC_NUMBER = NEW.AC_NUMBER;
END;
I get the following error:
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAF' at line 1
Here is the original question:
Create a trigger named trg_char_hours that automatically updates the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values.
(Hint: use temp values, as the INSERT event does not accept the OLD keyword.)
arrow_forward
Python please
starter code:
# Web App to Get Stock Market Data from AlphaVantage Serviceimport requests#Function that gets stock info from API# Returns results in list of two strings# DO NOT EDIT THIS FUNCTION EXCEPT TO INSERT YOUR API KEY WHERE INDICATEDdef getStock(symbol):baseURL = "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&datatype=csv"keyPart = "&apikey=" + "REPLACE WITH YOUR API KEY" #Add API keysymbolPart = "&symbol=" + symbolstockResponse = requests.get(baseURL+keyPart+symbolPart)return stockResponse.text #Return only text part of response#Function that computes and displays resultsdef main():# Add code that meets the program specifications (see instructions in Canvas)#Code that starts the appmain()
arrow_forward
the "list.txt" contains information about materials stored in the warehouse. Every record (line) in the file contains code, name and description seperated by "#"
write a php script that will open the file, read the content of the file and manupulate using associative array with code as a key.
the array should be sorted by the code and displayed to the user.
arrow_forward
Customers
CustomerID INT
◆ FirstName VARCHAR(50)
◆ LastName VARCHAR(50) H
> Email VARCHAR(100)
> Address TEXT
Indexes
F
|
Orders
OrderID INT
> CustomerID INT
> OrderDate DATE
◆ TotalAmount DECIMAL (10,2)
Indexes
#
ShippingInformation
ShippingID INT
> OrderID INT
→ ShippingAddress TEXT
ShippingDate DATE
-K
> EstimatedArrivalDate DATE
→ ShipmentStatus VARCHAR(50)
Indexes
Reviews
ReviewID INT
> ProductID INT
> CustomerID INT
◆ Rating INT
Comment TEXT
> DatePosted DATE
Indexes
OrderDetails
OrderDetailID INT
▶I
> OrderID INT
HI-KO ProductID INT
→ Quantity INT
Subtotal DECIMAL (10,2)
Indexes
T
Categories
CategoryID INT
◆ CategoryName VARCHAR(255)
Indexes
Products
ProductID INT
-H ProductName VARCHAR(255)
> Description TEXT
◆ Price DECIMAL (10,2)
-I+ CategoryID INT
> DiscountID INT
Indexes
Discounts
DiscountID INT
◆ Discount Code VARCHAR(50)
◆ Discount Percentage DECIMAL (5,2)
> StartDate DATE
> EndDate DATE
Indexes
For the design above, Write in SQL a query to print customer names who made…
arrow_forward
Some rows of the STUGRADE table of a school are shown below:
STU_CODE
CLS_CODE
GRADE
YEAR
291
111
3.1
2010
938
101B
2.3
2011
931
M101
3.3
2040
291
M101
3.4
2018
190
111
2.0
2021
931
321
3.9
2003
You want to show all STU_CODE with average grades higher than 3.0. Which of the following gets the required data?
a.
SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 GROUP BY STU_CODE
b.
SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE GRADE > 3.0 GROUP BY STU_CODE
c.
SELECT STU_CODE, AVG(GRADE) FROM STUGRADE GROUP BY STU_CODE HAVING AVG(GRADE) > 3.0
d.
SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 AND STU_CODE GROUP BY STU_CODE
arrow_forward
In the main.asm file, you are to create a few arithmetic calculations using the following
instructions:
mov
add
sub
Then after each expression is calculated, you will print the result using:
mov
rdi, XXX
call print_num
call print_lf
The value of XXX will depend on which register your final result landed.
Do this at least 3 times using only the registers ( rax, rbx, rcx and rdx).
For example, if you wanted to print the result of 32 + 5 - 10, you could do something like:
mov
rax, 32
add
rax, 5
sub
rax, 10
mov rdi, rax
call print_num
call print_lf
Remember that in order for the print_num subroutine to print your number, you must move the
result into rdi.
arrow_forward
<?php
if (isset($_POST['login'])){
$email = $_REQUEST['username'];
$password = $_REQUEST['psw'];
Require(‘connect_sql.php’);
$sql=
$result = mysqli_query($connection,$sql);
$num =
if( ){
}else{
echo "invalid username or password!";
}
mysqli_close($connection);
}
?>
arrow_forward
PYTHON CODE
Using Artists.csv (link below), write a query that returns all lines that are female artists only, with begin date greater than 1950 but no greater than 2000
Write a query that will return all lines of British Male artists, who's first names starts with the letter ‘A’ and has an end date earlier than 1990
Write a query that will write to a file all lines that have Japanese Artists who’s difference of end date and begin date exceeds 100 years. I.e. if artist begins in 1900 and ends in 2005, then they would be included in the output (2005-1900 = 105 years)
Write a query that will write and find to a file the artist who’s been at the Museum the longest (the widest gap between Begin Date and End Date)
Artists.csv: https://media.githubusercontent.com/media/MuseumofModernArt/collection/master/Artists.csv
arrow_forward
PHP
i want to use foreach function for 3 variables
i use this code in my page:
<?php foreach(array_combine($commodity_id, $quantity) as $commodity_id => $quantity){ $query = "INSERT INTO order_detail (commodity_id,quantity,c_stander_name,order_id) VALUES ('$commodity_id','$quantity','$c_stander_name','$order_id')"; $result = execute_sql($link, "0201", $query); } ?>
how can i do that like :
<?php foreach(array_combine($commodity_id, $quantity,$c_stander_name) as $commodity_id => $quantity =>$c_stander_name){ $query = "INSERT INTO order_detail (commodity_id,quantity,c_stander_name,order_id) VALUES ('$commodity_id','$quantity','$c_stander_name','$order_id')"; $result = execute_sql($link, "0201", $query); } ?>
No hand written and fast answer with explanation
arrow_forward
Official Miami Dade College Hon x
/ Content
Take Test: Exam 2- CGS1540C-2 x
Ô https://mdc.blackboard.com/webapps/assessment/take/launch.jsp?course assessment_id= 818475 1&course_id=_207342_
O Imported from Inte.
Remaining Time: 1 hour, 48 minutes, 41 seconds.
* Question Completion Status:
QUESTION 2
During class, I showed you how application programs (e.g., software used by nurses in hospitals) written in different general-purpose programming
languages can use API to send SQL code to SQL servers. Which one of the following was an example of a programming language that I used to illustrate
that idea?
O Cookies
O PHP
O Front-end scripting
O HTML
QUESTION 3
Which of the following statements regarding MYSQL is FALSE?
O It has free and open-source versions
O It is most popular with web applications
O It is owned by Oracle
O It implements SQL in a non-relational structure
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
P Type here to search
a * S O
77°F…
arrow_forward
mysql> DESC bookauthor;
mysql> DESC author;
mysql> DESC book;
| Field
| Туре
| Field
| Туре
| Field
Тур
| int(11
| varchai
author_order | int(11
royaltyshare | decima:
author_id
isbn
| author_id | int(1:
| ssn
lastname
| firstname | varch:
| phone
| address
| city
| state
| zip
| varch:
| varch:
isbn
var
I name
| type
pub_id
I price
| advance
I ytd_sales
I pubdate
var
var
| varch:
| varch:
| varch:
| varch:
| varch:
| int
dec
| dec
int
mysql> DESC bookeditor;
| dat
| Field
| Туре
mysql> DESC editor;
mysql> DESC publisher;
editor_id | int(11)
| varchar(1
| Field
isbn
| Field
| Туре
editor_id
ssn
pub_id | int(11)
| varchar(40)
varchar(40)
varchar(20)
varchar(2)
lastname
name
firstname
address
| phone
editor_position
salary
| city
state
arrow_forward
The following code will
#define N_ROW 10
#define N_COL 10
int row;
double sum=0, table[N_ROW][N_COL];
sum = 0;
for (row = 0; row < N_ROW; row++)
sum += table[row][1]
sum the values of the column with an index of 1.
sum the values of the row with an index of 1.
sum the values of the row with an index of N_ROW.
none of the others
sum the values of the first column in the array.
arrow_forward
Web Programming Question
Create a complete PHP application with two (2) input fields to input five (5) username and its password into an MyUser [] array using adduser() function and a submit button using post method. Display the contents of the MyUser[] array after all the inputs.
arrow_forward
In the linked list below, find the value of "TEMP->Next->Data".
list1
a.
David
b.
Leah
c.
Robert
d.
Miriam
arrow_forward
CREATE OR REPLACE PROCEDURE PROCUNO ( W_ID IN NUMBER ) W_FLAG W TAX W MSG NUMBER : = 0 ; NUMBER : = 0 ; NUMBER : = 0 ; STRING ( 20 ) : = " ; BEGIN SELECT COUNT ( * ) INTO W_FLAG FROM COMPRA WHERE COMPRA_ID - W_ID ; W_TAX : - W_X * 0.115 ; IF W_FLAG = 1 THEN SELECT SUM ( CANTIDADCOMPRADA * PRECIO ) INTO W_X FROM PRODUCTO_COMPRADO WHERE PRODUCTO COMPRADO.COMPRA_ID = W_ID ; UPDATE COMPRA SET COMPRA_X = W_X , ELSE WHERE COMPRA_ID = W_ID ; W_MSG : = ' mensajel " ; END IF ; COMPRA_TAX = W_TAX , COMPRA_TOTAL = W_X + W_TAX W_MSG : = ' mensaje2 ' ; END ;
arrow_forward
2. load_friendsdb
This function does the reverse of save_friendsdb -- it takes a single argument, filename, and opens that specified file for
reading. Then it reads the file one line at a time and creates a new friends database to return. Like in the previous
function, each line will contain a friend's name followed by a tab, then the friend's height, and then a newline.
Sample calls should look like this:
>>> load friendsdb("friendsdb.tsv")
[{'name': ' bimmy', 'height': 600}, {'name': 'Ian Donald Calvin Euclid Zappa', height': 175}]
arrow_forward
10. Which of the following PHP statements will execute the query "select * from item":
a. $select = mysqli_fetch_array("select * from item");
b. $query = "select * from item";
c. $query = mysqli_num_rows("select * from item");
d. $select = mysqli_query($conn, "select * from item");
arrow_forward
In java create an application to manage your data base
information the database is already created in mysql
tables, the tables are fill, So the user can use your
database application user friendly
Retrieve all data: Given a table name, retrieve all data
from the table and present it to the user.
Average: Given a table name and a column name, return
the average of the column. Here the assumption is that
the column type will be numeric (e.g., cost column).
Insert: Given a table name, your program should show
the column names of that table and ask the users to
input new data to the table. In case of errors, your
program should directly show the MySQL errors to the
users.
Assumption 1: Users will enter data according to the
database constraints.
Assumption 2: Users will input one record at a time.
Delete: Given a table name, your program should show
the column names of that table and ask the users to
input data that they want to delete.
Assumption 1: Users will enter data according to the…
arrow_forward
In [15]: print("Points scored by Your Team in Home Games (2013 to 2015)")
print("
--")
your_team_home_df = your_team_df [your_team_df [ 'game_location'] == 'H'].copy()
# --- TODO: make your edits here
mean = your_team_home_df['pts'].mean()
median = your_team_home_df['pts'].median ()
variance = your_team_home_df['pts'].var()
stdeviation = your_team_home_df['pts'].std()
print('Mean =', round(mean, 2))
print('Median =', round (median, 2))
print('Variance =', round(variance, 2))
print('standard Deviation =', round(stdeviation, 2))
Points scored by Your Team in Home Games (2013 to 2015)
Mean = 99.06
Median = 99.0
Variance = 121.68
Standard Deviation = 11.03
Step 7 - Descriptive Statistics - Points Scored By Your Time in Away Games
The management also wants you to run descriptive statistics on the points scored by your team in games played at opponent's venue (Away) in 2013-2015.
They want you to analyze measures of central tendency (e.g. mean, median) and measures of spread (e.g. standard…
arrow_forward
DATA:
myBytes BYTE 10h,20h,30h,40hmyWords WORD 8Ah,3Bh,72h,44h,66hmyDoubles DWORD 1,2,3,4,5myPointer DWORD myDoubles
Questtion:
mov edx,[myDoubles + edi] ; EDX =?
arrow_forward
Microsoft Excel Formula assignment: The objective of this assignment is to create 100 [5x5] tables and each 5 by 5 table will have mix of numbers from 1 to 100. The numbers placed in the 5x5 table have to be randomized and cannot have a matching table (out of the 100 tables). AND each table cannot repeat the same number.
I need to create this without having to manually type numbers and create the 5 by 5 tables.
Please solve this assignment. simpifly the assignment (If needed) by producing 20 tables to start it out. This assignment demonstates the examples for formulas on excel. TIP: Formulas would help out! Here is two examples for 2 tables.TABLE 1:1 2 3 4 56 7 8 9 1011 12 13 14 1516 17 18 19 2021 22 23 24 25TABLE 2:59 2 3 4 133 72 8 9 6611 22 13 88 1516 17 18 19 529 40 99 30 21
arrow_forward
Stal
>>> Run PS6_P2_solution.py
Vehicle:
Make: Tesla
Model: Model 3
Year: 2022
Age: 1 years
Vehicle:
Make: Ford
Model: F-150
Year: 2020
Max Load: 10000 lbs
Age: 3 years
Can the truck carry 11000 lbs? No
>>>
arrow_forward
like that
declarecursor c isselect first_name, last_name, department_idfrom employeeswhere to_char(hire_date, 'ddd') > 100;
v_fname employees.first_name%type;v_lname employees.last_name%type;v_deptid employees.department_id%type;
beginopen c;loopfetch c into v_fname, v_lname, v_deptid;exit when c%notfound;dbms_output.put_line('First Name: '|| v_fname);dbms_output.put_line('Last Name: '|| v_lname);dbms_output.put_line('Department ID: '|| v_deptid);dbms_output.put_line(' ');end loop;close c;
end;
Display the first name and salary*10000 of all employees who works for department 50. Handle exceptions like Invalid cursor, cursor already open and no data found with oracle pl sql
arrow_forward
main.asm
%include "lib.asm"
section .textglobal _start
_start:
;; YOUR CODE HERE!;
; SAMPLEmov rdi, 65536 ; going to print 65536call print_num ; print the numbercall print_lf ; move to next line
exit:mov rax, 60 ; exitmov rdi, 0 ; return codesyscall
arrow_forward
Using Python with File Manipulation file name reservation.txt
Use Python Programming - restaurant reservation program. The application offers different reservation rate for adults and children. (see sample below)
RESTAURANT RESERVATION SYSTEMSystem Menua. View all Reservationsb. Make Reservationc. Delete Reservationd. Generate Reporte. Exit
2. When the VIEW RESERVATIONS is clicked, this will display all the reservations made:
# Date Time Name Adults Children 1 Nov 10, 2020 10:00 am John Doe 1 1 2 Nov 25, 202011:00 am Michelle Franks 2 1 3 Dec 10, 2020 9:00 am Ella Flich 1 1 4 Dec 21, 2020 12:00 pmDylan Cloze 2 1
3. If the user selects MAKE RESERVATION, the user needs to input the following:
a. Name (String)b. Date (String)c. Time (String)d. No of Adults (Integer)e. No of Children (Integer)
Note: Adult is 500 per head and Kids is 300 per head reservation, save the data in a text file.
4. If DELETE RESERVATION is selected, the user needs to input the reservation number to remove the…
arrow_forward
___________________ can be used to terminate a PL/SQL loop.
EXIT WHEN
CONTINUE WHEN
GOTO
KILL
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Related Questions
- Twitter Data: twitter_url = 'https://raw.githubusercontent.com/Explore-AI/Public-Data/master/Data/twitter_nov_2019.csv'twitter_df = pd.read_csv(twitter_url)twitter_df.head() Question: Write the Number of Tweets per Day Write a function which calculates the number of tweets that were posted per day. Function Specifications: It should take a pandas dataframe as input. It should return a new dataframe, grouped by day, with the number of tweets for that day. The index of the new dataframe should be named Date, and the column of the new dataframe should be 'Tweets', corresponding to the date and number of tweets, respectively. The date should be formated as yyyy-mm-dd, and should be a datetime object. Hint: look up pd.to_datetime to see how to do this.arrow_forwardCreate Trigger for When a student marks are being inserted, if the marks that are inserted are greater than 50, allow the insertion, but update marks to 50. Marks(Id , Marks) -> Table Fill in the blanks: ___ triggerName Before ___ ON Marks REFERENCING _____ AS nrow FOR EACH ROW WHEN (nrow.marks>50) _____ nrow SET nrow.marks = 50;arrow_forwarduser_hashes.txt -/labl Open + Save 1 userl:saMNhdbYqwtng 2 user2:$1$saltsalt$Uf4ZS8mOUI3K0JVGdW0Gg/ 3 user3:$5$saltsalt$LJ1xP2sWvlns2HXEEtjkvBBnDjVDRjIJYli9wZOF6p5 4 user4:$6$saltsalt$Fx0z1/00gd05Rhbk9mNVswJYBtw9HwOmeHAOmn9Awl.Y3Z/AOPSLja52Fx31E11qxuKl.YnTnlo0z9b21Kt7K0 5 Why didn't John the Ripper crack all of the hashes using the above syntax? (Hint, look at the password formats in the user_hashes.txt file.arrow_forward
- This does not work: CREATE OR REPLACE TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAFT SET AC_TTAF = AC_TTAF + NEW.CHAR_HOURS_FLOWN, AC_TTEL = AC_TTEL + NEW.CHAR_HOURS_FLOWN, AC_TTER = AC_TTER + NEW.CHAR_HOURS_FLOWN WHERE AIRCRAFT.AC_NUMBER = NEW.AC_NUMBER; END; I get the following error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAF' at line 1 Here is the original question: Create a trigger named trg_char_hours that automatically updates the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values. (Hint: use temp values, as the INSERT event does not accept the OLD keyword.)arrow_forwardPython please starter code: # Web App to Get Stock Market Data from AlphaVantage Serviceimport requests#Function that gets stock info from API# Returns results in list of two strings# DO NOT EDIT THIS FUNCTION EXCEPT TO INSERT YOUR API KEY WHERE INDICATEDdef getStock(symbol):baseURL = "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&datatype=csv"keyPart = "&apikey=" + "REPLACE WITH YOUR API KEY" #Add API keysymbolPart = "&symbol=" + symbolstockResponse = requests.get(baseURL+keyPart+symbolPart)return stockResponse.text #Return only text part of response#Function that computes and displays resultsdef main():# Add code that meets the program specifications (see instructions in Canvas)#Code that starts the appmain()arrow_forwardthe "list.txt" contains information about materials stored in the warehouse. Every record (line) in the file contains code, name and description seperated by "#" write a php script that will open the file, read the content of the file and manupulate using associative array with code as a key. the array should be sorted by the code and displayed to the user.arrow_forward
- Customers CustomerID INT ◆ FirstName VARCHAR(50) ◆ LastName VARCHAR(50) H > Email VARCHAR(100) > Address TEXT Indexes F | Orders OrderID INT > CustomerID INT > OrderDate DATE ◆ TotalAmount DECIMAL (10,2) Indexes # ShippingInformation ShippingID INT > OrderID INT → ShippingAddress TEXT ShippingDate DATE -K > EstimatedArrivalDate DATE → ShipmentStatus VARCHAR(50) Indexes Reviews ReviewID INT > ProductID INT > CustomerID INT ◆ Rating INT Comment TEXT > DatePosted DATE Indexes OrderDetails OrderDetailID INT ▶I > OrderID INT HI-KO ProductID INT → Quantity INT Subtotal DECIMAL (10,2) Indexes T Categories CategoryID INT ◆ CategoryName VARCHAR(255) Indexes Products ProductID INT -H ProductName VARCHAR(255) > Description TEXT ◆ Price DECIMAL (10,2) -I+ CategoryID INT > DiscountID INT Indexes Discounts DiscountID INT ◆ Discount Code VARCHAR(50) ◆ Discount Percentage DECIMAL (5,2) > StartDate DATE > EndDate DATE Indexes For the design above, Write in SQL a query to print customer names who made…arrow_forwardSome rows of the STUGRADE table of a school are shown below: STU_CODE CLS_CODE GRADE YEAR 291 111 3.1 2010 938 101B 2.3 2011 931 M101 3.3 2040 291 M101 3.4 2018 190 111 2.0 2021 931 321 3.9 2003 You want to show all STU_CODE with average grades higher than 3.0. Which of the following gets the required data? a. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 GROUP BY STU_CODE b. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE GRADE > 3.0 GROUP BY STU_CODE c. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE GROUP BY STU_CODE HAVING AVG(GRADE) > 3.0 d. SELECT STU_CODE, AVG(GRADE) FROM STUGRADE WHERE AVG(GRADE) > 3.0 AND STU_CODE GROUP BY STU_CODEarrow_forwardIn the main.asm file, you are to create a few arithmetic calculations using the following instructions: mov add sub Then after each expression is calculated, you will print the result using: mov rdi, XXX call print_num call print_lf The value of XXX will depend on which register your final result landed. Do this at least 3 times using only the registers ( rax, rbx, rcx and rdx). For example, if you wanted to print the result of 32 + 5 - 10, you could do something like: mov rax, 32 add rax, 5 sub rax, 10 mov rdi, rax call print_num call print_lf Remember that in order for the print_num subroutine to print your number, you must move the result into rdi.arrow_forward
- <?php if (isset($_POST['login'])){ $email = $_REQUEST['username']; $password = $_REQUEST['psw']; Require(‘connect_sql.php’); $sql= $result = mysqli_query($connection,$sql); $num = if( ){ }else{ echo "invalid username or password!"; } mysqli_close($connection); } ?>arrow_forwardPYTHON CODE Using Artists.csv (link below), write a query that returns all lines that are female artists only, with begin date greater than 1950 but no greater than 2000 Write a query that will return all lines of British Male artists, who's first names starts with the letter ‘A’ and has an end date earlier than 1990 Write a query that will write to a file all lines that have Japanese Artists who’s difference of end date and begin date exceeds 100 years. I.e. if artist begins in 1900 and ends in 2005, then they would be included in the output (2005-1900 = 105 years) Write a query that will write and find to a file the artist who’s been at the Museum the longest (the widest gap between Begin Date and End Date) Artists.csv: https://media.githubusercontent.com/media/MuseumofModernArt/collection/master/Artists.csvarrow_forwardPHP i want to use foreach function for 3 variables i use this code in my page: <?php foreach(array_combine($commodity_id, $quantity) as $commodity_id => $quantity){ $query = "INSERT INTO order_detail (commodity_id,quantity,c_stander_name,order_id) VALUES ('$commodity_id','$quantity','$c_stander_name','$order_id')"; $result = execute_sql($link, "0201", $query); } ?> how can i do that like : <?php foreach(array_combine($commodity_id, $quantity,$c_stander_name) as $commodity_id => $quantity =>$c_stander_name){ $query = "INSERT INTO order_detail (commodity_id,quantity,c_stander_name,order_id) VALUES ('$commodity_id','$quantity','$c_stander_name','$order_id')"; $result = execute_sql($link, "0201", $query); } ?> No hand written and fast answer with explanationarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Browse Popular Homework Q&A
Q: A school is setting up for the science department's annual "Night of Phantastic Physics Phun." One…
Q: 1. Of the following, which theory places the greatest emphasis on the characteristics of a leader’s…
Q: Gradient fields Find the gradient field F = ∇φ for the following potential function φ.
φ(x, y, z) =…
Q: Please show your answer to at least 4 decimal places.
Suppose that f(x, y)
= ry. The directional…
Q: 2. Based on the following correlogram, answer the following questions. (a) Is the series a white…
Q: A folk culture may resist the adoption of commercial culture because
a) It adopts the same taboos.…
Q: Complete the table. Report all answers accurate to three
decimal places.
Category
A
B
C
D
Observed…
Q: Find the slope of the line if it is defined.
Through
(2,1)
and
(2,0)
Select the correct…
Q: Write Sk
1.13+2 14+3•15+...+
Write SK+1-
(Type your answer in factored form.)
1.13+2+14+3•15++=…
Q: RC Circuit time constants
Note: I may change the voltage curves; I may change the relative value of…
Q: Suppose that P(A) = 0.3
and P(B) = 0.2
.(a) What does P(A u B) equal if
1. A and B are mutually…
Q: Carbon disulfide and
CS₂(g)+30₂(g) → CO₂(g)+2SO₂(g)
Suppose a mixture of CS₂, O₂, CO₂ and SO₂ has…
Q: O Macmillan Learning
Mikaela is out for a bike ride on a breezy day. The wind
blows out of the west…
Q: 7. A justification for boot camps is that youths
will benefit from a military-style atmosphere
that…
Q: Which of the following best describes the origins
of the Socialist law tradition?
It is rooted in…
Q: A
uniform electric field with magnitude E = 450 N/C points to the right. In addition, a +5.00 nC…
Q: what is the speed ratio of v/U for part b?
Q: We can see from the examples of folk food customs in the book that a) All involve taboos. b) Food is…
Q: Find the future value of an ordinary annuity if payments are made in the amount R and interest is…
Q: Consider the function below. (If an answer does not exist, enter DNE.)
C(x) = x/5(x + 6)
(a) Find…
Q: Questions 19 and 20 are related.
Assume that two investors each hold a portfolio, and that…
Q: A periodic, standing wave exists on a string of length L=3.69m. If a particular wave is measured to…
Q: ecently a community college offered a 2-credit course to help students with math anxiety. At the…
Q: In most models for the early universe, which was the first force to have frozen out of the original…
Q: For each system listed in the first column of the table below, decide (if possible) whether the…