64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for turbomen

Dear ALL, Could you tell me how can I get num1, num2 and Output 2 for the following programme. [code] program Project2; {$APPTYPE CONSOLE} uses SysUtils, ourcrt; var num1, num2: integer; begin num2:=0; repeat num1:=num2+1; if (num1 mod 2=1) then begin writeln(num2); end else begin num1:=num1+1; end; num2:=num2+1; until num2>4; …

Member Avatar for FlamingClaw
0
172
Member Avatar for turbomen

Dear Sir, I have got the answer of the following question but I do not understand why it has been done in this way: 3. Your task is to create a game of Heads or Tails against the computer. Write a program that asks the user for Heads or Tails, …

Member Avatar for FlamingClaw
0
143
Member Avatar for Aphrodite

Hi all, can you please help me solve these errors I am receiving: q2.cpp:127: error: expected primary-expression before ‘*’ token q2.cpp:127: error: ‘wordPointer’ was not declared in this scope print function which is contained within the sc class: [code] void printDict(struct wordRecord *wordPointer) { // Code omitted to step through …

Member Avatar for Aphrodite
0
101
Member Avatar for minbor

Hello, I have a series of variables ending with a number and am trying (unsuccesfuly) to put them in a table using For Next loop. the code looks like this: [CODE] <% v1 = "text_1" v2 = "text_2" v3 = "text_3" %> <table border="1"> <% For x = 1 To …

Member Avatar for minbor
0
114
Member Avatar for sravan953

Hey guys... I am working on a program where when a user enters a number, the program adds all the digits of the number and goes on till the sum is single digit. [TEX]Example: 9812737 = 9 + 8 + 1 + 2 + 7 + 3 +7 = 37 …

Member Avatar for bumsfeld
0
132
Member Avatar for slatk3y

Hello, I have a question about bitwise operators, especially shifting. Suppose we have: [code=C++] #include <iostream> using namespace std; int main() { unsigned i = 2; i<<=2; cout << i << endl; } [/code] unsigned i = 2 in binary is 0.......00010, if we shift 2 bits to the left …

Member Avatar for slatk3y
0
135
Member Avatar for tintincute

Hi I'm very new to programming and I'm learning C# for the first time with no experience. I just finished designing a program which counts the vowels in a sentence. Now I would like to count the vowels while typing it to the text box. I'm wondering what event/events is/are …

Member Avatar for tintincute
0
392
Member Avatar for Jiro90

Can anyone explain the flow chart or algorithm of the program attach? The program is about LCD clock but I don't know how it works. I need it by tomorrow so please help me take a look. Thanks

Member Avatar for wildgoose
0
101
Member Avatar for K?!

Hi all I'm having a problem with netbeans when I try to make af form. It gives an error when it's not supposed to. At least, as far as I know it's not. An image can say a thousand words: check the attachment. Any help? I know this is not …

Member Avatar for K?!
0
129
Member Avatar for jbisono

Hi, friends i have a datagrid bound a hypercolumn [CODE=ASPNET] <asp:DataGrid ID="menu" AutoGenerateColumns="False" Runat="server"> <Columns> <asp:HyperLinkColumn DataTextField="OPT_DESC" DataNavigateUrlField="OPT_LINK" DataNavigateUrlFormatString="{0}"/> </Columns> </asp:DataGrid> [/CODE] basically what i want to do is, that i want to insert into the database the users that click some links. so how can i make a clickevent …

Member Avatar for jbisono
0
353
Member Avatar for sotvisal

import java.util.*; class Degree2 { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } double readDouble(String m) { out(m); return in().nextDouble(); } String readString(String m) { out(m); return in().nextLine(); } void foundRoot(double a,double b,double c) { if(a==0) out("Value x is: "+(-c/b)+"\n"); else { double data=(b*b)-(4*a*c); if(data>=0) …

Member Avatar for harsh2327
0
391
Member Avatar for sotvisal

[code=java] import java.util.*; public class Convert { Scanner in() { return new Scanner(System.in); } void out(String m) { System.out.print(m); } long readLong(String m) { out(m); return in().nextLong(); } int readInt(String m) { out(m); return in().nextInt(); } String readString(String m) { out(m); return in().nextLine(); } String digitOne(int n) { String st=""; …

Member Avatar for tux4life
0
160
Member Avatar for hashinclude

hello , first i want to say that im very new at c++ , i managed to create a very simple program through searching the internet , this little program involves running a certain exe file with parameters : (e.g: "c:\folder\file.exe" -parameter1 -parameter2) i am using the system() function to …

Member Avatar for epitalon
0
183
Member Avatar for shazzy99

Hi, I've been trying to read the file content from the file path entered by user at run time. However i always end up in error. Help needed... char name[100]; ifstream infile; cout<<"Enter filename to open"; cin.getline(name,100); infile.open(name); if(!(infile.is_open())) { cout<<endl<<"File Not Found"; } i'm not using relative path, instead …

Member Avatar for shazzy99
0
177
Member Avatar for tanha

Hi everyone, I have a registration form for the book, which has two many to many relationships with Author and Category, So I don't know what is the best way to implement and to be user friendly. If there is an example, please let me know and also share your …

Member Avatar for tanha
0
1K
Member Avatar for sayakyi

Dear All, I am very happy to be here. I have got alots help from this forum. I don't know how to show my search result on the same page. My Code index.php [ICODE] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script language="javascript" type="text/javascript" src="jquery-1.3.2.min.js"></script> <script language="javascript" …

Member Avatar for djjjozsi
0
214
Member Avatar for LOVE4CODE

I've created a admin center, that has two seperate login permissions. Admin which can edit listings, etc... and Viewer which can only view listings, and edit 1 or 2 of the listings details and not all of them like the admin. I've seen web-sites where certain text input fields are …

Member Avatar for benjiei
-1
3K
Member Avatar for subii P

Hello, I am facing the a probelm, I wanted to read a unix PATH variable into perl script. But its not working. $path_var=`$PATH`; Can u help me in doing this. Thanks in advance, Subii

Member Avatar for masijade
0
120
Member Avatar for aditi_19

Hi, I have a problem. I am storing projectid (varchar) as a field in this format :- DD-NNN where DD is the last two digits of the year and NNN is the next project number within that year (i.e. 09-500 is the 500th project in year 2009). The user has …

Member Avatar for somedude3488
0
101
Member Avatar for Godstryke

Hi all, I'm currently learning Java right now through a class and my instructor has asked me to try writing a word-count program using a Map interface. It should run through command line and has to identify the number of words, the number of distinct words, and the distinct words …

Member Avatar for Godstryke
0
1K
Member Avatar for harryhaaren

Hi everyone, Im working on a large scale audio program, and I got a question regarding namespaces: The main() part of the program includes my own headers, each named according to what part it plays in the program, eg: Audio.hpp , Midi.hpp etc. These headers will "load" other headers..? Is …

Member Avatar for kvprajapati
0
122
Member Avatar for chrispaul8676

Hi, there, i have come up with a dropdownlist that takes data from database. A gridview with checkbox to select and a button to submit the selected rows in gridview and selected data in dropdownlist. i am getting errors. I don't know what is the cause. The dropdownlist will have …

Member Avatar for nccsbim071
0
172
Member Avatar for kralco626

I have a gridview on my "second" page with a SqlDataSource. The data source is configured to take the qurry string "arg" from the url and run a stored procedure with it. On the "first" page i have a gridview and one collumn is links. Click on this link and …

Member Avatar for dsweb1017
0
508
Member Avatar for sab73

hi, i have a python module which i compile to an EXE (using Py2EXE). this EXE will be called from another program which was created in C++. my Q is, how can i return an error status from my PY exe to the calling program. is there anyway i can …

Member Avatar for sab73
0
107
Member Avatar for itisnot_me

ok what i am trying to do is see if multiple values are all yes. idk if what i think is right, actually is right. [CODE] $1 = "yes"; $2 = "yes"; $3 = "no"; if ( ($1 && $2 && $3) == "yes" ) { $thing = "you"; } …

Member Avatar for itisnot_me
0
80
Member Avatar for Darkangelchick

Hey guys I'm attempting to make a super mario like platform game and need help with making images move. Like instead of moving the little man, just having the background moving with the corresponding button movement. Can anyone hint at how to do this? Or is moving the little man …

Member Avatar for shadwickman
0
150
Member Avatar for MrNoob

well i alawys wondered when i make char name[]="bla"; and count by ptr it doesnt work it says cant count wrong argument to increment but see whenever i like make it a function like void putit(char *Name); it work i dunno why though why does it work then if its …

Member Avatar for MrNoob
0
105
Member Avatar for papanyquiL

I've got drag and drop to work in ListView so that I can drag a folder containing mp3's and they will display. My problem is that they only show up if I drag the directory in. I can't drag a single .mp3 file in by itself and have it displayed. …

Member Avatar for papanyquiL
0
825
Member Avatar for echo off

What I have: [CODE] (tcp stuff here) data = System.Text.Encoding.ASCII.GetString(bytes, 0, i); switch (data) { case (data.Substring(0,6)=="send /": MessageBox.Show(data.Substring(6).....) break; case (....): ..... break; ....... } [/CODE] The error: cant implicitly convert bool to string. This is from the case statements. I would use an if statement but when I …

Member Avatar for echo off
0
181
Member Avatar for goody11

Hey, I'm trying to make a save function in API that will append to a txt file instead of writing over it. Can I get some help? Here's what I have so far: [code] #include <new> #include "windows.h" BOOL SaveTextFileFromEdit(HWND hEdit, HWND hEdit2, HWND hEdit3, HWND hEdit4, HWND hEdit5, HWND …

Member Avatar for Ancient Dragon
0
180
Member Avatar for declain

I am working on an example for a class and the build succeeds, but when it runs, it just hangs and won't complete. Not sure what I'm doing wrong? [code] #include <iostream> #include <fstream> using namespace std; int main(int argc, char *argv[]) { istream *fin = &cin; if(argc > 1) …

Member Avatar for declain
0
161
Member Avatar for johnysums

Hello, im having this annoying problem with trying to create a global class to hold all the global variables to be used in the form. This is my main function: [code=CPP] // car rental.cpp : main project file. #include "stdafx.h" #include "Form1.h" #include <string> #include <stdlib.h> #include <vcclr.h> #include "Globals.h" …

Member Avatar for Tom Gunn
0
149
Member Avatar for serkan sendur

hi guys, i need to encrypt a plain text limited to 15 characters but the output the encryption must also be 15 characters since i am limited to database constraint. how can i do this? thanks

Member Avatar for Tom Gunn
0
513
Member Avatar for john_beginner

hello all in vb we can use controll array to make the calc so with in single block we can write our entire code Is there any way to make calc in c# like vb's controll array ?? pls provide ur suggetion

Member Avatar for john_beginner
0
968
Member Avatar for shivaa

Question - Three stacks can be used to sort a list of numbers. Assuming stack in holds the input list of numbers, stack out is to hold the output list after sorting the numbers and temp is used during the sorting process. The sorting algorithm follows. 1 set up stack …

Member Avatar for shivaa
0
85
Member Avatar for hims4u

hello exprts!! i am new 2 database!!! i have oracleXE and jdk 1.6.0_14 installed on windows XP!! i want 2 connect them via my java program.but i am gettting errors after executing the program. my code is: [code=java]import java.sql.*; //import oracle.jdbc.*; //import oracle.jdbc.OracleDriver; public class OracleConnect { public static void …

Member Avatar for ~s.o.s~
0
513
Member Avatar for Ana D.

Hi, I'm trying to populate my TreeView based on my Directory Structure. Actually, what I need is just the files and directories present in one folder. I found a lot of pages, blogs and posts about this, but all the solutions require the TreeView to be inside a form. The …

Member Avatar for Ana D.
0
232
Member Avatar for kelechi96

Hi I'm thinking of writing a mmorpg game and what I would like to do is create a server I would like to send text messages over the internet to trigger events at the client or server. A. How can I do this. B. Is there a better way of …

Member Avatar for kelechi96
0
119
Member Avatar for gcah

Does any one know how to get the index value in a 1 dim array of a returned character or integer? For example the value is 15 but I need to know where 15 is on the array, position a[0] or a[15] etc. thanking you in advance

Member Avatar for gcah
0
4K
Member Avatar for JasonL220

I've been writing a java wrapper to a c library, and need to use asm to push the parameters onto the stack to call the library function. an extract of the c code: [CODE]extern void asm_dispatch(void *func, int nwords, char *arg_types, long *args, int res_type, long *resP,int conv); /********************************************************************/ /* …

Member Avatar for wildgoose
0
250
Member Avatar for Tank50

Hi I want to read the content in datareader.So I use below coding to do that if (dataReader4.IsDBNull(0)){ } but I run above coding it gave me an error meassage.The error Meassage is "Invalid attempt to read when no data is present". then I use below coding dataReader4["Email"]==null but It …

Member Avatar for Tank50
0
172
Member Avatar for jbd4d

Im not sure if this is the proper place to be posting this but... I have a dedicated server that i would like to automatically run a script every 10 minutes/ half hour / any set period of time. I do not want to have to leave my personal computer …

Member Avatar for jbd4d
0
131
Member Avatar for sfgal

I am totally stuck. I created a program to read in the file and one that will sort from a string array. The problem is that it sorts from the beginning of each line. I need it to sort after the -. I need it to sort by the town …

Member Avatar for sfgal
0
170
Member Avatar for ravikiran032

[CODE]Imports System.Data.SqlClient Public Class Form3 Dim con As SqlConnection Dim cmd As SqlCommand Dim dr As SqlDataReader Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click con = New SqlConnection("uid=sa;pwd=igiat;database=harsha1") cmd = New SqlCommand("select * from student") con.open() dr = cmd.ExecuteReader() While (dr.Read()) If dr(0).ToString() = TextBox1.Text …

Member Avatar for sknake
0
136
Member Avatar for whiteyoh

Hi All, In the following code, the selected row from mysql database it populated in each cell, except for the "Content", where the syntax is slightly different, and obviously incorrect. Please can somebody take a look at it for me and advise where it needs to be changed. Thanks [code] …

Member Avatar for whiteyoh
0
297
Member Avatar for Annex31b

Hi! How can I call the matching constructor [CODE=csharp] foreach (Animal d in AnimalBufferList) { this.Add( ....call matching copyconstructor.... (d) ); } . . . [/CODE] [CODE=csharp] abstract class Animal { public Animal (Animal d) { } . } } class Pig: Animal { public Pig(Pig d): base(d) { } …

Member Avatar for sknake
0
163
Member Avatar for anuj_sharma

Hey Guys, I have added a DetailsView to my page and i have enabled editing but when i click on update all the fields are editable. I want only only one row to be editable and all other rows to be ReadOnly. Please suugest some ideas on how to make …

Member Avatar for nccsbim071
0
87
Member Avatar for k2k

hi, if i left a field blank in my table. when i tried to retrieve all the info out to the form. the text box supposed to have blank (because the corresponding field in the table is blank) appear a "/" ... i have tried to use trim() ... stripslashes() …

Member Avatar for k2k
0
335
Member Avatar for GDICommander

Hello, everyone! It's been a long time using C++ and I have a link problem. This is the code... [CODE] #include <iostream> #include "libc++/pcslib.h" int main() { std::cout << "About to load the server and all the clients." << std::endl; Pcs serverProcess("server"); Pcs clientProcess("client"); serverProcess.Join(); clientProcess.Join(); std::cout << "After joining …

Member Avatar for GDICommander
0
116
Member Avatar for laghaterohan

i have calendar placed on my form i have one textbox n a button("Show date") When the user enters date in the textbox say 29/07/2008 and click on the show date button the calendar should show / reflect that date.. how to achieve this...i knw...it ll b simple but am …

Member Avatar for laghaterohan
0
128

The End.