73 Topics

Member Avatar for
Member Avatar for kiail

I'm trying to make a bubble sort to sort numbers like 3.2, 5.8, etc(double / float numbers). I have this code so far, but I'm still trying to learn and don't know why my code isn't working the way I think it should. Any help is appreciated. [CODE]using System; using …

Member Avatar for Momerath
0
270
Member Avatar for Dr_Freeman

Greetings. I'm currently implementing small ANN on my microcontroller. I need to calculate sigmoid activation function. The problem is that I cannot use standard c libraries like math.h so I need custom written pow function. This is how it will be used:pow(e,-(someFloat)); Did anyone have already implemented something similar ?

Member Avatar for histrungalot
0
620
Member Avatar for the_kitoper

Why is this? [CODE] int kitty(GtkWidget* widget, float* foo) { if(*foo != .5f) std::cout << "this usually occurs" << std::endl; } int otherFunc(void) { float foo = .5f; //assume widget has been created g_signal_connect(G_OBJECT(widget), "clicked", G_CALLBACK(kitty), (gpointer)&foo); }[/CODE]

Member Avatar for vijayan121
0
197
Member Avatar for ak24

I'm trying to determine the minimum range of floating-point types. It's easy when using values from standard headers: [CODE]#include <stdio.h> #include <float.h> main() { printf("Minimum range of float variable: %e\n", FLT_MIN); printf("Minimum range of double variable: %e\n", DBL_MIN); return 0; } [/CODE] This code gives the following output: Minimum range …

Member Avatar for Adak
0
231
Member Avatar for trektrak

I would love to know, if it's possible to get a specific data from a specific mysql table.. Let say on the table itself has a Varchar ... mixed of words and floats.. and then ... I want to pull only the float from the table using php... can it …

Member Avatar for trektrak
0
140
Member Avatar for umair jameel

How to convert int value to another data type in java or from other data types to int.I just need syntax of it.

Member Avatar for JamesCherrill
0
74
Member Avatar for judge6

Hi all, I'm working on a website which has a horizontal navigation menu, much like the one on DaniWeb. Basically I need to include an icon which floats right for each list item. IE7 has a bug whereby if the container div does not have a width stipulated then a …

Member Avatar for Dandello
0
151
Member Avatar for emily-bcot

[CODE]select * from Table where data=2.6[/CODE] After running the above query, db returned an empty result set. But Seen from table, there are many rows matching data=2.6 criterion. Here the type of 'data' column is FLOAT. If changing the value to an integer like 'where data=2', the matched result sets …

Member Avatar for smantscheff
0
211
Member Avatar for elneco

Forumns, i got some boxes with a animation. You'll notice the last one of the line causes a rukus.. well these boxes will be contained in a flexible container so using a fixed width and using a clear on last item of row is not gonna solve this problem... check …

Member Avatar for elneco
0
80
Member Avatar for crapped

Im a beginner.. What i want to do is converting user textbox input into Float value. Okay to the point ----- [QUOTE]I have textbox with 3 inputlimit I want if user input '200' itll give result to 2.00 (floatvalue), and if user input '12.3' the result will be 0.123 (floatvalue) …

Member Avatar for pritaeas
0
188
Member Avatar for Birdmanskii

The #review section won't float left in Dreamweaver. For some reason when I use the float: left; command, the #review div stays underneath the #band_links div. I want #review to line up on the right side of the #share, #tracklist, and #band_links divs. I've tried everything I can think of …

Member Avatar for shibin vadayatt
0
1K
Member Avatar for rizla777

okay so i've been at this for 2 days. i've tried recoding the entire site but nothing seems to work. It's only 1 navigation bar that is giving me a problem. ul#sub-nav. I can get it to align horizontally in firefox except sometimes it works in IE and sometimes. you'll …

Member Avatar for Dandello
0
287
Member Avatar for dev90

In structure hen i read floating point value from user and i get the error like"floating point not conneted..." i have been sugested to write two lines for that extern void float conetor(); #pragma extref floatconnector even though i got the same error it is not even asking for float …

Member Avatar for Narue
0
153
Member Avatar for c++creator

Hey everybody,it's the c++ creator.I am a beginner at C++,and am getting confused at functions.I am learning from a site called cprogramming.com and this is what they say- [QUOTE]Lesson 4: Functions (Printable Version) Now that you should have learned about variables, loops, and conditional statements it is time to learn …

Member Avatar for frogboy77
0
562
Member Avatar for johnnycho

To illustrate the issue, I've created two HTML pages: [url]http://www.johnnycho.com/firefox_csstest01.html[/url] [url]http://www.johnnycho.com/firefox_csstest02.html[/url] They are both exactly the same, with one exception. On the first page, the div class="topbox" has a padding of 1px. On the second page, the padding has been set to 0. If you look at these two pages …

Member Avatar for Arkinder
0
658
Member Avatar for fadeterra

I searched in this forum, but it didnt help my solve my problem. Please help me. This is my code [I]int intOrderNo = (int) Session["sOrderNo"]; DetailsViewRow row0 = DetailsView1.Rows[0]; string strProductId = row0.Cells[1].Text; DetailsViewRow row6 = DetailsView1.Rows[6]; string strUnitPrice = row6.Cells[1].Text; float floUnitPrice = float.(strUnitPrice); string strQty = DropDownList1.Items[DropDownList1.SelectedIndex].ToString(); int …

Member Avatar for fadeterra
0
327
Member Avatar for Labdabeta

This is a conversion question that has me stumped. I need to convert an unsigned char to a signed float. Some examples: 0xFF becomes 1.0f 0x00 becomes -1.0f 0x80 becomes ~0.0f The only idea that I could come up with was a massive switch statement. But a switch statement will …

Member Avatar for ddanbe
0
338
Member Avatar for Toikkala

Hi! On school we got exercise to calculate how much the length of substance grow when we know original length and temperature change. So,the case goes that i have value temperature coefficient of different substances and i have to multiply them. I'd like to it without doing several condition statements. …

Member Avatar for woooee
0
241
Member Avatar for Aepexx

So what I'm aiming for here is to take the user's input as float and write code to split up that input into individual digits and use an array. How would I go about doing this? Here is what my code looks like currently: [CODE]import java.util.Scanner; public class Asn8 { …

Member Avatar for FRGT/10
0
228
Member Avatar for sagive

Hey guys.. i got this kind of div structure (Hebrew website) [CODE] <div id="main" style="background: #ffffff; padding: 20px;"> <div id="sidebar" style="float: right;"> actuall sidebar </div> <div id="pagecontent" style="float: right"> some content </div> </div> [/CODE] My problem.. The contact inside the content / sidebar isn't stretching the "main" div and so.. …

Member Avatar for sagive
0
190
Member Avatar for Aepexx

Here is the output that I should be receiving: [CODE] Please enter the name on the check (First Last): John Doe Please enter the amount for the check (as a float): 123.45 --------------------------- Pay to : John Doe $123.45 one hundred twenty three dollars and 45 cents[/CODE] Now, what I …

Member Avatar for Aepexx
0
179
Member Avatar for RyanMcMillan

i have a variable "float PI = 3.146;" in a header file called "evar.h" but when i use the variable PI in my main functoin it only comes out as "3" , i have to explictly type cast it for the number "3.146" to be printed out how could i …

Member Avatar for RyanMcMillan
0
172
Member Avatar for commando1200

Im trying to make a tax and tip calculator and whenever the tax comes up it goes 10 or more decimal places and im trying to restrict it to two. [code=java] public static void main(String[] args) { double cost, total, tip, taxtotal, tiptotal, subtotal, grandtotal; Scanner myScanner = new Scanner(System.in); …

Member Avatar for commando1200
0
193
Member Avatar for bensewards

The question is: A file contains a list of names in the form: Jones, Frederick M Brennan, Claire Your program should alphabetize the list. Use the C++ string class. Also, extract names from the input stream with getline(). What i know so far: main() should declare a char array and …

Member Avatar for ravenous
0
199
Member Avatar for andrewliu

Hello, I have a problem with my css styling with div tags. Right now I have 3 div tables and they're aligned next to each other when I do [CODE]float:left;position:relative; [/CODE] but when I drag my browser smaller, the div tags that are in the middle and on the right …

Member Avatar for andrewliu
0
365
Member Avatar for FutureWebDev

The program takes 10 numbers of type float, which are entered by the user, and outputs the average ( also of type float ) of those 10 numbers. If I am going to test a range of values for those ten number, am I correct to test the highest values …

Member Avatar for FutureWebDev
0
185
Member Avatar for Gribouillis

This snippet generates the best rational approximations of a floating point number, using the method of continued fractions (tested with python 2.6 and 3.1).

Member Avatar for Gribouillis
1
1K
Member Avatar for hi102

Can someone please help fix this program? I'm pretty new in Python. Every time I run this program it says : Traceback (most recent call last): File "E:/Python/delin.py", line 38, in <module> discounted_total = regular_total - full_discount TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' def find_discount(total): if total …

Member Avatar for hi102
0
11K
Member Avatar for knan

We know that 0.1 + 0.1 + 0.1 - 0.3 = 0.0 But in python 0.1 + 0.1 + 0.1 - 0.3 = 5.5511151231257827e-017 Is there any way I can get 0.0...??

Member Avatar for knan
0
195
Member Avatar for vavazoom

I'm trying to create a random float generator. The float must be 2 decimal places and between the values 0.50 and 999.99. I tried casting rand() to a float below, which didn't work. I'd still like to know the reason this didn't work. [CODE] saleAmount = ((float)rand() % 99950.00 + …

Member Avatar for vavazoom
0
271

The End.