C assignment help

C program. NOT C++
specialcountmulthreads.c is not completed. Need some modification

31 text files named input_00.txt to input_30.txt.

Requirements:

Multiple threads are expected to run in parallel to share the workload, i.e. suppose 3 threads to process 30 files totally, then each thread should process 10 files;

When a thread is created, a message should be print out showing which files this thread will process, for example:

Thread id = 274237184 starts processing files with index from 0 to 10!

When a file is being processed, a message should be print out showing which thread (thread_id = xxx) is processing this file, for example:

Thread id = 265844480 is processing file input_11.txt

When a thread is done with its workload, a message should be print out showing which files this thread has done with work, for example:

Thread id = 274237184 is done !

The array long specialfreq[ ] should always be up-to-date, i.e. it always has the result of all the threads counted so far. [You may need to use mutexes to protect this critical region.]

======specialcountmulthreads.c=====================

#include <stdio.h>

#include <stdlib.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <string.h>

#include <pthread.h>

#define MAX_FILES 30

#define MAX_LEN 1000

int num_threads;

char *filename[MAX_FILES];

int num_files;

long specialfreq[MAX_FILES];

int *index_array[MAX_FILES];

void *thread_function(void *arg) {

int *index = (int *) arg;

int i;

int my_index = *index;

int starting_index = my_index * (num_files / num_threads);

int ending_index = starting_index + (num_files / num_threads);

FILE *fp;

char ch;

int count = 0;

char line[MAX_LEN];

printf(“Thread ID: %lu starts working on files %d to %d.\n”, pthread_self(), starting_index, ending_index);

for (i = starting_index; i < ending_index; i++) {

fp = fopen(filename[i], “r”);

if (fp == NULL) {

perror(“Error opening file”);

} else {

printf(“Thread ID: %lu is working on file %s\n”, pthread_self(), filename[i]);

while (fgets(line, sizeof (line), fp) != NULL) {

ch = fgetc(fp);

if (ch == ‘!’) {

count++;

}

}

specialfreq[i] = count;

fclose(fp);

}

}

printf(“Thread ID: %lu is done!\n”, pthread_self());

pthread_exit(NULL);

}

void specialcountmulthreads(char *path, char *filetowrite, long specialfreq[], int num_threads) {

pthread_t tid;

int i;

int err;

int total_count = 0;

if (argc < 3) {

printf(“Usage: ./a.out num_threads input_file1 input_file2 … input_file30”);

exit(0);

}

num_threads = atoi(argv[1]);

num_files = argc – 2;

//printf(“Num thread: %d\n”, num_threads);

//printf(“Num files: %d\n”, num_files);

for (i = 2; i < argc; i++) {

filename[i – 2] = argv[i];

//printf(“Argv: %s\n”, argv[i]);

//printf(“Filename: %s\n”, filename[i – 2]);

}

for (i = 0; i < num_files; i++) {

index_array[i] = malloc(sizeof (int));

*index_array[i] = i;

//printf(“Index array: %d\n”, *index_array[i]);

//printf(“Index array: %d\n”, index_array[i]);

}

for (i = 0; i < num_threads; i++) {

err = pthread_create(&tid, NULL, thread_function, index_array[i]);

if (err != 0) {

printf(“\ncan’t create thread :[%s]”, strerror(err));

}

}

for (i = 0; i < num_files; i++) {

total_count += specialfreq[i];

}

printf(“Total count: %d\n”, total_count);

return 0;

}

======================testmulthreads.c=====================================================

#include <stdio.h>

#include <dirent.h>

#include <string.h>

#include <stdlib.h>

#include <ctype.h>

#include<unistd.h>

#include <stdbool.h>

#include “count.h”

/*

* Print the frequencies of special words stored in array: specialfreq[] to output screen in the format as:

* letter -> frequency (one letter a line)

* Input: specialfreq – array having the frequency of each special word

size – the total number of special words

* example:

* he -> 250932

* she -> 181764

*/

void displayalphabetfreq(long specialfreq[], int size)

{

for(int i = 0; i < size; i++)

{

switch (i)

{

case 0:

printf(“%s -> %d\n”, “he”, specialfreq[i]);

break;

case 1:

printf(“%s -> %d\n”, “she”, specialfreq[i]);

break;

case 2:

printf(“%s -> %d\n”, “they”, specialfreq[i]);

break;

case 3:

printf(“%s -> %d\n”, “him”, specialfreq[i]);

break;

case 4:

printf(“%s -> %d\n”, “me”, specialfreq[i]);

break;

defalut:

printf(“%s”, “Wrong number of special words … “);

}

}

}

int main(int argc, char *argv[])

{

printf(“Please enter 2 arguments only eg.\”./testmulthreads #_of__threads!!\”\n”);

int num_threads = atoi(argv[1]);

char *path = “../data”; // the data *.txt files are under this folder

char *filetowrite = “../result/result.txt”; // the frequency of all alphabetical letters will be written in this file

long specialfreq[SPECIALSIZE] = {0}; // array to store the frequency of each alphablet letter, which should be alway up-to-date;

specialcountmulthreads(path, filetowrite, specialfreq, num_threads); // process the data files using mutiple threads

printf(“The results are counted as follows : \n”);

displayalphabetfreq(specialfreq, SPECIALSIZE); // print the frequency stored in the array to output screen

}

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Case Study

 The paper must be APA-formatted, 1200 to 1500 words, the double-spaced, and 12-point font size in Times New Roman. 

 

Read the paper rubric to understand how your work will be assessed.

This assignment is also used to assess a Cybersecurity Program Learning Outcome (PLO) through the rubric. The PLO assessment will appear as a separate row within the rubric; it will not contribute points to the paper.  

Please see the attached word document for the instruction and the Case Study link is attached to the word document. Please write this paper based on the rubric.

Case study link: https://store.hbr.org/product/data-breach-at-equifax/118031?sku=118031-PDF-ENG

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Discussion 3- Executing the Project

When acquiring resources and preparing to implement a project, team members can or will take on one of two roles: “Supportive Roles” or “Destructive Roles”.  The project manager must be cognizant of both types of roles, so he/she can manage them.  

The simulation exercises in this course are done as teams(Assume there are 4 team members in the project). State the team number assigned to you, the names of your team members, and the method(s) your team have decided to collaborate for the simulation decisions. When was the last date and time you met with your team members? If you have team members that are taking more of a ‘descrictive role’ or ‘non-supportive role,’ how do you plan on managing that?

Text

Title: Project Management 

ISBN: 9780134730332 

Authors: Pinto 

Publisher: Pearson 

Edition: 5TH 19

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

PROJECT 1: CENSUS DATA

 

PROJECT 1: CENSUS DATA

OBJECTIVE
The purpose of this project is to demonstrate your understanding of the following course concepts:

1. How to create and navigate within workbooks.
2. How to enter data and format cells.
3. How to format worksheets and workbooks.
4. How to create, edit, and format tables.
5. How to modify tables.
6. How to use functions and formulas.
7. How to calculate and transform data.
8. How to create and modify charts.

PROJECT DESCRIPTION
You are working as part of a group creating a report that includes data from the most recent census. Your task is to create and format a worksheet using information from the census.gov website and chart the data.

1. Create a new workbook and save it as Project1_Census.xlsx.
2. Identify three U.S. cities of your choice and enter the city and state names in cells A4, A5, and A6.
3. Open a web browser and navigate to the data.census.gov website. Use the most recent census data to locate the population, median age, number of housing units, and median income for each city (e.g. type “median income in Maryland” in the search box at the top of the page).
4. Enter the information into the respective cells in the worksheet, as shown in the image below but using cities of your own choosing. Note: If you are unable to locate the necessary data, either choose a different city or perform a search for another website containing the necessary data.

PROJECT 1 FIGURE 1

CMST 100G Project 1 Figure 1

5. Format the data table using techniques you have learned to present the data in a visually appealing form such as:

a. Set the column widths appropriately.
b. Set labels alignment appropriately.
c. Apply borders, gridlines and shading to the table as desired.
d. Set the columns labels alignments appropriately.
e. Align the worksheet vertically and horizontally on the page.

6. Enter a formula to find Average Household Income for all THREE cities.
7. Enter a formula to find the Total Population for all THREE cities.
8. Create charts that present the data for each of the four categories of data. Decide which chart types will best present the data. (Hint: If you are not sure which types to use, consider selecting he data and using the Recommended Chart button to narrow down and preview suitable choices.)
9. Place each chart on a separate sheet and format the charts to best present the data in a clear, attractive format.
10. Give each worksheet a descriptive name and color the tabs using theme colors. Reorder the sheets so that the data table appears first, followed by the charts.
11. Save and submit the workbook to the Assignment Folder.

SUBMISSION REQUIREMENTS
Please submit the following to your Assignments Folder:

1. The completed Project1_Census.xlsx file.
2. Submit a Project Reflection (see below).

PROJECT REFLECTION
Answer the following questions when you submit your assignments files.

a. Describe a situation in daily life when someone would use Microsoft Excel.
b. You made several decisions while creating the workbook for this assignment: how to lay out the data in the worksheet and which chart types to use. What was the rationale behind each of these decisions?
c. What issues or challenges did you face completing this project? 

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Organ Leader and Decision making

 This week’s journal articles focus on empowering leadership and effective collaboration in geographically dispersed teams, please answer the following questions:

  1. How do geographically dispersed teams collaborate effectively?
  2. Please find at least three tools on the market that teams can use to collaborate on a geographically dispersed team.  Please note the pros and cons of each tool. 
  3. Based on the research above, note which tool you would select if you were managing the geographically dispersed team and why.

Be sure to use the UC Library for scholarly research. Google Scholar is also a great source for research.  Please be sure that journal articles are peer-reviewed and are published within the last five years.The paper should meet the following requirements:

  • 3 pages in length (not including title page or references)
  • APA guidelines must be followed.  The paper must include a cover page, an introduction, a body with fully developed content, and a conclusion.
  • A minimum of five peer-reviewed journal articles.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Blockchain in business

Industry experts believe blockchain is a technology that has the potential to affect the business of most IT professionals in the next five years. Pick an industry you feel will be most affected by blockchain and how blockchain may be used in that industry. As an IT manager, how would you embrace blockchain? For instance, how would training occur for your team, what strategies might you use, what security methods may you recommend be used?Your paper should meet the following requirements:

  • Be approximately four to six pages in length, not including the required cover page and reference page.
  • Follow APA7 guidelines.Use font Calibri, 11 pt.Your paper should include an introduction, a body with fully developed content, and a conclusion.
  • Support your answers with the readings from the course and at least two scholarly journal articles to support your positions, claims, and observations, in addition to your textbook. The UC Library is a great place to find resources.
  • Be clearly and well-written, concise, and logical, using excellent grammar and style techniques. You are being graded in part on the quality of your writing.

Extra Reference :

Stoyanovich, M., & Tanz, F. E. (2019). Coming to Grips with Blockchain. Benefits Magazine, 56(5), 20-25.

Waldo, J. (2019). A Hitchhiker’s Guide to the Blockchain Universe. Communications of the ACM, 62(3), 38–42. Retrieved from https://doi.org/10.1145/3303868

Burns, S. (2019). Blockchain: Hype Vs Reality. Computer Weekly, 21-24.

Tarzey, B. (2019). Inside Blockchain and Its Various Applications. Computer Weekly, 16-20

Carson, B., Romanelli, G., Walsh, P., & Zhumaev, A. (2018). Blockchain beyond the hype: What is the strategic business value? McKinsey Quarterly, (4), 118–127.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

2 Discussions and 1 Case Study

Discussion 2.1

What is the Gramm-Leach-Bliley Act?  Can you find any cases that have dealt with this Act?  

Discussion 2.2

What are the Payment Card Industry Standards?  Provide an example of why these standards were developed.

Case Study 2.1

Case Study:Conduct research on the Internet or select 1 of the 2 examples in your text in Chapter 4, page 117 on a credit card breach. Write a 3 to 4 page paper (Not including title and reference page) in which describe the details of the event. Tell us what could done to prevent the event from happening, list the laws that were broken and if the event violated any of the acts or laws that you read about in chapters 3 & 4. You paper should be in APA format and contain 3 to 4 different sources. Make sure you cite all sources.Writing Requirements

  • 3–4 pages in length  (excluding cover page, abstract, and reference list)
  • At least 3-4 peer reviewed sources that are properly cited and referenced
  • APA format, Use the APA template located in the Student Resource Center to complete the assignment.
  • Please use the Case Study Guide as a reference point for writing your case study.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Data visualization in 24 hr

Review  Discussion: Storytelling and Success Stories then focus on Moritz’s work on the  OECD Better life index download the executive summary and the index data.

In a one-page summary, note a few particular places around the world and compare and contrast the statistics.  Also, note briefly how this graphic tells the story.

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

Database Sql

Do the sql tables based on the report file uploaded 

Create tables using sql based on the requirements below:

 1. SQL to create all tables 

 2. SQL insert multi-table queries 

 3. SQL update multi-table queries 

4. SQL delete multi-table queries 

 5. SQL views that use: 

             i. Aggregation function

             ii. Sorting

             iii. Grouping

             iv. Subqueries 

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now

(1200 words) What Are The Key Differences Between A Vulnerability, A Risk And A Threat? ( Please No Bid Negotiations After Accepting)

 What are the key differences between a vulnerability, a risk and a threat?

Please provide examples in your paper and use references that are <=5 years old. 

1200 words min excluding reference !!!!    APA Format and No Plagiarism 

****( Please No bid Negotiations after accepting)*****

Needs help with similar assignment?

We are available 24x7 to deliver the best services and assignment ready within 3-4 hours? Order a custom-written, plagiarism-free paper

Get Answer Over WhatsApp Order Paper Now