199,124 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for QWaz

Hi, I am trying to get money to display correctly with the decimal points in the right place. I have read the PHP manual, but just don't get it. I want to do 2 things: 1: if someone types in 123.23 -> I want to remove the '.' (so it …

Member Avatar for sacarias40
0
117
Member Avatar for Rajnesh

I was creating a chat application in Java Swing/Socket Programming. The same when I created in non GUI app. it worked [url]http://www.daniweb.com/code/snippet448.html [/url]. But in GUI, they can't connect now. I have tried it thru many ways but still m getting errors for connection. Can anyone can help me...... /********************* …

Member Avatar for anthonydonx
0
260
Member Avatar for Koibu0

Forgive my ignorance with such matters, but I have what is probably a simple issue that I can't seem to resolve on my own. I'm getting this error when sending a request to the SOAP server [CODE]org.xml.sax.SAXParseException: Content is not allowed in trailing section.[/CODE] I've checked the end of all …

0
121
Member Avatar for Zemeus

[code] #reg.py #Choose username and password def regis(): userpass = open("userpass.txt","w") userpass1 = userpass.write(raw_input("Please select a username: ") + "\n") password1 = userpass.write(raw_input("Select a password: ")) userpass.close() #end of reg.py #login.py # Should i import reg before this function or is it ok to do it in the function? # …

Member Avatar for TrustyTony
0
145
Member Avatar for fsl4faisal

abstract class A { abstract void callme(); void callmetoo() { System.out.println("this is concrete method"); } } class B extends A { void callme() { System.out.println("implementation of callme"); } } public class abstractdemo { public static void main(String []args) { B b=new B(); b.callme(); b.callmetoo(); } }

Member Avatar for NP-complete
0
197
Member Avatar for 3ndl3ss

Hello, I have a simple idea for a gaming application tool. I would like to create a small tool for an online game that I play. [B] The tools objective will just be to alert the user through a sound that will play as soon as there is any type …

Member Avatar for 3ndl3ss
0
185
Member Avatar for Member 784878

How to convert following dos batch code to unix shell:- echo Database username and password will be taken from liquibase.properties file.... setlocal ENABLEEXTENSIONS for /f "tokens=1* delims==" %%a in (liquibase.properties) do ( if "%%a"=="username" set dbuser=%%b if "%%a"=="password" set dbpwd=%%b if "%%a"=="url" set dburl=%%b ) echo. echo UserName is:=%dbuser% echo …

Member Avatar for griswolf
0
147
Member Avatar for krishx343

Hi I need to know, is there any option to use For loop instead of While and ForEach to retrieve the result. While Loop ----------- [CODE] $query = "SELECT name, subject, message FROM contact"; $result = mysql_query($query); while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { echo "Name :{$row['name']} <br>" . }[/CODE] instead to …

Member Avatar for rajarajan2017
0
9K
Member Avatar for virspy

Hello Friends, Hello to all, Iam having an issue regarding the Jquery facebox i applied jquery facebox to my login form and its working great now. But the problem is when we click on facebox link without the total loading of page it si opening in anothe window. but the …

Member Avatar for virspy
0
90
Member Avatar for mtliendo

I'll start off by saying that not only am I new to Python but programming in general. But the problem is that whenever I have the user put in a number, then have the user put in another number, I can't get the two x,y variables to add up. the …

Member Avatar for griswolf
0
175
Member Avatar for sparkles_links

Hello guys? You have been very wonderful, I have some stress. I designed a site and send the form details to an email address but Image will not or can not be sent along the other details I don't know why. Please I need help. This is what I did.With …

Member Avatar for vibhaJ
0
70
Member Avatar for faizabest

I have this error when I run my system in XAMPP but it works succ on WAMP.. Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\xxx\xxx.php on line 29 Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\xxx\xxx.php on line 38 My coding: [COLOR="Red"]7[/COLOR] …

Member Avatar for faizabest
0
146
Member Avatar for adams161

In my sample code for writing to update a value, say employeeId, i saw it said to use the properties method and follow two paths. If it exists allready: [code=c#] If(child.Properties.Contains("employeeId")) [\code] then you would simply do: [code=c#] child.Properties["EmployeeID"][0] = Id; // by the way it seems this has two …

Member Avatar for Teme64
0
173
Member Avatar for echellwig

Hi, I am trying to interface between Java and Python in a program called Eclipse. Specifically, I need to call a program I wrote in python while in java. Any insight on how to do this would be helpful. Thanks! Elise

Member Avatar for Stefano Mtangoo
0
102
Member Avatar for kentor

I want to build a site similar to ebay (a mini version of it) and I'm wondering how they built their system. The part I don't understand the most is how they manage their categories. They have one search code and probably one code for posting items for sale as …

Member Avatar for avanitgrpl
0
191
Member Avatar for jmangu

Hello, I need help concerning <curses.h> and <conio.h> libraries issues. There's a conflit between both libraries when I compile my software in Dev-C++ (XP OS). 1. In <curses.h> there's this code line: . . . extern int COLORS,COLOR_PAIRS; . . . 2. In <conio.h> there's this code line: . . …

Member Avatar for Ancient Dragon
0
444
Member Avatar for SacredFootball

I've read this on some other questions here at DaniWeb so I've been trying to use the suggestions posted. They don't seem to be working correctly for what I need or I'm seriously confused (probably the latter). Anyways, I'd like to establish good programming practices early to avoid developing bad …

Member Avatar for Lerner
0
210
Member Avatar for chinee

I don't understand why my labels are not coming up when i run the code are the JComboBox to big or what? [CODE]import javax.swing.*; //import javax.swing.AbstractButton; import java.awt.*; //import java.awt.event.ActionEvent; //import java.awt.event.ActionListener; public class floralOrderGUI { JButton submitButton = new JButton("Submit"); public static void main(String[] args) { new floralOrderGUI(); //system.exit(Q); …

Member Avatar for NormR1
0
90
Member Avatar for surfgrommett

Hi guys. First I have spent awhiel trying to find an answer for this online and haven't been able to. I have defined a variable ($new) in the beginning of my page. to test that is IS defined right i echo'd it...im using nested if statements to check thing. in …

Member Avatar for surfgrommett
0
109
Member Avatar for arbme

Hi, I new to C# but been working with PHP for years and decided to try proper programming :) I want to create a simple proxy to add or remove certain http headers. My plan was to use HttpListener to catch the request by the browser then edit headers I …

Member Avatar for Lusiphur
0
357
Member Avatar for chinee

i am trying to extend a splashscreen window ti 15 minutes can anyone help. [CODE]import java.awt.*; import javax.swing.*; public class flowerOrder extends JWindow { private JProgressBar bar; private JLabel ImageHolder; private ImageIcon myImage; private int i; public flowerOrder(){ setBounds(60,60,600,600); //set location and size of the window getContentPane().setBackground(Color.BLUE); //set the background …

Member Avatar for chinee
0
122
Member Avatar for shave31

Hello! I'm trying to make a simple calculator in Visual C++ and while coding the decimal button, I encountered the error C2228. Basically, I'm checking if the textBox1 (its name!) already contains a '.'; if yes, then it should return; else, it'll add a '.'. To check for that, I …

Member Avatar for Danny_501
0
226
Member Avatar for vlad44

hi all, i was trying to write to a pre existent binary file but every time it would change the size of file and remove all of its contents so what i should i do????? here is an example to what i'am trying to say(it is not exactly the same …

Member Avatar for vlad44
0
113
Member Avatar for nwhitfield

I know a lot of c++ but don't know how to apply it in games. What should I do???

Member Avatar for nwhitfield
0
119
Member Avatar for Dan08

Hey everyone again, so I am having a lot of problems with function in wxPython, this time, I need to know how, or if it is possible, to add new widgets to the main frame from a function, so here is my code: [CODE]import wx class Example(wx.Frame): def __init__(self,parent,id): wx.Frame.__init__(self,parent,id,'Example', …

Member Avatar for TrustyTony
0
260
Member Avatar for Daqpan

I can't believe I'm even having to ask this rather simple question but I wouldn't normally use C++ for this, and I'm caught on a snag. I have some files filled with many entries like this (from unix time command): [code] real 0m0.475s user 0m0.091s sys 0m0.028s [/code] For each …

Member Avatar for dusktreader
0
135
Member Avatar for mbaker3

Some background I have about 1000 objects of the same class that are created from parsing a text file. The class holds 4 short (~20 characters) Strings and 2 ints. I plan to make an application that uses these objects (a sort of map if it matters). I would prefer …

Member Avatar for NormR1
0
84
Member Avatar for lakarr

Hello! So I have a program where I need to open a file, pass the reader into a method, and then within the method read from the file. Then when control shifts out of the method, I need the file reader to be able to pick up where the method …

Member Avatar for lakarr
0
316
Member Avatar for cmsc

hello! i need to make this program that lets the user input like for example 99 then the program will output 'c'. i don't know how to start. but i thought about getting the first 9 first, then subtract 30h, the multiply it by 10. afterwards, add the other 9, …

Member Avatar for Goalatio
0
4K
Member Avatar for Member 785748

Hi. I've been working on this for maybe 10 hours without success and hope someone can help me here. Sounds simple: I want the user to enter URLs similar to this: [url]www.site.com/thisuser[/url] or [url]www.site.com/thisuser/[/url] (never underestimate the stupidity of the user, so I want it to work with or without …

Member Avatar for Member 785748
0
330
Member Avatar for euroazn

Alright. In Outlook, if I want to arrange my tasks by categories, I can go View->Arrange By->Categories. My question is, is there anyway to do this programatically? Thanks a bundle :D

Member Avatar for euroazn
0
130
Member Avatar for iWalletMobile

So im trying to write a code within an iframe that will hide the address bars page address. Example: [url]http://example.com/[/url] will be the ONLY thing in the address bar that shows regardless of page they are on. So if someone clicks to0 example.com/about.php it will only show example.com in the …

Member Avatar for iWalletMobile
0
115
Member Avatar for Member 785174

Hi. I am working on a program in which the user enters a series of integers, and the program displays the highest and lowest integers after the user inputs -99. My problem is initializing the variables; I have no clue how to make my loop work in all cases, just …

Member Avatar for NormR1
0
138
Member Avatar for A Huang

Hi there, I see a sample code that an object is instantiated within the class definition block. But when I test the folllowing, I got error "Process is terminated due to StackOverflowException."? [code] Imports System Module xx Sub Main() Dim a As New c() End Sub End Module Public Class …

Member Avatar for GeekByChoiCe
0
151
Member Avatar for vello

[CODE]import time import subprocess from PyQt4 import QtGui, QtCore[/CODE] ............. This function is not working! [CODE]@button.clicked.connect def connectClicked(): button.setEnabled(False) process = subprocess.Popen("command", shell=True, stderr=subprocess.PIPE, stdout=subprocess.PIPE) time.sleep(5) # 5 sek (?) button.setEnabled(True) [/CODE] ................

Member Avatar for TrustyTony
0
155
Member Avatar for Member 784453

Hi again, I'm back, with another question about my calculator program (which I got to work, yay!) Why does the following program not work (when the one after it does): [CODE] #include <iostream> using namespace std; float x; float y; char z; int add() { cout << x << " …

Member Avatar for Member 784453
0
165
Member Avatar for phummon

Hi everyone, I have a "This should be simple!" kind of problem. I need to do a little socket programming on a SunOS machine. I went back to an old school assignment I did years ago, cut-n-pasted that code, intending to basically cannibalize it for the program I need to …

Member Avatar for phummon
0
279
Member Avatar for honos1

I have started getting an out of memory error that wasnt occurring before I changed hosts. I altered my php ini settings to add but the godaddy people pointed to this code and suggest I rewrite it. The problem I am having is I took this code from someone else …

Member Avatar for honos1
0
144
Member Avatar for Member 784689

Visual C++ is an absolutely big environment. Currently, I'm working on windows forms applications. I tried to search for tutorials but the only thing I found was scattered information in MSDN Microsoft website. How is it possible to learn windows forms separately?Is there a book out there? Anyway, I'm going …

Member Avatar for Ancient Dragon
0
168
Member Avatar for Tommymac501

We get files from a unix system that are delimited with linefeed only, this is not a problem. The problem is that within some of the fields themselves, there are carraige controls ("\r\n"). Reading the file using OS will see a row like this and stop reading at the crlf. …

Member Avatar for TrustyTony
0
11K
Member Avatar for laghaterohan

Hello, I have created an HTML table wherein the row's values are filled thru database. ex: FirstName : dbvalue and so on... Then i create an excel file please find below code: [QUOTE] StringBuilder str1 = new StringBuilder(); str1.Append("<html xmlns:o='urn:schemas-microsoft-com:office:office'").Append(Environment.NewLine); str1.Append("xmlns:x='urn:schemas-microsoft-com:office:excel'").Append(Environment.NewLine); str1.Append("xmlns='http://www.w3.org/TR/REC-html40'>").Append(Environment.NewLine); str1.Append(Environment.NewLine); str1.Append("<head>").Append(Environment.NewLine); str1.Append("<meta http-equiv=Content-Type content='text/html; charset=windows-1252'>").Append(Environment.NewLine); str1.Append("<meta name=ProgId …

Member Avatar for Lusiphur
0
171
Member Avatar for kayfar

[CODE]protected void Button3_Click(object sender, EventArgs e) { String path = Server.MapPath("App_Data\\dnis2010.mdb"); String sqlQuery = "SELECT * FROM tableRegister WHERE SerialNo=@TextBox41"; OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =" + path); OleDbCommand aCommand = new OleDbCommand(sqlQuery, aConnection); aCommand.Parameters.AddWithValue("TextBox41", TextBox41.Text); try { aConnection.Open(); OleDbDataReader aReader = aCommand.ExecuteReader(); if (!aReader.HasRows) { ClientScript.RegisterStartupScript(typeof(Page), "PopUpMsg", "<script>alert …

Member Avatar for Lusiphur
0
472
Member Avatar for VBNick

I have a small test program made, and it actually fully works. It connects, and you can send messages back and forth.....but for some reason, when I call connect(), It returns SOCKET_ERROR, but connects, and works fine anyways. Does anyone know why? here is the code: see lines 160, 161 …

Member Avatar for VBNick
0
222
Member Avatar for red_ruewei

Hi guys, Need your help/advice/opinion for below sql. I try to select all count record that exist in tables between to date insert by user.Currently, just put dummy date to test. The result is ok, but it only view for match data. How to include the record that not match …

Member Avatar for tesuji
0
1K
Member Avatar for adaniel058

I have a problem where I need to be able to create an array using the data from the text file. The first line of the file is the array size and the following values need to be put into structs. There may be more than one array per txt …

Member Avatar for adaniel058
0
368
Member Avatar for mayank101505

how to read txt file binary data and store it in array for further use. this use the concept of data file handling. plzzz bhelp me the way out as soon as possible.

Member Avatar for Excizted
0
91
Member Avatar for Nikon70

When I read a text file as the code below the first line returns as nothing. I checked the text file and it contains 3 lines before the read. After the read the first line is blank the following 2 lines have values. I don't write back to the file, …

Member Avatar for Nikon70
0
97
Member Avatar for Member 785230

Hiya, I have a int x = 28492374 and need to add every other digit together and then later do other stuff with the digits like take every other digit and multiple by two then add each digit together. Anways i dont know the method call out a single digit …

Member Avatar for Prateek Jauhari
0
93
Member Avatar for midget66

I' working on an array where the user inputs characters(up to 80). I then need to output the characters, one per line, until the string is null. My problem is in the while loop i think, im just not sure what to do from here. Any ideas? [CODE]#include <stdio.h> void …

Member Avatar for kings_mitra
0
141
Member Avatar for hasbeenbad

I have a web app that creates an employee.txt file, how do I go about printing the contents of the file from a form? [CODE]<%-- confirmation.jsp --%> <%@ page session="false" import="java.util.*" %> <%@page import="java.io.InputStreamReader"%> <%@page import="java.io.BufferedReader"%> <%@page import="java.io.DataInputStream"%> <%@page import="java.io.FileInputStream"%> <%--Retrieve the Employee and Hiring beans from the Request scope--%> …

Member Avatar for NormR1
0
135

The End.