Type your impression on the issues surrounding the Silk Road legal case.
In: Computer Science
What are patents for inventions in software? What are the dangers of not applying for patents? Develop 250-300 words
In: Computer Science
Create a structure In C program named Student
with the following components and appropriate data types:
Name,
ID, CGPA
i. Create an Array of Students of size three and take user input to
fill the array.
ii. Now find the student with the least CGPA and display his or
hers Name, ID and CGPA.
In: Computer Science
Show that if there is an Euler cycle in the graph, there is an Euler cycle in any BCC of the graph
In: Computer Science
You are given a reference to the head node of a linked list that stores integers. Please print the minimum element in this linked list. The class ListNode.java contains the description of a single node in the linked list. It has a num field to store the integer number and a reference next that points to the next element in the list. The file MyList.class is a pre-defined java code, that creates a linked list. The file ListSmallest.java creates an instance of MyList, and gets the head node of this list. Please fill out the part that says “TODO”, that computes the minimum element in the list. For fun, please solve this problem recursively. This means that no part of your solution may include iterative loops. The list will not contain any integer greater than 2000000.
ListSmallest.java:
public class ListSmallest {
public static void main(String [] args) {
// Creating an instance of
MyList.
MyList L = new MyList();
// Get the head of the linked
list.
ListNode head = L.getHead();
// Create an object of this
program to avoid static context.
ListSmallest l = new
ListSmallest();
// head is the head of my linked
list L.
// TODO: please write a function to
print the minimum element in this list. Please store this in the
variable m.
int m = 0; // store the min in this
variable.
System.out.println("The smallest
is " + m);
}
}
ListNode.java:
public class ListNode
{
public int num;
public ListNode next;
public ListNode(int _num, ListNode _next)
{
num = _num;
next = _next;
}
}
MyList.java:
public class MyList
{
private ListNode head;
MyList()
{
System.out.println("Loading my list.");
for (int i = 0; i < 50000; ++i) {
this.head = new ListNode(200000 - i, this.head);
}
this.head = new ListNode(17, this.head);
for (int j = 50000; j < 100000; ++j)
{
this.head = new ListNode(200000 - j, this.head);
}
System.out.println("My list is successfully loaded. Please print
the smallest element.");
}
public ListNode getHead()
{
return this.head;
}
}
CANNOT ADJUST NODE SIZE!!
MUST SOLVE RECURSIVELY!!
In: Computer Science
Write a complete program in python to impute null values in a data frame with mean and median . Please explain logic also because i am not understanding
In: Computer Science
Apply IP Configurations to the network. You may use this network ID 192.168.200.0. Show your work.
For each network, find the following
In: Computer Science
STRICT DOWNVOTE IF NOT DONE FULLY, WILL REPORT ALSO IF COPY PASTED OR MODIFIED ANSWER Develop a class, using templates, to provide functionality for a set of recursive functions. The functions specified as recursive must be written recursively (not iterativly). The UML class specifications are provided below. A main will be provided. Additionally, a make file will need to be developed and submitted. ● Recursion Set Class The recursion set template class will implement the template functions. recursionSet -length: int -*mySet: myType -MAX_VALUE = 500000 static const: int -LIMIT = 1000 static const: int +recursionSet() +recursionSet(const recursionSet&) +~recursionSet() +getSetLength() const: int +generateElements(int): void + getElement(int) const: myType +setElement(int, myType): void +readValue(const string) const: int +printSet() const: void +operator == (const recusrionSet&): bool +tak(myType, myType, myType) const: myType +printSeptenary(myType) const: void +squareRoot(myType, myType) const: myType -recSqRoot(myType, myType, myType) const: myType +recursiveSum() const: myType -rSum(int) const: myType +checkParentheses(string) const: bool -recChkPar(string, int, int) const: bool +recursiveInsertionSort(): void -recInsSort(int, int): void -insertInOrder(myType, int, int): voidYou may add additional private functions if needed (but, not for the recursive functions). Note, points will be deducted for especially poor style or inefficient coding. Function Descriptions • The recursionSet() constructor should set the length to 0 and mySet pointer to NULL. • The recusrsionSet(const recursionBucket&) copy constructor should create a new, deep copy from the passed object. • The ~recursionSet() destructor should delete the myType array, set the pointer to NULL, and set the size to 0. • The setElement(int, myValue) function should set an element in the class array at the given index location (over-writing any previous value). The function must include bounds checking. If an illegal index is provided, a error message should be displayed. • The getElement(int) should get and return an element from the passed index. This must include bounds checking. If an illegal index is provided, a error message should be displayed and a 0 returned. • The getSetLength() functions should return the current class array length. • The printSet(int) function should print the formatted class array with the passed number of values per line. Use the following output statement: cout << setw(5) << mySet[i] << " • "; Refer to the sample executions for formatting example. The readValue(string) function should prompt with the passed string and read a number from the user. The function should ensure that the value is 3 1 and £ MAX_VALUE. The function should handle invalid input (via a try/catch block). If an error occurs (out of range or invalid input) an appropriate message should be displayed and the user re- prompted. Example error messages include: cout << "readSetLenth: Sorry, too many " << "errors." << endl; cout << "readSetLenth: Error, value " << cnt << " not between 1 and " << numMax << "." << endl; • Note, three errors is acceptable, but a fourth error should end the function and return 0. The generateList(int) function should dynamically create the array and use the following casting for rand() to fill the array with random values. mySet[i] = static_cast(rand()%LIMIT); • • • The printSeptenary(myType) function should print the passed numeric argument in Septenary (base-7) format. Note, function must be written recursively. The recursiveSum() function will perform a recursive summation of the values in class data set and return the final sum. The function will call the private rSum(int) function (which is recursive). The rSum(int) function accepts the length of the data set and performs a recursive summation. The recursive summation is performed as follows: rSum ( position )= • { array[ 0] array[ position ] + rSum ( position−1) if position = 0 if position > 0 The tak(myType) function should recursively compute the Tak 1 function. The Tak function is defined as follows: tak ( x , y , z) = { z tak ( tak ( x−1, y , z) , tak ( y−1, z , x) , tak ( z −1, x , y ) ) 1 For more information, refer to: http://en.wikipedia.org/wiki/Tak_(function) if y≥ x if y < x• • The squareRoot(myType, myType) function will perform a recursive estimation of the square root of the passed value (first parameter) to the passed tolerance (second parameter). The function will call the private sqRoot(myType,myType,myType) function (which is recursive). The private recSqRoot(myType,myType,myType) function recursively determines an estimated square root. Assuming initially that a = x, the square root estimate can be determined as follows: recSqRoot ( x , a , epsilon) = • • • • • { 2 if ∣ a − x ∣ ≤ epsilon a 2 (a + x) sqRoot x , , epsilon 2 a ( ) if ∣ a 2 − x ∣ > epsilon The recursiveInsertionSort() function should sort the data set array using a recursive insertion sort. The recursiveInsertionSort() function should verify the length is valid and, if so, call the recInsSort() function to perform the recursive sorting (with the first element at 0 and the last element at length-1). The recInsSort(int, int) function should implement the recursive insertion sort. The arguments are the index of the first element and the index of the last element. If the first index is less than that last index, the recursive insertion sort algorithm is follows: ▪ Recursively sort all but the last element (i.e., last-1) ▪ Insert the last element in sorted order from first through last positions To support the insertion of the last element, the insertInOrder() function should be used. The insertInOrder(myType, int, int) function should recursively insert the passed element into the correction position. The arguments are the element, the starting index and the ending index (in that order). The function has 3 operations: ▪ If the element is greater than or equal to the last element in the sorted list (i.e., from first to last). If so, insert the element at the end of the sorted (i.e, mySet[last+1] = element). ▪ If the first is less than the last, insert the last element (i.e., mySet[last]) at the end of the sorted (i.e., mySet[last+1] = mySet[last]) and continue the insertion by recursively calling the insertInOrder() function with the element, first, and last-1 values. ▪ Otherwise, insert the last element (i.e., mySet[last]) at the end of the sorted (i.e., mySet[last+1] = mySet[last]) and set the last value (i.e., mySet[last]) to the passed element. The checkParentheses(string) function should determine if the parentheses in a passed string are correctly balanced. The function should call the private recChkPar(string, int, int) function (which is recursive) The recChkPar(string, int, int) function should determine if the parentheses in a string are correctly balanced. The arguments are the string, an index (initially 0), and a parenthesis level count (initially 0). The index is used to track the current character in the string. The general approach should be as follows: ◦ Identify base case or cases. ◦ Check the current character (i.e., index) for the following use cases: ▪ if str[index] == '(' → what to do then ▪ if str[index] == ')' → what to do then ▪ if str[index] == any other character → what to do then Note, for each case, increment the index and call function recursively.
In: Computer Science
Find information on 1 of the newest "viruses" affecting computer systems. Write up a detailed explanation of each virus and, if possible, write how you can combat this virus. (be sure to include the reference where you found each virus' information)
In: Computer Science
C++
bool exists_trio(int*,int); (it must use this line here) I was not sure how to utilize this line because I made code that works but not with this line specifically.
//Input:
//an integer array (param 1) and its size (param
2)
//Output:
//True or false
//Behavior:
//Returns true is there exists
//a sequence of 3 *consecutive* values in the
array
//such that the sum of the first two elements
//is equal to the third element in that
//sequence, false otherwise.
//Example:
//For the array {3,4,1,3,17,3,20,21,5,96},
//the function returns true because of the
// sequence {17,3,20} (i.e., 17+3=20).
//For the array {3,4,1,3,3,7},
//the function returns false.
In: Computer Science
Instruction to assigned to each processor. ARM Cortex-A12
In: Computer Science
You will be asked to implement a JavaFX program to demonstrate skills and knowledge covering the following:
• implementing EventHandlers and ChangeListeners for UI controls incl. ListViews
• JFoenix
Just need some examples in Java
In: Computer Science
Write a java program of a multiplication table of binary numbers using a 2D array of integers.
In: Computer Science
Dataset
The scikit-learn sklearn.datasets module includes some small datasets for experimentation. In this project we will use the Boston house prices dataset to try and predict the median value of a home given several features of its neighborhood.
See the section on scikit-learn in Sergiy Kolesnikov’s blog article Datasets in Python to see how to load this dataset and examine it using pandas DataFrames.
Reminder: while you will use scikit-learn to obtain the dataset, your linear regression implementation must use NumPy directly.
Experiments
Run the following experiments in a Jupyter notebook, performing each action in a code cell and answering each question in a Markdown cell.
Load and examine the Boston dataset’s features, target values, and description.
Use sklearn.model_selection.train_test_split() to split the features and values into separate training and test sets. Use 80% of the original data as a training set, and 20% for testing.
Create a scatterplot of the training set showing the relationship between the feature LSTAT and the target value MEDV. Does the relationship appear to be linear?
With LSTAT as X and MEDV as t, use np.linalg.inv() to compute w for the training set. What is the equation for MEDV as a linear function of LSTAT?
Use w to add a line to your scatter plot from experiment (3). How well does the model appear to fit the training set?
Use w to find the response for each value of the LSTAT attribute in the test set, then compute the test MSE ? for the model.
Now add an x2 column to LSTAT’s x column in the training set, then repeat experiments (4), (5), and (6) for MEDV as a quadratic function of LSTAT. Does the quadratic polynomial do a better job of predicting the values in the test set?
Repeat experiment (4) with all 13 input features as X and using np.linalg.solve(). (See the Appendix to Linear regression in vector and matrix format for details.) Does adding additional features improve the performance on the test set compared to using only LSTAT?
Now add x2 columns for all 13 features, and repeat experiment (8). Does adding quadratic features improve the performance on the test set compared to using only linear features?
Compute the training MSE for experiments (8) and (9) and compare it to the test MSE. What explains the difference?
Repeat experiments (9) and (10), adding x3 columns in addition to the existing x and x2 columns for each feature. Does the cubic polynomial do a better job of predicting the values in the training set? Does it do a better job of predicting the values in the test set?
In: Computer Science
Hey everyone
I'm working through my homework which involves creating a ER diagram based of certain business rules and I am stuck on this part:
Updated info
• Customers have a name, phone number, a credit card no, and a unique customer number.
• Customers can attend many performances, and each performance can have many customers attending. • Each performance of a show is on at a specific date and time, at a venue.
• Each performance has many actors and the actors in each performance can vary.
• Actors have a staff id, first name, last name, and a date of birth.
• A show has a title, year and duration in minutes. While two shows could have the same title, no two shows in the same year have the same title.
• Shows can have many producers, each with a staff id, first name, last name, date of birth.
1. Whenever customers want to attend a performance they must purchase a ticket, which records the purchase date. They can use different credit cards for different purchases. The customer account must be created prior to purchasing a ticket, and tickets are not transferable.
2. Tickets are for a specific performance of a show and identify the seat number, and a status (to indicate if the ticket has been redeemed).
3. There may be cases where performances of a show run concurrently.
4. Actors have a specific role that they play in each performance of the show which must be recorded in the system.
5. Actors must have one understudy, who will perform their role in cases where the primary actor is unavailable (eg due to illness). An understudy can study under many primary actors.
6. Producers may have a single production company which has a unique name and has an address. Each production company belongs to a single producer.
I can see that credit cards would be an attribute of customer entity but i'm not sure how this would relate to a ticket entity, an example diagram would really help me (UML must be used)
Thanks in advance!
In: Computer Science