199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for DJPlayer

ok I'm taking a text file.. 16 lines.. 6 character values per line and trying to randomly get one character per each line.. and place them into a 2d array (4x4). The values i'm getting aren't correct for some reason.. anyone have any helpful tips? [CODE] int main() { srand …

Member Avatar for WaltP
0
243
Member Avatar for abhimanipal

Hi All, Today I came across a peculiar piece of code. [code] int main(int argc, char* argv[]) { printf("%lf\n",(0.99-0.90-0.09)); } [/code] According to me the output for this code should be 0, but to my surprise when I ran this code the answer that I got was -0.000. I cannot …

Member Avatar for abhimanipal
0
99
Member Avatar for dmotah

hi, tkx to welcome me in here! i have wrttien a program in vb6 that uses ms access. the program is a attendance monitoring system, that uses the time to calculates hrs late and early of employees. im having problem i dnt know how to make validations in vb6 ex: …

Member Avatar for daniel2829
0
75
Member Avatar for network18

Hi, I am customizing jquery scrollshow, it can be found originally [URL="http://flesler.blogspot.com/search/label/jQuery.ScrollShow"]here[/URL] As you can see in the original script there are only images which scroll, now I have the description to show below each image which should also scroll as the images scroll. This description will include - 1. …

Member Avatar for network18
0
148
Member Avatar for Hawkeye Python

Incomplete dice game function, dunno why does'nt works... If you're not using windows, change the dir. "C:/" [CODE] def bet(Bet): try: f = open('C:/money.txt') print f money = f.readline() f.close() print ('You have', money, 'Dollars. Wanna play dice(y/n)?') v = raw_input() if v == 'y': # here i'm printing those …

Member Avatar for The_Kernel
0
175
Member Avatar for iamsmooth

I want to be able to ensure that my print is exactly as expected, so I'm wondering if there's some kind of function in java or junit that will catch what system.out.print uses so I can perform some assertions on it. Thanks for your help.

Member Avatar for jwenting
0
1K
Member Avatar for eldhoksuresh

[B][/B]every time i create a file in java a window opens with created file in it... how to avoid this.... pls help

Member Avatar for jwenting
0
73
Member Avatar for Grn Xtrm

Hello. I'm trying to write a program that will convert a user input infix expression into its postfix form. My current code is allowing the user to input a string, but it does nothing with the string. I'm fairly new to JAVA, thus I think I'm making a simple mistake …

Member Avatar for cymercutie88
0
1K
Member Avatar for csfriends

hi, 1.can anyone tell about how artificial passenger is better than other gadgets? justification. 2.if it can be disabled, how do v do dat? then what is the use of such device?driver may disable the device and in dat case its of no use right? 3.is it embedded one? or …

Member Avatar for Salem
0
384
Member Avatar for Risk24

Hey everyone, I have no experience with writing programs. This is my first program and I'm sort of "winging it". I have a problem converting from fahrenheit to celsius, I can convert from celsius to fahrenheit fine though. The bolded part is where I'm having troubles. Here is what I've …

Member Avatar for endsamsara
0
194
Member Avatar for tformed

Hello, I am a new member to this forum. I have some announcements, I will continue to read some more. I need to create a program were the user inputs a number, program displays the cube root for that number. The code I got thusfar is: [CODE][COLOR=#0000ff] #include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h> [/COLOR][COLOR=#0000ff]#include[/COLOR][COLOR=#000000] …

Member Avatar for NathanOliver
0
697
Member Avatar for marcmm

I've got a simple question: how can I make an onclick return confirm event work inside PHP tags. [code] <HTML> <BODY> <a href="delete.php" OnClick="return confirm('blah blah');"> Click here </a> <?PHP ECHO "<a href='delete.php' OnClick='return confirm('blah blah');'> Click here </a>"; ?> </BODY> </HTML> [/code] the first link is a simple html …

Member Avatar for akmotta
0
14K
Member Avatar for Slacked

Hi, I'm trying to create a pretty basic fancy string output, [CODE] #include <iostream> #include <cstring> #include <stdlib.h> using namespace std; int main() { char output[] = "Hello there world"; int len = strlen(output); for (int i = 0; i < len; i++) { cout << output[i]; system("sleep 0.1"); } …

Member Avatar for Slacked
0
158
Member Avatar for peck3277

Hi guys I'm having sometrouble here! Please help if you can! I'm storing in a mysql database the price of some products. I am storing them in cents ie. €5.99 = 599. I have the following code that will output just that: [CODE]<?php $x='599'; $num = $x; $last_num = strlen($num) …

Member Avatar for darkagn
0
124
Member Avatar for PDB1982

I'm trying to find a set of random numbers between 1 and 365, so I tried to use: [code]DayOfBirth = rand() % 365 + 1;[/code] But, I've been told that srand() will produce a better random number, is this true? How do I use it for this instance?

Member Avatar for mrnutty
0
459
Member Avatar for jangozo

Hello, I'm trying to make my code work with -Wall -Werror flags but I get the above error (error: array subscript has type char). Here is the code, which works if these flags are not set. The code is meant to check whether the first character from text is blank …

Member Avatar for jangozo
0
420
Member Avatar for darktangent

I am implementing a popup with javascript which fire when the page is closed . I am using the unload() page handler. The problem is that the popup does not stays ... it popups for a while but then the new page loads. I want it to stay there until …

Member Avatar for almostbob
0
394
Member Avatar for tryphy

Hi every1, I am new to php... From the image that i have attached you can see what i basically need... In view users.php v can see who r all the users.. and clicking on that particular user,.it has to display that particular users details. eg: when we click user1 …

Member Avatar for fobos
0
2K
Member Avatar for ELBUF

Hey guys, Just wondering if someone can help me out with this. I want to read in a text file (team.txt) and have it implemented into the rest of my code. My program will read in from the file, the number of players and their heights and print out some …

Member Avatar for vmanes
0
137
Member Avatar for Hawkeye Python

Well, I'm a begginer in Python coding, and at DaniWeb. My problem is: I can't open any files! I tried: [CODE] >>> f = open('C:\teste.txt', 'w') Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> f = open('C:\teste.txt', 'w') IOError: [Errno 22] invalid mode ('w') or filename: 'C:\teste.txt'[/CODE] …

Member Avatar for Hawkeye Python
0
4K
Member Avatar for Kitten84

I have this website with a login and a password recovery link. When I click the "forgot my password" link it takes me to a page which asks for username and security question answer. When I fill it out and hit submit. I am taken to a page that tells …

Member Avatar for Kitten84
0
241
Member Avatar for Saba9

[CODE]select distinct cust.no, cust.branch, cust.name, cust.surname, term.benefit, term.code,tehi.trcode, tehi.trancode, dmhi.trancode, dmd.benefit from cust as cust inner join term as term on cust.rowno = term.rowno_custterm_cust inner join tehi as tehi on term.rowno =tehi.rowno_termtehi_term inner join dmd as dmd on cust.rowno =dmd.rowno_custdmd_cust inner join dmhi as dmhi on dmd.rowno =dmhi.rowno_dmddmhi_dmd group by …

Member Avatar for jbisono
0
105
Member Avatar for sidlampard

hi can anyone help me with checkbox binding in c# to sql database if data is in bit format and to retrieve the same from database

Member Avatar for sidlampard
0
111
Member Avatar for ushur

Lemme just start by saying i know nothing about js or pretty much anything else. I've been playing this online browser based game and it's cool and all but it has this tiny chat window. Is it possible to make the thing bigger? Before i start to learn how to …

Member Avatar for samaru
0
98
Member Avatar for swolll

allPlaylists is a vector of type Playlist. listSongs is a vector of type *Songs. [code] //Loop that goes through each element in the playlist vector. for(int k = 0; k < allPlaylists.size(); k++) { // loop that goes through each song within the Playlist vector element. listSongs is a vector …

Member Avatar for swolll
0
258
Member Avatar for MansonASP

My first post ever anywhere! :) As a novice I may be asking a stupid question here. Although arraysize exists, postcode array doesn't when I try to work with it in the addToArray method (and yes I know there are some other issues but I'll sort those later): [CODE]namespace Postcodes …

Member Avatar for MansonASP
0
249
Member Avatar for mr.romero99

Hi all, I am newbie at Pascal programming and I need help getting started on one of my assignments. I am totally lost on where to begin. This is what my professor gave us to start: Implement a menu based program with the following array-based list functions: * ADD (at …

Member Avatar for mr.romero99
0
101
Member Avatar for invisi

Well I wrote this programme, hoping what I wrote is a lenear sorting algorithm if it's not pls tell me :-O [CODE] #include <iostream> #include <string> using namespace std; int main() { int a[10]; int num = 0; int number = 0; cout << "Enter 10 int..." << endl; for …

Member Avatar for Narue
0
127
Member Avatar for vermont

Please I am having challenges to write a code with notepad and then run it with IDLE 2.6 particularly when importing modules like turtle. Here is an example: here is python code : [code=python] # Programme pour dessiner une série de triangles équilatéraux de différentes couleurs en différent endroit. from …

Member Avatar for vegaseat
0
1K
Member Avatar for LTT

Hi all... Im having some trouble inserting values to my mySQL database. I have the following installed on my local system. [B]MySQL[/B] Server: localhost via TCP/IP Server version: 5.1.43-community Protocol version: 10 User: root@localhost MySQL charset: UTF-8 Unicode (utf8) [B]Web server[/B] Apache/2.2.14 (Win32) PHP/5.2.12 MySQL client version: 5.0.51a PHP extension: …

Member Avatar for mwasif
0
228
Member Avatar for Orusaka

Okay, so I have a program that read integers from a file and stores them in an array. The relevant code: [code] readLevel.open("level.txt"); if((readLevel.is_open())) { for(int rows = 0;rows<=BLOCKROWS-1;rows++) { for(int cols = 0;cols<=BLOCKCOLUMS-1;cols++) { blocks[rows][cols] = readLevel.get(); } } } [/code] However, here's the trouble. Instead of reading the …

Member Avatar for WaltP
0
95
Member Avatar for persianprez

I'm trying to make the code able to post in here [url]http://spreadsheets.google.com/embeddedform?formkey=dEtSUVAtQVAtUVN1WDFPU3BEbm9yNkE6MA[/url] I've been successful in getting to read from the spreadsheet. With this code if you're wondering: [CODE] import urllib opener = urllib.FancyURLopener({}) f = opener.open("urlhere") print f.read() [/CODE]

Member Avatar for persianprez
0
172
Member Avatar for rwill357

Hello having some issues with my logic. I have to write a function that determines whether a given string is palindrome. I have to use multiple stacks for implementation. I have began coding and it compiles however it is not working correctly. I think the problem is within my while …

Member Avatar for dusktreader
0
112
Member Avatar for iou

How do you make something happen everytime the program runs? [code] Dim CloseValue As String = Space(255) Win32.GetPrivateProfileString("Close", "value", "Default", CloseValue, 255, "C:/UserData.ini") [/code] I need that to execute, I've tried Public Sub Form_Load() Public Sub Form_Initialize() Public Sub Form_Active() None works, I've tested with MsgBox("HELLO") to see if that …

Member Avatar for iou
0
89
Member Avatar for akamini

Hi This is my first time posting after daniweb has helped me alot but I couldn't find a solution for this so I thought hey why not ask. Basically I would like to have an sql statement which selects all the bookings from a table in microsoft access callled tblBookings …

Member Avatar for akamini
0
194
Member Avatar for Fbody

A couple days ago, I was involved in [URL="http://www.daniweb.com/forums/thread258996.html"]this thread[/URL] which concerns bit shifting (kind of) and a solution was found (by someone else). The problem is, something about the solution never really sat right with me. Hopefully someone can clarify this for me. [B]Code:[/B] The code uses 1 constant …

Member Avatar for Fbody
0
164
Member Avatar for eldhoksuresh

in netbeans 6.7 i'm trying to create a text file,say man.txt using code "file fr=new file("man.txt").. code executed fine..but i can't see the file man.txt anywhere where the file is created..pls help me

Member Avatar for eldhoksuresh
0
85
Member Avatar for whiteyoh

Hi all, Can anybody advise on how i can best use php and mysql to give a database record an "age" in days? Im recording record creation via timestamp at the minute Cheers Paul

Member Avatar for vharuna
0
100
Member Avatar for tzushky

hello, Here's a simple question I want to clear up. We all know that we can use the name of an array as the pointer to that array, and that a pointer holds the address to the variable named. What I'm doing is this [CODE] //somwhere in the code uint8_t …

Member Avatar for Narue
0
3K
Member Avatar for jmercola

I am trying to use PHP in an HTML page to change Login to Logout and reference my login page. Instead of printing 'Login' and 'Logout' I get the following: Logout" ; } else { echo" Login" ; } ?> The IF function seems to get confused and starts echoing …

Member Avatar for vaultdweller123
0
140
Member Avatar for AdamE34

I'm a relative beginner, taking a c++ class, and I'm trying to output this stream of numbers to a .txt file. I'm having no problem actually getting them into the file, but I can't figure out how to get the numbers to line up in columns or rows instead of …

Member Avatar for AdamE34
0
141
Member Avatar for blueguy777

I'm working on MLM script i.e. Auto filling nodes, how to display empty tree node images and replace them with filled images by fetching matching record using PHP Mysql. Please refer to the following screen shot. [url=http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/bb2140a87c.jpg[/img][/url] thanks in advance

Member Avatar for blueguy777
0
160
Member Avatar for janbryan

i am a 1st yr computer science student in the Philippines. In our "Data Structure" subject, we are given a project/ research on the Banking System in the Philippines. can anyone give me some hints regarding this very difficult research of ours? banks are very secretive regarding their infos on …

Member Avatar for janbryan
0
113
Member Avatar for rajeesh_rsn

Hai, I need to refresh a page "ONLY ONCE" if a visitor visit. I want to do this because if a visitor hit back button in their browser then i need to display fresh content not from the browser cache.. Please help Thanks Rajeesh

Member Avatar for Graphix
0
99
Member Avatar for jemz

hello can i delete my thread so that it can't be found in the google?because all my thread can be search in google..hoping for your positive responds

Member Avatar for jemz
0
90
Member Avatar for scias23

i have supertype-subtype: supertype: document subtype: clearance, sedula this query: [CODE=mssql] SELECT Document.DocNo, (Person.Givenname + SPACE(1) + Person.Middlename + SPACE(1) + Person.Lastname) AS Name, Person.Address, CASE WHEN DATEADD(YEAR, DATEDIFF (YEAR, Person.DOB, CURRENT_TIMESTAMP), Person.DOB) > CURRENT_TIMESTAMP THEN DATEDIFF(YEAR, Person.DOB, CURRENT_TIMESTAMP) - 1 ELSE DATEDIFF(YEAR, Person.DOB, CURRENT_TIMESTAMP) END AS 'Age', Person.Status, Person.Picture, …

Member Avatar for jbisono
0
161
Member Avatar for vamsicoolman

please help me how to check the validity of the json object if suppose the example of the JSON is as ({type:'AAU', msgid:1265033798233, sel:0, gadinfo:[{ adid:316,adprt:40.0,dur:10,ef:'2009/06/03 10:00:00',et:'2012/06/03 12:00:00',imgfurl:'vaccumcleaner_h.jpg' }]}) SO I want a script in python which would give me the validity of the object as the output by taking …

Member Avatar for vegaseat
0
183
Member Avatar for nimmyliji

Hi, I am new to Python programming... I have a .txt file....... It looks like.. 0,Salary,14000 0,Bonus,5000 0,gift,6000 I want to to replace the first '0' value to '1' in each line. How can I do this? Any one can help me.... With sample code.. Thanks in advance. Nimmyliji

Member Avatar for vegaseat
0
130
Member Avatar for scias23

i have a supertype-subtype: supertype: DOCUMENT subtypes: CLEARANCE, TAX CERTIFICATE, RECEIPT, BUSINESS CLEARANCE each clearance subtype may have a TAX CERTIFICATE, how could i join using join? in other words, document>clearance document>tax certificate i want to join document>clearance and document>tax certificate into a SINGLE view help. thanks

Member Avatar for jbisono
0
230
Member Avatar for vesnushka

Hi everyone!! Help me please with my script. I'm using Perl Express for scripting in . This is my script: [CODE]use warnings; use strict; open (file,'C:\Documents and Settings\soea\Desktop\Test.docx') || die "Can not open: $!\n"; @file = <file>; for (my $i = 0; $i<=scalar(@file)-1; $i++;) { if ($f[@file] =~ /^Exec.+\n/) { …

Member Avatar for vesnushka
0
319

The End.