64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for sergent

I decided to learn C++ STL and I was exprimenting with STL containers. I saw this example [here](http://www.cplusplus.com/reference/stl/vector/insert/): // inserting into a vector #include <iostream> #include <vector> using namespace std; int main () { vector<int> myvector (3,100); vector<int>::iterator it; it = myvector.begin(); it = myvector.insert ( it , 200 ); …

Member Avatar for sergent
0
440
Member Avatar for blueyan

Hai, I'm a C++ beginner with self learning.I have a function that return a vector string eg: vector <string> result :"PA1070","PA1088","PA1091","Pa1070","PA1044"..... How do I compare the vector string element in a proper way? I tried to compare (if result[0] < result[3] ) cout << "True"; else cout << "False"; it …

Member Avatar for sergent
0
350
Member Avatar for Sevyt

I need this for 2 different changes. ON one form i got a week calendar, the other a month calendar. Was hoping to add 2 buttons previous & next. To scroll back in time x days, or x days forward. And similar for the months, but instead of days months. …

Member Avatar for Sevyt
0
98
Member Avatar for Begginnerdev

Hello my fellow Danniwebbers, I have yet another question for you to ponder. I have two custom action listers. One that handles Mouse.Click and one that handles Mouse.MouseDown. My question to you is, can I delay the mouse down event so that it does not intefere with the code of …

Member Avatar for Begginnerdev
0
5K
Member Avatar for adrigreat14

I am starting to learn python as my first programming language, but i ran into a problem while trying to make a function that calculated the missing variable in the simple equation v= u+at. The problem is that i am incapable to change a variable's value from False to True …

Member Avatar for adrigreat14
0
282
Member Avatar for programmer12

Hi, I am trying to write a code in php where I retrieve the DateTime from the database and find what time is it 15 minutes before the DateTime. Such as //Receiving the Start Time from the database. $time1 = "2012-03-17 15:00:00"; //Reformating time to get the date 1hr or …

Member Avatar for programmer12
0
170
Member Avatar for geekdevil

#include<iostream.h> #include<conio.h> void main() { int z[33]; clrscr(); cout<<"Enter any Password (32 character max): "; for(int i=0;i<33;i++) { z[i]=getch(); if(z[i]==13) { break; } cout<<"*"; } cout<<"\nYou entered : "; for(int j=0;j<=32;j++) { if(z[j]==13) { break; } cout<<(char)z[j]; } getch(); }

1
127
Member Avatar for Michael27

Can someone show me algorithm so i can sort array like this? [Picture](http://i.imgur.com/HhQ4I.jpg)

Member Avatar for Mitja Bonca
0
354
Member Avatar for klemme

I have this function, which sends an email to the user and confirms an order. I cant figure out why I cant get to display the image IN the email, at the very top. I have tried with: `"Content-Disposition: attachment; filename=\"mail-top-img.gif\""` And `"Content-Disposition: inline; filename=\"mail-top-img.gif\""` Both sends the mail as …

Member Avatar for klemme
0
196
Member Avatar for jarograv

I am working on a java application that will display an image and play a sound. It finds the current month and displays the appropriate information. Below is the code that I have been testing (that's why santa is in april) it will not work when trying to play wav …

0
253
Member Avatar for 4evrmrepylrning

So I have been told by various people on numerous occasions that you cannot parse XML by using regular expressions or any means other than a parser. So, here at work, I have LXML and that is what I have to use. At the moment I am trying to remove …

Member Avatar for 4evrmrepylrning
0
284
Member Avatar for nostalgia

Hi, I'm having trouble writing a prolog program which does the following: Say I'm given a map of 3 different points; Point A, point B and point C. Point A is connected to point B and point B is connected to point C, if you want to travel from point …

Member Avatar for nostalgia
0
121
Member Avatar for markjnj

Hey all, I'm working on a login screen and have an MSAccess database that stores the userName and password. I am currently using JtextField and String to access the username and password located in the MSAccess database, but now I want to hide the password when it is being typed …

Member Avatar for NewJavaLearner
0
583
Member Avatar for Eagletalon

Hi There, I hope somebody can help me, I work with Visual C++ 2008 with QT libraries I am trying to include a Interop.Encore.dll file into my program to access our ERP system business objects and post new data to the ERP We have a Visual Basic program geared to …

Member Avatar for Eagletalon
0
3K
Member Avatar for chieny

<?php require ("includes/DBConnection.php"); ?> <?php $id =$_REQUEST['a_id']; // sending query //mysql_query("INSERT INTO audittrail(article.a_title,article.a_author,article.a_description,article.a_date, article.dept_id) //WHERE article.a_id='$id'") mysql_query("INSERT INTO audittrail SELECT * FROM article WHERE a_id='$id'") or die(mysql_error()); mysql_query("DELETE FROM article WHERE a_id = '$id'") header("Location: articlelist-a.php"); ?> Parse error: syntax error, unexpected T_STRING in C:\wamp_chieny\www\MULTI\ADMIN_MULTI\article-del.php on line 17 i try …

Member Avatar for chieny
0
126
Member Avatar for newbie1234

I have div.js which is for popup in this i define 2 function getPageSize(); and getPageScroll(); and other file a.php and b.php in a.php as below <script language=Javascript src="/div.js"></script> <script language=Javascript> function divOn (aId_task) { var arrayPageSize = getPageSize(); var arrayPageScroll = getPageScroll(); //bgrnd4 = '<div style="position:absolute; top:0; left:0; width:100%; …

Member Avatar for newbie1234
0
12K
Member Avatar for DarkMonarch

doing this stuff in js and the css doesn't affect the tags in the js writeln js: `document.writeln("<table><tr><td>Nom</td><td>Pr&eacute;nom</td><td>Code Permanent</td><td>Login</td></tr></table>");` css: `table, td, tr{border:2px, double;}` i know this is simple, what am i missing ? oh yeah, it's an external js file, if that changes anything. thx Dark

Member Avatar for DarkMonarch
0
93
Member Avatar for DarkMonarch

what am i doing wrong ? i want to fetch what langugage of new users. i've tested and tried: navigator.userLanguage navigator.browserLanguage navigator.systemLanguage and so far it returns: undefined thx Dark

Member Avatar for DarkMonarch
0
115
Member Avatar for jamesr12

I know this seems to be a very basic questions but still want to clear my basic knowledge so i am asking this question What is String Pool in java? what is difference between String var="DANIWEB; and String var =new String("DANIWEB");

Member Avatar for jamesr12
0
146
Member Avatar for ARKaMAN

Hi! I am just starting PHP. I am learning to sanitze my data. I found this exmaple from the web. It displays the sanitized data, but... it does not insert the sanitized data. :( What shouuld I do to make that happen? <?php $filters = array( "firstname" =>array("filter"=>FILTER_VALIDATE_INT, "flags"=>FILTER_FLAG_ARRAY|FILTER_NULL_ON_FAILURE, "options"=>array("min_range"=>0, …

Member Avatar for joshmac
0
139
Member Avatar for mortyBox

Hey all! I'm pulling my hair out trying to figure out this noodle scratcher. I have a form that takes a users first and last name, then posts that to process.php where it pulls all the info for that person from mySQL database. The DB connection is fine, and I …

Member Avatar for joshmac
0
4K
Member Avatar for mortyBox

elbeato Hi all again. I couldn't reply to my last post "Message Field Required"? Anyway props to "elbeato" for helping me out. My textarea is now indented on the first line. Is there any way to align the text in a textarea? <td align="right">Additional Training</td> <td colspan="5"> <textarea name='AdditionalTraining' rows=6 …

Member Avatar for diafol
0
407
Member Avatar for userct

I'm trying to write a program that concatenates two null-terminated strings. (I declared the strings and buffer in the dad section) .data string1: .asciiz "In a hole in the ground” string2: .asciiz " there lived a hobbit." buffer : .space 512 The program copies the first string into the buffer …

Member Avatar for userct
0
1K
Member Avatar for vinnitro

Hi friends, I am a student of BScIT and I want a project which is to be done in ASP.NET language. I surfed the internet but not found anything new... So, Is there anyone who can give me good suggestion??? & also help me give some objective i.e. what the …

Member Avatar for vinnitro
0
174
Member Avatar for zachattack05

Was writing a new method to open a custom dialog box I created, and realized that the other method I wrote to open another custom dialog had the same name as the object representing it, but there was no error? This is what I mean: Originally the code read: Dialogs.Accounts.NewLocation …

Member Avatar for zachattack05
0
127
Member Avatar for dendenny01

How can I transfer the values inserted in <input type="text" name="num1"> to radio button <input type="radio" name="rep_num1" value="">On submit of form. Actuall when user insert the value or text in the textbox the value of the text box should replace or transfer to the value in radio button when user …

Member Avatar for Topi Ojala
0
277
Member Avatar for jackmaverick1

I've decided to try to create a small (very) game in Javascript + HTML, using the Canvas element. So far, its gone pretty well, but recently I started on bullets. This also has gone well. I've decided to try to implement a bullet-goto-mouse type thing. I know this uses trigonometry, …

Member Avatar for jackmaverick1
0
156
Member Avatar for mani508

i want to send mail notification to anwer the question in forum.how its possible...??

Member Avatar for Dani
0
101
Member Avatar for FraidaL

There is something wrong with this program. The code is ok, the program runs, but it stops after asking the user how much their income is. Where am I going wrong? (Sorry, it's really long, but I can't figure out where the problem is) #include <iostream> #include <string> #include <cctype> …

Member Avatar for FraidaL
0
108
Member Avatar for anand01

hi all , I develpoed java application i java swingss, I need tocreate two versions linced version and trail version, Trail version should experied in 20 days,once user gives the serieal key the application shold work , where shold I store registration key, How could I protect my application could …

Member Avatar for anand01
0
378
Member Avatar for sammer021486

I am having difficulty getting the php include for my menu to show the active page on my site. When the site is using just plain html to show the active page, it works as expected. But when I switch to the php include the menu is not styling to …

Member Avatar for sammer021486
0
3K
Member Avatar for MrEARTHSHAcKER

Hi, I found the examples of explicit specialization, but I have a vagueness about code: using namespace std; template<class T = float, int i = 5> class A { public: A(); int value; }; template<> class A<> { public: A(); }; template<> class A<double, 10> { public: A(); }; template<class …

Member Avatar for MrEARTHSHAcKER
0
194
Member Avatar for Despairy

I have a vector that contains Points on a board and I would like to do the following: 1) if a Point appears an even number of times i would like to delete all of the same Points. 2) if a Point appears an odd number of times i would …

Member Avatar for mike_2000_17
0
95
Member Avatar for Mike Bishop

I am pulling three coloums of data from a SQL view into my data drid Day,TimeIn,Timeout I want to colour my datagrid rows red if timeout is null and green if both the timein, timeout have data in them. here is my code so far, but it aint working Public …

Member Avatar for Mike Bishop
0
120
Member Avatar for manishanibhwani

hello everyone, I am developing an application for my project... My application works correctly when I run it on applet viewer...But when i try to run it with the help of html page ..the code does not run and gives an erron java.security.accessdenied exception.... Actually i have loaded an image …

Member Avatar for manishanibhwani
0
156
Member Avatar for Dani

Hi, I'm getting really frustrated with an issue that Ancient Dragon discovered is happening here. Anytime that the combination `% 02` (without the space) is submitted via a textbox, it's recieved by PHP $_POST[] array just as a space. It's like URL decoding is happening on the fly. This happens …

Member Avatar for Dani
1
330
Member Avatar for belber

hey all, i wan't ask.. how make shortcut in form.., did i've to use keyup or keydown event ..??? i need some reference pliss...

Member Avatar for mustaffa hasan
0
212
Member Avatar for kase20

hi guys!! The purpose of the program I am trying to do is to have an input number of 6 digits typed in and this should then be printed as an hour minute second format. for example 123456 would be 12:34:56 This is what I have but it isn't working …

Member Avatar for Ancient Dragon
0
107
Member Avatar for phorce

Hello, Wondering if you can help me.. I have a variable, that each time needs to multiply by 2 (I know, it sounds simple.. I'm probably being an idiot) but it works like this: LOOP 1 offsetX = 0; offsetY = 0; LOOP 2 offsetX = 2; offsetY = 0 …

Member Avatar for phorce
0
118
Member Avatar for Ordella

Could anyone tell where is the error in the program? There is a compile-time error... When I hit compile it shows error in the 40th line saying that 'r' might not have been initialised.. I can't get that.. Pease could anybody help?? import java.util.Scanner; public class Customer_Account { public static …

Member Avatar for Ordella
0
106
Member Avatar for slaythezeppelin

Hello im new to daniweb and c++ and am getting a overloaded function error on my readFile function, specifically the string data type. I cant seem to pinpoint whats causing the error. Im supposed to use the function to read data from a text file in this format: Johnson 5000 …

Member Avatar for rubberman
0
166
Member Avatar for mehnihma

I need to take arguments and change the extensio of the file for writting but I get java.lang.ArrayIndexOutOfBoundsException: 1 Why? Is there any better way? // change file name for saving the output file int dot = inputFile.lastIndexOf('.'); // check for the dot String baseName = (dot == -1) ? …

Member Avatar for mehnihma
0
185
Member Avatar for poolet

I am trying to create a 2 dimation array for a game... The table will look like that!!! **0 1 2 3 4 5 6 7 ** **0|0 0 0 0 9 0 0 0 ** **1|0 0 0 0 0 0 0 0 ** **2|9 0 9 0 0 …

Member Avatar for poolet
0
143
Member Avatar for codecrypt

Hello, I've been having a little dificulty with passing this array to my text file. What i'm doing is writing a questionaire type quiz which involves outputting questions, receiving input, and taking each input value and listing it in a text file. What I have works, except for writing the …

0
64
Member Avatar for poojavb

Hello Friends, I need one help I have a datetimepicker control, a combobox with day i.e. Sunday, Monday and so on.... The datetimepicker min date will be todays date and max date will be more 7 days...i.e. a week... so the days dont get repeated..means sunday will come only one …

0
84
Member Avatar for Dani

Quick question ... What happens if you use array_slice() and specify a length that is longer than the length of the array? Sorry but I couldn't find the answer on PHP's doc pages or in a quick G search.

Member Avatar for Dani
0
183
Member Avatar for JOSheaIV

So first of all let me say I am pretty new to C++ and find it very difficult to learn (especially when compared to say C#) Anyway I am working on a program that requires the use of a 2D array or a similar container. After talking with a professor …

Member Avatar for JOSheaIV
0
3K
Member Avatar for Bchandaria

How To Upload a Embedded media or video it to asp.net application with complete UML Source Code? ? ? ? ? ?

Member Avatar for Sinderone
0
112
Member Avatar for NguyenThai

Hi. I'm working with my project right now. In my project, there will be 2 form; I will call form1 and form2. Form 1 call first and then it has button to call form 2. I don't want user open many form2 so I use a private boolean variable. When …

Member Avatar for adetolah
0
158
Member Avatar for marComm

Hello, I am building a website using a standard form and perl script that we commonly use, but this one has a special request and I don't know how to handle it because I have very little knowledge of Perl, other than what is in the standard script I have …

Member Avatar for marComm
0
579

The End.