Questions
What does each line in the code?? Please unsigned Long timer1; unsigned Long button_dbnc_tmr = 0;...

What does each line in the code?? Please

unsigned Long timer1;
unsigned Long button_dbnc_tmr = 0;
const int User_Button = 2;
const int USER_LED_Pin = 13;
bool allow_change = 0;
int counter = 0;
int state;
void read_state_from_memory(void);
void write_state_to_memory(void);
void turnoff(void);
void flash_1s(void);
void flash_2s(void);
void flash_3s(void);

void setup()
{
read_state_from_memory();
pinMode(USER_LED_Pin, OUTPUT);
Serial.begin(9600);
}
void loop()
{
timers();
if(digitalRead(User_Button) == 1)
{
if(allow_change == 1)
{
state++;
Serial.println(counter);
Serial.println(state);
allow_change = 0;
if(state > 3)
state = 0;
write_state_to_memory();
}
}
}
else
{    counter = 0;
    allow_change = 1;
button_dbnc_tmr = 0;
}
switch(state_
{
case 0:
turn off();
break;
case 1:
flash_1s();
break;
case 2:
flash_2s();
break;
case 3:
flash_3s();
break;
}
}
void turnoff()
{

//complete by me

}
void flash_1s()
{
//complete by me

}
void flash_2s()
{
//complete by me

}
void flash_3s()
{
//complete by me

}
void timers(void)
{
static unsigned Long ms_runtime;
static int one_ms_timer;

if(millis() > (ms_runtime + 1))
{   ms_runtime = ms_runtime + 1;
one_ms_timer++;
}
else if(ms_runtime > millis())x
ms_runtime = millis();

if(one_ms_timer > 99)
{   one_ms_timer = 0;
button_dbnc_tmr++;
timer1++;
}
}
void read_state_from_memory ()
{
//to be completed by me
}
void write_state_to_memory()
{
//to be completed by me
}

In: Computer Science

Based on what you have picked up, learned professionally, developed through your studies, or any research...

Based on what you have picked up, learned professionally, developed through your studies, or any research you might need to do, discuss the network connectivity challenges that international companies have over regional or national companies. Provide at least 5 issues.

I need issues to be descriptive and I need original work. I have researched online but not sure I have found the correct thing?

In: Computer Science

what is the difference between reverse_tcp and a reverse_ord_tcp payload?

what is the difference between reverse_tcp and a reverse_ord_tcp payload?

In: Computer Science

R-9.6 Explain where the induction proof for showing that deterministic selection runs in O(n) time would...

R-9.6 Explain where the induction proof for showing that deterministic selection runs in O(n) time would fail if we formed groups of size 3 instead of groups of size 5.

In: Computer Science

Using Matlab's FUNCTION FILE Solve this system of equations using Gauss Elimination in MATLAB by writing...

Using Matlab's FUNCTION FILE

Solve this system of equations using Gauss Elimination in MATLAB by writing a Function file.

10y + z = 2

x + 3y – z = 6

2x + 4y + z = 5

Could you also provide me with a copiable function file of Matlab and the associated screenshot. Thank you!

In: Computer Science

Q1- Write code in C language(Atmel atmega32 avr microcontroller) (a)-Switches are connected to Port C and...

Q1- Write code in C language(Atmel atmega32 avr microcontroller)
(a)-Switches are connected to Port C and Port B and LED’s with PORTD. Write a code to read input from
PortB and C and perform following.
Addition of both inputs, Subtraction, Multiplication, Division, And, Or, Nor,Xor.


(b)- A switch is connected to PD0 and LED’s to Port B and Port C. Write a code to perform following:
When switch is 0 send your roll number to Port B.
When Switch is 1, toggle PortC 20 times.

In: Computer Science

Please write a basic function using Python. Please comment all steps. Thank you! Experimentally determined molecular...

Please write a basic function using Python. Please comment all steps. Thank you!

Experimentally determined molecular structures are stored in the Protein Data Bank. Protein Data Bank format is a standard for files containing atomic coordinates which are stored in the “ATOM” record. Write a Python function to extract x coordinate of each atom for a given PDB file. Test your function with the provided “1a3d.pdb” file as the example. Also, give a good thought what would be the proper data type for x coordinate.

Contents of the 1a3d.pdb file:

     
ATOM 1 N ASN A 1 57.429 52.566 66.234 1.00 11.00 N
ATOM 2 CA ASN A 1 57.401 52.920 64.787 1.00 13.62 C
ATOM 3 C ASN A 1 57.241 51.647 63.993 1.00 12.30 C
ATOM 4 O ASN A 1 57.394 50.528 64.511 1.00 13.98 O
ATOM 5 CB ASN A 1 58.652 53.792 64.352 1.00 11.78 C
ATOM 6 CG ASN A 1 59.934 53.013 64.271 1.00 14.53 C
ATOM 7 OD1 ASN A 1 59.937 51.833 63.961 1.00 17.83 O
ATOM 8 ND2 ASN A 1 61.041 53.653 64.610 1.00 18.58 N
ATOM 9 N LEU A 2 56.891 51.813 62.733 1.00 15.05 N
ATOM 10 CA LEU A 2 56.682 50.689 61.820 1.00 16.69 C
ATOM 11 C LEU A 2 57.715 49.557 61.882 1.00 16.96 C
ATOM 12 O LEU A 2 57.354 48.393 61.884 1.00 16.70 O
ATOM 13 CB LEU A 2 56.635 51.236 60.401 1.00 20.56 C
ATOM 14 CG LEU A 2 56.295 50.233 59.323 1.00 26.35 C
ATOM 15 CD1 LEU A 2 54.885 49.716 59.572 1.00 27.75 C
ATOM 16 CD2 LEU A 2 56.411 50.917 57.970 1.00 27.62 C
ATOM 17 N TYR A 3 59.006 49.894 61.877 1.00 15.94 N
ATOM 18 CA TYR A 3 60.075 48.891 61.913 1.00 16.81 C
ATOM 19 C TYR A 3 60.140 48.155 63.238 1.00 16.30 C
ATOM 20 O TYR A 3 60.425 46.938 63.288 1.00 16.54 O
ATOM 21 CB TYR A 3 61.442 49.547 61.609 1.00 16.00 C
ATOM 22 CG TYR A 3 61.665 49.814 60.140 1.00 15.35 C
ATOM 23 CD1 TYR A 3 62.265 48.869 59.327 1.00 14.53 C
ATOM 24 CD2 TYR A 3 61.317 51.039 59.577 1.00 18.90 C
ATOM 25 CE1 TYR A 3 62.525 49.123 57.992 1.00 14.89 C
ATOM 26 CE2 TYR A 3 61.569 51.315 58.216 1.00 17.39 C
ATOM 27 CZ TYR A 3 62.179 50.348 57.437 1.00 17.30 C
ATOM 28 OH TYR A 3 62.427 50.624 56.104 1.00 17.17 O
ATOM 29 N GLN A 4 59.836 48.870 64.313 1.00 14.44 N
ATOM 30 CA GLN A 4 59.850 48.231 65.615 1.00 15.12 C
ATOM 31 C GLN A 4 58.665 47.258 65.724 1.00 15.52 C
ATOM 32 O GLN A 4 58.781 46.210 66.362 1.00 14.91 O
ATOM 33 CB GLN A 4 59.802 49.295 66.685 1.00 15.14 C
ATOM 34 CG GLN A 4 61.021 50.221 66.666 1.00 17.99 C
ATOM 35 CD GLN A 4 60.921 51.273 67.741 1.00 20.05 C
ATOM 36 OE1 GLN A 4 59.978 52.055 67.719 1.00 18.28 O
ATOM 37 NE2 GLN A 4 61.855 51.274 68.714 1.00 18.47 N
ATOM 38 N PHE A 5 57.530 47.594 65.111 1.00 13.82 N
ATOM 39 CA PHE A 5 56.363 46.691 65.118 1.00 13.83 C
ATOM 40 C PHE A 5 56.764 45.436 64.296 1.00 14.36 C
ATOM 41 O PHE A 5 56.530 44.298 64.693 1.00 15.15 O
ATOM 42 CB PHE A 5 55.148 47.419 64.487 1.00 13.48 C
ATOM 43 CG PHE A 5 53.863 46.590 64.416 1.00 13.88 C
ATOM 44 CD1 PHE A 5 53.558 45.607 65.376 1.00 11.38 C
ATOM 45 CD2 PHE A 5 52.911 46.884 63.410 1.00 12.99 C
ATOM 46 CE1 PHE A 5 52.287 44.920 65.339 1.00 12.60 C
ATOM 47 CE2 PHE A 5 51.645 46.217 63.342 1.00 13.09 C
ATOM 48 CZ PHE A 5 51.335 45.245 64.313 1.00 11.98 C
ATOM 49 N LYS A 6 57.402 45.664 63.154 1.00 15.35 N
ATOM 50 CA LYS A 6 57.867 44.578 62.324 1.00 15.33 C

In: Computer Science

Write a JavaScript program with a function named fives that reads two numbers from two text...

Write a JavaScript program with a function named fives that reads two numbers from two text fields and then outputs to a div "True" if both of the numbers are greater than 5 or if their sum is greater than 20. Otherwise your function should output "False" to the div. If you wish, you may use the following HTML code to begin your program.

In: Computer Science

Write a Python program, phone.py, that inputs a string of characters which represent a vanity telephone...

Write a Python program, phone.py, that inputs a string of characters which represent a vanity telephone number, e.g., 800-MYPYTHON, and prints the all numeric equivalent, 800-69798466.

You should implement this using a loop construct to process each character from left to right. Build a new string that is the all numeric equivalent and then print the string.

In: Computer Science

(1) (6 marks) For each of the following projects, state (a) what generic software process model...

(1) For each of the following projects, state (a) what generic software process
model you would employ and (b) what features of the project are best suited to the
chosen model.
(i) An online Call Routing Management (CRM) software module that provides
both routing and voice fidelity capabilities to a voice network exchange
centre.
(ii) An Air-traffic Message Handling System (AMHS) which provides air traffic
controllers at an airport with message exchanges from arriving and departing
aircrafts.
(iii) A navigation and control software module for driverless hybrid electric
vehicles.

In: Computer Science

from typing import List def longest_chain(submatrix: List[int]) -> int: """ Given a list of integers, return...

from typing import List


def longest_chain(submatrix: List[int]) -> int:
"""
Given a list of integers, return the length of the longest chain of 1's
that start from the beginning.

You MUST use a while loop for this! We will check.

>>> longest_chain([1, 1, 0])
2
>>> longest_chain([0, 1, 1])
0
>>> longest_chain([1, 0, 1])
1
"""
i = 0
a = []
while i < len(submatrix) and submatrix[i] != 0:
a.append(submatrix[i])
i += 1
return sum(a)


def largest_rectangle_at_position(matrix: List[List[int]], x: int, y: int
) -> int:
"""
Returns the area of the largest rectangle whose top left corner is at
position , in .

You MUST make use of here as you loop through each row
of the matrix. Do not modify the input matrix.

>>> case1 = [[1, 0, 1, 0, 0],
... [1, 0, 1, 1, 1],
... [1, 1, 1, 1, 1],
... [1, 0, 0, 1, 0]]
>>> largest_rectangle_at_position(case1, 0, 0)
4
>>> largest_rectangle_at_position(case1, 2, 0)
5
>>> largest_rectangle_at_position(case1, 1, 2)
6
"""

pass

replace the word pass with a function body by implementing the 1st function. make sure nested loops can be a max of 3. try to keep it as short as possible and fulfill the docstring requirements

In: Computer Science

1. What are the differences between mobile communication and mobile computing? 2. Compare between 2G, 3G,...

1. What are the differences between mobile communication and mobile computing?
2. Compare between 2G, 3G, and 4G mobile networks.
3. Compare between TDMA, FDMA, and CDMA networks.
4. Draw and explain the GSM block diagram.
5. What is a GPRS network? What are advantages of SGSN and GGSN?

In: Computer Science

C++ PLEASE ___________________________________________________________________________________________________________________________________ Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and...

C++ PLEASE

___________________________________________________________________________________________________________________________________

Your Community Supported Agriculture (CSA) farm delivers a box of fresh fruits and vegetables to your house once a week. For this Programming Project, define the class BoxOfProduce that contains exactly three bundles of fruits or vegetables. You can represent the fruits or vegetables as three instance variables of type String .Add an appropriate constructor, accessor, and mutator methods. Also write a toString() method that returns as a String the complete contents of the box.

Next, write a main method that creates a BoxOfProduce with three items randomly selected from this list:

Broccoli

Tomato

Kiwi

Kale

Tomatillo

This list should be stored in a text file that is read in by your program. For now you can assume that the list contains exactly five types of fruits or vegetables.

Do not worry if your program randomly selects duplicate produce for the three items. Next, the main method should display the contents of the box and allow the user to substitute any one of the five possible fruits or vegetables for any of the fruits or vegetables selected for the box. After the user is done with substitutions, output the final contents of the box to be delivered. If you create additional methods to select the random items and to select valid substitutions, then your main method will be simpler to write.

____________________________________________________________________________________________________________________________________

In: Computer Science

Write a python program that will take in the number of call minutes used. Your program...

Write a python program that will take in the number of call minutes used. Your program will calculate the amount of charge for the first 200 minutes with a rate of $0.25; the remaining minutes with a rate of $0.35. The tax amount is calculated as 13% on top of the total. The customer could have a credit that also has to be considered in the calculation process. Finally, the program displays all this information. Below is a sample run:

Customer account number:                                        12345

Minutes used:                                                                (you provide)

Charge for the first 200 minutes@ 0.25:                (you provide)

Charge for the remaining minutes@ 0.35:             (you provide)     

Taxes:                                                                              (you provide)

Credits:                                                                            (you provide)

Total bill:                                                                         (you provide)

please provide .py program file screenshot and output.

In: Computer Science

I get an error when im trying to run this java program, I would appreciate if...

I get an error when im trying to run this java program, I would appreciate if someone helped me asap, I will make sure to leave a good review. thank you in advance!

java class Node

public class Node {
private char item;
private Node next;
Object getNext;

public Node(){
  
item = ' ';
next = null;
}
public Node(char newItem) {
setItem(newItem);
next = null;
}
public Node(char newItem, Node newNext){
setItem(newItem);
setNext(newNext);
}
public void setItem(char newItem){
item = newItem;
}
public void setNext(Node newNext){
next = newNext;
}
public char getItem(){
return item;
}
public Node getNext(){
return next;
}
  
}

java class LinkedString

public class LinkedString {
Node head;
int length;
  
public LinkedString(char[] characters) {

for(int i=0;i<characters.length;i++) {
Node newNode = new Node(characters[i]);
if(head==null) {
head = newNode;
}
else
{
Node curr=head;
while(curr.getNext!=null)
{
curr=curr.getNext();
}
curr = newNode;
}
}
length=characters.length;
}
public LinkedString(String str) {
for(int i=0;i<str.length();i++) {
Node newNode = new Node(str.charAt(i));
if(head==null) {
head = newNode;
}
else
{
Node curr=head;
while(curr.getNext!=null)
{
curr=curr.getNext();
}
curr = newNode;
}
}
length=str.length();
}
  
public char charAt(int index)
{
Node curr;
curr = head;
if (index == 0){
return curr.getItem();
}else if(index > 0 && index < length){
for (int i = 1; i<index; i++){
curr = curr.getNext();
}
}
return 0;

}
  

public LinkedString concat(LinkedString str)
{
if(isEmpty())
{
length=str.length();
return str;
}
Node curr=head;
while(curr.getNext!=null)
{
curr = curr.getNext();
}
curr.setNext(str.head);
length=length+str.length();
return this;
}
  
public boolean isEmpty() {
return length==0;
}
  
public int length() {
return length;
}
  
public LinkedString replace(char oldChar,char newChar) {
Node curr = head;
while(curr!=null) {
if(curr.getItem()==oldChar)
curr.setItem(newChar);
curr = curr.getNext();
}
  
return this;
}
  

public String toString() {
Node curr = head;
String ans = "";
while(curr!=null) {
ans+=curr.getItem();
curr = curr.getNext();
}
return ans;
}   

}

java class test

public class Test {


public static void main(String[] args) {
char array[]= {'m','a','h','d','i'};
System.out.println("String 1: ");
LinkedString LS1=new LinkedString(array);
System.out.println("isEmpty: "+LS1.isEmpty());
System.out.println("Length :"+LS1.length());
System.out.println("String form: "+LS1.toString());
System.out.println("Character At index 3: "+LS1.charAt(3));
  
System.out.println("\nlinkedString Object 2: ");
LinkedString LS2=new LinkedString("mazloumi");
System.out.println("isEmpty: "+LS2.isEmpty());
System.out.println("Length :"+LS2.length());
System.out.println("String form: "+LS2.toString());
System.out.println("Character At index 5: "+LS2.charAt(5));
  
  
System.out.println("\nConcatenated linked String: ");
LinkedString LS3=LS1.concat(LS2);
System.out.println("isEmpty: "+LS3.isEmpty());
System.out.println("Length :"+LS3.length());
System.out.println("String form: "+LS3.toString());
System.out.println("Character At index 10: "+LS3.charAt(10));

  
System.out.println("\nReplaced String: ");
LinkedString ls4=LS3.replace('a', 'o');
System.out.println(ls4.toString());
}

}

In: Computer Science