In: Computer Science
An Armstrong number is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is an Armstrong number since 3**3 + 7**3 + 1**3 = 371.
Write a C function to print all Armstrong numbers between a given interval. Then write a C program to keep reading two integers and print all Armstrong numbers between these two integers by calling that function.
In: Computer Science
Ex : Each of the following questions is about event processing.
Mark T if the question is valid, otherwise F.
(1) Subclasses of EventObject on components handle special types of
events such as action, window, component, mouse, and key events (
)
(2) Source objects activate events, event-related objects handle
events, and event-related objects are called risers ( )
(3) For all event types, the riser interface is usually named
XListener for Xevent (except for MouseMotionListener) ( )
(4) e.getSource() may be used to determine if the source object is
a button, check box, or radio button ( )
(5) Since the riser class is not shared by other applications, it
is appropriate to be defined inside the frame as an internal class
( )
(6) Since all methods within the riser interface are abstract and
require implementation of all methods, classes called adapters are
provided for convenience ( )
Please solve the problem. and Please Let me explain the process.
Thank you:)
In: Computer Science
Please show all work and thought process
In: Computer Science
Using Pass-by-Reference for Out Parameters Write a single function that counts the number of positive, negative and zero values in an integer array. Return the number of positive values, the number of negative values and the number of zero values. Use pass-by-reference to use parameters as “out parameter”: these are variables passed by reference into a function with the purpose of holding the result of the function after it terminates. Your function should have the following declaration: void countPosNegZero(int array[], int numElements, int &positive, int &negative, int &zero); where array is the array with the values, numElements is the number of elements in the array, positive will hold the number of positive values in the array, negative will hold the number of negative values in the array and zero will hold the number of zero values in the array. Add a test-main function that tests your program with several different arrays (use the rand() method to create arrays with random values ranging over negative and positive values).
c++
In: Computer Science
(a) Find a canonical cover for the FDs of the following table. (b) Put the table into 3NF.
T(A, B, C, D, E)
B --> CD
CD --> A
BC --> A
CD --> E
B --> E
In: Computer Science
do the following SQL programming tasks:
In: Computer Science
hi, can you draw me a cloud using turtle from python.
please send me the codes
In: Computer Science
What is the difference between port preservation and port forwarding? Can you explain it in plain language?
Thank you so much.
In: Computer Science
In: Computer Science
2.7 Implement an environment for a nxm rectangular room, where
each square has a 5% chance
of containing dirt, and n and m are chosen at random from the range
8 to 15, inclusive.
2.8 Design and implement a pure reflex agent for the environment of
previous problem 2.7, ignoring
the requirement of returning home, and measure its performance.
Explain why it is impossible
to have a reflex agent that returns homeland shuts itself off.
Speculate on what the best possible
reflex agent could do. What prevents a reflex agent from doing very
well?
2.9 Design and implement several agents with internal state.
Measure their performance. How
close do they come to the ideal agent for this environment?
2.10 Calculate the size of the table for a table-lookup agent in
the domain of problem 2.7 .
Explain your calculation. You need not fill in the entries for the
table.
2.11 Experiment with changing the shape and dirt placement of the
room, and with adding
furniture. Measure your agents in these new environments. Discuss
how their performance
might be improved to handle more complex geographies.
In: Computer Science
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
True/False
In: Computer Science
linux
Now use the date command and use redirection to APPEND today's date to the INSERTHERE file created (you want to append to the end of the file, not overwrite your name). What command did you use to do this?
In: Computer Science
Read the article and answer the question:
Question: Write your position (3 to 4 paragraphs) about Who Controls the Internet based on Dr. Wu
title:Hooking up
Let's say you're an entrepreneur who has an idea to build a wireless fob that finds your keys even if you left them in Virginia or Barcelona. Or say you want to design a refrigerator that transmits a signal to Safeway, instructing it to deliver a gallon of milk every time you're running low. To enter the market you will have to turn to one of the four mobile phone carriers that today exercise an oligopoly over wireless device communications: Verizon Wireless, AT&T, Sprint and T-Mobile.
Good luck. Get ready for an endless set of hurdles, including lengthy trials, revenue sharing and demands to cripple or modify features, without any guarantee of final approval. All that before your fob or fridge can transmit a tiny signal. In practice, many innovative devices never reach the market. The Big Four tend to approve only established partners whose devices fit their business plans, which is why we have yet to see all those wireless devices that were supposed to be in our future.
The firms already control what phones or devices reach Americans; 95% of cell phones are sold by the wireless carriers themselves. They strictly control phone design, blocking features that might threaten their revenue, like timers that keep track of how many minutes you've used each month. The carriers have also crippled or blocked alternative means of connecting wirelessly, like Bluetooth and Wi-Fi, because they want you to burn up minutes on their networks and charge extra fees.
The good news is that the federal government will soon have a chance to change all that and throw open America's airwaves to innovation and entrepreneurship. It will come in the form of an auction, within the next year, of the few remaining pieces of a precious national resource--licenses to the nation's wireless spectrum. This particular chunk of spectrum is becoming available because TV stations must stop using it to broadcast old-fashioned analog television by February 2009.
That's why this year's auction is so important. The Federal Communications Commission will soon deliver an initial set of rules to govern the spectrum auction. What's needed to spur innovation is a simple requirement: that any winner of the auction respect a rule that gives consumers the right to attach any safe device (meaning it does no harm) to the wireless network that uses that spectrum. It's called the Cellular Carterfone rule, after a 1968 decision by the FCC in a case brought by a company called Carter Electronics that wanted to attach a shortwave radio to AT&T 's network. That decision resulted in the creation of the standard phone jack. Applying the Carterfone rule to the next spectrum auction would ensure that our key fob designer need only look up standard technical specifications and then build and sell his device directly to the consumer. The tiny amounts of bandwidth the fob used would show up on the consumer's wireless bill.
The right to attach is a simple concept, and it has worked powerfully in other markets. For example, in the wired telephone world Carterfone rules are what made it possible to market answering machines, fax machines and the modems that sparked the Internet revolution.
Attachment rights can break open markets that might otherwise be controlled by dominant gatekeepers. Longshot companies like Ebay or YouTube might never have been born had they first needed the approval of a risk-averse company like AT&T. If you've invented a new toaster, you don't have to get approval from the electric company. Consumers decide how good your product is, not some gatekeeper.
But who has the political courage to push such ideas? To date, House Representatives Edward Markey (D--Mass.) and John Dingell (D--Mich.) have taken the lead in Congress by holding hearings on the issue. John McCain is the only presidential candidate so far to take a serious interest. Others should take notice. If America's reputation as the world's leading innovator is to be sustained, we need to get wireless policy right.
Tim Wu Professor at Columbia Law School and Author
In: Computer Science
PLEASE WRITE CLEAR AND CONCISE CODE
Subject is Unix system programming
Write code that downloads all of the log files ending in `.log` in an S3 bucket and counts the total number of HTTP errors in those logs.
Log lines are in the format `{"path": "/", status: 200}` or `{"path": "/", status: 404}`, for example. (This is JSON, and you can process it as such if you choose.)
Use the bucket `class6-logs`, the access key ID "AKIASUMBPHIPY6DLZ4C5", and the secret access key "JQdQIbxsRcipnoKFnsfse44SMRGouzz4tbAzTYbe".
Use the code below to get started:
Code-
import boto3
client = boto3.client(
's3',
aws_access_key_id="AKIASUMBPHIPY6DLZ4C5",
aws_secret_access_key="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",
)
resp = client.list_objects(Bucket='class6-logs')
client.download_file('class6-logs', resp['Contents'][0]
['Key'], 'downloaded_file')
# for object in resp['Contents']:
# print(object['Key'])
# print(resp['Contents'][0]['Key'])
In: Computer Science