answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What will happen if you will assign a value to float variable which is beyond the range of float data type?

Then data will be lost. Quite often, at least in Java, the compiler will protest at compile time, basically forcing you to rethink your strategy.

How can you create infinite instances of the same class using Python?

try using a never ending looping statement

(I know that I need a while/for loop, but I don't know how to assign variables to a randomly generated string)

Describe the analysis stage of a sdlc?

Sldc is a operation that can be operate each other

How do you display .dwg file on asp 2.0?

First of all, which do you need? An application which bases on Net FrameWork or a website which uses asp 2.0 technical?

The answer of the two questions is that both of them are achievable. To display .dwg on asp 2.0, you need: * to use: a development tool which support Net FrameWork (e.x. Visual Studio 2008) * to make sure you know: a development language (e.x. VB, C#) * to get: a .dwg viewer ActiveX control (e.x. ocx) Main idea of making a web based application - Add COM components in your project.

Main idea of making a website page - Add referecne in your website.

How do you write a program in lisp to find if a number is prime or not?

(defun prime (num)

(if (< 2 num)

(do ((dividend 2 (1 + dividend))

(chk-to (sqrt num)))

((equal (rem num dividend) 0))

(when (<= chk-to dividend)

(return t)))

t))

How do you find the orthocenter of a triangle?

The orthocenter is the point of concurrency of the altitudes in a triangle. A point of concurrency is the intersection of 3 or more lines, rays, segments or planes. The orthocenter is just one point of concurrency in a triangle. The others are the incenter, the circumcenter and the centroid.


My daughter's math teacher recommended the following site, which was enormously helpful for her. Here's a link to the 'orthocenter' topic, and you can find a bunch of other math topic videos there. It is all free. Hope it will help.

http://www.brightstorm.com/d/math/s/geometry/u/constructions/t/constructing-the-orthocenter

What is meant by ones-compliment of a decimal number?

One-complement applies to binary values, not decimal values. Therefore when we say the ones-complement of a decimal value we mean convert the value to binary, invert all the bits (the ones-complement), then convert the result back to decimal.

For example, the decimal value 42 has the following representation in 8-bit binary:

00101010

If we invert all the bits we get 11010101 which is 213 decimal. Thus 213 is the ones-complement of 42, and vice versa.

However, it's not quite as straightforward as that because some (older) systems use ones-complement notation to represent signed values, such that 11010101 represents the decimal value -42. The problem with this notation is that the ones-complement of 00000000 is 11111111 which means the decimal value 0 has two representations, +0 and -0 respectively. In the real-world, zero is neither positive nor negative.

To resolve this problem, modern systems use twos-complement to represent signed values. The twos-complement of any value is simply the ones-complement plus one. Thus the ones-complement of 42 becomes -43, therefore the twos-complement of 42 is -43+1 which is -42. Thus -42 is represented by the binary value 11010110 in twos-complement notation.

With twos-complement, there is only one representation for the value 0. This is because the ones-complement of 00000000 is 11111111 and if we add 00000001 we get 00000000. Note that we don't get 100000000 because the result cannot have any more bits than were in the original value. When an "overflow" occurs, we cycle back to zero. As a result, incrementing and decrementing signed values has exactly the same logic as incrementing or decrementing unsigned values and flipping the sign of any value is only slightly more complicated by the extra addition operation. However, flipping the sign of a value is a much rarer operation than counting so the cost is trivial compared to the cost of counting operations using ones-complement (because there are two values for zero).

Note that ones-complement notation allows an 8-bit value to store signed values in the range -127 to +127, whereas twos-complement allows a range of -128 to +127 (through the elimination of the extra zero). But in unsigned notation, both allow the same range: 0 to 255.

Although we rarely encounter ones-complement notation, it is important to keep in mind that not all systems use twos-complement notation, particularly when working with low-level but portable programming languages. This is the reason why both the C and the C++ standards state that the range of an 8-bit signed value is only guaranteed to store values in the range -127 to +127.

Convert 1234 bits to kilobits?

1234 is SI(kilobit) ~1.205kb or IEC(kilobit) 1.234kb. As defined by SI standards for binary data, a kilo-unit is 1024 base units, while the IEC defines kilo-units as 1000 base units.

Hardware manufacturers and Apple programmers usually refer to IEC units, while Linux, Microsoft programmers, and low-level programmers generally refer to SI binary units.

What do you mean by applet?

An applet is a piece of code that can be used for graphical user interaction. An applet generally uses java api's for applets. It could be a window/ a dialog box and some such gui.

Visit www.sun.com for examples on applets

What Cel Animation mean?

I am somewhat new to cel animation, but I know it has something to do with cartoon rendering. daz studio is free and has a good cartoon renderer.

What is close system in System analysis?

close system are the type of system that do not interact with the environment

What is dotnet 35sp1?

Hi

In order to run .Net programmed applications, you have to have .Net Framework installed in your computer.

It depends that the programmer programmed with which version of .Net?

.Net Framework's versions are:

.Net Framework 1.0

.Net Framework 2.0

.Net Framework 3.0

.Net Framework 3.5

.Net Framework 3.5 Service Pack 1 (SP1)

.Net Framework 4.0

Usually, a .Net programmer has all of these .Net versions installed in his computer. But, as a client you have to have the .Net version that your programmed is coded by.

Usually, the programmer makes the application installation file equipped with.Net Framework, so it installs on your computer and you don't have to do anything more.

How do phonegap help in mobile app development?

Silicon Valley is a one of the leading Mobile Cross Platform Development Company in India. Silicon Valley offers Mobile Cross Platform Development Services to clients across the globe. The team of Mobile Developers at Silicon Valley has years of experience in Mobile Cross Platform Development.we are great symphony developers in India.

What is ad-hoc polymorphism?

If the range of actual types that can be used is finite and the combinations must be specified individually prior to use, it is called ad-hoc polymorphism.

Ad-hoc polymorphism usually refers to simple overloading, but sometimes automatic type conversion, known as coercion, is also considered to be a kind of ad-hoc polymorphism. Common to these two types is the fact that the programmer has to specify exactly what types are to be usable with the polymorphic function.

The name refers to the manner in which this kind of polymorphism is typically introduced: "Oh, hey, let's make the + operator work on strings, too!" Some argue that ad-hoc polymorphism is not polymorphism in a meaningful computer science sense at all---that it is just syntactic sugar for calling append_integer, append_string, etc., manually. One way to see it is that

  • to the user, there appears to be only one function, but one that takes different types of input and is thus type polymorphic; on the other hand,
  • to the author, there are several functions that need to be written---one for each type of input---so there's essentially no polymorphism.

Example

Imagine, if you will, an operator + that may be used in the following ways:

  1. 1 + 2 → 3
  2. 3.14 + 0.0015 → 3.1415
  3. 1 + 3.7 → 4.7
  4. [1, 2, 3] + [4, 5, 6] → [1, 2, 3, 4, 5, 6]
  5. [true, false] + [false, true] → [true, false, false, true]
  6. "foot" + "ball" → "football"

How can plants benefit from fire?

Fire triggers germination in some plants (eg. eucalyptus). They can also re-establish woodland areas, which is especially useful after extensive logging. Most importantly, they reduce the amount of available fuel in the area, reducing the chance of high risk fire occurance and overall destructive impact. People who are passionate about natural forests must accept that fire is an important ecological process, vital to the ongoing life of many plant species.