Blog

Coursehelp
February 6, 2019
QUESTION : No Comments

Explain through an example Global Human Resource Management.

Explain through an example Global Human Resource Management. Discuss the variables that moderate the differences between domestic and international human resource management. Why should an organization globally standardize human resource management? Discuss the factors that drive localization.

Expert Answer

1. The major function of global Human Resource Management (GHRM) is that the organization in generalcarries a local appeal in the host country despite it has to maintain an international feel.  Thus company has to take an approach of global human resource while it view from international perspective. None of the multinational / international company would . .  .

OR
OR

Have a Comment on this Question?

Questions viewed by other students


  • QUESTION : (Solved) : Code Statsc Include Include Include Statsh Todo Fix Error Function Void Readinarray Int Ar Q35261596 . . .

    3.1 Static Arrays Navigate back to the statistics directory. Several files have been provided for you. The stats.c and stats.

    This is the code:

    stats.c:

    #include<stdlib.h>

    #include<stdio.h>

    #include “stats.h”

    //TODO: fix the error in this function

    void readInArray(int *arr, int size) {

    int i;

    printf(“Enter your list of numbers: “);

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

    //

    scanf(“%d”, &arr[i]);

    }

    return;

    }

    int * generateRandomArray(int size) {

    int * randomArr = malloc(sizeof(int) * size);

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

    randomArr[i] = rand();

    }

    return randomArr;

    }

    void printArray(const int *arr, int size) {

    printf(“[“);

    for(int i=0; i<size-1; i++) {

    printf(“%d, “, arr[i]);

    }

    printf(“%d ]n “, arr[size-1]);

    }

    //change the getMean function to get parameters as array andsize,CHEGGEA

    double getMean( const int *arr,int size )

    //double getMean( , ) {

    {

    double sum=0;

    int i;

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

    {

    sum+=arr[i];

    }

    return sum/size;

    }

    //change the getMean function to get parameters as array andsize,CHEGGEA

    int getMin( const int *arr,int size )

    //int getMin( , ) {

    {

    int i;

    int min=arr[0];

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

    {

    if(min > arr[i])

    min=arr[i];

    }

    return min;

    }

    //change the getMean function to get parameters as array andsize,CHEGGEA

    int getMax(const int *arr ,int size )

    //int getMax( , )

    {

    int i;

    int max=arr[0];

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

    {

    if(max < arr[i])

    max=arr[i];

    }

    return max;

    }

    ===================

    stats.h

    /**

    * This function prompts and reads in a collection of numbers

    * from the standard input and populates the given array. The

    * provided array must be properly initialized for thisfunction

    * to work.

    */

    void readInArray(int *arr, int size);

    /**

    * Generates a random array of integers of the given

    * size. This function assumes that the random number

    * generator has already been seeded.

    */

    int * generateRandomArray(int size);

    /**

    * Prints the given array to the standard output

    */

    void printArray(const int *arr, int size);

    /*

    * TODO:

    * 1. Write prototypes for each of these functions

    * 2. Write documentation for each of these functions

    * 3. Implement the functions in stats.c

    */

    //added parameters to the following functions

    double getMean( const int *arr,int size );

    int getMin( const int *arr,int size );

    int getMax(const int *arr ,int size );

    ================

    This what was given for statsMain.c:

    /**
    * Statistics main driver program
    */
    #include <stdlib.h>
    #include <stdio.h>

    #include “stats.h”

    #define SIZE 500

    int main(int argc, char** argv) {

    //seed the random number generator with the current time
    srand(time(NULL));

    int min, max, size;
    double mean;

    printf(“Enter the amount of numbers you’d like to find the statsfor: “);
    scanf(“%d”, &size);

    if(size > MAX_SIZE) {
    printf(“ERROR: program does not support that manyintegers!”);
       exit(1);
       }

       //TODO: declare a static array “large enough” tohold as many integers as we’ll need

       //TODO (Activity 3): change your delcaration andinitialization to use
       // a dynamic array and malloc instead

       //TODO: pass the appropriate variable
       readInArray(, size);

       //TODO: pass the appropriate variables to yourfunctions here
    min = getMin( , );
    max = getMax( , );
    mean = getMean( , );
    printArray( , );

    printf(“Min: %dn”, min);
    printf(“Max: %dn”, max);
    printf(“Mean: %.2fn”, mean);

    return 0;
    }

    What should I do for statsMain.c

    3.1 Static Arrays Navigate back to the statistics directory. Several files have been provided for you. The stats.c and stats.h file define several utility functions to manipulate arrays and to compute statistics on those arrays. The statsMain.c file contains a main driver program. Recall that you will compile these files using: gcc -c stats. gcc -o runstats stats. o statsMaln·c In this activity, you will implement and use several functions that use arrays as parame- ters. When passed as a parameter to a function, the function also needs to be told how large the array is; typically an integer size variable is passed with any array parameter You will also declare and populate a static array to test your functions. Instructions 1. A function, readInArray has been provided for you that takes an array and its size and prompts the user to enter values to populate the array. However, there is an error in the function: examine the scanf call and determine what is wrong and fix it before proceeding 2. Using the other functions as a reference, implement the getMin, getMax, and getMean functions. You will need to provide the correct function signature in both the header file and source file 3. In the statsMain.c declare a static array that is “large enough” as indicated by the other clues in the code. Use your declared static array as an argument to readInArray and the other function calls. 4. Run your program and demonstrate it to a lab instructor Show transcribed image text

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Usage Inputfile Textpattern Executes Command Cat Inputfile Grep Textpattern Cut B 1 Q36160712 . . .

    2. Pipelined Commands In this portion of the recitation, you will be given nearly complete C code in rec08B.c that implements

    code:

    /*
    * usage: ./a.out input_file text_pattern
    * Executes the command “cat input_file | grep text_pattern | cut -b1-10”.
    * Note only minimal error checking is done for simplicity/shortnessof code.
    */

    #include <stdio.h>
    #include <unistd.h>
    #include <fcntl.h>
    #include <sys/types.h>
    #include <sys/stat.h>

    int main(int argc, char **argv)
    {
       int status;
       int i;

       if (argc == 3)
       {
           // arguments for commands
           char *cat_args[] = {“cat”, argv[1],NULL};
           char *grep_args[] = {“grep”,argv[2], NULL};
           char *cut_args[] = {“cut”, “-b”,”1-10″, NULL};

           // file descriptors for 2 pipes:fd1 for cat-to-grep, fd2 for grep-to-cut
           int fd1[2], fd2[2];

    // make pipe for cat to grep
           // fd1[0] = read end ofcat->grep pipe (read by grep)
           // fd1[1] = write end ofcat->grep pipe (written by cat)
          

    // make pipe for grep to cut
           // fd2[0] = read end ofgrep->cut pipe (read by cut)
           // fd2[1] = write end ofgrep->cut pipe (written by grep)
          
          
           // fork the first child (to executecat)
           if (fork() == 0)
           {
               // duplicatewrite end of cat->grep pipe to stdout
              

               // close bothends of all created fd# pipes (very important!)
              
              
              
              

    execvp(*cat_args, cat_args);
           }
           else // parent (assume noerror)
    {
    // fork second child (to execute grep)
    if (fork() == 0)
               {
                  // duplicate read end of cat->grep pipe tostdin (of grep)
                 

                  // duplicate write end of grep->cut pipe tostdout (of grep)
                 

                  // close both ends of all created fd# pipes(very important!)
                 
                 
                 
                 

                  execvp(*grep_args, grep_args);
               }
    else // parent (assume no error)
               {
                  // fork third child (to execute cut)
                  if (fork() == 0)
    {
    // duplicate read end of grep->cut pipe to stadin (of cut)
                     

    // close both ends of all created fd# pipes (veryimportant!)
                     
                     
                     
                     

    execvp(*cut_args, cut_args);
    }
               }
    }
      
           // only the parent gets here, closeall pipes and wait for 3 children to finish
           close(fd1[0]);
           close(fd1[1]);
           close(fd2[0]);
           close(fd2[1]);

           for (i = 0; i < 3; i++)
           {
              wait(&status);
           }
       }
       else
       {
           printf(“usage: %s input_filetext_patternn”, argv[0]);
       }

       return 0;
    }

    .2. Pipelined Commands In this portion of the recitation, you will be given nearly complete C code in rec08B.c that implements a pipeline (ie, multiple pipes). Specifically, your code will implement functionality executed by the following command: cat input file| grep text pattern |cut -b 1-10 This cut command simply selects the first 10 bytes (i.e., characters) from the resulting text. Your program is invoked with the following: /a.out input file text pattern All that is missing are 18 system calls (don’t worry, most of them are the close () system call) for you to add beneath the applicable comments in the code. Follow the comment instructions to add the needed code, paying special attention to which file descriptor is being closed or duplicated. SAMPLE OUTPUT (user input shown in bold green) ş more inputl.txt This life, which had been the tomb of his virtue and of his honour, is but a walking shadow; a poor player, that struts and frets his hour upon the stage, and then is heard no more: it is a tale told by an idiot, full of sound and fury, signifying nothing. William Shakespeare ş cat inputl.txt I grep his cut -b 1-10 This life, tomb of hi struts and ş ./a.out inputl.txt his This life, tomb of hi struts and Show transcribed image text 2. Pipelined Commands In this portion of the recitation, you will be given nearly complete C code in rec08B.c that implements a pipeline (ie, multiple pipes). Specifically, your code will implement functionality executed by the following command: cat input file| grep text pattern |cut -b 1-10 This cut command simply selects the first 10 bytes (i.e., characters) from the resulting text. Your program is invoked with the following: /a.out input file text pattern All that is missing are 18 system calls (don’t worry, most of them are the close () system call) for you to add beneath the applicable comments in the code. Follow the comment instructions to add the needed code, paying special attention to which file descriptor is being closed or duplicated. SAMPLE OUTPUT (user input shown in bold green) ş more inputl.txt This life, which had been the tomb of his virtue and of his honour, is but a walking shadow; a poor player, that struts and frets his hour upon the stage, and then is heard no more: it is a tale told by an idiot, full of sound and fury, signifying nothing. William Shakespeare ş cat inputl.txt I grep his cut -b 1-10 This life, tomb of hi struts and ş ./a.out inputl.txt his This life, tomb of hi struts and

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Towers Hanoi C Replace Use Peg Class Stack Class Node Class Write Node Class Consist Q34426859 . . .

    This code is towers of hanoi in c++

    Replace the use of in your Peg class with a Stack class and aNode class that you write.

    Your Node class should consist of an element of type int and apointer to the Node class. It should have appropriate constructors,a destructor, and accessors / mutators for each attribute.

    Your Stack class should implement a stack data type thatconsists of Node objects which are dynamically allocated uponcreation. It should have a constructor, a destructor, and methodsfor push, pop, reading the top element, returning the number ofelements in the stack, and outputting the stack to the display.Memory should be deallocated upon pop and destruction of the stackobject.

    IM STILL KIND OF CONFUSED WITH NODES, PLEASE HELP!! THANKYOU!

    HERES MY MAIN CODE:

    #include “stdafx.h”
    #include
    #include
    #include “Peg.h”

    using namespace std;

    // Global types
    // Global consts
    const int NUM_DISKS(7); // Number of disks to simulate
                          // Globalfunction declarations

    int hanoi(int numDisks, Peg &start, Peg &goal, Peg&temp);
    void moveDisk(Peg &from, Peg &to);

    int main()
    {
       // Initialize variables
       Peg peg1(“Peg1”, NUM_DISKS), peg2(“Peg2”, 0),peg3(“Peg3”, 0);
       int numMoves(0);

       // Introduce the program
       cout << “Welcome to Cliff’s Towers of Hanoisimulator…this simulation will be running with ” <<NUM_DISKS << ” disks.” << endl << endl;

       // Display the starting condition
       cout << “Starting condition of the three pegs:”<< endl;
       peg1.displayPeg();
       peg2.displayPeg();
       peg3.displayPeg();
       cout << endl;

       // Solve Towers of Hanoi – move the disks from peg1 to peg 3, using peg2 temporarily, getting the number of requiredmoves returned
       cout << “Moves required to move ” <<NUM_DISKS << ” disks from ” << peg1.getName() <<” to ” << peg3.getName() << “:” << endl;
       numMoves = hanoi(NUM_DISKS, peg1, peg3, peg2);

       // Display the ending condition
       cout << endl << “Ending condition of thethree pegs:” << endl;
       peg1.displayPeg();
       peg2.displayPeg();
       peg3.displayPeg();
       cout << endl;
       cout << endl << “A stack of ” <<NUM_DISKS << ” disks can be transferred in ” <<numMoves << ” moves.” << endl << endl;
       cout << “Thanks for using Cliff’s Towers ofHanoi simulator!” << endl;

       system(“pause”);
       return 0;
    }
    // Functions
    // Hanoi – recursive solution to the tower of hanoi problem
    int hanoi(int numDisks, Peg &start, Peg &goal, Peg&temp)
    {
       int numMoves(0);
       // Only if there are disks to be moved
       if (numDisks > 0)
       {
           // First, move n-1 disks to thetemporary peg, capturing the number of moves required
           numMoves = hanoi(numDisks – 1,start, temp, goal);

           // Next, move the remaining diskto the goal peg; increment the move count
           cout << “Move disk ” <<start.topDisk() << ” from ” << start.getName() <<” to ” << goal.getName() << endl;
           moveDisk(start, goal);
           numMoves++;

           // Finally, move n-1 disks tothe goal peg, capturing the number of moves required
           numMoves += hanoi(numDisks – 1,temp, goal, start);
       }

       // Let the caller know how many moves weremade
       return(numMoves);
    }
    // Function to move a disk from one peg to another
    void moveDisk(Peg &from, Peg &to)
    {
       assert(from.getNumDisks() > 0); // Verifyassumption that the “from” peg has at least one disk on it

       if (to.getNumDisks() > 0) // Verify assumptionthat the diskon “from” is smaller than disk on “to” (only if thereis a disk on “to”)
       {
           assert(from.topDisk() <to.topDisk());
       }

       // Place the top disk from “from” onto “to”
       to.addDisk(from.removeDisk());
    }

    // PEG.CPP

    #include “stdafx.h”
    #include
    #include
    #include “Peg.h”

    // Static Variables
    int Peg::numCreatedPegs = 0;

    // Constructors – default, with peg name, with # of disks, withpeg name number of disks
    // Constructor – note that there is no default constructor toprevent mis-use of the Peg during initialization

    Peg::Peg(string inputName, int numDisks)
    {
       name = inputName;
       loadDisks(numDisks);
       numCreatedPegs++;
       cout << “Peg <” << name << “>created, ” << numCreatedPegs << ” pegs active.”<< endl;
    }

    // Accessors / Mutators
    // Function to load disks onto the peg
    void Peg::loadDisks(int numDisks)
    {
       assert(numDisks >= 0); // no negative number ofdisks!
       stack.clear(); // Remove any existing disks
       for (int i = numDisks; i > 0; i–) // Add disks ininverse order (biggest to smallest)
       {
           addDisk(i);
       }
    }

    // Function to return the number of disks on the peg
    unsigned int Peg::getNumDisks() const
    {
       return(stack.size());
    }

    // Function to display what disks are on the peg
    void Peg::displayPeg() const
    {
       cout << name << ” has ” <<stack.size() << ” disks: “;
       for (int i = getNumDisks(); i > 0; i–) // Readstack from the top
       {
           cout << stack[i – 1];
       }
       cout << endl;
    }

    // Accessor for the peg name (intentionally no mutator)
    string Peg::getName() const
    {
       return(name);
    }

    // Function to return the value of the top disk
    int Peg::topDisk() const
    {
       assert(getNumDisks() > 0); // Verify assumptionthat the Peg has a disk on it
       return(stack.back());
    }

    // Functions to add and remove disks from the peg
    void Peg::addDisk(int diskNum)
    {
       stack.push_back(diskNum);
    }

    int Peg::removeDisk()
    {
       assert(getNumDisks() > 0); // Verify assumptionthat the Peg has a disk on it
       int returnVal = stack.back();
       stack.pop_back();
       return returnVal;
    }

    // Destructor
    Peg::~Peg()
    {
       numCreatedPegs–;
       cout << “Peg <” << name << “>destroyed, ” << numCreatedPegs << ” pegs active.”<< endl;
    }

    // PEG.H

    #pragma once
    #include
    #include

    using namespace std;

    class Peg
    {
    private:
       static int numCreatedPegs; // Number of active pegobjects
       string name; // Name of the peg
       vector stack; // Structure to hold the disks
       void loadDisks(int numDisks);          // Private method to loadnumDisks disks onto a Peg

    public:
       // Constructor (note the lack of a default constructorto prevent usage errors)
       Peg(string pegName, int numDisks);

       // Method to return the number of disks on thePeg
       unsigned int getNumDisks() const;

       // Method to display what disks are on thepeg
       void displayPeg() const;

       // Accessor for the peg name
       string getName() const;

       // Method to return the value of the top disk
       int topDisk() const;

       // Methods to add and remove disks from thepeg
       void addDisk(int diskNum);
       int removeDisk();

       // Destructor
       ~Peg();
    };

    // STACK.CPP

    #include “stdafx.h”
    #include “Stack.h”
    #include
    #include

    using namespace std;

    Stack::Stack()
    {
    }

    void Stack::push(int newPayload)
    {
       top = new Node(newPayload, top);
       numNodes++;
    }

    int Stack::pop()
    {
       assert(top != nullptr);
       Node *tempPtr = top;
       int tempPayload = top->getPayload();
       top = top->getNext();
       delete tempPtr;
       numNodes–;
       return tempPayload;
    }

    void Stack::displayStack() const
    {
       Node *current = top;
       while (current != nullptr)
       {
           cout <<current->getPayload;
           current =current->getNext;
       }
    }

    void Stack::reversePrintHelper(Node *current)
    {
       if (current != nullptr)
       {
          reversePrintHelper(current->getNext);
           cout <<current->getPayload();
       }
    }

    void Stack::reversePrint(Node)
    {
       reversePrintHelper(top);
    }

    Stack::~Stack()
    {

    }

    // STACK.H

    #pragma once
    #include “Node.h”

    using namespace std;

    class Stack
    {
    private:
       Node *top; // Pointer to the top element
       int numNodes;

    public:
       //Constructor
       Stack();
      
       // push method
       void push(int newPayload);

       int pop();

       void displayStack() const;

       void reversePrint(Node);
      
       void reversePrintHelper (Node *current);

       // Deconstructor
       ~Stack();

    };

    // NODE.CPP

    #include “stdafx.h”
    #include “Node.h”

    Node::Node(int newPayload, Node* newNext)
    {
       Node *node = new Node(payload, nullptr);
    }

    //Accessors
    int Node::getPayload() const
    {
       payload = node->getPayload();
    }

    Node::getNext() const
    {
       next = node->getNext();
    }

    // Mutators
    void Node::setPayload(int newPayload)
    {
       node->setPayload(newPayload);
    }

    void Node::setNext(Node* next)
    {
       node->setNext(newNext);
    }

    Node::~Node()
    {
    }

    // NODE.H

    #pragma once

    using namespace std;

    class Node
    {
    private:
       int payload;
       Node *next;

    public:
       // Construtor
       Node(int newPayload, Node* newNext);

       //Accessors
       int getPayload() const;
       Node *getNext () const;

       // Mutators
       void setPayload(int newPayload);
       void setNext(Node* next);

       // Deconstructor
       ~Node();
    };

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Sympy Using Python Please Provide Code Detailed Possible Thanks Create Animation Invo Q36690618 . . .

    CODE IN SYMPY USING PYTHON. Please provide the code asdetailed as possible. Thanks

    Create an animation involving the circle x(t) = acos(t); y(t) = asin(t). The radius increases from 0 to 2. The code starts like:

    np.linspace(8, 2, 100) # Parameter a varies between 0 and 2. np.linspace(0, 2*np.pǐ, 100) # For every value of a, the full ci

    Let me provide you with an example of what Iwant. The code for the animation of the below function isthe following (I am asking for the same but for the circle):

    f(x) = sin (-x

    import matplotlib.animation as animation p np.linspace(1, 2np.pi, 100) fig, ax - plt.subplots(1,1) ax.set_xlim([e, 6*np.pi])

    np.linspace(8, 2, 100) # Parameter a varies between 0 and 2. np.linspace(0, 2*np.pǐ, 100) # For every value of a, the full circle must be shown, so t from θ to 2 * pi. a t fig, ax – plt.subplots (1,1) ax . set xỉin([-3, 3]) ax.set_ylim([-3, 3]) # Finish the code f(x) = sin (-x import matplotlib.animation as animation p np.linspace(1, 2″np.pi, 100) fig, ax – plt.subplots(1,1) ax.set_xlim([e, 6*np.pi]) ax.set_ylim(-1, 1]) sinuskromme, -ax.plot ([], []) box ax . text(12, 1.15, ..) def animate(i): Y np.sin(2″X”np.pǐ/plǐ]) sinuskromme.set_data(X, Y) box . set-text(‘periode : . + str(np . round (plij, 2))) # Round it to two decimal places anim = plt.show) animation . FuncAnimation(fig, animate, frames-100, interval-50) Show transcribed image text np.linspace(8, 2, 100) # Parameter a varies between 0 and 2. np.linspace(0, 2*np.pǐ, 100) # For every value of a, the full circle must be shown, so t from θ to 2 * pi. a t fig, ax – plt.subplots (1,1) ax . set xỉin([-3, 3]) ax.set_ylim([-3, 3]) # Finish the code
    f(x) = sin (-x
    import matplotlib.animation as animation p np.linspace(1, 2″np.pi, 100) fig, ax – plt.subplots(1,1) ax.set_xlim([e, 6*np.pi]) ax.set_ylim(-1, 1]) sinuskromme, -ax.plot ([], []) box ax . text(12, 1.15, ..) def animate(i): Y np.sin(2″X”np.pǐ/plǐ]) sinuskromme.set_data(X, Y) box . set-text(‘periode : . + str(np . round (plij, 2))) # Round it to two decimal places anim = plt.show) animation . FuncAnimation(fig, animate, frames-100, interval-50)

    Expert Answer


    . . .


    view full answer
  • QUESTION : (Solved) : Code Supposed Look Like 0 1 2 Example Format Actual Answer Keeps Popping Screen Straight W Q27719670 . . .

    My code is supposed to look like this:

    [0] ***

    [1]

    [2]***

    (just an example format^ not the actual answer)

    but it keeps popping up on my screen as a straight***********

    what am I doing wrong?

    #include <stdio.h>

    /**
    * Prints a histogram to the screen using horizontal barchart.
    * Parameters:
    * list – a list of integers
    * n – the number of values in the list
    */
    void printHistogram ( int *hist, int n );

    int main() {
    const int SIZE = 10;
    int hist[] = {0, 5, 3, 2, 0, 3, 2, 1, 2, 2};

    printHistogram(hist, SIZE);

    }

    void printHistogram(int *hist, int n) {

    int i;
    for(i = 0;i<n;i++){
    printf(“*”);
    }
    printf(“n”);
      
    }

    Expert Answer


    . . .


    view full answer