answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What if you have computer games that are not compatible with your computer?

Do you mean the games say "compatible with windows 98?" and you have Windows XP? Games are backwards compatible. Meaning, if the games say "windows 98", windows 95 is ok (anything before windows 98 will work). But it is not forward compatible--Windows 2000, windows xp, etc. will not work. does this answer?

In modern warfare 2 how does the data get corrupt on multiplayer?

If you turn off your console while it is accessing the hard drive. If you are rank hacking, your out of luck.

Program of bucket filling in computer graphics lab?

#include

#include

#include

#include

#include

#include

void fill(int x,int y,int c,int bon);

void main()

{

clrscr();

int gdriver=DETECT,gmode;

initgraph(&gdriver,&gmode,"");

setcolor(WHITE);

line(0,316,640,316);

bar(297,170,300,316);

bar(195,170,297,173);

setcolor(8);

circle(190,170,5);

floodfill(190,170,8);

setcolor(WHITE);

bar(184,170,179,173);

bar(177,170,180,176);

bar(189,164,191,160);

bar(186,160,194,158);

line(150,315,210,315);

line(150,315,150,260);

line(210,315,210,260);

line(147,257,210,260);

line(213,257,210,260);

getch();

setcolor(BLUE);

for(int j=178;j<=314;j++)

{

line(179,178,179,j);

line(178,178,178,j);

delay(20);

}

int b=1;

for(int i=314;i>260;i--)

{

setcolor(0);

line(179,314-b,179,314-b);

line(178,314-b,178,314-b);

fill(178,i,1,15);

b++;

}

setcolor(0);

line(179,178,179,260);

line(178,178,178,260);

getch();

closegraph();

}

void fill(int x,int y,int c,int bon)

{

int curr=getpixel(x,y);

if(curr!=c)

{

if(curr!=bon)

{

putpixel(x,y,c);

fill(x+1,y,c,bon);

fill(x-1,y,c,bon);

delay(2);

}

}

}

How high level computer language works without assembler compiler and interpreter?

I do not know, ask your teacher.

Why, for example Python, PHP, Pearl and JavaScript work without compiler; C, Pascal, Cobol and Fortan work without interpreter.

None work "without assembler compiler and interpreter" so the question cannot be answered as asked because there is no answer.

If we want to write a program without an assembler, compiler or interpreter; it is an easy answer. You hand assemble, that is where you manually enter the machine code. In the early days this was the only way to program a computer. Having done some hand assembly I have to things to say about it.

1) it is not as hard as it might appear to be but it is painfully slow to do.

2) why bother when there are excellent compilers available.

Is there a Macintosh Driver for the Diamond Multimedia VC500?

The Diamond range is a Windows only item.. Similar products supported on the Mac are available from the likes of Pinnacle and Elgato (See links below).

Write a shell script to Print a table of any number?

Improve

$vi multable.sh

echo "enter the value of n:"

read n

i=1

for((i=1;i<=10;i++))

do

echo " $n * $i = `expr $n \* $i`"

done

What is the difference between open-source and closed-source software?

The answer is in the question itself. Open-source software has it's source code available to everyone. Closed-source software does not.

What is RSS in computer language?

RSS is built of XML and is a method to receive feeds with a RSS Reader

What are the significant IT milestones presented in the movie Pirates of Silicon Valley?

The film opens with the creation of the 1984 commercial for Apple Computer, which introduced the first Macintosh. Steve Jobs (Noah Wyle) is speaking with director Ridley Scott (J. G. Hertzler), trying to convey his idea that "We're creating a completely new consciousness." Scott, however, is more concerned at the moment with the technical aspects of the commercial.

The film then flashes forward to 1997 as Jobs, who has returned to Apple, is announcing a new deal with Microsoft at the 1997 Macworld Expo. His partner, Steve Wozniak or "Woz" (Joey Slotnick), is introduced as one of the two central narrators of the story. Wozniak notes to the audience the resemblance between "Big Brother" and the image of Bill Gates (Anthony Hall) on the screen behind Jobs during this announcement. Asking how they "got from there to here," the film turns to flashbacks of his youth with Jobs, prior to the forming of Apple.

The earliest flashback is in 1971 and takes place on the U.C. Berkeleycampus during the period of the student anti-war movements. Jobs and Woz are shown caught on the campus during a riot between students and police. They flee and after finding safety, Jobs states to Woz, "Those guys think they're revolutionaries. They're not revolutionaries, we are." Woz then comments that "Steve was never like you or me. He always saw things differently. Even when I was in Berkeley, I would see something and just see kilobytes or circuit boards while he'd see karma or the meaning of the universe."

What is the file extension for a DVD RW file?

any extension can be used because the DVD disk is not the file. there are likely going to be hundreds if not thousands of files on a DVD. Some could be video files, (.mov, .wmv, .mpg, or others) some could be picture files (.bmp, .jpg, .gif, and many others) some could be executable files .exe, or zip files .zip

Is there a free program that is as easy as Flash that can help you make an Avatar in Whirled?

Short answer. No. If you're wanting avatars that have all the extra bells and whistles of actions and states and walking transitions, the only viable source--because of it's use of AS3 coding--is Flash. However, if you're wishing just for free animation software that can be used to make an avatar that has one state, and drags/continues the state when walking. Or would like to try your hand at making animated furniture, www.doink.com offers free animating software that's run through the internet and allows you to download as a .swf file, that can then be uploaded to Whirled.

What is the difference between binary tree and tree data structure?

binary tree is a specific tree data structure where each node can have at most 2 children nodes. In a general Tree data structure nodes can have infinite children nodes.

What is pencil case in spanish?

i hope this helps,

pencil case in spanish is un estuche .

:)

What does 8.3 mean in the context of naming conventions?

8.3 would mean that the software is the 3rd revision of the 8th version of that particular piece of software. When you see names like "8.3.5", that typically means that they have revised a revision.

High level scheduling?

In computers , the High Level scheduler decides which jobs or processes are to be admitted to the ready queue (in the Main Memory); that is, when an attempt is made to execute a program, its admission to the set of currently executing processes is either authorized or delayed by the high level scheduler.

Write a function that inserts an integer into a linked list in ascending order?

public void InsertInorder(Node head, int data)

{

Node newNode = new Node(data);

If(head == null head.data > data)

{

newNode.next = head;

head = newNode;

}else{

Node cur = head;

while(cur.next != null && cur.next.data < data)

cur = cur.next;

newNode.next = cur.next;

cur.next = newNode;

}

}

What is the data type for a company's profit?

Although it may seem obvious that currency should be represented by some floating point data type, floating point values are merely approximations, and these approximations can introduce rounding errors that can be difficult to predict. For instance, when dealing with Sterling, we physically deal with whole pounds (£) and hundredths of a pound (pennies). However, tax and interest rates are typically expressed as percentages, so we inevitably need to introduce fractions of a penny into our calculations, rounding up or down to the nearest penny. But a penny is already a fraction (one hundredth of a pound), so we immediately lose two digits of precision before we've begun.

In order to retain the precision we require, we need to introduce a scalar, such that we deal in whole pence rather than whole pounds. A scalar of 100 would allow us to treat £1.23 as if it were really 123 pence. Now we can store monetary values as integers instead of floating point values and that alone can have a significant benefit in terms of performance (integer arithmetic is significantly quicker than floating point arithmetic).

We still have the problem of how to deal with unpredictable rounding errors that might occur within the fractions of a penny we create when working with percentages. However, this is easily resolved by raising our scalar by a higher power of 10. Thus a scalar of 1000 would mean our 123 pence then becomes 1230 tenths of a pence, while a scalar of 10,000 would create 12,300 hundredths of a pence. That's about as much precision as we require for currency values. We could go further, but we have to keep in mind that the greater the scalar, the lower the range of values we can represent.

Assuming twos-complement signed notation, a 32-bit signed integer can accommodate whole values in the range -2,147,483,648 through 2,147,483,647. With a scalar of 10,000, this would accommodate all monetary values in the range £-214,748.3648 through £214,748.3647. While adequate for many smaller businesses, this would be highly unsuitable for large corporations with a profit/loss in excess of this range. However, each additional bit doubles the range such that a 64-bit integer could easily accommodate all monetary values in the range £-922,337,203,685,477.5808 through £922,337,203,685,477.5807.

So, the data type we actually use will be an integer, typically a 64-bit integer. However, in order to make the integer more intuitive and easier to work with, it will ideally be encapsulated by a class that can also encapsulate a user-defined scalar and currency enumerator (such as GBP or USD). In this way, users can work with actual currency in real numbers, such as pounds and pence (including fractions of a penny where appropriate), while the class performs its calculations upon the scaled integer and presents the result back to the user in pounds and pence.

How would we write a program that calculates the area of a circle and displays the result?

The area of a circle is calculated as πd^2, where π is the constant ratio between the diameter of a circle and its circumference, d is the diameter of the circle and ^2 is the square of their product.

In programming languages where the value of π is not built-in, we must define it. To ensure the maximum possible precision across all implementations of the language, π is typically expressed as arctan (1) * 4.

In C programming, we'd define this constant as follows:

const double PI = atan(1.0) * 4.0; // global constant: e.g., 3.14159265359...

From this we can implement a function to compute the area of a circle:

double area_of_circle (double diameter) { return pow (PI * diameter, 2); }

Note that the atan() and pow() functions are both defined in the C standard library header or in if using C++.