75 Discussion / Question Topics

Remove Filter
Member Avatar for
Member Avatar for William Hemsworth

I'm working on a program that requires some very low level optimization. My question is, when precision isn't an important factor, how can I automatically use the most efficient floating point type for whatever architecture the program is being run on? As far as I'm aware, floats are more efficient …

0
194
Member Avatar for ogsirus

Hi guys, I am trying to write a program which picks the closest number possible out of a dictionary. The dictionary contains 50 doubles values, and I use a random double to pick the number i want to get the closest to if that makes sense. Currently I am using …

Member Avatar for ogsirus
0
853
Member Avatar for Gl753

I'm working on a programme that's supposed to accept input of doubles from an array however it's not quite working out for me. It takes in Integers alright but not the double values. Could someone point me in the right direction Any help is much appreciated double array[] = new …

Member Avatar for samson.dadson.3_1
0
226
Member Avatar for hanspeare_1

Hi there, i have recieved this notice Warning: Header may not contain more than a single header, new line detected in C:\xampp\htdocs\a\Student_Edit_Handler.php on line 53 and these are my codes. Kindly help me to fix this. <?php session_start(); $session_id = $_SESSION['user_id']; if($session_id == null){ header("location:Student_Edit.php"); die(); } include 'Connect.php'; $flag …

0
214
Member Avatar for singhneeraj421

In our network we have two gateways one for accessing local intranet sites and other for accessing internet.we use static routing in individual pc to access both the routes.we are facing problem that one intranet site http://np41http1.xyx.abc.co.in:8103/SAP(bD1lbiZjPTQwMCZkPW1pbg==)/ryt/default.htm .we susscessfully ping the site from ip addess and tracert is also done …

Member Avatar for rch1231
0
337
Member Avatar for rabadiyaronak

i have two different programs that compare float and double variales and gives output , i shown that below : 1. #include<stdio.h> main() { int r; float f=22.5; double d=22.5; r=(f==d); printf("r=%d",r); } **Output:- r=1** 2. #include<stdio.h> main() { int r; float f=22.7; double d=22.7; r=(f==d); printf("r=%d",r); } **Output:- r=0** …

Member Avatar for jwenting
0
289
Member Avatar for cppgangster

Hi there, I am having a problem of passing arrays to functions, here is my code: void zeroMatrix(float **arr); void main() { float e[2][2]; zeroMatrix(e); } void zeroMatrix(float** arr) { int i,j; for (i=0;i<2;i++) { for(j=0;j<2;j++) { *( *(arr +i)+j) =0; } } } The problem is I want to …

Member Avatar for David W
0
332
Member Avatar for CoilFyzx

Heelloooo good day. Thanks for seeking to help. I am creating a Java program(obviously). At the end of my work I wish to install it as (a)an .exe file. However I wish that after its installation, file type association would have been setup automatically(I phrased that latter part of the …

Member Avatar for stultuske
0
301
Member Avatar for vishal anand.s

Hi my name is vishal. For the past 1 week i been in the process of creating a dashboard using listview in c# windows forms with sql server 2008. I created listview named lstDashItems and populate it from a table named USERACTIVITIES in sql server 2008. The design of USERACTIVITIES …

Member Avatar for vishal anand.s
0
385
Member Avatar for m1m6jbr

I'm designing a LongDouble datatype which take a 16 byte space. my question is how to add or substract a two double numbers correctly ex : a= 3.025466 b=4.132655`` the result will be 7.158121 but in my code it's different here is my code LongDouble LongDouble::operator+( LongDouble olong) { LongDouble …

Member Avatar for kal_crazy
0
210
Member Avatar for decade

Hi everyone, I'm new in vb.Net programming and i just want to ask how to validate a "Double" data type. for example. Dim number as Double number = textbox1.text If the value of "number" variable is in "Double" data type like 1.23 or 0.12 it returns a correct value and …

Member Avatar for decade
0
3K
Member Avatar for Szabi Zsoldos

Hi guys, I've created a simple plugin for Wordpress that interacts with an API in the backend. The problem is that everything is inserted twice in the database, and I cannot figure out why. The form is submiting only once, not twice. What could it be ? Redirects from my …

Member Avatar for Szabi Zsoldos
0
846
Member Avatar for fatalaccidents

Hello everyone, I'm trying to basically get a cmd variable to pass into commands.getstatusoutput. The problem is that the command has a lot of single and double quotes in it and I can't seem to get it to store as a variable. When I print the cmd it comes out …

Member Avatar for fatalaccidents
0
375
Member Avatar for jason.angeles.75

public class homework8_2 public static void main(String [] args) { Scanner keyboard = new Scanner(System.in); int selections = 0; DecimalFormat formatter = new DecimalFormat("#0.0000"); do { showMenu(); selections = keyboard.nextInt(); System.out.println("please input the amount of meters"); double meters = keyboard.nextDouble(); if (selections == 1) { double kilometers; kilometers = showKilometers(meters); …

Member Avatar for stultuske
0
240
Member Avatar for Gobble45

Hi there, My issue: I have a datagridview and a DB file with ~100 columns and ~200 rows of data. This data is imported to the DGV onLoad(). Once i have the data i run a script that searchs a predefined(by the user) folder for text files. Each text file …

Member Avatar for Gobble45
0
2K
Member Avatar for jspence29

What I am trying to do is make a program that reads a txt file and converts the number into a double array. import java.io.*; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class rocket { public static void main(String[] args) throws IOException, FileNotFoundException { System.out.println(readLines("/Users/Jeremy/Documents/workspace/altitude.txt")); } public static Double[] readLines(String …

Member Avatar for jspence29
0
380
Member Avatar for sparsh610_1

hello everyone ,, have a look on the program really difficult for me to understand the concept please help

Member Avatar for sepp2k
0
226
Member Avatar for kyle.mace.35

Alright so my problem is I am getting an error that says undefined reference to all of my functions related to DoubleLinked, DoubleLinked<string> dict, dict.add, etc. If anyone knows why that would be great. Thank you. Oh and if i add () to DoubleLinked<string> dict then i just have undefined …

Member Avatar for kyle.mace.35
0
381
Member Avatar for romz

hi everyone. I want to delay the click event in a vsFlexgrid so that the double click event will run 1st. I used a timer for the delay in the click event and managed to get the value of the double click speed in the windows library for the timer …

Member Avatar for romz
0
1K
Member Avatar for jlemieux

I have an assignment to create 2 arrays. One holding Student names, one holding their grades. They then have to be sorted using BubbleSort, so that their grades are in descending order. I have created the first part of it, that allows me to put in their grades, and I …

Member Avatar for jalpesh_007
0
270
Member Avatar for blindislands

My teacher wants me to write a function called double cos(float); to compute the cos of an angle (given in radians) using the Taylor series shown. Your function should find the value of the cos for ANY angle (preferred) or at least angles up to 2 PI (Hint: if you …

Member Avatar for blindislands
0
548
Member Avatar for tingwong

Hi everyone, I have a little problem with my code right now. For a project, we are to create a snack machine with cookies and mints using a GUI. We are given nickels, dimes, and quarters to enter in. The problem is when I enter in 1 nickel and 6 …

0
128
Member Avatar for xikhari.some1behindu

I need help with this http://codepad.org/FNUci22s I am posting the ling of code pad because it has a way to execute it, so long story short. I use two different functions seno, sen (both for sin). When using the printf and adressing both to compare results I get from the …

Member Avatar for xikhari.some1behindu
0
264
Member Avatar for Yoink

Hi, I'm writing a simple program that runs a vending machine. I thought I had everything working fine untill I messed around with the money input some more. In my program I obviously compare money values and check to make sure the values match up exactly to buy an item. …

Member Avatar for Yoink
0
491
Member Avatar for kamran.j

hello everybody; i have a problem, i want to convert a string which is an Equation to double, in order to use each part which is seprate by + or - ; how can i do that? thanks a lot for your helps.

Member Avatar for kamran.j
0
218
Member Avatar for sangi1981

Hi all, I implemented a C program using my mac book. Now, my client wants to migrate to windows OS (MinGW). Program does many calculation using long double: on mac it works fine, otherwise on winz doesn't. I read on internet the problem is that long double type is supposed …

Member Avatar for sangi1981
0
303
Member Avatar for smith32

Hi, I'm working on a quick sort for double linked list. All work except the first item. I don't know what is wrong. Can u plz help me find the error? Here is my code. dlist_t* quick_sort(dlist_t* list) { dlnode_t *tnode = NULL, *first = NULL, *last = NULL; first …

Member Avatar for smith32
0
244
Member Avatar for iamnot

I am generating the sequence 1,3,8,22,60,.... upto 10^9 the term mod of 10^9+7; However my code is giving inaccurate answers for large value of n. The formula I am using is ((1+Q)^(n+1)-(1-Q)^(n+1))/(4*Q) Here Q is sqrt (3) Here is my code.Can someone point out the error in the code or …

Member Avatar for Ancient Dragon
0
250
Member Avatar for Nickl246

Hi, below is my code for an android app I am developing, I was wondering how I can pass the value of pos from the array adapter to another activity through intent? What I would like is for the code in the next activity to be performed based on the …

Member Avatar for peter_budo
0
602
Member Avatar for James19142

i'm making this function that replaces single slashes in a path with doubles slashes. It works for everything but slashes because I gotta use doubleslashes to specify a single slash so how do I refer to double slashes. QString AddDoubleSlashtoPath(QString Path){ QStringList splitup=Path.split("//") ;/*supposed to be a single slash*/ QString …

Member Avatar for triumphost
0
1K

The End.