Count all nonzero elements, odd numbers and even numbers in a linked list.
Code needed in java through single linked list.
In: Computer Science
JAVA PROGRAM Overview :
You will create a card deck program that allows the player to shuffle a deck of cards and play a game that draws and plays cards until all cards in the deck have been used.
Instructions:
The application must be able to perform the following tasks :
1. At the start of a new game, it shuffles all cards using a deck shuffler
2. The player then draws X number of cards from the deck and 'plays' the cards by displaying them in the UI
3. The played cards are then added to a discard pile.
4. The player draws X new cards and repeats playing and discarding cards.
5. When there are no cards left in the deck, the game should ask the player of they want to play again.
-if the answer is yes, create a new deck with the discard pile and start again
-if the answer is no, end the game with a creative message to the player.
Requirements:
- The player must be able to continue to draw cards without errors.
- It should include different methods for drawing, shuffling and playing cards.
-It must include three arrays of a card, using a custom class that includes { Title: string, Description: String}
In: Computer Science
Type the Python code for all the questions. 1 2 Q1: Using DataFrame, with Figure 1 data, store the hypermarket data for rows and columns. Display the output as shown in Figure 1. 0 ITEMS NAME DISCOUNT 1 Grocery Rice 56 2 Electronics Mobile 25% 3 Food Apple 30% Figure 1 Q2: Update and display the "Rice" discount from 5% to 10%. Your output should be like Figure 2 now. 1 2 0 ITEMS NAME DISCOUNT 1 Grocery Rice 108 2 Electronics Mobile 25% 3 Food Apple 30% Figure 2 NO Q3: Use Figure 3 data to add and display a new column. Your output should be like Figure 3 now. 0 1 2 3 ITEMS NAME DISCOUNT STOCK Grocery Rice 10% 100 Electronics Mobile 25% 3 Food Apple 30% W NO 20 40 Figure 3
In: Computer Science
- What is meant by term “inelastic traffic” on a network?
- Explain the primary difference between network applications that use client-server architecture and applications that use peer-to-peer architecture.
- What is meant by the term “peer-churn” with respect to peer-to-peer application architectures?
- Describe in one sentence what is represented by a “port” number to the protocol operating in the transport layer in layered protocol architecture.
Please don't copy and paste from the internet. Thank you
In: Computer Science
ASAP PLEASE... USE PYTHON
Design and implement in a language of your choice, i.e. a C++ , Java, or Python as you prefer, program that calculates the molecular weight of a formula. Your program should accept a formula in whatever form you choose as input from the user, and should display the molecular weight for that formula. Your program must be able to handle formulas that:
The representation of data and the algorithm you choose for your implementation are entirely up to you. The interface for your program should clearly describe the expected input form so the user can interact effectively. Grading emphasis for this assignment is on correctness only -- inefficiency and inelegance may be commented on but will not adversely affect your grade except in extreme cases.
The periodic table of elements can be found in many sources, incuding numerous Web pages (e.g., www.chemicalelements.com/show/mass.html). A list of elements with their atomic weights is written as raw text below:
H 1.0080 He 4.0026 Li 6.9410 Be 9.0122 B 10.8100
C 12.0110 N 14.0067 O 15.9994 F 18.9984 Ne 20.1790
Na 22.9898 Mg 24.3050 Al 26.9815 Si 28.0860 P 30.9738
S 32.0600 Cl 35.4530 Ar 39.9480 K 39.1020 Ca 40.0800
Sc 44.9559 Ti 47.9000 V 50.9414 Cr 51.9960 Mn 54.9380
Fe 55.8470 Co 58.9332 Ni 58.7100 Cu 63.5460 Zn 65.3700
Ga 69.7200 Ge 72.5900 As 74.9216 Se 78.9600 Br 79.9040
Kr 83.8000 Rb 85.4678 Sr 87.6200 Y 88.9059 Zr 91.2200
Nb 92.9064 Mo 95.9400 Tc 98.9062 Ru 101.0700 Rh 102.9055
Pd 106.4000 Ag 107.8680 Cd 112.4000 In 114.8200 Sn 118.6900
Sb 121.7500 Te 127.6000 I 126.9045 Xe 131.3000 Cs 132.9055
Ba 137.3400 La 138.9055 Ce 140.1200 Pr 140.9077 Nd 144.2400
Pm 145.0000 Sm 150.4000 Eu 151.9600 Gd 157.2500 Tb 158.9254
Dy 162.5000 Ho 164.9303 Er 167.2600 Tm 168.9342 Yb 173.0400
Lu 174.9700 Hf 178.4900 Ta 180.9479 W 183.8500 Re 186.2000
Os 190.2000 Ir 192.2200 Pt 195.0900 Au 196.9665 Hg 200.5900
Tl 204.3700 Pb 207.2000 Bi 208.9806 Po 210.0000 At 210.0000
Rn 222.0000 Fr 223.0000 Ra 226.0254 Ac 227.0000 Th 232.0381
Pa 231.0359 U 238.02900 Np 237.0482 Pu 242.0000 Am 243.0000
Cm 247.0000 Bk 249.0000 Cf 251.0000 Es 254.0000 Fm 253.0000
Md 256.0000 No 256.0000 Lr 257.00
In: Computer Science
- What event will cause the sender to initiate fast retransmit when using TCP?
- Describe briefly the relationship between the round trip time (RTT) observed between a sender and a receiver and the retransmit timer used in TCP.
- Describe briefly the basic difference in service provided by an email server using POP3 protocol compared to an email server using IMAP protocol.
Please don't copy and paste from the internet. Thank you
In: Computer Science
In: Computer Science
“So much Fake News. Never been more voluminous or more inaccurate,” tweeted President Trump. A database of Trump remarks contains 320 references to fake news, named as term of the year in 2017. Leading news channels are not immune, for example in 2016 a story claiming HH Shaikh Mohammad Bin Zayed Al Nayhan had chanted a Hindu prayer went viral in India and was tweeted by main news channels. Fake news has been blamed for causing tension between countries, for example the Deputy Chairman of Dubai Police blamed Al Jazeera for deepening the crisis between Qatar and the UAE. Fake news has also resulted in tighter regulation of social media, and is now seen as a threat to democracy and free debate.
Historically, political interests have always misrepresented facts, but the identification, categorization and concept of fake news has become more complex and challenging. One team of students from Berkeley identified four classifications; clickbait, propaganda, commentary and humour and built a tool www.classify.news which scores the truth of information based on its URL. Their site claims 84% accuracy but the sample is based on only 5000 articles. IBM tested a prototype Question Answering Machine (QAM) called Watson to separate fact from fiction, and Google funded a fact checking operation called Full Fact to develop an automated fact-checking system. However, the successful implementation of fact checking models requires a constantly updated corpus of knowledge which is verified.
There are different data science architectures to check facts. The traditional NLP method of fake news detection is used by Thomson Reuters, a trusted global news source. Tracer News is a sensitive algorithmically driven system which filters news stories and social feeds for truth, and assigns a veracity score. It’s claimed to be 84% accurate, and with a sample of 5 tweets the system achieves 78% accuracy on distinguishing rumour and fact.
Research has shown that tweets containing false news spread faster and wider on Twitter than those with valid news. One estimate claims that in the month before the 2016 US election people read up to 3 articles of fake news. How this may possibly effect our attitudes is unknown, and psychologists have taken an interest in fake news. The Cognitive Reflection Test (CRT) was used to measure the ability to think analytically and consequently to predict people who can distinguish fake news from real news. Research has shown that if people agree with a message then they are more likely to believe it.
Social platforms such as Facebook are attempting to crack down on fake news in response to pressure. Facebook was accused of publishing fake posts using the name Lewis, who is a financial expert. Many people were thereby scammed to trust a financial product. Lewis pursued legal action to force social media to change their policy on advertising and be liable for hosting scams. Facebook are now playing an editorial role by changing the way News Feed functions. CEO Zuckerberg commented that sensationalism, misinformation and polarization are too common.
Countries such as Malaysia are making fake news punishable with up to 10 years in prison in an effort to protect national security. The law penalizes those who create, offer, circulate, print or publish fake news, which is defined as “any news, information, data and reports which is, or are, wholly or partly false whether in the form of features, visuals or audio recordings or in any other form capable of suggesting words or ideas”. Opponents call this an attack on freedom of speech and fear the new law could be used to penalize critical attacks on the government.
Human fact checkers are a rigorous and expensive way to combat fake news. A simple claim could take hours to verify and the manpower required could be considerable. If the responsibility lies with algorithms, false positives and negatives could lead to the suppression of a news story. In the UAE, the Youth Media Council is playing a role in the UAE’s strategy of developing the media sector and verifying credible from fake news. In a Dubai competition the winners research had explored a fake news incident whereby students’ names were spread on social media as soldiers who had died. Workshops to educate and teach young people skills to identify fake news were suggested.
Technology has enabled anyone to create news and for that news to go viral. The success of the message is not reliant on the truth of the contents, and there is too much information to validate. Many questions are raised about the effects of tagging news as fake, susceptibility to fake news, is fake news more real if its viral, and how to identify fake news. How can we create and sustain a global culture which promotes and values truth? What indeed is the truth of an event when multiple perspectives of the same event can hold truth.
In: Computer Science
in JAVA
Create a class called “MinMax” that satisfies the following
requirements:
a. create an integer array called nums that has 20 cells
b. generate a random number between 5 and 30, and populate the
array nums
c. print the minimum and maximum number in the array nums
d. print sum and average of numbers in the array nums
Your output look like this: (Note: numbers shown below will be
different in your program due to the random numbers)
minimum number = 6
maximum number = 29
sum = 123
average = 67.23
In: Computer Science
Explain with examples the role of metadata in social media. Discuss the various pillars of National Cyber Security Strategy.
In: Computer Science
Write a program call FancyMyName which asks you to write a program that tests the usage of different methods for working with Strings.
This program will ask the user to enter their first name and their last name, separated by a space.
Read the user's response using Scanner. Separate the input string up into two strings, one containing the first name and one containing the last name. You can accomplish this by using the indexOf() hint*** find the position of the space, and then using substring() to extract each of the two names. Also output the number of characters in each name (first & last) and output the user's initials. The initials are the first letter of the first name together with the first letter of the last name
A sample run of the program should look something like this:
Please enter your first name and last name, separated by a space?
You entered the name: Steve Henry
Your first name is Steve: has 5 characters
Your last name is Henry: has 5 characters
Your initials are: SH
In: Computer Science
Explain with examples the role of dark and deep web, ways the can affect an organization, or a business and ways to prevent.
In: Computer Science
Describe briefly how the operation of a Web proxy server increases the performance seen by Web clients (browsers).
In: Computer Science
Explain a few ways to obtain the data source and ways to utilize them to benefit an organization, or a business.
In: Computer Science
We can apply PCA to reduce features in a data set for
model construction. But, why do we still
need regularization?
What is the difference between lasso and ridge regression? What is
the role of hyper parameter in regularization task?
In: Computer Science