64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for top123

hi...i am worjig on project to display numbers entered by user..and display it in random order....i use devcpp.. and here is the code..it does compile but is not working properly..can anyone help me plz as quickly as possible..this is due within 4 days... [CODE]#include<iostream> using namespace std; int main(){ int …

Member Avatar for top123
0
120
Member Avatar for Sunny89

Write a Java program that will generate random four letter words. The words must consist of only lower case letters. The program will prompt the user to enter the number of words to generate. The program should request that the user enter a number between 1 and 500 and ensure …

Member Avatar for peter_budo
0
814
Member Avatar for leppapuu

Hi! I have a program with two QSpinBoxes with integers in them. When user clicks one spinbox it should affect to the other one. And vice versa. I can't use valueChanged() signal because it causes an endless loop that won't stop until the maximum values of the boxes have been …

Member Avatar for leaffan
0
1K
Member Avatar for phid2002

Can someone take a look at the code to see where is the mistake because i can't display the 10 records of my database per page [CODE] <% Option Explicit ' ADO constants used in this page Const adOpenForwardOnly = 0 Const adLockReadOnly = 1 Const adCmdTableDirect = &H0200 Const …

Member Avatar for phid2002
0
121
Member Avatar for JohnnyT

Hi all, I'm just learning C# and completed a book exercise. They had a different answer and I'm not sure the difference between the two. The way I did a method was like this: [CODE]public int ShiftsLeft { return shiftsToWork - shiftsWorked; }[/CODE] However, when I looked at the book …

Member Avatar for JohnnyT
0
132
Member Avatar for newbiecoder

I want my code to take two characters and print them, but this code only takes one character, prints it and terminates, can you please tell me what's wrong with it? Thank you. [code=syntax] #include <stdio.h> int main() { char a, b; scanf("%c", &a); scanf("%c", &b); printf("%c %c\n", a,b); return …

Member Avatar for newbiecoder
0
257
Member Avatar for bunnyboy

So today at school I was given a task to create an application to apply convolution over image. I decided to load convolution cores from xml file. But, as this was the first time me working with xml I have no knowledge how to effective parse it. So here is …

Member Avatar for bunnyboy
1
105
Member Avatar for whiteyoh

Hi All, Below are two files, one being the index page, and one being the functions page. My problem is when i use a function it just gives me a blank screen. The echo at the top of the index page is simply a sanity check. Do i have an …

Member Avatar for whiteyoh
0
87
Member Avatar for PierlucSS

Is it possible to somehow compare a value to a range of value without using for/foreach. [CODE]IEnumerable<XElement> results = xdoc.Descendants( "PAGE" ).Where( p => p.Attribute( "id" ).Value == RANGE_OF_ID).Select(result => result);[/CODE] Is there anyway of doing what I wrote below? RANGE_OF_ID could be a collection.

Member Avatar for PierlucSS
1
142
Member Avatar for akabir77

I am very new to this and trying to call a method which will update the record depending on the check box user clicks. now my jsp looks like this [CODE] <input TYPE="checkbox" name="<%=as.getAppId()%>" id="<%=as.getAppId()%>" <%=((as.isStatus()==true)?"CHECKED":"")%> onClick="update('<%=as.getAppId()%>')" /> [/CODE] and the scripts [CODE] function update(appId) { var stat = eval("document.getElementById(appId)"); …

Member Avatar for akabir77
0
70
Member Avatar for alvalany

hi friends, From many days I wanted to create some application in Windows. Now which IDE would be better (I am also a bit confused with the term IDE ) Turbo c or Borland C++ bulder or Visual c Whatz the difference between these things?? Please someone clear my confusion. …

Member Avatar for Ancient Dragon
0
971
Member Avatar for bornwith

I am trying to teach myself C#. I was working on an example when I came across something of interest (to me anyway), and none of my resource material explains why this happens. Can some one explain why this happens. The code below works as it should [CODE] //calc test …

Member Avatar for apegram
0
127
Member Avatar for thebluestar

Account.java [CODE=java] package btclass; import java.util.Scanner; public class Account { private float amount;//actual amount private static float balance;//balance amout Scanner keyboard = new Scanner(System.in); public void deposit() { System.out.println("Enter the amount you want to deposit: "); float depos = keyboard.nextFloat(); if (depos < 0) { System.out.println("Amount you entered is < …

Member Avatar for javaAddict
0
158
Member Avatar for kiyu2keith

How do I exchange data from page to page? for example: on the 1st page I voted for 1 person, when I click submit it will go to the 2nd page that will let you see the output of the vote? I can't seem to do it, as I don't …

Member Avatar for peter_budo
0
170
Member Avatar for lagspike

I have a program which connects to a remote MySQL Server. When i try running the program on other PCs (ones with nothing more than the .NET Framework) I tried using ODBC, which would run the program, but not be able to connect to the database because of the lack …

Member Avatar for lagspike
0
222
Member Avatar for WoW Me Web Girl

im building a clone youtube site and the templates have smarty code every-time i try to add a style to it or even change the bg color of the template i get this error. could someone show me an example on what im supposed to do. and how it should …

Member Avatar for WoW Me Web Girl
0
375K
Member Avatar for pythonNerd159

hey all. i need some help with my calculator and i was wondering if anyone knew how to make it so if you click on a button it would pop up the value of that button in the entry screen. [CODE]## -*- coding: utf-8 -*- ## SDD, Major Project, Extreme …

Member Avatar for Alq Veers
-1
292
Member Avatar for akssps011

The following code when compiled gives the error: "i[B]nvalid conversion from `void*' to `f*' "[/B] What is wrong with it ? [CODE] typedef struct a { int* value; struct a* p; int r; }f; f* m(int* value) { f* node = malloc(sizeof(f)); node->value = value; node->p = NULL; node->r = …

Member Avatar for akssps011
0
113
Member Avatar for cwarn23

I have been designing a security system to stop bots from spamming my forum. Basically, it will check if there is any isp name detected from the ip address then if there is no detected isp, the submitted post will not be made. I know to detect the ip address, …

Member Avatar for kvprajapati
0
2K
Member Avatar for niths

---Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\Program Files\Apache Group\Apache2\htdocs\Project\login.php on line 72---- <html> <body> <form action="login.php" method="post"> <div> <table width="100%"> <tr> <td><img src="Logofinalcopy.gif"></td> </tr> <tr> <td bgcolor="aqua"><h2>Login</h2></td> </tr></table> <table align="right" style="width:40%"> <br> <tr> <td>Username:</td> <td><input type="text" name="username"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="password"></td> </tr> …

Member Avatar for as.bhanuprakash
0
326
Member Avatar for sirko

Hi! Does anybody know how to write a Pascal app that would remove blank lines from a text file. function RemoveBlankLines(OldFile: string): string; var fi,fo: Text; s,NewFile: string; n: integer; begin result:=EmptyStr; if FileExists(OldFile) then begin //rename old file .bak, n:=Length(OldFile); while (n>1) and (OldFile[n]<>'.') do Dec(n); n:=Length(OldFile)-n; NewFile:=Copy(OldFile,1,Length(OldFile)-n)+'bak'; RenameFile(OldFile,NewFile); …

Member Avatar for FlamingClaw
0
266
Member Avatar for ubi_ct83

i have this code: [code] int main(int argc, char* argv[]) { remove(debug_file); count=0;//count d number of seeding for (int i = 1; i < argc; i++) { /* Check for a switch (leading "-") */ if (argv[i][0] == '-') { /* Use the next character to decide what to do. …

Member Avatar for ubi_ct83
0
121
Member Avatar for student02

Hi guys.. Im still working on my project, it is a payment and enrollment system. Ive been thinking what to do with the Student ID since it requires a format like xx-xxxx, its possible that ill make two fields right? i mean the first xx on xx-xxxx to make it …

Member Avatar for cid777
0
294
Member Avatar for dondajr

Hi guys o/ ! I'm trying to make a program that write in text file some datas. Then, i wrote a header that have all functions I need to write in this file. thas is my header: [CODE] #ifndef _SNAPSHOT_H #define _SNAPSHOT_H #define LAST_PRICE 0; #define BEST_ASK 1; #define BEST_BID …

Member Avatar for jephthah
0
152
Member Avatar for SoulMazer

Hi, so I've been programming with Python (2.x) for a while now, and I was wondering about what people thought of 3.x. From just a few quick searches, some people recommend that people get used to it quickly as it is the future, and others say to just stay with …

Member Avatar for SoulMazer
0
159
Member Avatar for smeghead007

My problem is that when i run the program i ask the user to select a month from a menu then input a year. I then calulate the first day and janaury for that year. Then i have to find the first day of the month the user selected but …

Member Avatar for smeghead007
0
142
Member Avatar for sjn21682

hi everyone, im having a hard time with my loop, what i want to do is to print f1, f2, f2,f2... till it finishes to read, then f1, f2, f2... , whats happening to my output is f1,f2, f2..., then f1, f1 till end, i want to ask, how will …

Member Avatar for kvprajapati
0
212
Member Avatar for Encrypted

I'm trying to write a program for class and I can't get my fractional exponent to work. I've tried using 2/3 2.0/3.0 and I've tried entering 2/3 into a separate variable, but nothing seems to work. I don't get any errors while building 2/3 but the logic does not come …

Member Avatar for MosaicFuneral
0
392
Member Avatar for Syphilis

What's Up? OK, So this has been driving me crazy over the last few weeks, All I need to do is edit a file so that it runs without showing any windows (I.E Runs in background) The window is created by means of Delphi, (So WS_EX_TOOLWINDOW Won't work) The only …

Member Avatar for MosaicFuneral
0
160
Member Avatar for litchi

Hi :) I was hoping someone could point me in the right direction to create a grid of clickable objects/images/shapes. My problem is this, I have to create a grid of 100+ characters that, when you click on one, appends a JTextArea with a specific, different, character. The only idea …

Member Avatar for litchi
0
1K
Member Avatar for Randomnoize

Hi all - This is kicking my butt. I have searched everywhere I can think of and have tried the various solutions to no avail. First I am connecting to two databases on the same instance of mySQL using : [code=php] $conn2 = mysql_connect ( "XXX.XX.XX.13", "User1", "PWord1",true) or die("Could …

Member Avatar for Randomnoize
1
161
Member Avatar for skerdzius

Hello, i've been learning java for a few months now, but i woulld also like to try c++. I tried rewriting one of my exercises in c++, but i cant seem to get objects working. These lines all prodduce errors. Cylinder outer(5,5); Cylinder inner(4,4); cout << "\n" << outer.volume() << …

Member Avatar for skerdzius
1
339
Member Avatar for Katana24

Considering no one seems to be-able to answer my other thread I'll try simplifying this one. I have created GUI frame which contains a menubar at the top. I have several methods as well as a method which paints 5 circles onto the frame. When I call that method, by …

Member Avatar for BestJewSinceJC
0
80
Member Avatar for emilo35

Okay, this might become a monstous post, and I apologize for that. I recently switched from programming Java to C++ like a week ago, and can't seem to get all the pointers right it seems. Maybe all code provided in this post might seem a little overkill for the size …

Member Avatar for emilo35
0
186
Member Avatar for larrywjr

Hi, I am new to Python. I have written a routine and am trying to compile the code for distribution. I went to [URL="http://sourceforge.net/projects/py2exe/files/"]http://sourceforge.net/projects/py2exe/files/[/URL] and downloaded the file py2exe-0.6.9.win32-py2.6.exe. I am running Python 2.6 on a Win-XP Pro OS. I assume this file is a self-extracting exe. The trouble is …

Member Avatar for jcao219
0
245
Member Avatar for Mathhax0r

Is it possible to have a function run at the beginning of every function of a class without explicitly writing it? I'm going to have a class with 20 or so methods, and though I can just copy and paste, I was wondering if there was an easier way to …

Member Avatar for jcao219
0
11K
Member Avatar for sanchow

Hello, I have a huge file with the following kind of lines: A,B,C 1,2,3 D,E 4,5 What is efficient way to split and get the following output using python? A 1 B 1 C 1 A 2 B 2 C 2 A 3 B 3 C 3 D 4 D …

Member Avatar for sanchow
0
117
Member Avatar for soUPERMan

Im getting errors with this, please advice me on what to do: [CODE]def displayHappy(): numLimit = input("Enter a positive integer: ") countHappy = 0 countUnhappy = 0 liHappy = [] for num in range(1, numLimit + 1): inNum = num while inNum != 1 and inNum != 4: inNum = …

Member Avatar for soUPERMan
0
167
Member Avatar for Aaron Robinson

I am trying to create a sidebar menu which when categories are clicked, they expand and show items under each category. My website is structured so that an index.php is used to include 3 other php files: header, body and footer. The body is a php file that changes based …

Member Avatar for Aaron Robinson
0
202
Member Avatar for Acute

How can i move the Rectangle on the form and animate it as it moves? If i want to move it for example to the right, i must increase it's X cordinate, right? I did it (++x) and drawed a new rectangle and overdrawed the old one with background color. …

Member Avatar for ddanbe
0
719
Member Avatar for angelicakirana

Hello, i'am newbie. I don't know about programming language,in each language, i only know "hello world". Javascript is spend more expensive bandhwidth. Especially for Limited Account of hosting. Is it possible to convert javascript to php or html ???

Member Avatar for angelicakirana
0
3K
Member Avatar for farsen

Hi. In lack of better examples, I´ve found this javascript example which shows and hides content in a sliding way. Exactly what need. You can see the example here: [URL="http://www.dhtmlgoodies.com/index.html?whichScript=show_hide_content_slide"]http://www.dhtmlgoodies.com/index.html?whichScript=show_hide_content_slide[/URL] And the demo here: [URL="http://www.dhtmlgoodies.com/scripts/show-hide-content-slide/show-hide-content-slide.html"]http://www.dhtmlgoodies.com/scripts/show-hide-content-slide/show-hide-content-slide.html[/URL] Problem is, because of my text and image layout, I want the hide/reveal text to …

0
144
Member Avatar for dreinzy

Hello folks, I'm getting the error message "Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/login.php on line 9". I've been at it for hours and my eyes are starting to bleed, I would greatly appreciate a code-weary traveller could spot my mistake. Here's the first 10 lines of my page. …

Member Avatar for dreinzy
0
2K
Member Avatar for serkan sendur
Member Avatar for sarfrazashfaq

Hi there I am translating PERL code into python and i am new on both language.I have one question if we have hash key reference in PERL like this way $a->{b} how we can traslate it into PYTHON? and if we have this code $a->{$b} , how we translate it …

Member Avatar for sarfrazashfaq
0
179
Member Avatar for cwarn23

Hi and I have a mysql table that gets a few million records inserted per day and it seems to get corrupted very often. The current database structure is myisam but it keeps on getting corrupted. Are there any mysql data structures that won't corrupt even when restarting the mysql …

Member Avatar for cwarn23
0
112
Member Avatar for phoenix_dwarf

I'm trying to test out the Ajax multihandleslider control but the control dos not show up on the screen. Only an empty text box. Am i doing something wrong? This is everything... [CODE] <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true" /> <div> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <table> …

Member Avatar for phoenix_dwarf
0
126
Member Avatar for abebosco

[CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> #define TRUE 1 #define FALSE 0 #define BUFFER_LEN 240 #define NUM_P 50 void str_sort (char *[], int); int main () { char *s[NUM_P]; int count; printf("Enter the number of count:"); scanf("%d",&count); int i = 0; printf("enter the first string:"); scanf("%s",&s[0]); printf("enter the second string:"); …

Member Avatar for abebosco
0
122
Member Avatar for CreativeCoding

So I have looked and looked and wasn't able to find how to retrieve text from a selected option in a combobox. I have just started visual c++ so I don't really understand a lot. But I used to work with Visual C# before. So, is there any way? [CODE]if(comboboxslectedvaluethingy …

Member Avatar for CreativeCoding
0
164
Member Avatar for phoenix911

I have no idea whats wrong here, i am fairly new to java.. heres my code.... [CODE] private JPanel pnlLogin, pnlFinalLogin,pnlUser, pnlPass = new JPanel(new BorderLayout()); btnLogin = new JButton("Login"); lblUser = new JLabel("Username:"); lblPass = new JLabel("Password:"); pnlUser.add(lblUser, BorderLayout.WEST); //pnlUser.add(txtUser); pnlPass.add(lblPass, BorderLayout.WEST); //pnlPass.add(txtPass); pnlLogin.add(pnlUser, BorderLayout.WEST); pnlLogin.add(pnlPass, BorderLayout.CENTER); pnlLogin.add(btnLogin, BorderLayout.EAST); …

Member Avatar for phoenix911
0
112

The End.