199,124 Archived Topics
Remove Filter ![]() | |
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 … | |
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...... /********************* … | |
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 … | |
[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? # … | |
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(); } } | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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 … | |
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 … | |
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] … | |
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 … | |
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 | |
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 … | |
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: . . … | |
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 … | |
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); … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
I know a lot of c++ but don't know how to apply it in games. What should I do??? | |
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', … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
[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] ................ | |
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 << " … | |
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 … | |
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 … | |
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 … | |
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. … | |
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 … | |
[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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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, … | |
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 … | |
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 … | |
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--%> … |
The End.