64,152 Solved Topics
Remove Filter ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
hi everyone I want to develop a web browser.....can anyone suggest me how to develop it in java ... | |
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 … | |
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 … | |
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 ? | |
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 … | |
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) … | |
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 … | |
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 … | |
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 | |
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 … | |
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), … | |
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 … | |
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{ … | |
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 … | |
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 … | |
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". … | |
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 | |
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" … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
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 … | |
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. … | |
![]() | 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 … ![]() |
![]() | 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 … ![]() |
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 | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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(); … | |
[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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.