199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for apanimesh061

[CODE] import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.Statement; import java.lang.NullPointerException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; /** * * @author Animesh Pandey */ public class anilet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter …

Member Avatar for ghul-mur
1
344
Member Avatar for KushMishra

Hello everyone, I am developing a WPF application in which there is a **header (user control)** with some buttons as "Home", "Upload", "Log Off" etc. What I want is to add this header user control in a page and when I **click the "Upload" button** of this header user control, …

Member Avatar for KushMishra
1
2K
Member Avatar for iismitch55

I have been messing around with making a windows application in Dev-C++ I wanted to make it in a single source file, rather than a project to see if it worked. It did, other than the fact that I got the windows app, AND a DOS prompt behind it. Is …

Member Avatar for adityatandon
1
11K
Member Avatar for Human01

[COLOR="Red"]Hi all, I'm in my final year and I'm supposed to do an IT Project Managment Assignment. I have little knowledge in IT Proj. so I need your assistance and guidance to put me on the right track. Some points and hints from you will make my life easier. I …

Member Avatar for Keath Moore
1
440
Member Avatar for nitinmbhanu

#include<dos.h> #include<iostream.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<string.h> #include<graphics.h> int y; int i; struct element{ char name[20]; int at_no; double at_wt,at_r,en,ion,density,mp,bp; char ato_wt[20],ato_r[20],eno[20]; char iono[20],densityo[20],mpo[20],bpo[20]; char crs[20]; char sym[4]; char earr[100]; }E[118]; void numberfind(int); void numrfind(int,int); void massfind(double); void namfind(char*); void namlfind(char); void massrfind(double,double); void ionifind(double); void ionirfind(double,double); void enegfind(double); void enegrfind(double,double); …

Member Avatar for DeanMSands3
1
251
Member Avatar for nitinmbhanu

[Moderator edit: 3500 lines of code removed as it was totally irrelevant to the question and severely affecting load time of the page]

Member Avatar for nitinmbhanu
1
265
Member Avatar for problematic:)

hi. I am working on a project that requires a search button. it goes like this. the I will enter data on a text box. then the record that goes with it will display on the 3 textboxes. My problem is I don't know how to code a search buttons. …

Member Avatar for sai.pawar.p
1
2K
Member Avatar for Szabi Zsoldos

Hello, I've built a timekeeping aplication from a fingerprint machine with automatic import to db and I'm getting some reports. One report is that I'm getting the employees time if they are late from work. But my table is small with 20.000 entries, but with the following query, the results …

Member Avatar for maniat123
1
229
Member Avatar for Gribouillis

This code snippet provides methods to convert between various ieee754 floating point numbers format. For example double precision to single precision. The format is given by a pair (w, p) giving the size in bits of the exponent part and the significand part in the ieee754 representation of a number …

Member Avatar for TrustyTony
1
5K
Member Avatar for KushMishra

Hi all, I have recently designed a WPF application with some user controls and I want to code behind a user control to redirect to another window or invoke another user control however I am unable to do the same. The problems I am facing presently are as follows:- 1.When …

Member Avatar for Sahil89
1
186
Member Avatar for abhishekagrawal

Dear All, I have written a program that finds the integer whose square is closest to but greater than the integer number input as data. But it is giving me an erroneous answer. My algorithm is: 1. Select a number which is half the input number. 2. Square it and …

Member Avatar for nullptr
1
249
Member Avatar for mrnutty

This question is from code chef, named Odd. I believe this is a good problem to play with for all levels. If I can solve it surely anyone else can, cough * only if pi is fake* cough*. Here is the question : [ICODE]The captain of the ship TITANIC is …

Member Avatar for nezachem
1
675
Member Avatar for LastMitch

Hi I have a question. I haven't try this yet but rather have someone tell me that it will work or not. For example I have this let's call this **1.php** file **1.php** has these two categories SKU: <?php echo stripslashes($row1['sku']);?> Item ID: <?php echo stripslashes($row1['itid']);?> I want to submit …

Member Avatar for LastMitch
1
161
Member Avatar for KushMishra

Hello everyone !!! I recently designed a web application using VB.Net and tried to copy a folder (containing multiple files) from one disk drive to another but unfortunately I didn't succeed. I tried using a file upload but that is only for single/multiple file selection however I want to select …

Member Avatar for KushMishra
1
155
Member Avatar for TrustyTony

Here is my take on [balanced ternary](http://en.wikipedia.org/wiki/Balanced_ternary) conversion (the base considered by [Donald Knuth](http://en.wikipedia.org/wiki/Donald_Knuth) "Maybe the prettiest")

1
949
Member Avatar for jhbalaji

Hello, Many guys have been asking for this sort of sms scripts! Any way i have created one for personal use but i am sharing here :) Things you need [LIST] [*]An Account in tm4b.com and PHP 5. [*]cURL or allow_url_fopen enabled in php.ini [/LIST] - [URL="http://jhbalaji.com"]Balaji J H[/URL]

Member Avatar for abhishek123465q
1
1K
Member Avatar for hankmeyer

Hello, I currently have a script that Uploads an image, resizes and saves successfully. I am having trubble understanding how I would rename the uploaded image according to the other image names in the directory. For example there are 3 images in the directory (Image1.png, Image2.gif and Image3.jpg) How would …

Member Avatar for cereal
1
4K
Member Avatar for koduruabhinav

i have image on my web application. When i click that i will be redirected to track jsp.What that jsp does is track the image that is clicked and redirect to that image url .At present i asing response.sendredirect(URL) which will redirect in same window.Is there any possiblity to open …

Member Avatar for CrazyDieter
1
119
Member Avatar for piyush3dxyz

I just develop a simple C++ program which gets data from user and make in database form and save it to file... compile it and share your review... /*simple Database application Programmed by Piyush gautam email-piyush3dxyz@gmail.com */ #include <iostream> #include <conio.h> #include <fstream> #include <stdio.h> using namespace std; struct work …

Member Avatar for sfuo
1
12K
Member Avatar for gusfraba

I've had nighmares about this since 3 days ago and couldn't find anything by googling so here I am. As the title says so i need to find a way to store and then retrieve images from a mysql database I have tired the code below to do so (the …

Member Avatar for imdeadsoul
1
2K
Member Avatar for nathmack

Hi, I have been trying to solve this for ages and just can’t seem to get it right. I want to do 2 things here, i am getting an array out of a mysql database (i am getting the user’s id) and then converting that array into a string and …

Member Avatar for |-|x
1
148
Member Avatar for bishisht

Hello there below is the easy way to get the email addresses extracted from any file. import os import re import sys def grab_email(file): """Try and grab all emails addresses found within a given file.""" email_pattern = re.compile(r'\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b',re.IGNORECASE) found = set() if os.path.isfile(file): for line in open(file, 'r'): found.update(email_pattern.findall(line)) for …

Member Avatar for TrustyTony
1
306
Member Avatar for TrustyTony

New Daniweb way to copy the code from posts with indentation is to double click (not too quickly) to select the code region and use normal copy paste as you like (second mouse button or ctrl-c). Easier than before but little not obvious!

Member Avatar for TrustyTony
1
299
Member Avatar for happygeek

Although you may not realise it, dear coder, you apparently have the best job in America. At least that's what the newly published [2012 Jobs Rated Report](http://www.careercast.com/jobs-rated) reckons. The CareerCast research shows that for the second year running the best job in the US is a software engineer. Not surprisingly …

Member Avatar for happygeek
1
424
Member Avatar for jpadgett230

Hello! What I am trying to do is assign the values from a mysql query and store them in an array. I have some code that queries the DB by using SHOW COLUMNS. I then loop through dynamically assigning the name of the DB field to input fields of a …

Member Avatar for jpadgett230
1
221
Member Avatar for Dani

Sooo ... I learned during my schema migration that our webpages use UTF-8 encoding but our MySQL database (all InnoDB tables) uses latin1. After finally running some utf8_decode() php magic, I was finally able to successfully get all posts to display correctly again. However, now that I realize there's an …

Member Avatar for smantscheff
1
344
Member Avatar for jon92

Write a program that accepts a filename as a command-line parameter. The program will search the given file for each letter in the alphabet and print statistics on the number of occurrences. I was wondering if i could have some help with this as i dont understand how to do …

Member Avatar for woooee
1
116
Member Avatar for Stevo812

Hi all. I'm currently writing a pool game in java and I'm having trouble making the cue ball move by using the mousePressed(), mouseDragged and mouseReleased() methods of mouseEvents(). When the mouse is dragged a line should appear out of the ball in opposite directions one for the power and …

Member Avatar for NormR1
1
1K
Member Avatar for syed30

Hey guys I need to hand in this assingment and actually made an account for this as I know this is one of the best forums so far that I have came across about programing, so it would be awesome if someone could help me out with this. So first …

Member Avatar for Ezzaral
1
509
Member Avatar for foxy_123

Hi everyone, I'm trying to make a simple application displaying some amount of buttons which has added simmilar but different action. The amount of buttons is not known before compiling because it depends on external data. All the buttons are shown in some container. How did I get it: -creating …

Member Avatar for foxy_123
1
192
Member Avatar for jshort89

I am a student and am pretty new with java. I'm trying to write a basic pacman applet for a class my problem is i have the code written to draw the maze and the pacman but when i run the applet all I am getting is the black background …

Member Avatar for NormR1
1
331
Member Avatar for guidely

Hi I dont really sure what I did wrong but it no working. I am making Snakes and Ladders game with out using list import random separator = '-' * 20 spaces = [None] * 90 c_l_spaces = {r'slid down a chute ': [[14, 3], [20, 15], [39, 33],[66, 53],[69, …

Member Avatar for TrustyTony
1
1K
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 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 DavidKroukamp

Hey all, I have been busy building my own chess game and as of now im a bit stomped. Well you see i have an object Board, this object will be initiated and it will create a new frame with various panels one of them being the panel which holds …

Member Avatar for JamesCherrill
1
247
Member Avatar for turt2live

Simply enough: Call the function, get the returned filename. Function Variables: $file : The input file (source/background) $destination : Where you want the new watermarked image to go $overlay : The overlay image (foreground), this is default set (if not passed in) to "images/watermark.png" $X : X-Position of overlay (default …

Member Avatar for webatz
1
525
Member Avatar for mb01a

Have you ever needed to open a file with your VB program? Here's a way to easily do it. (code copied from an original program written by Mike B) If the program that uses the file is installed on your workstation, the file will be opened in that application. I …

Member Avatar for deades
1
1K
Member Avatar for london-G

Hello, I havr created a program in which there are two classes. One ship, and shooter. However it is not working. Any idea? [CODE] package shooter; import java.awt.Color; import java.awt.Graphics; import java.awt.Rectangle; import java.awt.event.KeyEvent; public class Ship implements Runnable { int x, y, xDirection; boolean shoot = false; boolean ready …

Member Avatar for london-G
1
136
Member Avatar for jouj

using the java swing how can i put a background image to my application in a way that the image will cover the frame . [B]ps [/B]: I'm new to the java so maybe my question is a silly one but i will appreciate any help .

Member Avatar for NormR1
1
170
Member Avatar for Andy90

Hi, I have created a form with one button. I m using mouse hover event on button to execute code! But the problem is, I want to execute the code only if my mouse hover on button for more than 2 or 3 seconds!

Member Avatar for ddanbe
1
117
Member Avatar for vegaseat

This snippet explores the change of a hexadecimal (base 16) string to a denary (base 10) integer and the reverse. Interestingly Python allows the representation of the hexadecimal string in two different forms. For instance 255 can be changed to 'FF' (also 'ff') or '0xff'. Any of these hexadecimal strings …

Member Avatar for warunn
1
8K
Member Avatar for shean1488

Hi everybody! Help me plz to figure out obe little thing. so imagine little window with 4 buttons and a JLable. I want to ask how to add JLable to the panel and not give it a Grid Layout. I mean that I want my JLable be under 4 buttons. …

Member Avatar for shean1488
1
125
Member Avatar for revenge2

hello there. i've installed mingw compiler and im wondering how i would go about setting up notepad++ to compile my c/c++ code?. How do i do this? -regards.

Member Avatar for jussij
1
854
Member Avatar for Jammie

Hi there, I tried binary addition. It seems to work fine. Could someone tell me if there's a better way of doin this or any bugs that could be uncovered in the code below? I appreciate your time. Thanks, Tina [code=c] #include <stdio.h> void binaryAdd(char *, char *); int main() …

Member Avatar for arunsolo1984
1
983
Member Avatar for gbertoli3
Member Avatar for habermanm
1
3K
Member Avatar for TrustyTony

Sometimes, before optimizing your code, you may end up to have very slow running code in list comprehension statement. Because you have not yet tested the code fully, it easy to loose patience and just interrupt the code. If you are making function, you can insert print statements for verification. …

Member Avatar for Gribouillis
1
1K
Member Avatar for zeeya

Hi!!! i'm final year student in computer science and have chosen virtual classroom systems to be done as a project for my final year.. i would like to know the enhancements and the new features that could be added to the project so that i could try to add them …

Member Avatar for happygeek
1
334
Member Avatar for khizer03

i have a doubt i have created a application in which i have used a VLC (Video LAN player) and i have given in the property in the option MRL i gave the video address which should be played, when i executed then the video was playing and when i …

Member Avatar for codeorder
1
123
Member Avatar for hey.howdy

[CODE] // a code to produce matrix style affect #include "stdafx.h" #include<iostream> using namespace std; int modulus(int Number, int number); char getchar(int lowerlimit, char a, int upperlimit); int modulus(int Number, int number) { int q=Number/number; return Number-(q*number); } char getchar(int lowerlimit, char a, int upperlimit) { return (a+modulus(lowerlimit,upperlimit)); } int …

Member Avatar for histrungalot
1
135
Member Avatar for javitis

Hello to everyone! I am working on a simple application like a search engine.It searches in an index(a txt file with filenames). If a match is found, it displays the complete path where the keyword is contained and opens the path. It's a movie catalog and searches for the movie …

Member Avatar for stultuske
1
304

The End.