what is the concept of token bucket for traffic shaping , computer network, could anyone explain in detail, thanks
In: Computer Science
COMPUTER SCIENCES HOMEWORK
Assume it takes 10-6 seconds to do a unit of work.
10 | 100 | 1,000 | 10,000 | 100,000 | 1,000,000 | |
n | ||||||
n2 | ||||||
log10(n) | ||||||
2n |
In each cell in this table put the length of time it would take to complete an algorithm with the given work formula and the given size.
Take the time to represent large numbers in reasonable values; eg. report 109 seconds as 25 hours
PLEASE HELP!!
In: Computer Science
Need the correct line of code for c program to solve this equation . i is a value that the program all ready calculates from user imput. t
i = (x*1000)+(y*500)+(z*250
In: Computer Science
Create a form in which the user enters two separate numbers (x and y), and when the user clicks the appropriate button, math functions are performed on these two numbers and output back on to the form.
INPUT
PROCESSING
OUTPUT
CRITERIA
GRADING
SUBMISSION INSTRUCTIONS
All files should be included in submission
In: Computer Science
How would I write a C++ code that gives me the following out put:
Enter count of male students: 14
Enter count of female students: 17
Students registered
Total: 31
Male: 14 45.16%
Female: 17 54.84%
Enter count of male students: 7
Enter count of female students: 2
Students registered
Total: 9
Male: 7 77.78%
Female: 2 22.22% */
In: Computer Science
The program prompts a user for the number of contestants entered in this year’s and last year’s Greenville Idol competition, and then it displays the revenue expected for this year’s competition if each contestant pays a $25 entrance fee.
The programs also display a statement that compares the number of contestants each year. Now, replace that statement with one of the following messages:
If the competition has more than twice as many contestants as last year, display The competition is more than twice as big this year!
If the competition is bigger than last year’s but not more than twice as big, display The competition is bigger than ever!
If the competition is smaller than last year’s, display, A tighter race this year! Come out and cast your vote!
Below is the source code.
using System;
using static System.Console;
class GreenvilleRevenue
{
static void Main()
{
const int ENTRANCE_FEE = 25;
string entryString;
int numThisYear;
int numLastYear;
int revenue;
bool isThisYearGreater;
Write("Enter number of contestants
last year >> ");
entryString = ReadLine();
numLastYear =
Convert.ToInt32(entryString);
Write("Enter number of contestants
this year >> ");
entryString = ReadLine();
numThisYear =
Convert.ToInt32(entryString);
revenue = numThisYear *
ENTRANCE_FEE;
isThisYearGreater = numThisYear >
numLastYear;
WriteLine("Last year's competition
had {0} contestants, and this year's has {1} contestants",
numLastYear,
numThisYear);
WriteLine("Revenue expected this
year is {0}", revenue.ToString("C"));
WriteLine("It is {0} that this
year's competition is bigger than last year's.",
isThisYearGreater);
}
}
Please show output and source code of how to get the displayed text.
In: Computer Science
In this assignment, you are required to write the SQL statements to answer the following queries using PostgreSQL system.
The SQL statements comprising the DDL for Henry Books Database are given to you in two files. For that database, answer the following queries. Create the files Q1 to Q10 in PostgreSQL. Do follow the restrictions stated for individual queries.
1. List the title of each book published by Penguin USA. You are allowed to use only 1 table in any FROM clause.
2. List the title of each book that has the type PSY or whose publisher code is JP. You are allowed to use only one condition term in any WHERE clause; i.e., don't use AND/OR boolean operations.
3. List the title of each book that has the type CMP, HIS, or SCI. You are allowed to use only one condition term in any WHERE clause.
4. List the title of each book written by John Steinbeck and that has the type FIC.
5. For each book, list the title (sorted alphabetically), publisher code, type and author names (in the order listed on the cover).
6. How many book copies have a price that is greater than $20 and less than $25?
7. For each publisher, list the publisher name and the number of books published by it, only if the publisher publishes at least 2 books.
8. For each book copy available at the Henry on the Hill branch whose quality is Excellent, list the book's title (sorted alphabetically) and author names (in the order listed on the cover).
9. Create a new table named FictionCopies using the data in the bookCode, title, branchNum, copyNum, quality, and price columns for those books that have the type FIC. You should do this in two steps: 9A) Create the table, and 9B) populate it with the said data.
10. Ray Henry is considering increasing the price of all copies of fiction books whose quality is Excellent by 10%. To determine the new prices, list the bookCode, title, and increased price of every book in Excellent condition in the FictionCopies table. You are not allowed to modify the prices in the table, just show them.
DB1: https://users.cs.fiu.edu/~navlakha/4710/HenryPSQL.sql
DB2: https://users.cs.fiu.edu/~navlakha/4710/HenryInventory.sql
In: Computer Science
Create separate class with these members
a, b, c, x, y, z
int a b c
float x y z
Demonstrate
1) A two arg float constructor, and a two arg int constructor to instantiate objects, initialize variables read from the keyboard, display the sum.
Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
In: Computer Science
2. Show the trace of the RTL code for Booth's algorithm for X = 0111 and Y = 1011.
In: Computer Science
Write an Java/C program code to perform known-plaintext attack
on Permutation Cipher.
This program can be used to determine the length of the permutation
m and the
key permutation.
In: Computer Science
Using draw.io diagram tool, design a database schema for an application that tracks and manages students’ applications for a university. Make sure to create proper primary key for each entity. Add relations and specify cardinalities.
Use diamonds and the association on the arrow.
THINGS TO KEEP IN MIND :
In: Computer Science
In: Computer Science
In C++ Write a function that took in SIZE and array [size] and counted the number of elements >100
In: Computer Science
Define what an array index value is in JAVA. Then, write a JAVA program that passes an array to a method and finds the average value or mean value (add up the numbers in the array and divide by the number of values) of the array and prints it out.
In: Computer Science
Hello I'm currently having an error that says "main is not abstract and does not override abstract method" is there a way to fix the error?
import java.io.IOException;
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
import static javafx.application.Application.launch;
import javafx.scene.layout.StackPane;
public class Main extends Application implements
EventHandler<ActionEvent>{
public static void main(String[] args){
launch(args);
}
@Override
public void Start(Stage stage){
stage.setTitle("Test");
Button calcButton = new
Button("Steam");
StackPane root = new
StackPane();
calcButton.setOnAction(this);
Scene scene = new
Scene(root, 100, 100);
stage.setScene(scene);
stage.setTitle("Test");
stage.show();
}
class CalcButtonHandle {
public void
handle(ActionEvent event) throws IOException
{
Main fo = new
Main();
fo.runOt("D:\\Steam\\Steam.exe");
}
}
public void runOt(String path) throws
IOException{
Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " +
path);
}
}
In: Computer Science