73 Topics
| |
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 … | |
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 ? | |
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] | |
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 … | |
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 … | |
How to convert int value to another data type in java or from other data types to int.I just need syntax of it. | |
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 … | |
[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 … | |
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 … | |
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) … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 { … | |
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.. … | |
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 … | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
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). | |
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 … | |
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...?? | |
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 + … |
The End.