64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for MadnessCow

This a program i write for practice. The problem I'm facing is inside the while statement. Is it okay to divide, in this case, the miles(which is inside the the while) with gall(outside the while). I tried to compile it and the answer given was 0.00000 P/S. This program is …

Member Avatar for MadnessCow
0
107
Member Avatar for devnar

I have tried to come up with a 2-D (4 rows and 4 columns) array which holds values from 0 to 15, with none of the values used more than once. I'm posting only the code snippet. please lemme know if the logic is correct. [CODE=C] int HIGH=16; /*(Max value …

Member Avatar for devnar
0
110
Member Avatar for smile4evr

hi... ive connected my VB to my data base with the following code.... [code=visualbasic] Private Sub Form_Load() Set CN = New ADODB.Connection cString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Desktop\DATABASE FINAL\Passport Requirements.mdb" With CN .ConnectionString = cString .CommandTimeout = 20 .CursorLocation = adUseClient .Open End With nw... i want to connect every …

Member Avatar for smile4evr
0
117
Member Avatar for daggath

Hi, I recently was trying to learn how to write DLLs and was doing ok until I ran across this interesting problem. It seems that the function is not receiving the last argument. Here is my code for the dll [code]#include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID …

Member Avatar for daggath
0
171
Member Avatar for AlSal

I'm having problems with my do/while loop. It does not take the condition and simply continues the loop indefinitely. I have: [code=c] do { printf("Choose the base of the number to convert:\n\n"); printf("2 5 8 10 16\n\n"); printf("Enter option:"); scanf("%d", &baseFrom); system("cls"); if(baseFrom != 2 || baseFrom !=5 || baseFrom …

Member Avatar for Salem
0
92
Member Avatar for nizbit

I have an input file that has call to function and arguments that are passed to that function. There might be one argument or two. A simple while loop for input will not work ex-while(inputf >> function >> arg1 >> arg2) because if a function has only one argument then …

Member Avatar for nizbit
0
233
Member Avatar for OutOfReach

Ok I'm making a program in PyQt and when I call [code=Python]os.path.join("~/", "otherdirectory")[/code] It gives me: [code=Python]File '/usr/lib/python2.5/posixpath.py', Line 62, in join: elif path == ' ' or path.endswith('/'): Attribute Error: endswith [/code] I don't know what is causing this. :S Any help would be appreciated!

Member Avatar for OutOfReach
0
289
Member Avatar for vidit_X

[URL="http://www.daniweb.com/forums/post303743-1.html"]Q.Write a program which will print all the pairs of prime numbers whose sum equals the number entered by the user. ( suggested by Aniseed ) (Intermediate) [/URL] [code=C++] #include<iostream.h> #include<conio.h> #include<math.h> int prime(int); void main() { int i,j,c1,c2,num,f1,f2; clrscr(); cout<<"Enter the number-"; cin>>num; for(i=2,j=num-2;i<=num/2;i++,j--) { f1=prime(i); if(f1) { f2=prime(j); …

Member Avatar for vidit_X
0
656
Member Avatar for jtok

I have a datetime column in a T-SQL table that I need to sort desc. However, when I do this the NULL values for that field will show up at the bottom. I need them to be at the top of the list, while still having everything else sorted in …

Member Avatar for jtok
0
216
Member Avatar for tomtetlaw

I was writing a text adventure in python and i ran into a "NameError: name 'military' is not defined" error and i need help, heres the code this is the part with the prob: [code=python] choice = raw_input("Pick your civ:") if choice == military: [/code] thnx for your time -- …

Member Avatar for tomtetlaw
0
108
Member Avatar for lonestar23

Hello, I am having problems retrieving correct values from two radio buttons in my AJAX script below. The radio button values are either a 1 or 0 and always produces 0 regardless of which button is selected. Once in AJAX, I can not have the script retreive a 1 or …

Member Avatar for essential
0
1K
Member Avatar for cwarn23

Hi and I am expanding one of my websites which requires me to write a script which has a language syntax highlighter (the gml/gamemaker language). So to do that I am using mainly preg replace and str replace. I have been working hard at it for the last 29 hours …

Member Avatar for cwarn23
0
80
Member Avatar for Tess James

can i create dynamic array variable names in php? my requirement is... i want a no: of 1-d arrays like $c1[],$c2[],$c3[]. and i need to dynamically create the arrays like this.. for($i=1;$i<$var;$i++) $c.$i[]=$r; is there any way to do this?

Member Avatar for Pado
0
171
Member Avatar for shweta797

Dear Sir I want to develop an application that will get the current market price of the stock using jsp.

Member Avatar for jwenting
0
120
Member Avatar for anderson

I am writing an application using python to display a FITS image file. I am using pythoncard to build GUI for my application.I can display image files in jpeg, .png, etc . but I am not able to dispaly FITS image in the same application...I donot understand why I am …

Member Avatar for anderson
0
277
Member Avatar for prateeknigamk

i am new in java can any one please tell me the main use of constructor if we can use method in what cases its necessary to use constuctor

Member Avatar for jaka.ramdani
0
88
Member Avatar for freelancelote

Hi, I'm learning C++ at the moment using one of Jesse Liberty's books and got to the pointers day. They ask to code a stray pointer as an exercise and give as a solution the following code: [CODE=syntax] int main() { int *pVar; *pVar = 9; return 0; }[/CODE] Could …

Member Avatar for William Hemsworth
0
243
Member Avatar for ulrik04

hey all :) I'm making a console program, and I want to do that when you run it from the terminal, you can give arguments like -debug (./program -debug). How do i get whether an argument is set or not in the code? i've tried #ifdef debug, but it didn't …

Member Avatar for ulrik04
0
280
Member Avatar for Mylena

Hi, In the code below, when I click on the link [I]Colour[/I], it needs to connect to javascript function and display "Hello" or alert message. For some reason, it does not do it. If anyone spots a mistake, pleeese let me know - I'll be here. Appreciate! [CODE] <!DOCTYPE html …

Member Avatar for Mylena
0
172
Member Avatar for Alex5248

Hi everyone, I tried to embed a video from YOUTUBE to my website with autostart. The suggested code is [code]<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/52_wba_dzKs&hl=en&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/52_wba_dzKs&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object>[/code] I modified it [code]<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/52_wba_dzKs&hl=en&fs=1&rel=0"></param> <param name="allowFullScreen" value="falce"></param> <param name="allowAutoPlay" value="true"></param> <embed src="http://www.youtube.com/v/52_wba_dzKs&hl=en&fs=1&rel=0" type="application/x-shockwave-flash" allowfullscreen="falce" allowAutoPlay=”true” …

Member Avatar for Alex5248
0
191
Member Avatar for subscribeid

Hello, i have created a HTML table dynamically using javascript and JSP, i have to store the values inside the table to database. Thanks in advance. Ananth

Member Avatar for peter_budo
0
1K
Member Avatar for ravikiran032

i would like to know how to get ipaddress using host name of my friends computer in java programming. I have tried using [COLOR="Red"]getByName(".....")[/COLOR] method ,but it is a failure. will u assist me.......

Member Avatar for Ezzaral
0
133
Member Avatar for Oreo1982

Hi, I have a web form that uses an objectdatasource to select and update the data that is displayed on a gridview. the select is working great, but the update keeps coming back with this. " ObjectDataSource 'objdsIntake' could not find a non-generic method 'UpdateCompleted' that has parameters: Completed, LName, …

0
78
Member Avatar for udaydesai

Hello Friends, i return a database connectivity like this. [code=php] function db_conn() { $mysqli = new mysqli("localhost", "root", "", "test"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error()); exit(); } return $mysqli; } [/code] with this upto now i used to insert records successfully. but now i have an problem with …

Member Avatar for udaydesai
0
343
Member Avatar for dharam_05

Hi i want need to fetch sec highest marks from given tables. my database design is like: My database design: Table 1: Student table (PK)Stud_id, Stud_name Table 2: Subject table (pk)Sub_id, Sub_name, Marks. Table 3: Stud_Sub table Stud_id, Sub_id And i come up with the query: Select Student.stud_id, Student.stud_name Max( …

Member Avatar for dharam_05
0
370
Member Avatar for Alibeg

Hi everyone.... Could anyone tell me... I have a C++ program, source and exe. And I have a txt file that acts as a database. That program reads and operates with that database and is intended to be useable on my one site. Now... what I want to know is... …

Member Avatar for Alibeg
0
86
Member Avatar for Tishiablo

Hello, Usually I can find solutions to problems that seem to arise when I'm coding for this game, but I'm stumped on why this is happening.. So I found out how to get the text from the last line of the text box on this game, and I want to …

Member Avatar for VernonDozier
0
208
Member Avatar for MVied

Hi, I've been working with PHP for about 6 or 7 years now, and recently I came across a problem that I really couldn't figure out. At my work, we have management software that has been worked on for years and years by a lot of different programmers. It is …

Member Avatar for MVied
0
222
Member Avatar for pabz_sarquilla

Hi - Can someone please help me? I have a html table generated by php mysql and have a header to download it to excel. My problem is, I have this cell/table data that displays .10 in html and when I exported it in excel it displays as 0.1. The …

Member Avatar for pabz_sarquilla
0
2K
Member Avatar for uan_Blr

Hi everyone! I have just signed in at daniweb, I hope you can help me. I am new to perl and have the following problem to solve: I have loads of files with 16 columns full of numbers. I need to 1. take column 6 and substract column 10, store …

Member Avatar for uan_Blr
0
519
Member Avatar for lukechris

I am currently writing a Poker Clock program in VB 2008. I have got everything working up until I try and type this (on a button) Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Timer1.Interval = 120000 End Sub End Class 120000 being 2 minutes, I …

Member Avatar for lukechris
0
107
Member Avatar for K?!

What's wrong about this code? ($matches is a 2 dimensional array) for($i = 0; $i < count($matches); $i++) { [INDENT]echo $matches[$i][0]->getName_team_home()."<br />";[/INDENT] } It's not the actual code, it's just an example, originally it has to put the names of a team playing home in a table. It only shows …

Member Avatar for K?!
0
96
Member Avatar for joshmo

hello. Am having a hard time intepreting this java error. The last post made somethings clear but I dont know what am missing. I am getting the error "cannot find symbol construtor Student(java.lang.String, java.lang.String,char,boolean,int,int)" Iam getting the error on this line of code [code] Student studentObj1=new Student("mark","251461",'m',false,3,5);[/code] Here is the …

Member Avatar for joshmo
0
87
Member Avatar for cellus205

Hows it going everyone. Im pretty sure theres a simple way to do this, but cant figure it out right now. Im still relatively new to vb .net, and have a function that reads a csv file into a datatable and fills a datagrid. But what I want to do …

Member Avatar for cellus205
0
1K
Member Avatar for amrith92

hey, This might be naive, but how come this bit of code isn't working??? [CODE] int lc=0; read.open(filename_user.c_str(), ios::in); while(getline(read, linecount, '\n')) { ++lc; }[/CODE] Have looked through the internet, and this code seems to be fine, so what is it that makes it not work?? the output is always …

Member Avatar for amrith92
1
211
Member Avatar for miepmuts

I am relatively new to XSLT, but I have a problem which seems very strange to me and I hope you will be able to help me out. I have an xml file which contains information about the x and y sizes of sheets in a document and x and …

Member Avatar for miepmuts
0
145
Member Avatar for SIDE

Hi I've used Access to model a new database that now needs to be created in SQL Server Express. Wow - that's alot of data types! Can someone tell me what the SQL version of the Access Memo data type is? Thanks _________________ [url=http://www.freefixit.net/monitoring-parental-control-software-advice/]Parental control software[/url] [url=http://www.loans.cc]free parental control software[/url]

Member Avatar for hollystyles
0
205
Member Avatar for Kadence

I have a class that has functions which use <stdio.h> and <stdarg.h> to take in indefinite arguments, and one of the member functions taking in filenames. There's another function (call it the "do" function) where I want to read from ifstreams created from those indefinite number of filenames. I can …

Member Avatar for Kadence
0
820
Member Avatar for raul15791

I have this problem. This program runs well except that it skip the value of the first item in list. I think it is because of the cin.ignore(). But if I don't use the cin.ignore(). The cin will only read the first input and none after that. Help? [CODE=cplusplus] #include …

Member Avatar for raul15791
0
118
Member Avatar for mattdahack

Hi there all, I am brand new to php (3 days under my belt). I am trying to modify a webmail.php script that came on this cd that I got with the learning php book. I am having difficulty getting the new fields I added to work. I am getting …

Member Avatar for langsor
0
142
Member Avatar for reaven

[code=c#]StreamReader reader = File.OpenText("mystations.txt"); string line = reader.ReadLine(); while (line != null) { // string[] stationtxt = line.Split('\t'); string name = line.Split('\t')[0]; string url = line.Split('\t')[1]; string desc = line.Split('\t')[2]; Image img = Image.FromFile("c:/pictures/"+ name + ".jpg"); line = reader.ReadLine(); dgLogo.Image = new Bitmap(img); dataGridView1.Rows.Add(name, url, desc, img); //(stationtxt); } …

Member Avatar for reaven
0
404
Member Avatar for retareed

I need to display a dropdown list of hospitals several times (10) in one form and I'm not sure of the best way to go about this. I can get the first list to display, but the subsequent lists just show "Select". This is my code: [code]<td width=\"200\"><select name=\"hospital1\"> <option …

Member Avatar for langsor
0
324
Member Avatar for ramseswar

i want to create a table in sql database using php code. if i try to use the sql command(given below) in my php source code [code]"CREATE TABLE new_table( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, id1 VARCHAR(55) NOT NULL id2 VARCHAR(32) NOT NULL, id3 CHAR, PRIMARY KEY(id));"[/code] i get syntax …

Member Avatar for langsor
0
132
Member Avatar for dexter1984

Part of the code from the program I'm having trouble with. The deletion of array element for this doesn't work properly. Can anyone tell me why? I can't spot any mistakes though zzz, [CODE=cpp]cin.ignore(); delStudentCounter = 0; cout << "Please enter ID to delete student: "; cin.getline(delStudent, 50); for (int …

Member Avatar for Salem
0
101
Member Avatar for maydhyam

Hi All, Could you help/guide me accordingly please...My intentions with this piece of code is for the relevant image to display with the respective user...my problem is that it doesn't work for the second user type (SysAdmin), it only works for 'Admin'... [CODE=php] <tr> <td width="255"> <? if($arr[6] != 'Admin' …

Member Avatar for maydhyam
0
105
Member Avatar for Jennifer84

There is one detailproblem that always occurs when I read text from a file and then putting this text to a multilined richTextBox. What happens is that the text begins on Row number 2 in the textbox and not on the top(Row 1). It seems that a linecharacter perheps is …

Member Avatar for Jennifer84
0
80
Member Avatar for Kob0724

I've been trying to compile a program I wrote with QT on a Mac for about a week now and I can't get it to work for the life of me. I'm very confused because the code compiles just fine on a linux machine using a core 2 duo, and …

Member Avatar for kmote
0
254
Member Avatar for Gabums

I am going to apologize off the bat for posting an email form question when there are sooooo many others... but honestly, i looked at them all before i wrote this. I have a form that contains a place to type in 'name', 'subject', 'message', and 'email'. When ever the …

Member Avatar for Gabums
0
132
Member Avatar for J-son

The following program is to produce the sum of Even and Odd array element. The program works properly when I use int instead of double. But getting errors when using double. Could anyone tell me what is the problem? Cus I wan it by using double array. and I don't …

Member Avatar for J-son
0
92
Member Avatar for Coyboss

I am working on a simple "test 123" java program for a RoboJDE robot. I keep getting a semantic error when I compile. The error reads ***semantic error: "private" is not a valid modifier for al ocal variable*** ***semantic error: "staict" is not a valid modifier for a local variable*** …

Member Avatar for Coyboss
0
277

The End.