64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for lytnus

I have a design question which I have not been able to find a satisfactory answer for by searching. Essentially, I have a class - Base - that contains a vector of pointers to another class - Node. However, I would like to be able extend both the Base and …

Member Avatar for lytnus
0
292
Member Avatar for udtohan_noriel

Guys, could someone help me to make a program that will display this not using if-else statement. I want to learn how to make it using for loop statement and any statement that will make this program short. I need 1 Program using for loop and another program but not …

Member Avatar for Duki
0
318
Member Avatar for vibhaJ

HI All, my requirement is as below: lets product name is "aaa bbb ccc". Now in search coding i have use LIKE statement. [CODE]"... where product_name LIKE '%".$keyword."%'"[/CODE] Now when user insert 'aaa' or 'bbb' or 'ccc' or 'aaa bbb' or 'bbb ccc' search works. But if user insert 'aaa …

Member Avatar for mwasif
0
111
Member Avatar for hknight

In this example, I want "ABC" to be replaced with "XYZ": [url]http://pastehtml.com/view/1avqmak.html[/url] I am posting data using AJAX and I want to use JavaScript to replace the response before the response is returned. If you test the link above you will see the issue. Here is my code: [CODE]<!DOCTYPE html …

Member Avatar for hknight
0
156
Member Avatar for vibhaJ

HI All, my requirement is as below: lets product name is "aaa bbb ccc". Now in search coding i have use LIKE statement. [CODE] "... where product_name LIKE '%".$keyword."%'" [/CODE] Now when user insert 'aaa' or 'bbb' or 'ccc' or 'aaa bbb' or 'bbb ccc' search works. But if user …

Member Avatar for vibhaJ
0
101
Member Avatar for satish2

hi everyone I want to develop a web browser.....can anyone suggest me how to develop it in java ...

Member Avatar for daudiam
0
82
Member Avatar for daudiam

I was reading an SCJP book by Khalid Mughal and I came across a statement [QUOTE]Enum constants are static members[/QUOTE] and another [QUOTE]Enum constant is an instance of its enum type[/QUOTE]. I am unable to reconcile the 2 statements. Are the constants static members or are they instances ? (Instances …

Member Avatar for daudiam
0
364
Member Avatar for brown23

Hey Guys! I'm really wanting to start learning a beneficial, but fairly easy-to-use programming language. I've tried to discuss this at other online communities and have also asked this question at a few seminar's I've been to recently. My objective is to create more advanced software that interacts with the …

Member Avatar for vegaseat
0
1K
Member Avatar for daudiam

Its said that enums can be nested as top-level type declaration. Does it mean that it can be declared as a data member of a class, but it cannot be declared as a data member of a nested class as the nested class id not top-level ?

Member Avatar for daudiam
0
80
Member Avatar for mrrko

Hi everyone. Im from Puerto Rico, and Im studying Computing Science. Im actually taking my first course of programming, and it is called "Introduction to computer programming", and we are programming with C++. At this point almost everything has been theory, but now we are starting with practice, and I …

Member Avatar for Fbody
0
752
Member Avatar for gunjannigam

I am writing some data to a file using FileWriter and BufferedWriter. I want that while writing in the file if somebody else wants to open the file in MS Excel, it should open only in read only mode Here is a snippet of my FileWriter and BufferedWriter [CODE] while(true) …

Member Avatar for masijade
0
157
Member Avatar for macdonald12

Hello people, I'm trying to collect some data stored between <body> and </body> tags inside a string. Here's a piece of the code i'm using: [CODE] $regex = '/<body>(.*?)<\/body>/si'; preg_match($regex, $content, $content); $content = $content[0];[/CODE] This works perfect, except that it also includes the above mentioned tags. I would just …

Member Avatar for macdonald12
0
190
Member Avatar for myk45

Hello. Well, unlike C, C++ provides a concept of headers(not header files) and that these headers are something like a collection of names, which may mapped as header files by the compiler. Can anyone please correct me if im wrong in my above understanding. Also please state the main difference …

Member Avatar for Fbody
0
174
Member Avatar for super_noobie

hey all I have a standard php form and I want a to add paypal purchasing action to it as well. is there an easy way to do this? thanks in advance

Member Avatar for sheltonjb
0
212
Member Avatar for mahdi68

Hi i have probleam on run application , when i click on "Launch as emulated Java ME JAD" this message shown : [QUOTE]com.sun.kvem.midletsuite.InvalidJadException: Reason = 22 The manifest or the application descriptor MUST contain the attribute: MIDlet-1[/QUOTE] but its run true when i click on "Launch as emulated Java ME …

Member Avatar for peter_budo
0
96
Member Avatar for medopunsher

Hey everybody , I'am writing a very simple chat program (Client & Server) in C++ & QTNetwork libary. I Have a static cast problem that i don't understand , here is my code : PS.Lines with errors are commented : [CODE]#include "server.h" #include "ui_server.h" #include <QtNetwork/QTcpSocket> Server::Server(QWidget *parent) : QWidget(parent), …

Member Avatar for medopunsher
0
252
Member Avatar for EvolutionFallen

Hi, I'm somewhat new to jQuery/JavaScript, so any help would be greatly appreciated. I have a few textboxes that need to be populated when a user clicks a hot spot on an image map. Each hot spot has an alt tag representing the ID number of the object I need …

Member Avatar for MooGeek
0
161
Member Avatar for hazeeel

hi all!! I need some help here. It's the Translation matrix. I can't seem to get the output. I wonder if my conditions are right cause I've been changing them. Please do take a look from line 125 onwards. Thanks much! [CODE]import java.io.*; import java.util.*; import java.text.*; public class KateAug24{ …

Member Avatar for hazeeel
0
267
Member Avatar for marvolo1300

Hi, I want my script to redirect the visitor to the another script which is in another folder under the same parent directory. And i cannot use the "header()" redirect method. [QUOTE]/www/index.php/ (where i want the visitor to be redirected to)[/QUOTE] [QUOTE]/www/upload/upload.php/ (where i want the visitor to be redirected …

Member Avatar for MooGeek
0
1K
Member Avatar for guyfrompluto

Here is a starter program that prints prime factors of a supplied numbers as a string.It's quite buggy as the input 8 yields 1.2.4 when what i wanted is 1.2.2.2 and I don't understand why the return in line 32 (commented) is not executed. [code=java] //program to compute prime factors …

Member Avatar for guyfrompluto
0
330
Member Avatar for Dean_Grobler

I'm struggling with a servlet that's suppose to represent an "online banking service". Once you run the servlet you'll see it's an extremely simple example... You enter an amount in the textfield provided, then click on the apropriate button depeding what action you want to perform e.g. "deposit","withdraw" and "balance". …

Member Avatar for martin5211
0
98
Member Avatar for kerek2

Hi all...need help from u all...i already develop system using VB.net with Microsoft Access 2003 as my database. when i running in Windows XP it's working great but when running in Windows 7, i can't insert into it...can anyone help me plz

Member Avatar for kerek2
0
141
Member Avatar for mgaritjr

Hello All, It's been a while since I started coding in C# so please bare with me. Here's the scenario: I have a form that has textbox fields such as "Qty, Price, and Total Amount". "Qty" needs to be multiplied to "Price" and the results shown in the "Total Amount" …

Member Avatar for mgaritjr
0
137
Member Avatar for Romil797

I am making a basic Player vs. Computer Tic-Tac-Toe in Visual Studios Express 2008. My Form.cs is [code]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Tic_Tac_Toe { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public Image …

Member Avatar for Romil797
0
136
Member Avatar for zachattack05

I've been trying to figure this one out. I was under the impression that when a class method contains any resources, once the method has reached the end of the code and returns it's result (or nothing in the case of void), that all of those resources are gobbled up …

Member Avatar for zachattack05
0
663
Member Avatar for plasticfood

ok i need to write something like [CODE] if { days > 5 && minutes > 5 } [/CODE] basically i need minutes to be around 5 to 10, and cannot be greater than 10. how do i do write this within the same if statement?

Member Avatar for plasticfood
0
101
Member Avatar for ceeandcee

Good Afternoon, I have this line of code: echo $sum['PTS1011_wk1']; Earlier in my page, I have set a variable to: $wk="wk1"; What is the syntax to use the Variable $wk instead of spelling out wk1. I want to be able to change $wk once and have it change throughout a …

Member Avatar for Fbody
0
85
Member Avatar for lgriess

This works fine in Firefox but not in IE7???? I have this button: <asp:TableRow> <asp:TableCell VerticalAlign="Top" HorizontalAlign="Center" ColumnSpan="2"> <asp:Button runat="server" ID="btn_Forgot" CausesValidation="false" BackColor="#E6E6E6" ToolTip="Click here if you forgot your password" BorderStyle="None" onclick="ForgotButton_Click" ForeColor="Red" style="font-size: small; font-family: Arial" Text="forgot your password?" /> </asp:TableCell> </asp:TableRow> and now the code behind for the …

0
53
Member Avatar for nv136

Hello everyone, i need a bit of help. On a click of a button i want to pay an audio file.... here is my code Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox2.Text = "1" Then TextBox2.BackColor = Color.LawnGreen C:\Users\Nick\Desktop\good_work.play now for some reason …

Member Avatar for codeorder
0
144
Member Avatar for mbrown686886

I am trying to open two different forms depending on if I click yes or no from a message box. The code runs but both yes and no open the same form. Is it possible to open two different forms? My code is posted below. Both open Form3 when clicked. …

Member Avatar for mbrown686886
0
161
Member Avatar for nssltd

You know you'd think it be the easiest thing in the WORLD to change the cursor, after all its just an image but yet again i'm having problems.I am making a web browser project I have the standard cursor( . cur file ) and when the application is navigating i …

Member Avatar for nssltd
0
138
Member Avatar for nssltd

Hi i have been making a web browser program in c# but an annoying dialog pops up on some pages the user navigates. The dialog says Script error Syntax error line 54 char 16 0 does anybody know how to prevent this from popping up. Thanks in advance NSSLTD. p.s …

Member Avatar for nssltd
0
103
Member Avatar for walter clark

I'd like to know what the ASCII codes for the toggle keys of the keyboard. I want to make the mouse clicks do different thing when the Caps Lock, or Scroll Lock is pressed. Walt

Member Avatar for Ancient Dragon
0
107
Member Avatar for amckenzie4

I've only just started playing with AJAX, as part of a project I'm dealing with at work. The specific piece I'm stuck on at the moment is this: I have a form with a lot of fields, two of which are subnet (a drop box populated from a database, via …

Member Avatar for amckenzie4
0
277
Member Avatar for slap01

i code this without the delete function, but when i started using it, there's and error. need help with this code[CODE]<?php $_GET['id']; $username = "root"; $password = '123456'; $hostname = "localhost"; $db = mysql_connect($localhost, $username, $password) or die ("Unable to connect to mySQL".mysql_error()); mysql_select_db('mynewdbase'); $del = "DELETE FORM newdbase WHERE …

Member Avatar for Stefano Mtangoo
0
119
Member Avatar for singeryoon

[CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim r, d As Double Const Pi = 3.141596 r = Val(rtb.Text) d = Val(dtb.Text) If 0 < d < 360 Then r = d / 180 * Pi rtb.Text = Format(r, "0.00") dtb.Text = Format(d, "0.00") ElseIf …

Member Avatar for the_carpenter
0
211
Member Avatar for gchurch

well i have a form on the one page of my site that sends some variables accross using POST to another page. then some other things get calculated however the same variables from the first page need to be sent through to the next page. and when i click a …

Member Avatar for gchurch
0
149
Member Avatar for maceron

Just a quick question, if string::npos represents the largest possible value for a string object, how can this value be -1 if it's an unsigned integer? I know this value will change for different compilers, as string::npos on my compiler is set to 4,294,967,295 which makes sense but I don't …

Member Avatar for maceron
0
213
Member Avatar for myd5258

Can some1 giv me some clues to cont the deal card to players part ??? The program will deal cards once the user enter the numbers of player between 3-7, either five cards per player or seven cards per player depending upon the menu selection, to the players at the …

Member Avatar for Lerner
0
428
Member Avatar for ftl25

Hi. Is is possible to create a lookup table of function pointers to functions with variable numbers/types of arguments? If not, can anyone recommend a solution for my problem? I have a list of commands corresponding to functions with variable types/numbers of arguments. Some don't take any arguments. I was …

Member Avatar for vijayan121
0
2K
Member Avatar for dineshcbe

[COLOR="Red"]I have a problem when i am writing a content into a files as a binary format.I noticed, that it writes the content two times into the file. Here is the code.[/COLOR] [CODE] #include<iostream> #include<string> #include<fstream> using namespace std; class store { protected: char pass[50]; public: fstream file; store(); ~store(); …

Member Avatar for Narue
0
131
Member Avatar for abhikr7891

[B]How do i resolve this error...i know this exception should be thrown only when i am using an older version jre to run my class file which should be compiled with a newer jdk but i have jdk 1.6 update 18 and jre 1.6 update 21 . thanks for any …

Member Avatar for abhikr7891
0
108
Member Avatar for Toulinwoek

I have created an Access (2010, but converted to 2007) database and I am building a front end to it using C#. I can't figure out how to provide the user with the means to create a new instance of that database. The idea is that the user can create …

Member Avatar for slider212
0
147
Member Avatar for daudiam

[CODE]class Faltu { public static void main(String aa[]) { int a=4,b; if (a==4) b=5; System.out.println ("b="+b); } }[/CODE] Here it says : "variable b might not have been initialized", but in the following : [CODE] class Faltu { public static void main(String aa[]) { int a=4,b; if (true) b=5; System.out.println …

Member Avatar for daudiam
1
89
Member Avatar for s-pika

i've this code, and when i run it, it produce garbage how to solve it???? [CODE]#include <stdio.h> #include <string.h> #include <stdbool.h> // using bool data type void function (void); char encode(char); char decode(char); void changeSecretCode(char, char); char code[27] ={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; char secretCode[27] = {'Z','Y','X','W','V','U','T','S','R','Q','P','O','N','M','L','K','J','I','H','G','F','E','D','C','B','A'}; int main () { function(); system("pause"); return …

Member Avatar for prvnkmr449
0
91
Member Avatar for PixelExchange

Hi everyone. I already know how to create a program using just one window.. but I'm having trouble creating a program with 2 windows. I used CreateWindow() to create my second window, however, my second window displays exactly what is on my main window! I figured the reason was because …

Member Avatar for PixelExchange
0
317
Member Avatar for sugumarclick

hi friends, I am a novice java programmer. I am in a learning process in java servlets. But i struck into a Class method which should return a result set([B]result of a join query[/B])as a an arrayList using the existing bean class. I will show my code as some one …

Member Avatar for sugumarclick
0
197
Member Avatar for gudads

DEAR FRIENDS, I M NEW TO JAVA, PLEASE ANSWER MY QUESTIONS: 1. I am trying to use float and double in java? can u tell me how to use it? 2. I am trying to calculate simple interest in java ? please fix my code: public class simple { public …

Member Avatar for gudads
0
184
Member Avatar for Krs13

Hi, In vb i used data form wizard to create Master/Details form from a database. When i run that code i get a error in the below line: Private Sub Form_Load() [COLOR="red"]Set grdDataGrid.DataSource = datPrimaryRS.Recordset("ChildCMD").UnderlyingValue[/COLOR] End Sub It says Data error event hit err:[ADODC]: Unknown error. [ADO] then it says …

Member Avatar for AndreRet
0
285
Member Avatar for sami.asanga

Hi, Can anyone tel me how to get values from the database to work with mail to function?? I mean rather than giving like mailto:xxxxx@xx.com ,I want to take email ids from the database.How should I do it? I did like this.. <a href = "mailto : $row['sup_email']."></a> But its …

Member Avatar for Razer_Thomas
0
132

The End.