answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is commond line interface?

The command line interface is one where the interaction with OS is possible by the commands and instructions. No Graphical facility is available like drag and drop facility.

Algorithm for multiples of2?

int n = 2 // start at 0 if you really want to

while n < some arbitrary limit

n = n + 2

What is information resources?

Because employees work under contract for companies. In fact, it is often the case that developers wanting to contribute to open source projects must be granted exception because of contractual restrictions that make every bit of code written by a programmer the express property of the company paying them. I would imagine that this is in a similar vein.

What is the largest positive number you can represent literally ie. as an immediate value within an LC-3 ADD instruction?

There are 5 bits in the immediate value for an LC-3 ADD, but the first bit is needed for the sign representation. The answer is 15.

Who invented the factory assembly line?

The earliest known factory assembly line was in Portsmouth Block Mills in England as early as 1801. Marc Isambard Brunel designed many of the machines that ran that line.

Why is it necessary to use flow diagrams identify business processes module human-computer interactions and so on before writing a computer program?

It might be a good idea to use flow diagrams, identify business processes, model human-computer interactions, etc. before writing a computer program.

But it's not absolutely necessary.
Lots of people sit down at a keyboard and make changes to a program -- or write entirely new programs -- without doing any of that stuff.

Explain linear search with an example?

Sequential search of an object with in an array of objects is called as linear search.

What A CPU really only understands instructions that are written in machine language.?

A CPU will have an "instruction set" which consists of primitive instructions i.e a command like MOVE:1002,1003 could be an example of an instruction to move the contents in memory location 1002 to the memory location of 1003. Some CPU's operate as a RISC (Reduced Instruction Set Computer) and others operate as a CISC(Complex Instruction Set Computer). Which basically means some have more "primitive instructions" than others but the more complex an instruction is - The more work will be needed to execute it. Alan Turing proved only 6 of these primitive commands are needed to compute anything that is "computable" by machines. Nowadays, programmers will write code in an "high level" language which contains more of these "primitive commands" but then the code will be compiled into a set of instructions that the CPU can actually execute (i.e to the instruction set of the targeted CPU). If we were to try to write any sufficiently complex program using only the instruction sets of CPU's, it would become very complicated for humans to understand and would take a ridiculously long time.

State your Main KRAs and KPAs?

What_is_KRA

http://www.citehr.com/4309-difference-between-kra-kpa.html

Greedy algorithm to generate shortest path from vertex to all vertices in a digraph?

In graph theory this is called the shortest path problem. There are several algorithms to solve it. Here is the pseudo code for one of them: Yes it is a Greedy algorithm! 1 function Dijkstra(Graph, source): 2 for each vertex v in Graph: // Initializations 3 dist[v] := infinity // Unknown distance function from source to v 4 previous[v] := undefined // Previous node in optimal path from source 5 dist[source] := 0 // Distance from source to source 6 Q := the set of all nodes in Graph // All nodes in the graph are unoptimized - thus are in Q 7 while Q is not empty: // The main loop 8 u := vertex in Q with smallest dist[] 9 remove u from Q 10 for each neighbor v of u: // where v has not yet been removed from Q. 11 alt := dist[u] + dist_between(u, v) // be careful in 1st step - dist[u] is infinity yet 12 if alt < dist[v] // Relax (u,v,a) 13 dist[v] := alt 14 previous[v] := u 15 return previous[] If we are only interested in a shortest path between vertices source and target, we can terminate the search at line 10 if u = target. Now we can read the shortest path from source to target by iteration: 1 S := empty sequence 2 u := target 3 while defined previous[u] 4 insert u at the beginning of S 5 u := previous[u] here is another procedure BellmanFord(list vertices, list edges, vertex source) // This implementation takes in a graph, represented as lists of vertices // and edges, and modifies the vertices so that their distance and // predecessor attributes store the shortest paths. // Step 1: Initialize graph for each vertex v in vertices: if v is source then v.distance := 0 else v.distance := infinity v.predecessor := null // Step 2: relax edges repeatedly for i from 1 to size(vertices)-1: for each edge uv in edges: // uv is the edge from u to v u := uv.source v := uv.destination if v.distance > u.distance + uv.weight: v.distance := u.distance + uv.weight v.predecessor := u // Step 3: check for negative-weight cycles for each edge uv in edges: u := uv.source v := uv.destination if v.distance > u.distance + uv.weight: error "Graph contains a negative-weight cycle"

Where is svchostexe NOT supposed to be in System NetworkService or LocalService?

svchost.exe is the host process for windows services. By default it can be executed from any account including all three built-in accounts: System, NetworkService and LocalService. There are no accounts where it is not supposed to execute unless the system administrator has specifically denied access to it from specified accounts. However, it's the services themselves that should be restricted (where necessary), never the host process.

What is a sprite in computer programming?

A Sprite is a two - dimensional image or animation that is integrated into a larger scene. Initially it was including just graphical objects which the programme handled separately from the memory bitmap of a video display. The ealiest "charectors" in some of the games were sprites. This was typical of the Spectrums, Amigas and apple machines in the earcly 1980s

Which CPU scheduling algorithm use by symbian os?

I ran screaming from Symbian OS and pledged to never buy another Nokia product about 6 years ago because of this specific topic. I worked with Nokia on a few development projects.

Symbian's scheduler (back then) was a strict priority queue. Instead if proper threads and processes, it was simulated through an "Active Object Queue" which was very simplistic and barely functional. The idea was, you had a list of cooperative threads (windows 3.1 style) and the first item in the list flagged as needing attention was the next item run. So, if you were to release control from a high priority object and want it back after, it would get control immediately and starve all other threads.

Later, they added a "kernel scheduler" which was "real-time" but was little more than an interrupt handler with a limited scheduler. The overall goal of the OS design was "it doesn't matter how back the OS sucks, we can run on a lower end CPU than windows CE." So while Windows CE was a full, preemptive multitasking real-time kernel. Symbian was basically something closer to a kernel with a real-time process and a non-real-time process.

What is the identity matrix?

The identity matrix is a square one with ones (1s) down its main diagonal and zeroes (0s) elsewhere. That is, it must have the same number of rows as columns, and where the row number is the same as the column number, the entry must be 1, elsewhere, it must be 0.

What is the code to print odd numbers from 20 to 30 in qbasic?

The following code will produce a list of numbers in steps of 2. It can be modified for any start & end number, and the size of the step.

start% = 21

end% = 29

FOR num% = start% TO end% STEP 2

PRINT num%

NEXT

The above code will produce the results 21,23,25,27 & 29

What program should be used to run games on the PC?

First of all,give us more info,tell us exactly what do you mean?

Do you need a program that boosts PC performace?

Do you need a program like Steam,in which you can purchase games online?

Do you need an OS(Operating System) like Windows or Mac OS X?

Do you want to run console games(PS3,X-BOX) on PC?

Do you need a program to let games run without CD/DVD/BD?

For online gaming, Flash is most popular. Shockwave is second (but older), and Java is dead :P

Who was Arfa Karim?

Arfa Karim was a computer prodigy and, at only 9 years old, became the youngest Microsoft Certified Professional in 2004. She was also the youngest recipient of the President's Award for Pride of Performance. She died in 2012, aged 16.

What are the disadvantages of databases?

Disadvantages of databases are:

* They are overcomplicated for storage of simple and/or small data.

* They are more complex

* They are more difficult to set up initially

* Crash without saving