answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is the Least Slack Time scheduling algorithm used for?

The Least Slack Time scheduling algorithm is used for assigning priority based on the slack time (temporal difference between the deadline, ready time and run time) of a process.

Who is the creator of Basic English?

BASIC English is used in programming computers. It is an acronym standing for Beginners All-purose Symbolic Instruction Code. John Kemeny and Thomas Kurtz created BASIC while at Dartmouth College in 1964

Where can one get assembly instructions for Rubbermaid products?

If one has lost the instructions that are included, one may look up the document on the Rubbermaid website. If this is not an option, one could try one's local library for either a print copy, or access to the library's computer system.

What kind of programming is Kron 4 offering?

Kron 4 is a news station that offers sports, weather, programming schedule, traffic, and information on community events. They cover the San Francisco Bay area.

How do you write a program to convert 99 to its hexadecimal number?

LXI H, 4150 ; Point to data

LXI B, 0000 ; Initialize hundreds= 0, Tens=0

MOV A, M ; Get hex data to A

LOOP: SUI 64

JC LOOP 1

INR B ; hundreds= hundreds+1

JMP LOOP

LOOP 1: ADI 64 ; if subtracted extra, add it clear carry flag

LOOP 2: SUI 0A

JC LOOP 3

INR C ; Tens=tens+1

JMP LOOP 2

LOOP 3: ADI 0A ; If subtracted extra, add it again

INX H ; A = Units

MOV M, B ; store hundreds

MOV B, A ; Combine Tens in C &

MOV A, C ; Units in A to form a

RLC ; Single 8-bit number

RLC

RLC

RLC

ADD B

INX H

MOV M, A ; Store tens & Units

HLT

How do you write a program to add 5 number?

Writing a program to add 5 numbers follows the same design principles as any other program design:

In the first step, clarify the requirements. For example, you might want to raise the following questions:

Will the program always add exactly 5 numbers, or any number of numbers up to 5?

Will all N summands be known at the same time, or will the program be required to add one summand at the time, until all N summands are accumulated?

Will all N summands share the same data type, and if so, what is the shared data type?

How is the program expected to handle summands of different types and resolution?

How is the program expected to obtain its input (the number N, and the N summands), and how is the program expected to present its output (the sum)?

How is the program expected to respond to error conditions?

In the second step, design a solution and identify its limitations. For example, you might discover that the algorithm stops functioning once the sum reaches a certain value. You might want to specify the precision of the result, and limitations of the algorithm (for example, the fact that N must be five).

In the third step, you'd repeat steps 1 and 2 until you understand the requirements, and the person who plans to use your program is satisfied with its limitations.

In the fourth step, you'd draft an initial version of the program. This could be feature limited (for example, with limited error checking), but should demonstrate that the core algorithm works correctly. Since the program will need to interface with a human or other programs, this version should also demonstrate this interface, proving that the required inputs and outputs can be obtained and delivered as intended.

In the fifth step, you'd refine your program. This will typically include refined error checking and diagnostics, performance improvements, etc.

In the sixth step, the program is being tested, and errors are addressed. When necessary, this might require returning to step 1.

In the seventh step, you should always review the requirements and limitations again to ensure that these agreed facts remain true, and no further limitations were added or new requirements discovered.

Subject to the complexity of your program, other steps include the creation of documentation and training materials, legal research, patent filing, software installation and distribution, protection of your intellectual property, and some-such.

What programming language is used for GameMaker?

GameMaker uses its own prgramming language, the Game Maker Language (GML) which was developed by Mark Overmars. GML supplements the drag & drop system within Game Maker.

Can the subroutines of a high level language be called processes?

No. A subroutine (also known as a procedure or function) is best thought of as being a task. The executable (program) is the actual process. Every process has at least one thread of execution and each thread has its own local call stack. Thus multiple threads may concurrently execute the same task independently of any other threads within the same process. This is useful when we have a large or time-consuming task which can be broken down or divided up into smaller instances of the same task; each thread handles a small portion of the overall task and operates concurrently with all other instances of that task. Depending on how many CPU cores we have available, multiple threads of execution should complete the whole task quicker than a single thread would have. That is, if we divide the task into four, we could potentially complete the whole task in 1/4 of the time it would take with just one thread of execution.

Why compiler is not applicable in low level language?

In layman's terms, compiler is an application to convert the code into instructions computer can understand. In a low level language, the code is already written using low level instruction which a computer can understand. Hence there is no need for a compiler.

PONG Visual C-Sharp Help?

Hello, this is the author posting... The problem is, that I need to set the sides of the Form as boundaries that picture boxes (that act as the paddles) cannot go past. IN OTHER WORDS: I need to block the PicBoxes from going out of view on the form.

Here's What I Got So Far:

using

System;

using

System.Collections.Generic;

using

System.ComponentModel;

using

System.Data;

using

System.Drawing;

using

System.Linq;

using

System.Text;

using

System.Windows.Forms;

namespace

Vong

{

public partial class frmVong : Form

{

public frmVong()

{

InitializeComponent();

KeyDown +=

new KeyEventHandler(Form1_KeyDown);

}

void Form1_KeyDown(object sender, KeyEventArgs e)

{

int x1 = picPlayer1.Location.X;

int y1 = picPlayer1.Location.Y;

int x2 = picPlayer2.Location.X;

int y2 = picPlayer2.Location.Y;

if (e.KeyCode Keys.Down)

y2 += 50;

picPlayer2.Location =

new Point(x2, y2);

}

}

}

How do you get 'you have won an iPhone' adverts off of your PC?

The simple answer is to use a pop-up blocker and/or advert blocker.

Which programming language is developed by Niklaus Wirth between 1968 and 1969?

Niklaus Wirth was responsible for the programming language Pascal, which was designed in the years 1968 and 1969.

What is batch data processing mode?

Batch processing generally means using a scripting language to queue one or more jobs that will work one after the other without any manual intervention. That is, the actual processing is automated, the only input required from the user is in order to set up the batch. Contrast with online or interactive data processing which requires user-input throughout the process.

In batch processing, the input is typically generated from input files collated as a batch, and the output of one job can often be used as input for the next job, dependant upon the type of processing. Some software includes batch processing modes of their own, but for those that don't, command sequences can be crafted using scripting languages, either from within the program itself (where supported) or externally at operating system level. Operating system command scripts can also be employed for batch processing, hence they are also known as batch files.

How data structure can influence program performance?

Greatly.

Certainly, a person with data structures orientation will write better structure code.

Imagine yourself is asked to write adding to big integers numbers having 200 digits?

Using long also we can not do this.

By employing linked list type data structure we can achieve this.

This is an example only.

How can you delete a program that wont delete?

One should not delete a program,programs can never be deleted they should always be uninstalled.Deleting a program can never help because if you delete a program u will not see it there but it is used by the computer or system.When you uninstall a program it is totally removed from the computer and is never used again unless u install it.

Can you download internet explorer on your Macbook Air?

No. Internet Explorer is a Windows only program, and probably will never be transferred to any other operating system.

What is a spider on a online discussion or message board?

An automated bot for a search engine like Google scanning the forum for pages to be listed, tags, etc.

How do you get backyard baseball 1997 to run on your windows 7 computer?

Right click the backyard baseball shortcut or executable, click properties, and go to the compatibility tab, and run it in compatibility mode for whatever version it was made for. If it doesn't work after that you're out of luck.

Are there any facts about binary code?

That depends on what you regard as interesting, but there are certainly facts.

Just as moving decimal digits to the left or right raises or lowers the value by a power of 10 (shifting the digits 12 one position to the left becomes 120, which is 10 x 12), shifting binary digits (bits) left or right raises or lowers the value by a power of 2. This fact is true in any base, where the shift raises or lowers by a power of the base. In digital computing, however, this fact makes it possible to raise and lower values by a power of 2 extremely quickly. That is, to double a value, shift all the bits one position to the left. To quadruple a value, shift two places to the left, and so on.

Base-2 is directly related to base-4, base-8, base-16, base-32 and so on. What this means is that we can directly translate any binary number into any base that is an exact power of 2. This makes it possible to notate long sequences of binary digits using much shorter sequences in a higher base. For instance, if we split up a long sequence of bits into pairs of bits, we find there are only 4 combinations for each pair (00, 01, 10 and 11), each of which can be denoted using a single base-4 digit (0, 1, 2 and 3). Thus we can denote a 32-bit sequence using just 16 base-4 digits. By the same token, base-8 (octal) is useful for denoting groups of 3 bits, thus a 24-bit binary number can be reduced to an 8 digit octal value. Base-16 (hexadecimal) digits allows us to represent groups of 4 bits, while base-32 uses groups of 5 bits, and so on. However, we typically use hexadecimal for binary notation because 4 bits is half a byte (a nybble) and two hex digits therefore represents one full byte (8 bits). Thus the 8-bit binary value 10101100 can be split into two nybbles, 1010 and 1100, each of which can be represent by one hexadecimal digit. 1010 binary is 10 decimal, which is A in hexadecimal (the letters A to F represent decimal digits 10 to 15), while 1100 binary is 12 decimal which is C in hexadecimal. Thus AC16 is the hexadecimal representation of the binary value 10101100. This is more commonly written as 0xAC, or ACh. An 8 digit hexadecimal value such as 0xAC15FF01 make it possible to denote 32-bit binary values very easily. And converting back to binary is simply a matter of translating each hexadecimal digit back to its 4-bit binary equivalent. Thus A becomes 1010.

The mechanics of physically storing digital data might be regarded as interesting. They're certainly factual. Although we use the digits 1 and 0 to represent binary values, computers do not. However, binary values can be denoted using any two symbols, whether real or conceptual; apples and pears, chalk and cheese, black and white, true or false. So long as the computer can differentiate between any two states it can differentiate digits and therefore store numbers. In computer memory, a 1 is represented by a capacitor with sufficient charge while a 0 is represented by a capacitor with insufficient charge. The charge is filled or drained via a transistor, and each pair of capacitor and transistor forms a single cell in memory, each capable of storing exactly 1 bit of information. Capacitors are like leaky cups while transistors are like taps that can either refill the cup or allow it to drain. Because a charge drains away very quickly, the transistors must constantly refill the capacitors to maintain their state, hence memory must be refreshed many times a second. Thus when all power is lost, the contents of memory are lost. However, memory is a bit like our short term memory. It's extremely fast but is highly volatile.

Thus computers use data storage devices such as hard disk in order to hold data more permanently, the equivalent of our long-term memory. It's slower, but does not require power to maintain its state. Hard-disks use magnetic medium to store digital information, using sequences of positively and negatively charged particles. However, it is not the polarity of the particles that denotes the value of a bit, it is the flux transitions from one state to the other that denotes a 1, while the lack of a transition denotes a 0. However, in order to mark where one bit ends and the next begins, there is also regular alternating flux transition interleaved into the actual data. This regulatory flux transition ensures there is always at least one flux transition for every two bits of actual data. Without this, long sequences of 0 bits would be impossible to differentiate, regardless of how accurately the speed of the medium is controlled.

Other methods of storing binary data include the original punch-cards, where the presence of a hole denotes a 1 while the absence of a hole denotes a 0. Unlike hard-drives, punch cards are read very slowly by comparison, but at a highly regular rate, thus they do not require transitions for timing. Passing the cards through a reader at a regular rate (using sprocketed drives) allows the computer to update its internal memory accordingly. Optical drives such as CD, DVD and BluRay use a series of pits and lands (or flats) similar to punch cards, but due to the high speed and lack of accuracy, they also require timing transitions the same as hard-drives. The point is that regardless of the method used to store data, the mechanics of differentiating between any two states remains largely the same -- there are no digits as such, only physical properties that can be translated into digits that we humans can easily understand.

What are apex classes?

Apex is a strongly typed, object-oriented programming language. A class is a template or blueprint from which objects are created. An Apex Class is a library of attributes and methods and serves as a blueprint to create Apex objects.

What is the minimum requirement of blue stacks?

win xp3 or higher, .net framework 2.0 or higher,graphics support 512 or more

What is mean by a one to many relationship when comparing a high level language to machine language?

It is meaningless. The term 'high-level language' implies a high-level of abstraction between the source code and the resultant machine code. In order for there to be a one-to-one relationship between the source code and the machine code, there must be little to no abstraction; the source language must be low-level. Assembly language is a low-level language with little to no abstraction.

How do you write an algorithm to find the number of times a given ITEM occurs in LIST?

You can write any algorithm in any way you like. Many prefer pseudocode or flowcharts, others use prose or more formalized methods.

For example, if you wanted to describe an algorithm to count the number of occurrences of a given item I in a given list L, I would propose the following pseudocode:

let counter be 0.

let the current item C be the first item in list L.

while C == valid {

if C matches I then

increment counter set C to the next item in the list

}

return counter.

Do high resolution images contain a small number of pixels?

Quite the opposite actually, the more pixels there are is generally the higher resolution

How do you write an assembly language program to count the number of ones in a given byte?

1. Find algorithm.

2. Implement it.

Hint: if a non-zero N number has K 1-bits, then (N AND N-1) has K-1 1-bits.