64,152 Solved Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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)"); … | |
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. … | |
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 … | |
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 < … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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, … | |
---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> … | |
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); … | |
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. … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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() << … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
![]() | 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 = … ![]() |
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 … | |
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. … | |
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 ??? | |
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 … | |
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. … | |
where can i download free asp.net themes? | |
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 … | |
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 … | |
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> … | |
[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:"); … | |
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 … | |
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); … |
The End.