Programming Homework Help

Programming Homework Help. Florida State College at Jacksonville C Programming Lab 4 Project

 

Lab 4 Directions

Write a C program called threadcircuit to run on ocelot which will provide a multithreaded solution to the circuit-satisfiability problem which will compute for what combinations of input values will the circuit output the value 1. This is the sequential solution, which is also attached. You should create 4 threads and divide the 65,536 test cases among them. For example, if p=4, each thread would be responsible for roughly 65,536/8 number of iterations (if it’s not divisible, some threads can end up with one more iteration than the others).

#include <stdio.h>
#include <sys/time.h>

/* Return 1 if 'i'th bit of 'n' is 1; 0 otherwise */
#define EXTRACT_BIT(n,i) ((n&(1<<i))?1:0)

int check_circuit (int z) {
int v[16]; /* Each element is a bit of z */
int i;

for (i = 0; i < 16; i++) v[i] = EXTRACT_BIT(z,i);
if ((v[0] || v[1]) && (!v[1] || !v[3]) && (v[2] || v[3])
&& (!v[3] || !v[4]) && (v[4] || !v[5])
&& (v[5] || !v[6]) && (v[5] || v[6])
&& (v[6] || !v[15]) && (v[7] || !v[8])
&& (!v[7] || !v[13]) && (v[8] || v[9])
&& (v[8] || !v[9]) && (!v[9] || !v[10])
&& (v[9] || v[11]) && (v[10] || v[11])
&& (v[12] || v[13]) && (v[13] || !v[14])
&& (v[14] || v[15])) {
printf ("%d%d%d%d%d%d%d%d%d%d%d%d%d%d%d%dn",
v[0],v[1],v[2],v[3],v[4],v[5],v[6],v[7],v[8],v[9],
v[10],v[11],v[12],v[13],v[14],v[15]);
return 1;
} else return 0;
}

int main (int argc, char *argv[])
{
int count, i;

count = 0;
for (i = 0; i < 65536; i++)
count += check_circuit (i);

printf ("There are %d solutionsn", count);
return 0;
}

If a thread finds a combination that satisfies the circuit, it should print out the combination (like in the given sequential version), along with the thread id (a number between 0 and 3 (p-1)). In the end, the main thread should print out the total number of combinations that satisfy this circuit (like in the given sequential program). Mutex should be used to update the total by each thread. An example output of the program is shown below:

% threadcircuit
0) 0110111110011001
0) 1110111111011001
2) 1010111110011001
1) 1110111110011001
1) 1010111111011001
1) 0110111110111001
0) 1010111110111001
2) 0110111111011001
2) 1110111110111001
There are 9 solutions

Code should be nicely indented and commented.

Create a simple Makefile to compile your program into an executable called threadcircuit.

Programming Homework Help

Programming Homework Help

Programming Homework Help. IT 2230 Capella University MySQL Command Line Tool Project

 

Through the remaining assignments due in this course, you will be creating a simple database for tracking information about volunteers working and raising money for a community organization. This assignment requires that you create the initial table, called PERSON, to hold basic information about volunteers. You will be redefining the design and building the database in the upcoming unit assignments.

Instructions

Your assignment will be scored on the following criteria. You will use the Weekly Solutions Submission Template to submit your assignment.

  1. Use the mysqldump.exe command line tool to backup the data in your volunteer database.
    • To access the mysqldump.exe tool, start the MySQL command line tool.
    • Use the quit command to exit to the system command prompt.
    • Run mysqldump.exe and direct the output of the backup to an appropriately named file.
    • Create a new database and restore the database from the backup to the new database. Submit a screenshot to document the restoration of the data to a new database.
  2. Write SQL CREATE TABLE statements and run them to create three new tables (ADDRESS, PHONE, AND EMAIL) to split out the contact information for your volunteers that is currently contained in the PERSON table.
    • Each table should have a unique primary key and foreign key constraint reference to the PERSON table.
    • Save your SQL statements to a text file using the MySQL tee command and document the process with screenshots.
  3. After creating the new tables (in Step 2), write and run SQL to insert the relevant data for the volunteers in the new tables.
    • Save your SQL statements to a text file using the MySQL tee command and document the process with screenshots.
  4. Modify the PERSON table using the ALTER TABLE statement to remove the columns for the data moved to the new tables.
    • Save your SQL statements to a text file using the MySQL tee command and document the process with screenshots.

Programming Homework Help

Programming Homework Help

Programming Homework Help. IT 2230 Capella University Initial Table for the Volunteer Database Questions

 

Creating the Initial Table for the Volunteer Database

Overview

Through the remaining assignments in the course, you will be creating a simple database for tracking information about volunteers working and raising money for a community organization. This assignment requires you to create the initial table, called PERSON, to hold basic information about individual volunteers. You will be refining the design and building the database in the assignments for upcoming units.

Instructions

Your assignment will be scored on the following criteria. You will use the Weekly Solutions Submission Template to submit your assignment.

  1. Think about the design of the table to hold VolunteerVolunteer_IDVolunteer_NameVolunteer_PhoneVolunteer_AddressVolunteer_CityVolunteer_StateVolunteer_ZipCodeVolunteer_EmailVolunteer_Organization TransactionsTrans_IDEvent_DateDonor_IDVolunteer_IDTrans_Amount DonorsDonor_IDDonor_FirstNameDonor_LastNameDonor_AddressDonor_CityDonor_StateDonor_ZipCodeDonor_PhoneDonor_Email EVENTEvent_IDEvent_NameEvent_LocationEvent_DateEvent_TimeEvent_DurationPOC_FirstNamePOC_LastNamePOC_PhonePOC_Email
    Briefly summarize (2–3 paragraphs) your design for this table.

    • Explain your decisions about the structure of the table and the data types used.
    • Discuss how you would go about gathering and normalizing the information that you need for putting the volunteer database together and how that fits into the database life cycle. Consider your vocabulary and communication style in your response. Your target audience would be the volunteer organization’s leadership.
  2. Write a SQL statement to create a new database named VOLUNTEER.
    • Save your SQL to a text file using the MySQL tee command and document the process with screenshots.
  3. Write a SQL table creation statement and run it to create the PERSON in your database (as noted above).
    • After creating the table, write and run SQL statements to insert rows in the table for 10 volunteers.
    • Save your SQL to a text file using the MySQL tee command and document the process with screenshots.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Simon Fraser University Inter Real Hustlers Web Project Case Study

 

Hi,

This is a Web Project Case Study.

I have completed part 1 and 2. And need help for part 3, 4, 5, 6.

Basically, you are here to publish a site that based my two completed parts. — a soccer club site with 6pages, please make sure to follow the instruction and give the html/css file. And a demo/web can be viewable.

A style css sample:

Thank you.

Programming Homework Help

Programming Homework Help

Programming Homework Help. Hudson Valley Community College Library Methods Discussion

 

Post three examples to this Discussion Board. Please try to pick different examples from other students, and please don’t just pick three easy ones and leave all the harder ones for other students.  If we run out of methods, you can find and describe some different methods that you found on the Java Oracle Online Reference, listed under Links.

Look at each of the following library methods. Tell what the method does.  Then tell either what class the method is in if it is static or the object used if it is non-static. Then tell what the argument(s) are and what type the arguments are.  Then tell what the return value is and what the return type is.  If necessary, look up your methods on the Java Oracle Online Reference, listed under Links.  Please identify the ones you picked in your answers. These are the ones I chose

parseInt(“1234”)

parseDouble(“1234.5”)

sleep(3000)

cosh(5.5)

cosh(5.5) – finds the hyperbolic cosine

class – Math

argument – 5.5 as a double

return – 122.34800951782942 as a doubl

this is what my teachers answer looked like, just so you can have some reference.

Programming Homework Help

Programming Homework Help

Programming Homework Help. AACC Parameters Match Prototypes and Return Values C Programming Exercise

 

hi guys I got few files it won’t let me post  Coding Assignment 7 – 2212

Coding Assignment 7 – 2212

CriteriaRatingsPts

This criterion is linked to a Learning OutcomeFormattingProgram is properly formatted – both alignment and formatting. Student’s name and id are at the top of every file and file containing C code is named Code7_xxxxxxxxxx.c where xxxxxxxxxx is the student’s 10 digit student id.

10 pts

Pass

0 pts

Fail

10 pts

This criterion is linked to a Learning OutcomeListLib.cOnly contains the code for a function to add nodes to a linked list and a function to search a linked list. Parameters and return values must match prototypes in ListLib.h.

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeFileLib.cOnly contains the code for a function to open a file and a function to read the file into the linked list. Parameters and return values must match prototypes in FileLib.h.

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeListLib.c-AddDrawCommandToListThis function should be passed a letter and a draw command and the address of the linked list head. It should add a new node to the passed in linked list head. It should malloc the amount of memory needed to store each draw command and store that pointer in the node.

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeListLib.c-FindLetterThis function should find the linked list node that matches the passed in letter. The draw command should copied into the empty array that was passed in. The address of the node where the search stopped should be passed back so that the next search starts where the current one left off This function should NOT process the draw command or create a list of them for a letter – every draw command should be processed as it is found – doing otherwise makes assumptions about how many draw command there are per letter.

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeFileLib.c-OpenFileFileLib.c should contain the OpenFile function from the previous assignment. It should pass in argc and argv and should return the file handle of the file that was opened. If a file name used on the command line, then that file should be opened. If a file name was not passed on the command line, then OpenFIle() should prompt for the file name.

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeFileLib.c-ReadFileIntoLinkedListThe file handle and address of the linked list head should be passed into ReadFileIntoLinkedList(). Nothing should be returned. Function should use fgets() to read the file and should strtok each file line to get the Letter and the DrawCommand. These values and the linked list head should be passed to AddDrawCommandToList().

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeCode7.c-main()Should call OpenFIle(), ReadFileIntoLinkedList(), and InitializeMap(). Prompt the user for 1-3 letters (user cannot enter fewer than 1 letters or more than 3 letters). Uppercase user’s entries. Traverse the linked list and find and execute all draw command for each input letter. Call PrintMap() at the end to display the results. The head of the linked list and the 2D array must be declared in main() and should be passed to other functions as needed. Assign a grade of 0 if either of these variables are declared outside of main().

5 pts

Pass

0 pts

Fail

5 pts

This criterion is linked to a Learning OutcomeTest 1GTA – run the program with and without the file name on the command line. If the file name is provided on the command line, then the program should NOT prompt for a filename and should open the file from the command line. If a file name is not provided on the command line, then the program should prompt for it and open the provided file.

15 pts

Pass

0 pts

Fail

15 pts

This criterion is linked to a Learning OutcomeTest 2GTA – enter lowercase letters to ensure input was uppercased and enter more than 3 letters to verify that user is being reprompted for invalid input.

15 pts

Pass

0 pts

Fail

15 pts

This criterion is linked to a Learning OutcomeTest 3GTA – using the instructor provided input file, enter test letters and validate that output is correct. Letters should be displayed correctly and in the correct positions.

25 pts

Pass

0 pts

Fail

25 pts

This criterion is linked to a Learning OutcomeGTA InstructionsCompile the student’s Code7_xxxxxxxxxx.c and other.c files using the student’s makefile on the VM. Perform all rubric criterion and pass/fail each one as needed. If code compiles with warnings/errors, fail all rubric points which will assign a grade of 0. Do not check any of the rubric criterion. Paste a copy of the compiler error/warning into the grader’s notes for this criterion.

Assign a grade of 0 to assignment if any of the following coding constructs were used in the program – global variables (typedef strucst are definitions – not global variables), goto, continue, break (except in a switch) and return used inside any loop.

0 pts

Fail

0 pts

Pass

0 pts

Total Points: 100

Programming Homework Help

Programming Homework Help

Programming Homework Help. KC PIN Verifier Personal Identification Numbers & Computer Rolls Programming Exercise

 

Problem One: PIN Verifier

Your task is to write a program to verify personal identification numbers (PINs). The user will enter a PIN, and your program will verify that it meets the requirements. Your program will report either that the pin does meet the requirements or that it does not. If it does not meet the requirements, it will explain why. These are the requirements for a valid pin:

  1. It must be between 5 and 7 digits long, excluding leading 0’s.
  2. It cannot repeat characters in consecutive positions (for example, 16634 would not be a valid pin)
  3. The sum of the last 4 digits of the pin must be a multiple of 4.
  4. The value of n-choose-k, where n is the largest digit and k is the left-most digit, must be an even number. Note that n-choose-k may be calculated as n! / (n-k)!k!

Your program must allow the user to continue entering candidate pins until they enter a -1, at which point the program will remind the user what the compliant pins were and then exit.

Programming Homework Help