64,152 Solved Topics
Remove Filter ![]() | |
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; … | |
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, … | |
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 … | |
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 … | |
![]() | 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 … |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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) … ![]() | |
[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=""; … | |
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 … | |
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 … | |
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 … | |
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" … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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"; } … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
![]() | 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) … ![]() |
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" … | |
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 | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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); /********************************************************************/ /* … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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] … | |
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) { } … | |
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 … | |
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() … | |
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 … | |
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 … |
The End.