64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for emko

Hi, I would like to get some suggestions on how to change this program from array to vectors. This program reads an ASCII input file and outputs the character frequency into a text file. I got it to work with the arrays, but I can't figure out where to do …

Member Avatar for emko
0
153
Member Avatar for daudiam

Forward referencing is allowed during declarations when the undeclared variable is used in the LHS of an expression, but not if its in the RHS. Therefore, the following won't work : [CODE]class A { int a=h; int h; }[/CODE] But the following code works : [CODE]class A { int a=this.h; …

Member Avatar for daudiam
0
227
Member Avatar for daudiam

Is it true that during autoboxing, the type.valueOf() method is called (which creates a new object only if another with the same primitive constant is not in the intern list. This applies to cases where interning is allowed. Otherwise, it creates a new object using new() ). Is this right …

Member Avatar for daudiam
0
141
Member Avatar for dennishall

Hi All: I am trying to load an image into a div using AJAX. Instead on loading the image, I get �PNG  as the result in the div. Does anyone know how to load an image into a div? Best Regards, dennishall

Member Avatar for hielo
0
992
Member Avatar for kumar_k

Hi, I want to convert a string to numbers ... i tried a lot of codes.. iam a beginner... Kindly help... Ex: a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 input value -->abc output value --> 123 input value -->abcj output value -->12310 I mean i want to …

Member Avatar for kumar_k
0
94
Member Avatar for harpay

please help me how i would write these two programs. im learning c++ and am having difficulties, if anyone can help i will greatly appreciate it. Write a C++ program that displays the results of the expressions 3.0 *5.0, 7.1 * 8.3 – 2.2, and 3.2 / (6.1 * 5). …

Member Avatar for harpay
0
452
Member Avatar for durpderp

Say I have a class: [CODE]class foo { public: foo(); int len{return 1}; }; [/CODE] Then in main I have a class pointer: [CODE] foo *var[5]; [/CODE] My question is when do class pointers get initialized? Or do they not? How would one initialize them?

Member Avatar for durpderp
0
110
Member Avatar for Empireryan

Hey guys, I think I have a pretty simple fix here, I just need somebody to point out my error. I'm getting a seg fault after writing to an array of char. I need my function to run through the array and find pairs. If every char in the array …

Member Avatar for Empireryan
0
189
Member Avatar for Stazloz

Hi! Having some major issues my homework assignment. I have to end this while loop when detecting two consecutive newline escape sequences in a row. This is the word problem: Write a program that gives and takes advice on program writing. The program starts by writing a piece of advice …

Member Avatar for Stazloz
0
1K
Member Avatar for phpDave

Hi, I'm trying to build a site that lets users contact each other through the site. Like an email system in the site only. I'm just looking for some keywords to do research on my own. Thanks!

Member Avatar for phpDave
0
71
Member Avatar for iwanttolearnc

what my code does is it waits for the user to type in "led" and performs the blink function. what i am trying to do is introduce the letter 'p' as a command to stop the blinking. what happens is that blink is only executed once. [CODE]if (!(strcmp(userinput, led))){ //condition …

Member Avatar for iwanttolearnc
0
114
Member Avatar for flyingcurry

We have an assignment to write a program finding the nth Fibonacci number. On the web, there are some standard mathematical equations for this, but that would just defeat the purpose of this assignment if I use those formulas. I have my current code down here(with some sketchy back up …

Member Avatar for coil
0
1K
Member Avatar for ryan-t

Hi, I'm pretty sure this would be something I'd need javascript for. What i want to do is to recognize when a user presses the enter key while active on a text area and to insert a new line

Member Avatar for Airshow
0
163
Member Avatar for vello

[CODE]a.cpp: In function ‘int main()’: a.cpp:39: error: no matching function for call to ‘find(int&, int)’ [/CODE] [CODE]#include <iostream> #include <fstream> using namespace std; int minutes, seconds; char temp; int array_l; bool* sees; int* a; int saade; int main() { ifstream sisf("raadio.sis"); ofstream valf("raadio.val"); /* * How many songs? */ sisf …

Member Avatar for arkoenig
0
202
Member Avatar for kerp

Hi I'm currently writing an Othello game using the Windows API. I have 3 classes in my program, the first class is simply called "Othello" and it handles almost everything. I also have a class called Field that's used to control which fields are black which are white etc. My …

Member Avatar for kerp
0
1K
Member Avatar for plasticfood

particularly from a txt file. for example if the file reads "name ###-####-#### address" all in one single line. how do i put all three items in three separate variables and print them?

Member Avatar for CrazyDieter
0
132
Member Avatar for DoEds

Can anyone give me some ideas on how to find the middle value between 3 numbers.? I really dont know how to start... I know how find minimum and maximum but finding the Middle value is kinda hard for me... For those C Wizards give me some idea advice please?., …

Member Avatar for krutarth
0
3K
Member Avatar for Jalwes

I am very new to JavaScript. In our class we were assigned a project to create a Web page with 5 text boxes, each with a value attribute of zero. When the user changes the values, it is supposed to call a caclAvg() function. How do I pass 5 values …

Member Avatar for P0lT10n
0
101
Member Avatar for gauri_agr

Hi all, I am able to run perfectly the following [CODE]<li><a href="javascript:ajaxpage('login.php', 'ajax');">Login</a></li>[/CODE] But not the following [CODE]echo "Welcome Guest!<br><a href=javascript:ajaxpage('login.php', 'ajax');>"[/CODE] I removed the " around the javascript:ajaxpage('login.php'); as it was giving me syntax error. But I am unable to cal login .php upon clicking Login. I tried various …

Member Avatar for hielo
0
99
Member Avatar for CodyOebel

Ok I have the Hwnd to a particular window I want to work with. Lets call this windows program the "UNWANTED". This UNWANTED window has two things I wish to identify it by. The first one I already have.. which is it's windows handle! Second.. is what I need to …

Member Avatar for CodyOebel
0
151
Member Avatar for suncica2222

I have this simple code and I want it running all the time on the server,AND NOT ONLY WHEN IT IS OPENED IN BROWSER TAB. I dont know exactly what is happening in http header but i guess that there is a way to keep it running non stop. Is …

Member Avatar for suncica2222
0
173
Member Avatar for Tommy.b

Hey, so I've tried like 50 different guides and so on with how to validate this form, and so far nothing works. When the user hits submit, I would very much like to validate if a button in each row has been selected, ideally it would be nice to have …

Member Avatar for Tommy.b
0
75
Member Avatar for Cool&Awesome

Hi everyone, I have a database with X items, and each of them can have one or more of 20+ properties. How I currently make this work is I have a huge table with each of the properties having it's own column, and a boolean to determine does the property …

Member Avatar for Cool&Awesome
0
133
Member Avatar for ampLife

Hi guys ive got a problem in my Tab control. you see, i have 2 tabs in my form then inside it i i got a [B]ListView[/B]. What i want to do is when a user clicks on the [B]First Tab[/B] some buttons in my form will be disabled but …

Member Avatar for ampLife
0
170
Member Avatar for jackparsana

hi, how to call code-behind function in java scrip. i am working on asp.net please help me to call the procedure with js. thanks in advance. jack

0
108
Member Avatar for nitin_gyan

Hi All, I am using MySql and wrote all my create table scripts directly on the command line client. Now I have no tracks of them. I need all the table scripts present in my database region for future reference. I used the below command to view the script of …

Member Avatar for nitin_gyan
0
169
Member Avatar for namehere05

Program descr: Im trying to make a windows manager for windows I might draw in CONSOLE. the plan is to draw manually windows in the console in an objectified way. instead of drawing the windows using console coordinates I create a buffer then use [URL="http://msdn.microsoft.com/en-us/library/ms687404(VS.85).aspx"]writeConsoleOutput[/URL] to write this buffer to …

Member Avatar for namehere05
0
1K
Member Avatar for bbman

I looked all over Google, but could not find anything other than: [CODE]File.WriteAllLines();[/CODE] It does not work, it just appends it. Cheers.

Member Avatar for Lusiphur
0
130
Member Avatar for DartDemon

Is it possible to use a timer to be able to count up, stop, and count down and be able to change the speed on the fly? Trying to make a simulator program that behaves like the real unit. The count also needs to stay in the 0000 format. ie; …

Member Avatar for codeorder
0
222
Member Avatar for emorjon2

hi there! i'm have a biiig trouble. I've make a simple chatbot, as can learning. The problem is, that I can't insert data into the dictionary without a error. here is the code: [CODE] codes = {} def arraycompare(array1, array2): l = 0 for i in array1: for j in …

Member Avatar for griswolf
0
136
Member Avatar for daudiam

[CODE]class hello { } class hello1 { public static void main(String aa[]) { hello ob[]={new hello(),new hello(),new hello()}; hello ob1[]=ob.clone(); // 1 } }[/CODE] ob is an array which is also treated as an object, and hence has a default clone method which is called at (1). But the default …

Member Avatar for daudiam
0
228
Member Avatar for beginerC#

Hello everyone! I have this code [CODE] string constring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + DataBasePath + ";Persist Security Info=False;Jet OLEDB:Database Password=""; conn = new OleDbConnection(constring); conn.Open() string searchstring = "SELECT * FROM MyTable WHERE field2=@field2"; OleDbCommand cmdsearch = new OleDbCommand(searchstring, conn); OleDbDataReader reader; cmdsearch.Parameters.AddWithValue("@field2", dgrDoc[1, index].Value.ToString()); reader = cmdsearch.ExecuteReader(); [/CODE] How …

Member Avatar for beginerC#
0
148
Member Avatar for HedoBum

Ok...this is my "HELP ME! HELP ME!" thread.:D I finally got my code to work...almost. The form posts to my database but only the first query data inserts and the last value of the third query. All the form fields are correct and the problem appears to be with my …

Member Avatar for HedoBum
0
208
Member Avatar for justinwarner

Hey guys, So, I need to add booleans on my project for the final piece. I have all of it done but the booleans. Basically, I checked about 10+ links on google, and none of them really explained how to do booleans. So, what I need is something that does …

Member Avatar for ~s.o.s~
0
150
Member Avatar for utkarsh009

Will the older c++ commands (leaving that of conio.h) work with a new compiler like g++ if i use "using namespace std;" and use 'int' with main() rather than 'void' and don't use .h for including a header file?

Member Avatar for Ancient Dragon
0
80
Member Avatar for ronaldpaul

I've built a website using php and mysql. I wanted to host this site. So I registered a domain name and buy a web hosting package. The webhoasting package provider gave me 2 name server addresses. I pun the in the domain name control panel. But still when i type …

Member Avatar for Nyight
0
363
Member Avatar for mike42intn

im writing this program for an assignment and im getting errors can anyone help make some suggestions? i have to have the program print out balances for saver1 and saver2 then change the percentage rate then reprint [CODE]//header definition file for savings account #ifndef SAVINGS_ACCOUNT_H #define SAVINGS_ACCOUNT_H class SavingsAccount { …

Member Avatar for Akill10
0
148
Member Avatar for |hex

im having trouble pin-pointing why my loop continues to execute infinetley. can someone point out what im doing wrong in my dowhile loop? [code=cplusplus] #include<iostream> #include<string> using namespace std; int main() { string command; char again; do { cout << "Welcome to the Intrepeter!" << endl; cout << "Please feel …

Member Avatar for Akill10
0
85
Member Avatar for teedoff

I have several queries on my site. I have a search.cfm that queries my database, then for each records I have a link coded in on the #item# column of my records. I also have the ability for users to go to "section" pages that have queries based on the …

Member Avatar for arrgh
0
238
Member Avatar for fernandofranca

I have the following funtion in my ComboBoxControl class, and it only returns to me the control of the comboBox. The foreach works fine but my problem is how to return the ComboBox, becuse if the ComboBox doesn´t exists I need to return NULL or something else. How can I …

Member Avatar for fernandofranca
0
174
Member Avatar for NH1

i get an error when i try and do this. [code=c] private void button2_Click(object sender, EventArgs e) { DataSet ds = new DataSet(); DBconnect db = new DBconnect(); Global.GlobalVar = textBox1.Text; string Co = new Password('J', textBox1.Text).SetSql(); ds = db.GetDataSet(Co); DataTable dt = ds.Tables[0]; if (dt.Rows.Count == 0) { if …

Member Avatar for Lusiphur
0
153
Member Avatar for jackparsana
Member Avatar for ddanbe
0
194
Member Avatar for Jazerix

Hey there, so im making a calculator to make my life a little bit easier ^^ so far its working well, I just got one problem o.O! If I enter a number with a comma like 0,5 into one of the textboxes and click calculate it will terminate, what can …

Member Avatar for Lusiphur
0
357
Member Avatar for Xorlium

Hi, If I have a std::vector of objects and I need to iterate through all its elements, is it faster to do: [code] for (vector::iterator i = myvec.begin(); i != myvec.end(); ++i) //blah [/code] or [code] for (int i = 0; i < myvec.size(); ++i) // myvec[i] blah [/code] Or …

Member Avatar for mrnutty
0
232
Member Avatar for arnas

I have a problem referring to Geometric progression Using a few mathematics formula I have to compare the value En that I calculate using Sinfinite and Sn. This value En(which determines accuracy of the calculated number I believe) should than be compared to an arbitrary value E. When En becomes …

Member Avatar for arnas
0
233
Member Avatar for Borderline

I've used the code below previously with success, but I'm having problems this time around, and hoped someone could point me in the right direction. I complete the form, click submit, and receive the message confirming data has been added. However, when I look at the database, there's nothing there. …

Member Avatar for Borderline
0
114
Member Avatar for Eworsley

Hello, I am supernew at php. I understand Javascript, some intermediate Java, expert html, css, Actionscript. Please advise as to the issue below. My company has acquired a php-based Web site. It has a button in the global main navigation header that we need to remove. Here is the following …

Member Avatar for Eworsley
0
105
Member Avatar for manishanibhwani

i m unable to interrpret my package from any other drive???? i mean ..i hav created my package, compiled it bt unable to run it... can anyone tl d way of running it or setting the path... the coding is done in command prompt

Member Avatar for NormR1
-1
98
Member Avatar for gauri_agr

Hi All, I have one index.php like below ..... ...... <head> <script type="text/javascript"> ajax function to call page1, page2 etc... </script> </head> <body> <div id="leftcolumn"> <a href="javascript:ajaxpage('page1.php', 'rightcolumn');">Page1</a> <a href="javascript:ajaxpage('page2.php', 'rightcolumn');">Page2</a> <a href="javascript:ajaxpage('page3.php', 'rightcolumn');">Page3</a> </div> <div id="rightcolumn"><h3>Choose a page to load.</h3></div> <div style="clear: left; margin-bottom: 1em"></div> </body> </html> Now if …

Member Avatar for gauri_agr
0
102
Member Avatar for cbowen12345

I am using python code to transmit data collected (Wii Nunchuck) via I2C wirelessly to another wireless node and then display the information about button press and also roll, yaw and pitch (X,Y,Z) data. The code uses Wx python for frame/window display. Part of the code was copied from the …

Member Avatar for snippsat
0
110

The End.