This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
//Assume that a system has a 32-bit virtual address with a 4-KB page size. | |
//Write a C program that is passed a virtual address (in decimal) on the command line | |
//and have it output the page number and offset for the given address. | |
int main(int argc, char *argv[]) | |
{ | |
unsigned long page_number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
//Assume that a system has a 32-bit virtual address with a 4-KB page size. | |
//Write a C program that is passed a virtual address (in decimal) on the command line | |
//and have it output the page number and offset for the given address. | |
int main(int argc, char *argv[]) | |
{ | |
unsigned long page_number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<stdlib.h> | |
#include<time.h> | |
//Write a program that implements the FIFO and LRU page-replacement algorithms presented in this chapter. | |
//First, generate a random pagereference string where page numbers range from 0 to 9. | |
//Apply the random page-reference string to each algorithm, and record the number of page faults incurred by each algorithm. | |
//Implement the replacement algorithms so that the number of page frames can vary from 1 to 7. | |
//Assume that demand paging is used. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<windows.h> | |
#include<stdio.h> | |
#include<conio.h> | |
#include<tchar.h> | |
#include<stdlib.h> | |
#include<iostream> | |
using namespace std; | |
//template<typename T,size_t N> | |
//template<size_t N> | |
//void catalan(int (&ans)[], int size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<windows.h> | |
#include<stdio.h> | |
#include<conio.h> | |
#include<tchar.h> | |
#include<stdlib.h> | |
#include<iostream> | |
using namespace std; | |
//template<typename T,size_t N> | |
//template<size_t N> | |
//void catalan(int (&ans)[], int size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <windows.h> | |
#include <stdio.h> | |
#include <conio.h> | |
#include <tchar.h> | |
#pragma comment(lib, "user32.lib") | |
int main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
workspace_folder/ -- WORKSPACE | |
src/ -- SOURCE SPACE | |
CMakeLists.txt -- 'Toplevel' CMake file, provided by catkin | |
package_1/ | |
CMakeLists.txt -- CMakeLists.txt file for package_1 | |
package.xml -- Package manifest for package_1 | |
... | |
package_n/ | |
CMakeLists.txt -- CMakeLists.txt file for package_n | |
package.xml -- Package manifest for package_n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<group ns="turtlesim1"> | |
<node pkg="turtlesim" name="sim" type="turtlesim_node"/> | |
</group> | |
<group ns="turtlesim2"> | |
<node pkg="turtlesim" name="sim" type="turtlesim_node"/> | |
</group> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ros/ros.h" | |
#include "std_msgs/String.h" | |
#include <sstream> | |
/** | |
* This tutorial demonstrates simple sending of messages over the ROS system. | |
*/ | |
int main(int argc, char **argv) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ros/ros.h" | |
#include "std_msgs/String.h" | |
/** | |
* This tutorial demonstrates simple receipt of messages over the ROS system. | |
*/ | |
void chatterCallback(const std_msgs::String::ConstPtr& msg) | |
{ | |
ROS_INFO("I heard: [%s]", msg->data.c_str()); | |
} |
OlderNewer