Understanding the distinction between the vector and raster data representations is fundamental to the use of GIS. What are both the pros and cons of vector and raster datasets?
In: Computer Science
#include <stdio.h>
#include <stdint.h>
char sz_1[] = "Upper/LOWER.";
char sz_2[] = "mIXeD CaSe..";
/* copies psz_2 to psz_1, downcases all letters */
void dostr (char* psz_1,char* psz_2) {
uint8_t u8_c;
while (*psz_2 != 0) {
u8_c = *psz_2;
if (u8_c > 0x2F) {
/* make sure it is not a special char */
*psz_1 = u8_c | 0x20; /* sets this bit */
} else {
/* leave special chars alone */
*psz_1 = u8_c;
}
psz_1++;
psz_2++;
}
}
int main(void) {
// Bug: MPLAB X v1.80 printf bug means strings vis %s don't print
correctly.
// So, break printf into two statements.
printf("Before...\n");
printf("sz_1: '"); printf(sz_1); printf("'\n");
printf("sz_2: '"); printf(sz_2); printf("'\n");
dostr(sz_1,sz_2);
printf("After...\n");
printf("sz_1: '"); printf(sz_1); printf("'\n");
printf("sz_2: '"); printf(sz_2); printf("'\n");
return 0;
}
convert it in assembly
In: Computer Science
Please solve using simple python programming language and make it easy to understand explain your code as I am a beginner, use appropriate variable names which make the code easy to understand and edit if needed.
A subsystem responsible for delivering priority numbers to an automated irrigation system has stopped working and you need to deliver a quick fix that will work until the actual subsystem is fixed by senior developer.
As you are the newest addition to the development team you have not fully grasped the complete picture of how all the systems work yet but you are confident you can solve this as you got a few hints from a senior developer.
Here is what the senior developer told you as he was running out the door.
He did not say it explicitly but you also understood that when you are done with the above steps, you need to display the sorted list of numbers on the screen.
When it comes to the design of the script there are a few requirements, there needs to be a main function that parses two command line arguments to file paths. From the first file (first argument) all odd numbers are read, and from the second file (second argument) all even numbers are read. The two lists of numbers are then combined and reverse sorted. The result from the sort is displayed on screen. Besides the main function the following functions must be present, and used.
read_file(filename)
Reads all the numbers in the specified file and adds them to a list
as integers. The list is returned from the function.
filter_odd_or_even(numbers, odd)
The first parameter is a list of numbers and the second parameter
is a Boolean value specifying if the filter function shall keep the
odd numbers (True) or the even numbers (False). The function shall
create a new list that is filled with either the odd or even
numbers from the parameter list depending on the odd parameter. The
new, filtered, list shall be returned from the function.
reversed_bubble_sort(numbers)
Takes a list of integer numbers as parameter and sorts it in place.
Sorting it in place means there is no need to return anything from
the function, the calling function will already have access to the
sorted list. The sorting shall be done using Bubble Sort (Links to
an external site.), but in reverse order. Reverse order means that
the biggest number shall be first and the smallest last. The
implementation of Bubble Sort shall not be optimized using the
optimization described in the link above.
In: Computer Science
. Do some research about the first handgun printed using a 3-D printer and report on some of the concerns raised.
In: Computer Science
In: Computer Science
For a given two-dimensional array in C as follows (Each int-type element occupies 4 bytes of memory)
int A[8][16];
If the address of A[1][4] is 0x0FFA0040, what is the memory address of A[2][6]?
In: Computer Science
Write a program to demonstrate the implementation of Inter Process Communication (IPC) using shared memory. Single line text.
In: Computer Science
The List method addAll(i,c) inserts all elements of the Collection c into the list at position i. (The add(i,x) method is a special case where c = {x}.) Explain why, for the data structures in this chapter, it is not efficient to implement addAll(i,c) by repeated calls to add(i,x). Design and implement a more efficient implementation.
In: Computer Science
Write a C# Program (using loops) to read temperature of the 7 days of the week (one day at a time) and calculate the average temperature of the week and print it.
In: Computer Science
Build a html form (making use of CSS and Javascript) with the following elements. The form must have validations and within a table format.
• Name: a text box where the content must start
with 1 upper case characters and no special character (i.e. !, @,
#, $, %, &, *). Number is not allowed. The text box must not be
empty.
• Module code: a text box where the content must
start with 3 lower case alphabets and follows by 4 digits where the
first digit cannot be zero. This textbox can be empty.
• Current date: a non-editable textbox and should
be in the format as shown (e.g. 12 October 2020 Monday 05:35
PM)
• Number of weeks till end of the year: a label
showing the total number of weeks from now till 31st Dec 2020.
(e.g. 17 days is 2 weeks and 3 days)
• Source language: a selection list with English,
Chinese, Malay, Indonesian, Japanese and Korean. Use English as the
default.
• Target language: a radio button with English,
Chinese, Malay, Indonesian, Japanese and Korean. Make Japanese as
the default.
• Source language content: a text area with 3 rows
and 20 columns. The default text is “Hello testing”. The text area
cannot be empty.
• Find text: a text box for the user to key in
text he/she wants to find.
• Replacement text: a text box for the user to key
in the replacement text. If the find text is empty, this element
should be disable (i.e. user cannot key in anything here).
• Find and replace button: when click, it will
find the occurrence of the “find text” in the source language text
area and replace it with the “replacement text”. If either find
text or replacement text is empty, this button is disable. After
the replacement, a message showing the number of replacements must
be displayed besides the button.
• Submit button: the button is called “Google
Translate”. When it is clicked, it should invoke the google
translate https://translate.google.com to perform the
translation.
• Reset button: this will reset the content of all
the elements.
All validation error messages must be italic and in
red colour and besides the html element. You are
free to rearrange all the html elements into logic group and
sequence.
In: Computer Science
1) Most police believe that cybercrime is not their responsibility, but 2) when departments dedicate training and investigation resources to online crime, that police can successfully investigate these issues. Are police right - should another agency be responsible for cybercrime? If so, who? If not, why are they incorrect? Write a 150 word response using the readings from this week.
In: Computer Science
Write a method that will accept a 2D character array. The 2D array represents a grid (table) of characters in which a triple may occur. A triple is 3 matching characters. This method will search through the array to determine whether or not it contains a set of 3 matching characters. Specifically, it will check to see if the 3 matching characters appear somewhere in the array as three adjacent characters either horizontally (left to right) or vertically (top to bottom). You should NOT consider diagonals. If a set is found, stop searching and return the character in the set, if no set is found throw the SetNotFoundException and provide an appropriate message.
You may either write your answer in the space provided or upload a PDF containing your solution.
Examples:
For the following array a search will result in a triple being
found and returning the character C:
For the following array a search will result in a triple being
found and returning the character B:
For the following array a search will result in a triple NOT
being found and throwing the SetNotFoundException:
/**
Searches the character grid for the appearance of a set of 3
identical characters, horizontally or vertically.
@param searchGrid The 2D character array in which the search will
occur.
@return The character that was in the set.
@throws SetNotFoundException if the searchGrid does not contain a
set of exactly 3 matching characters.
*/
public static char setSearchChar(char[][] searchGrid) throws
SetNotFoundException {
The language is Java
In: Computer Science
Write the test cases for searching flights in a flight reservation system. What testing method can be used?
In: Computer Science
Try to make it as simple as you can. Please provide the answers with some examples as fast as you can.
Linux
Using the following directory structure (See Structure question # 3)
-Determine the absolute path for the following files and directories:
- Your_Name_goes_here.dat
-Sales
-Assuming your current directory is RegionA, determine the relative pathname for the following files and directories:
-West1.dat
-RegionB
|
$HOME |
|||
|
Project4 |
|||
|
Payroll |
|||
|
.checks.dat |
|||
|
Pay2.dat |
|||
|
Sales |
|||
|
RegionA |
|||
|
East.dat |
|||
|
RegionB |
|||
|
West1.dat |
|||
|
Your_Name_goes_here.dat |
|||
|
West3.dat |
In: Computer Science
Try to make it as simple as you can. Please provide the answers with some examples as fast as you can.
Linux
Using the following directory structure (See Structure question # 3)
-Determine the absolute path for the following files and directories:
- Your_Name_goes_here.dat
-Sales
-Assuming your current directory is RegionA, determine the relative pathname for the following files and directories:
-West1.dat
-RegionB
|
$HOME |
|||
|
Project4 |
|||
|
Payroll |
|||
|
.checks.dat |
|||
|
Pay2.dat |
|||
|
Sales |
|||
|
RegionA |
|||
|
East.dat |
|||
|
RegionB |
|||
|
West1.dat |
|||
|
Your_Name_goes_here.dat |
|||
|
West3.dat |
In: Computer Science