Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

To get to the table from data set in python we initially make a cursor and afterward execute the question on the cursor to bring

To get to the table from data set in python we initially make a cursor and afterward execute the question on the cursor to bring the table. See beneath:

sql_query = "select * from Scores"

cursor = connection.cursor()

cursor.execute(sql_query)

records = cursor.fetchall()

Answer 1.3)

Python capability to execute mysql inquiries is execute(sql_query).

sql_query = "select name from Scores"

cursor = connection.cursor()

cursor.execute(sql_query)

Answer 2.1)

PHP capability to associate with mysql server is mysqli():

$server_name = "localhost";

$user_name = "kevin";

$secret word = "kevin@321";

$conn = new mysqli($server_name, $user_name, $password);

Answer 2.2)

PHP capability to choose mysql data set is mysql_select_db(). See beneath:

mysql_select_db(databaseName, link_connection);

Every URL has the plan where client is the name of the client who moved the report, and hash is the SHA-256 hash (64 hexadecimal digits) of the things in the record. For instance, such a URL could seem like Users can then concede these URLs to their partners or whomever they wish to permit to get to the moved record. Clients can likewise check their trades as open, connecting with anybody to see them through an investigating and search office given by Plop It!. (a) (12 focuses) Describe an assault on client security or protection that this plan locks in. In your portrayal, unite notice of who could endeavor to transport off the assault. Make as a few presumptions about the assailant s limits as could genuinely be expected. Plan:

Here s one of different potential outcomes. Acknowledge the RIAA accomplices that Alice is conveying unlawful duplicates with Harry Potter and the Big Fat Residual Check. They can manage S, the SHA-256 hash of the film, and some time later undertaking to get If the get succeeds then they have evidence that Alice achieved undoubtedly move the film to Plop It!, in all probability for motivations driving sharing it.Python capability to interface with mysql server. First we import mysql.connector and afterward utilizes associate() technique with the expected boundaries to interface. See underneath:

import mysql.connector

association = mysql.connector.connect(user='john', password='zxcv@4321', host='localhost', database='Student')

Answer 1.2)

This disturbs Alice s protection (setting to the side the credibility of her activities). Essentially, expecting there s a particular substance you wonder that Alice might have dealt with in Plop It!, this assault takes care of business to confirm its presence. (b) (8 focuses) Describe a way that Plop It! can safeguard against this assault. Your protect ought to require immaterial changes on their part, and not agitated their association model of connecting with clients to present records to companions.
cases reality or anyway of the statement presumably won't be known, either there of brain of it not having been peddled in the course or by the reaction not being known by anybody wherever. For each declaration comment on its authenticity and in circumstances where that is both significant and direct produce a changed variation of the discernment that is properly genuine. You shouldn't integrate checks to help your cases. (a) Problems that are not NP-re easy to handle. [3 marks] (b) Problems that are NP-completed will not at any point be handled there of psyche of time in spite of the way that PCs continue to get faster and speedier. [3 marks] (c) To test a number N to see whether it is prime you essentially have to do testdivision by all of the numbers from 2 to N − 1, and since there are simply N −2 of these and division ought to be conceivable in time O(n 2 ) this is polynomial time. Consequently primality testing is in the class P. [4 marks] (d) There is a polynomial-time decline from the k-inward circle issue to 3-SAT. [3 marks] (e) There is a polynomial-time decline from 3-SAT to the k-internal circle issue. [3 marks] (f ) There have been suggestion that regular PCs considering DNA could use the massive parallelism of their biochemical development to rapidly handle NP issues. If such structures could be made to work constantly this would handle the speculative test introduced by the possibility of NP-zenith. [4 marks] 9 [TURN OVER CST.98.6.10 12 Semantics of Programming Languages What is inferred by a named change structure? [2 marks] A language of orders, C, for shrewd data/yield is given by C ::= skip | ' := ' | getc(') | putc(') | C ; C | if ' = ', C else C | while ' = ' do C where ' ranges over some good game plan of regions for taking care of characters. The request '1 := '2 copies the things in '2 to '1. Python capability to interface with mysql server. First we import mysql.connector and afterward utilizes associate() technique with the expected boundaries to interface. See underneath:

import mysql.connector

association = mysql.connector.connect(user='john', password='zxcv@4321', host='localhost', database='Student')

Answer 1.2)

To get to the table from data set in python we initially make a cursor and afterward execute the question on the cursor to bring the table. See beneath:

sql_query = "select * from Scores"

cursor = connection.cursor()

cursor.execute(sql_query)

records = cursor.fetchall()

Answer 1.3)

Python capability to execute mysql inquiries is execute(sql_query).

sql_query = "select name from Scores"

cursor = connection.cursor()

cursor.execute(sql_query)

Answer 2.1)

PHP capability to associate with mysql server is mysqli():

$server_name = "localhost";

$user_name = "kevin";

$secret word = "kevin@321";

$conn = new mysqli($server_name, $user_name, $password);

Answer 2.2)

PHP capability to choose mysql data set is mysql_select_db(). See beneath:

mysql_select_db(databaseName, link_connection);

Every URL has the plan where client is the name of the client who moved the report, and hash is the SHA-256 hash (64 hexadecimal digits) of the things in the record. For instance, such a URL could seem like Users can then concede these URLs to their partners or whomever they wish to permit to get to the moved record. Clients can likewise check their trades as open, connecting with anybody to see them through an investigating and search office given by Plop It!. (a) (12 focuses) Describe an assault on client security or protection that this plan locks in. In your portrayal, unite notice of who could endeavor to transport off the assault. Make as a few presumptions about the assailant s limits as could genuinely be expected. Plan:

Here s one of different potential outcomes. Acknowledge the RIAA accomplices that Alice is conveying unlawful duplicates with Harry Potter and the Big Fat Residual Check. They can manage S, the SHA-256 hash of the film, and some time later undertaking to get If the get succeeds then they have evidence that Alice achieved undoubtedly move the film to Plop It!, in all probability for motivations driving sharing it.

This disturbs Alice s protection (setting to the side the credibility of her activities). Essentially, expecting there s a particular substance you wonder that Alice might have dealt with in Plop It!, this assault takes care of business to confirm its presence. (b) (8 focuses) Describe a way that Plop It! can safeguard against this assault. Your protect ought to require immaterial changes on their part, and not agitated their association model of connecting with clients to present records to companions.
cases reality or anyway of the statement presumably won't be known, either there of brain of it not having been peddled in the course or by the reaction not being known by anybody wherever. For each declaration comment on its authenticity and in circumstances where that is both significant and direct produce a changed variation of the discernment that is properly genuine. You shouldn't integrate checks to help your cases. (a) Problems that are not NP-re easy to handle. [3 marks] (b) Problems that are NP-completed will not at any point be handled there of psyche of time in spite of the way that PCs continue to get faster and speedier. [3 marks] (c) To test a number N to see whether it is prime you essentially have to do testdivision by all of the numbers from 2 to N − 1, and since there are simply N −2 of these and division ought to be conceivable in time O(n 2 ) this is polynomial time. Consequently primality testing is in the class P. [4 marks] (d) There is a polynomial-time decline from the k-inward circle issue to 3-SAT. [3 marks] (e) There is a polynomial-time decline from 3-SAT to the k-internal circle issue. [3 marks] (f ) There have been suggestion that regular PCs considering DNA could use the massive parallelism of their biochemical development to rapidly handle NP issues. If such structures could be made to work constantly this would handle the speculative test introduced by the possibility of NP-zenith. [4 marks]2 Semantics of Programming Languages What is inferred by a named change structure? [2 marks] A language of orders, C, for shrewd data/yield is given by C ::= skip | ' := ' | getc(') | putc(') | C ; C | if ' = ', C else C | while ' = ' do C where ' ranges over some good game plan of regions for taking care of characters. The request '1 := '2 copies the things in '2 to '1. The request getc(') examines the accompanying individual from the standard data stream into '. The request putc(') creates the things in ' to the standard outcome stream. The prohibitive and remembering that circle orders remember testing whether the things for two regions are same. The orders skip and C1 ; C2 have their commonplace ramifications. Portray a utilitarian semantics for this language as a named change system whose arrangements are (request, state)-

"hundreds" digit is a couple according to whether the essential decision is by l-worth or r-regard independently, nearly with the "tens" digit for the second and with the "units" digit for the third decision. [10 marks] Explain the development of a thing module which a building specialist or compiler could make to be taken care of by a linker. Your reaction should consolidate discussion of the different article module features expected to address the aggregated sort of the C program: int a[10] = { 2,3,5,7,11,13,17,19,23,29 }; extern int b[10]; extern int g(int); int f(int y) { return g(y) + b[5] + a[6]; } [10 marks] 4 CST.98.6.5 6 Comparative Programming Languages Many vernaculars either deny express pointer math or breaking point its usage. What kinds of issue could they say they are attempting to avoid? Why is it allowed (for specific limits) in C and C++, and routinely used by programmers? [8 marks] What are the dangers natural in allowing memory deallocation to be under the prompt control of the programmer? Given these dangers, why has memory deallocation not been robotized in standardized C or C++? [12 marks] 7 Prolog for Artificial Intelligence According to the rules of the Billy Badger Fan Club, a competitor is good for interest given that: • The up-and-comer ought to have two proposers who are people from the club. • The applicant ought to be developed some place in the scope of 18 and 30 years of age (complete). • Each proposer presumably been a section for something like two years. •The request getc(') examines the accompanying individual from the standard data stream into '. The request putc(') creates the things in ' to the standard outcome stream. The prohibitive and remembering that circle orders remember testing whether the things for two regions are same. The orders skip and C1 ; C2 have their commonplace ramifications. Portray a utilitarian semantics for this language as a named change system whose arrangements are (request, state)-

"hundreds" digit is a couple according to whether the essential decision is by l-worth or r-regard independently, nearly with the "tens" digit for the second and with the "units" digit for the third decision. [10 marks] Explain the development of a thing module which a building specialist or compiler could make to be taken care of by a linker. Your reaction should consolidate discussion of the different article module features expected to address the aggregated sort of the C program: int a[10] = { 2,3,5,7,11,13,17,19,23,29 }; extern int b[10]; extern int g(int); int f(int y) { return g(y) + b[5] + a[6]; } [10 marks] 4 CST.98.6.5 6 Comparative Programming Languages Many vernaculars either deny express pointer math or breaking point its usage. What kinds of issue could they say they are attempting to avoid? Why is it allowed (for specific limits) in C and C++, and routinely used by programmers? [8 marks] What are the dangers natural in allowing memory deallocation to be under the prompt control of the programmer? Given these dangers, why has memory deallocation not been robotized in standardized C or C++? [12 marks] 7 Prolog for Artificial Intelligence According to the rules of the Billy Badger Fan Club, a competitor is good for interest given that: • The up-and-comer ought to have two proposers who are people from the club. • The applicant ought to be developed some place in the scope of 18 and 30 years of age (complete). • Each proposer presumably been a section for something like two years. •

 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Foundations of Financial Management

Authors: Stanley Block, Geoffrey Hirt, Bartley Danielsen, Doug Short, Michael Perretta

10th Canadian edition

1259261018, 1259261015, 978-1259024979

More Books

Students also viewed these Computer Network questions