1) Describe the performance impact of using the LIKE operation with a wild card character at the beginning of the value.
2) Under what circumstances is a non-matching index scan performed?
3) A query is written to access a single table. Furthermore, that query will return only a single row because an equality predicate is coded on the primary key for the table. A unique index exists to support the primary key. What type of access is likely to be the most efficient for that query?
4) How can stored procedures be used to optimize performance in a client/server application?
5) Under what circumstances will a table scan outperform indexed access?
In: Computer Science
Programming Language: C++
Create a base class called Shape which has 2 attributes: X and Y (positions on a Cartesian coordinate system). Since a shape is amorphous, set the class up so that an object of type Shape can not be instantiated.
Create three derived classes of your choice whose base class is Shape. These derived classes should have accessors/mutators for their class specific attributes, as well as methods to compute the area and the perimeter of the shape.
In main(), create a stack of pointers to Shape and push one object of each derived class onto the stack. Then, pop each shape pointer off of the stack and output that shape's area and perimeter, demonstrating polymorphism.
In: Computer Science
Clarify the differences between the types of location sensors built-in to the mobile device. And how the Location information is accessed within an app?
In: Computer Science
In: Computer Science
Python
Without running / testing the following code, predict what the following program prints on the screen.
freeze = int(32)
boil = int(212)
freeze = 0
boil = 100
print(freeze, boil)
In: Computer Science
in C++, given a binary search tree of ints, in which each node contains a size parameter (also an int), explain, in English, not code, how you would find the median element of the tree in theta(log N) time.
In: Computer Science
Explain, If a device is configured with bandwidth and duplex settings on automatic, does the device at the other end of the connection have to be set to automatic as well?Explain, If a device is configured with bandwidth and duplex settings on automatic, does the device at the other end of the connection have to be set to automatic as well?
In: Computer Science
Create a script that take a directory path from the user. What I want you to do is figure out the total size of all files in the directory. You will need to import the os module for this.
In: Computer Science
Develop a simple GUI-based Java program that may be used to control a lighting system
In: Computer Science
Develop code in a Scala Maven project to monitor a folder in HDFS in real time such that any new file in the folder will be processed .For each RDD in the stream, the following subtasks are performed concurrently: (a) Count the word frequency and save the output in HDFS. Note, for each word, make sure space (" "), comma (","), semicolon (";"), colon (":"), period ("."), apostrophe (“’”), quotation marks (“””), exclamation (“!”), question mark (“?”), and brackets ("[", “{”, “(”, “” ) are trimmed. (b) Filter out the short words (i.e., < 5 characters) and save the output in HDFS. (c) Count the co-occurrence of words in each RDD where the context is the same line; and save the output in HDFS.
In: Computer Science
(e) T F The set of all NP-hard problems is the same as the set of all NP-complete problems.
(f) T F The dynamic programming technique can be used to solve any optimization problem.
(g) T F If A ≤p B and A is NP-Complete, then B is also NP-Complete.
(h) T F If a problem is in P, then it can be solved in polynomial time nondeterministically
with brief explaination
In: Computer Science
VBA question, write a function check keyword in a string.
Question:
Function sentimentCalc(tweet As String) As Integer
This function should check each word in the tweet and if the word exists as one of the keywords in the positive list or negative list it should impact the overall sentiment value. The positive list and negative list words exist in the keywords sheet. Access the keywords as ranges within your VBA code. The case of the word is inconsequential. For instance, happy, HAPPY, or hApPy are all treated as positive words regardless of their case (Hint: StrComp).
We have a keyword excel show that which word is positive and which is negative. How to get the keyword please see the hit part below.
If the word is in the positive list, it should increase the sentiment value by 10, if it is in the negative list it should decrease it by 10.
For instance, if the positive list includes “happy”, “rally”, “growth” and the negative list includes “crash”, “scam”, “bad” then:
If the Tweet is “I am Happy that Bitcoin is showing growth.”. The sentiment value will be 10 + 10 = 20
If the Tweet is “I am happy that Bitcoin is a scam and will CRASH!” The sentiment value will be 10 – 10 – 10 = -10
You must remove the following punctuation characters from the tweet text in your VBA code before calculating the sentiment: ! . , ? : ) ( ;
You may do this using multiple lines each calling the Replace function or with an array, loop and one call to the Replace function. Both methods will be marked as correct.
HIT:
You will need to use the string functions StrCom p, Split and Replace In this function.To get the ranges from the keywords Sheet use Worksheet and Range object like so:
Dim positive As Range
Set positive = Worksheets("keywords").Range("A2:A76")
Dim negative As Range
Set negative = Worksheets("keywords").Range("B2:B76")
This will give you the range A2:A76.From the sheet namedkeywords As the variable named positive.You can do the same for the negative range (but with different cell references And variable names).
You will need to use nested loops. One to go through each word in the keywords and one to Go through each word in the tweet text.
In: Computer Science
In: Computer Science
All the answers must be in Binary format. As always please show all your work.
9.75 + 0.5625
125.125 * 12.0625
In: Computer Science
Single inheritance
Given two integer numbers N1 and N2, create a class 'ProblemSolution' with following characteristics.
Result = (N1 + N2) * (N1 - N2)
What is inheritance?
Inheritance is a mechanism in which one object acquires all the
properties and behaviors of the parent object.
Reference:
https://www.tutorialspoint.com/cplusplus/cpp_inheritance.htm
Input
50
10
Output
2400
Given:
#include <iostream>
using namespace std;
// Base class
class Base {
public:
int addition(int N1, int N2) {
int result = N1 + N2;
return result;
}
int subtraction(int N1, int N2) {
int result = N1 - N2;
return result;
}
};
//write your code here
int main() {
int N1;
int N2;
cin >> N1;
cin >> N2;
ProblemSolution problemSolution;
cout << problemSolution.solution(N1,N2);
return 0;
}
C++
Must Run:
Both numbers being 0
1 negative and 1 positive number
both negative numbers
Large numbers
In: Computer Science