in Java Write a method called randomNumber that returns a random floating-point number in the range of [-20.0, 50.0). (hints: use Random class in the method)
In: Computer Science
Examine the role of IT governance and why it is important in the IT industry.
Analyze key aspects of IT governance, including enterprise resource planning and transaction processing systems.
In: Computer Science
in c++:
The area of an arbitrary triangle can be computed using the
formula
where a, b, and c are the lengths of the sides, and s is the
semiperimeter :
s = (a + b + c) / 2
1. (5 points) Write a void function that uses five parameters
:
three value parameters that provide the lengths of the edges
and
two reference parameters that compute the area and perimeter(not
the semiperimeter).
Make your function robust.Note that not all combinations of a, b,
and c produce a triangle.
Your function should produce the correct results for legal data and
reasonable results for illegal combinations.
In: Computer Science
Round Robin Simulation Description: Write a program in c++ that utilizes STL queue (or your own queue implementation) that simulates the round robin process scheduling algorithm. WITH COMMENTS Requirement: - write a class Process that holds following integer information: id, arrival_time, time_needed, finished_time. - read and initiate 5 Process objects from associated file (robin. txt) - file format: id, arrival_time, time_needed - once a process is finished, mark its finished_time accordingly. - CPU time frame: 4. - utilize a queue for process scheduling. - store finished processes into a vector (first finished, first stored) - output: print information about finished processes from the vector, in the finished order.
robin.txt:
1 0 10
2 1 12
3 5 6
4 6 10
5 7 4
In: Computer Science
You’ve been asked to install a new service called explodingwidgets. After installing the explodingwidgets package, what is the most likely way you would start the service?
In: Computer Science
I've created a C# Windows form application in Visual stuidos it allows the user to enter information, save that information to a database, then show that information in a datagridview. Everything works fine but the datgridview. It shows that rows have been added but not the text. I can see in my database the reports that have been added so I know its alteast saving the information. I don't know what I'm doing wrong. Please help!
My code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Globalization;
namespace Reports
{
public partial class ReportsForm : Form
{
public ReportsForm()
{
InitializeComponent();
}
SqlConnection con = new SqlConnection("Data Source=Blu;Initial
Catalog=Reports;Integrated Security=True");
SqlCommand cmd;
private void Submitbtn_Click(object sender, EventArgs e)
{
String query = ("INSERT INTO Reports_tbl (EntryDate, ReportText)
VALUES ('" + DateTime.Now + "','" + ReportsrichTextBox.Text +
"')");
con.Open();
cmd = new SqlCommand(query, con);
cmd.ExecuteNonQuery();
con.Close();
MessageBox.Show("Report Successfully Added");
ReportsrichTextBox.Text = "";
}
private void Form1_Load(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection("Data Source=Blu;Initial Catalog=Reports;Integrated Security=True");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("SELECT * FROM Reports_tbl", con);
DataSet ds = new DataSet();
da.Fill(ds,"Reports_tbl");
ReportsdataGridView.DataSource =
ds.Tables["Reports_tbl"].DefaultView;
con.Close();
}
}
}
In: Computer Science
In: Computer Science
When browsing to a web page you’ve configured, you are receiving a 403 error. What are two possible causes, and how would they be remedied?
how to solve 403 error issue?
In: Computer Science
The two standard ACL commands are getfacl and setfacl.
1. What is the difference between them?
2. How can setfacl help achieve security hardening?
In: Computer Science
For the following exercises, enter the data from each table into MS-Excel and graph the resulting scatter plots (Use a smoothing function). Determine whether the data from the table could represent a function that is linear, exponential, or logarithmic.
|
n |
1.25 |
2.25 |
3.56 |
4.2 |
5.65 |
6.75 |
7.25 |
8.6 |
9.25 |
10.5 |
|
f (n) |
5.75 |
8.75 |
12.68 |
14.6 |
18.95 |
22.25 |
23.75 |
27.8 |
29.75 |
33.5 |
|
x |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
|
f (x) |
2 |
4.079 |
5.296 |
6.159 |
6.828 |
7.375 |
7.838 |
8.238 |
8.592 |
8.908 |
| m | 0 |
1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 |
| F(m) | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 |
28 |
|
y |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
|
f (y) |
2.4 |
2.88 |
3.456 |
4.147 |
4.977 |
5.972 |
7.166 |
8.6 |
10.32 |
12.383 |
|
z |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
|
f (z) |
9.429 |
9.972 |
10.415 |
10.79 |
11.115 |
11.401 |
11.657 |
11.889 |
12.101 |
12.295 |
In: Computer Science
Create this C++ program using classes
1. Create a file text file with a string on it
2. Check the frecuency of every letter, number and symbol (including caps)
3. Use heapsort to sort the frecuencys found
4. Use huffman code on the letters, symbols or numbers that have frecuencys
I created the file, and the frecuency part but i'm having trouble with the huffman and heapsort implementation.
In: Computer Science
Php
2. Use case diagram and the purpose of using a use case diagram.==> analysis
3. use case diagram and data flow diagram==> model the logical concept
4. draw a use case diagram or describe/explain a use case diagram
5. data flow diagram: context diagram + a set of subdiagrams
In: Computer Science
Question: Write a single SQL query that, for
each pair of actors, lists their two actor_ids
and the number of films in which both actors appeared.
DATABASE SCHEMA
CREATE TABLE actor (
actor_id INTEGER,
first_name TEXT,
last_name TEXT);
CREATE TABLE film (
film_id INTEGER,
title TEXT,
description TEXT,
length INTEGER);
CREATE TABLE film_actor (
actor_id INTEGER,
film_id INTEGER);
In: Computer Science
There is a famous puzzle called the Tower of Hanoi. Code the recursive implementation of it with Python.
In: Computer Science
Language Javascript
Implement Insertion Sort
1. Non-increasing order,
2. At least an array of 10 elements.,
3. You can use a static array.
In: Computer Science