answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is involved in the promotoras program?

Promotora programs involve many things. "Promotoras" is a Hispanic word meaning female promoter. The promoters help the community and help with birthing processes of women in labor.

Why is uTorrent is only downloading 1 torrent at a time?

There are several possible reasons. Perhaps you set up options to only allow a small number of simultaneous connections (check the options under "Bandwidth"), or files (check the optons under "Queueing"). Perhaps it started downloading one file, and it takes up either a lot of connections, or a lot of bandwidth, so there is no room for the next file on the list. Please note that you will usually have multiple connections for different parts of the same file.

Ultimately, if one file is somehow prioritized, it is probably to your advantage, since that file will get finished faster. What happened to me is that one file might download ten time faster than another one. However, once the first file is finished downloading, the second file downloads at full speed.

It is also possible that your microTorrent program simply doesn't find people who have the remaining file(s) available. Try to find versions of the file that have many people sharing it. Look especially at the number of seeders - those are the people who have the complete file.


Explain the following tearm in the context of object oriented programming Also explain how these concept are implement in c by given an example program for each?

Explain the following terms in the context of object oriented programming. Also explain how these concepts are implemented in C++ by giving an example program for each.

How many holidays for a computer programmer?

Well, of course. There is no reason why they should be treated differently than other employees. Also, in many countries there are laws that specify that employees should have, at the least, a certain amount of vacation time every year.

5 List three functions performed by the power supply?

Manages watts to each device

Manages volts to each device

Supplys power to multipul devices

What are the advantages and disadvantages of a business hierarchy?

One advantage to a business hierarchy is the fact that employees will always know who they will report to. A problem associated with a business hierarchy is the fact that it can take to long to have a decision about any particular problem.

A company wants to transmit data over the telephone but it is concerned that its phones may be tapped All of its data is transmitted as four-digit integers It has asked you to write a program that?

#include<iostream.h>

int main ()

{

int num , rem , a , b , c , d , x , y ;

cout<<"Enter a four digit number ";

cin>>num;

a=num/1000;

rem=num%1000;

b=rem/100;

rem=rem%100;

c=rem/10;

rem=rem%10;

d=rem/1;

cout<<d<<c<<b<<a<<endl;

a=(a+7)%10;

b= (b+7)%10;

c= (c+7)%10;

d= (d+7)%10;

cout<<a<<b<<c<<d<<endl;

x=a;

a=c;

c=x;

y=b;

b=d;

d=y;

cout<<"The encrypted integer is ";

cout<<a<<b<<c<<d<<endl;

system("pause");

return 0;

}

What does Fortran 4 mean?

Fortran IV was a version of the Fortran programming language developed in the 1960's. It was widely accepted as a standard version of Fortran until the development of Fortran 66 which was itself largely based on Fortran iV.

What is Difference between static and dynamic routing tables?

Technically, there is no such thing.

The routing table has several entries (think of them as lines); the individual LINES in the routing table can be static or dynamic; and the routing table in its entirety can have both types.

A static entry is programmed (hard-coded) by a network administrator.

A dynamic entry is one which the router learns from a routing protocol, such as RIP, EIGRP, OSPF, BGP, etc. The routers "talk" to one another, and tell one another that they have routes to certain networks; the router that receives such updates will update its routing table as a result. Such entries are temporary, and expire after a relatively short time.

Conversion of decimal to binary in fortran?

This is not a perfect program, but it will get you started in the right direction. Works for any INTEGER up to "some" power of 2 (decimals kill the program).

PROGRAM binary

IMPLICIT NONE

INTEGER remainder, quotient, n, int_input, answer

REAL input, dec_input

WRITE(*,*) 'Input a number to convert to binary'

READ(*,*) input

int_input = input

dec_input = input - int_input

dec_input = abs(dec_input)

quotient = abs(input)

DO WHILE (dec_input==0)

n = 0

answer = 0

DO WHILE (quotient>1)

remainder = mod(quotient,2)

quotient = quotient/2

answer = answer+remainder*10.**n

n = n+1

END DO

IF (input<0) answer = -answer

answer = answer + quotient*10.**n

WRITE(*,"(a,i31)") 'Your answer in binary is:',answer

END DO

END PROGRAM binary

What does Fortran statement If left paren If left paren 2 times A comma Y Rt paren Rt paren 6 comma 5 comma 6 mean?

It is a three-way case statement. ( Arithmetic IF statement)

IF(exp) n1,n2,n3

meaning

go to n1 if expr < 0 ( value is negative)

go to n2 if expr = 0 ( value is zero)

go to n3 if expr > 0 ( value is positive)

IF(expr1-expr2) n1,n2,n3

meaning

go to n1 if expr < expr2

go to n2 if expr = expr2

go to n3 if expr > expr2

reference:

Fortran 77 with 90

Applications for scientific and engineers

second edition

RAMA N. REDDY

CAROLA A. ZEIGLER

How can we draw a flow chart to generate a multiplication table?

The mathematical equations that have multiplication and an algorithm have two simple parts and much more complex components.

The multiplication part is based on the numbers that the algorth pulls out of the equation.

a+b+c+d=0

if you take out only a and c or b and d then you will use a divide and set the equation back to zero so

you have to add if and and statements to start creating an algorithm.

if a+c=0 or b+d=0

and a x c=0 or b x d=0

then by multiplying (a+c) x (b+d) you will get 0 + the new answer 2(a+b+c+d)=0

The equations are easy to start with and get very exclusive by adding different equations. A computer uses multiprocessing to get answers simultaneously and can easily create multiple solutions for the equations over and over.

What is the datatype of images?

There is no single data type for images as there are many different ways to represent an image in computer memory. At best we can describe all image types as being a binary data type. In order to determine the actual type we must read the first few bytes of data looking for a known signature. Once we know the image type we can read the complete image header correctly and thus obtain the specific information we need to decode the payload properly.

Note that we cannot rely on the file extension to determine the data type. Changing a BMP extension to a JPG extension does not change the file's encoding, it merely changes its name (the extension is considered part of the fully-qualified file name). A file's extension simply provides a convenient method for the operating system to associate file types with the applications that use them without having to examine the file itself.

What server allows thousands of simultaneous users and perform several task everyday?

A server is an application (software), not a machine. There are many different types of server applications, including e-mail servers, print servers, file servers, DNS servers, web servers, ftp servers and so on. Each server application is dedicated to a single task, so there is no such thing as a server that performs several tasks.

In organisations with many clients requiring access to a variety of services, the servers will typically be split across several machines. The DNS server is by far the most important server and will typically be handled by a single machine dedicated solely to the task of translating domain names into IP addresses. In this sense we may refer to the machine as being "the server", however the server is the application, not the machine.

The machine itself does not need to be particularly powerful because the biggest bottleneck in any client-server application is not the raw speed of the machine running the server but the available bandwidth between the server and its clients. As the number of clients increases, the speed of delivery drops off substantially, so the server spends most of its time simply prioritising data packets so each client is dealt with fairly. For instance, a file server typically delivers files of varying sizes, but will generally prioritise smaller files over larger files. In this way, no single client ends up hogging all the bandwidth downloading large video files at the expense of those downloading a 1 KB text file.

In order to prevent backlogs at the server end, there needs to be sufficient bandwidth available to meet client demands, with a suitable overhead to deal with peak demand. A small network server might use just one network interface card, but a larger network will require several independent interfaces. To support "thousands" of simultaneous users, the server itself may be split across several dedicated machines, creating a "data centre". Many large organisations have buildings dedicated purely to housing data centres, known as "data farms", and the largest organisations have farms all across the world. These are often known as content distribution networks, or CDNs.

You don't need a CDN or indeed a powerful machine in order to connect a mere thousand users simultaneously, but what you will need is bandwidth -- and lots of it.

Why Member functions are not virtual by default?

It depends which language you are using. Java member functions are virtual by default but C++ member functions are not. Java takes the viewpoint that if any member function is declared virtual then all member functions should be declared virtual, so they may as well be virtual by default. However, C++ takes the view that a member function should only be declared virtual if there's a specific reason to declare it virtual. Not all functions are meant to be overridden. Indeed, not all classes are meant to act as base classes. So all member functions are non-virtual by default.

Purists will argue that the C++ method is the correct method. After all, there's no point in having a virtual-table if it's never going to be used. Java places the onus on the programmer to eliminate an unused virtual-table, whereas C++ simply doesn't provide one unless you explicitly declare one.

However, the real reason C++ uses non-virtual methods by default is because it has to maintain compatibility with a C struct. A C struct is not a class so it has no methods (and therefore no virtual methods). It is a "plain-old-data" or POD structure.

In C++, however, a struct is a class. As such, by default, it has a compiler-generated default constructor, default copy and move constructors, default copy and move assignment operators and a default destructor. It also has public access by default. However, because the compiler-generated methods are all trivial member-wise implementations, a C++ struct is backwardly compatible with a POD. Thus C code can use a C++ struct just as if it were a C struct, because both use POD structures by default. If C++ used virtual member functions by default, a struct would not be a POD by default, it would be a base class by default.

What is EDK?

This is for Mobile application Frameworks. Extension Development Kit (EDK) from Sony Ericsson which consists of an emulator add-on to assist you in developing two types of app extensions. You can develop extensions for the Timescape™ social network app, and for the Music player. Both are pre-installed in all Sony Ericsson Android™ phones (see the Compatibility section to learn more about what phones support what extensions).