199,114 Archived Topics
Remove Filter ![]() | |
Call me anal but [CODE] return NewMouse.LeftButton == ButtonState.Pressed && OldMouse.LeftButton == ButtonState.Released; [/CODE] on one line doesn't look right and isn't very readable. If I have a line of code that has multiple logic operators, how should it be formatted? For example Should return statement1 && statement2 && statement3 … | |
Hello, I am having some trouble debugging a simple windows forms application. I have four textboxes, two being readonly that display the calculated answers, and then a "calculate" button. here is the code for the calculate button: [code] private void btnCalculate_Click(object sender, EventArgs e) { decimal obj_height = Convert.ToDecimal(txtHeight.Text); decimal … | |
Hi when let me get straight to the point ..... I've made a database, inserted data into it and selected it on a page but I can't find out why I can't view the text in the table?????????????? :@ I'M SO PISSED OFF!!!!!!!!! I've been trying it for hours here's … ![]() | |
I have a form named:"RegistrationForm.php". when i click the "submit button", there's a data inserted in the database (the prove is, there a new row in the database), but there's no value from user textfield(ic_no,name,email...) that have been inserted. It means like there's a row of data inserted but without … ![]() | |
Hey Guys and Gals, I have an array: Array ( [Small] => Array ( [0] => 4 [1] => 5 [2] => 3 ) [Butters] => Array ( [0] => 5 [1] => 2 [2] => 5 ) [black] => Array ( [0] => 3 [1] => 5 [2] => … | |
i want this code to do the action, which is generate a random number 1-6. i am totally lost here ive been looking at examples and this is what i have. i get the error function def is not allow here before "{" token. [CODE]void roll_hold( char remark) { if(remark=='r') … | |
I'm writing a program that requires the user to select a file when the program starts. If he cancel this the program exits. Currently I'm creating an OpenFileDialog in the main form's constructor, but it's not working very well due to the following issues: * If the user cancels I … | |
I have a problem with inheritance. I have the class A with functions x and y Class B is a subclass of A and should override y. y should call y in A and add extra functionality. Class C is a subclass of B and should override y. y should … | |
During a university project, I had to print some int arrays to the screen, and I wanted to do it with printf. So I decided to include a function that converts an integer array into a string type, and passes the string out to the calling function. But the function … | |
This isn't entirely a programming problem, but it may be at its base, which is why I'm bringing it to you guys. For my assignment, I have download a .txt file from my prof's webpage, and then have my program open it. The file, when opened in a web browser, … | |
Hi experts, I have confusion about the point I read in my book: I. In a source file you can define number of classes, but only one of them can be a public class. In this case, the name of source file must match the name of public class. II. … | |
I wonder if at least according to ECMA-334, section 15.9.5, the behaviour of following is undefined: [code] using System; class FindingCountry { public static void Main(String[] args) { int a=0; try { throw new ArgumentNullException((5 / a).ToString()); } catch (DivideByZeroException) { } } } [/code] Running it with the VS … | |
in c++ primer " [CODE]void reset(int *ip) { *ip = 0; ip = 0; }[/CODE] After a call to reset, the argument is unchanged but the object to which the argument points will be 0:" I understand that the argument is unchanged, but why the object to which the argument … | |
Hey Guys - i am really new to Java and am having some serious problems trying to figure out how to use the painting stuff. My problem i am trying to get to work is that i need to create a 'circle' by using lines from X number of points. … | |
so this program takes an input file and computes the class average and lists the students who are below average and the students with the highest score. Heres what im having trouble with: Having trouble getting the proper for loop to calculate sum, I've tried many different ways but its … | |
I would like to thank the moderator for helping me with the code while reading row by row data using datatable and sqldata adapter. I am worried about the speed and performance of my code since I am making round trips to the server,every time I am increment the index … | |
It all started like this I created a sub directory in my hosting account, for blog engine 1.5. I then copied all the file from the source to the target sub directory folder which is under my root application. when I lauched this is the error I was getting [B]To … | |
[code] foreach (string id in str1) { string logoImage = ""; string BundleID = id; BundleSearchResultStruct BundleSearchResult = nbsi.GetProductDetails(guid, "marketingPartnerPassword", Convert.ToInt32(BundleID)); string y = builder1.Append(BundleSearchResult).Append(",").ToString(); y = y.TrimEnd(','); Session["BundleSearchResult"] = y; //some code relevent only to this block } while (reader1.Read()) { //do something foreach (string id in str1) { … | |
Good morning all, I am having a few issues. Firstly, I am no expert whatsoever so I may not have done anything conventionally. I have been able to create a form with many fields, click submit and data is inserted into a table in my database. I was then also … | |
Hi all. I have the following form: [CODE=html]<form id="registrationForm"> <input id="forename" type="text"></input> <input id="surname" type="text"></input> <input id="emailAddress" type="text"></input> <input id="password" type="password"></input> <input id="confirmPassword" type="password"></input> <input id="agreeToTerms" type="checkbox"></input> <input id="clickToRegister" type="button" onClick="javascript:SpeakAtServer(FormToJson('registrationForm'))" value="Register"></input> </form>[/CODE] ...with the following JavaScript... [CODE=javascript]FormToJson = function(sourceElement) { var JsonToServer = new Object(); if (document.getElementById(sourceElement).childNodes) { var … | |
Is python web programming anything like php? Is there simple examples like submitting a form to perform a calculator functions etc? | |
Hey gang, I have a string array containing 10 words,I would like to randomly pick one of these words, how do I go about it,cant find any tutorials???? Thanks Buzz | |
Hi i want implement a windows services scheduled task. I already created windows service. In a service i have implemented a timer.The timer is initialized at class interval. The timers interval is set in the start method of service and also it is enabled in the start method of the … | |
This program is a GUI shopping menu with text fileds next to item descriptions. My question is about the add method in ShippingCart class. It is called every time an action occurse in a text field, from a GUI class not shown here, where quantity requests are entered. So when … | |
Hey I hope someone can help me here because I am pretty stumped on this one... All I'm trying to do is to update my user_usr table with the submitted form data. It was working perfectly the other day so I must have changed something somewhere. The code and the … | |
I want to remove all the 1's from the sublists so l becomes [[2], [2], [2]] but have trouble keeping track of indices. Can someone help out? [CODE]l = [[1, 2, 1],[1, 1, 2],[2, 1, 1]] i = 0 for element in l: while i < len(element): if element[i] == … | |
Hey there :) i am trying this part of code, which testing arguments on command line: [CODE] use Getopt::Long; GetOptions( "verbose" => \$verbose, "get" => \$get ); print "verbose = $verbose\n"; print "get = $get\n"; [/CODE] In my script i have several arguments, with which my script working (any sequence). … | |
Hi guys, i want to find something out that will help me out a great deal. I am including a menu from a separate .php file using [CODE]<?php include("menu.php"); ?>[/CODE] but something that i really need to find out before i can continue with this. When I'm at eg 'Home' … | |
Hi im writing a code that is supposed to display this * ** *** **** ***** **** *** ** * i have this so far for (int i=0;i<6;i++){ for (int j=0;j<i;j++){ which displays this * ** *** **** ***** how do i get the reverse side | |
can anyone explain how can a function return a double pointer with which a 2 dimensional array can be traversed, this function takes the number of rows and columns as arguments: like: void ** function(int row, int col) { void **returningPointer= NULL; void*p; for (i = 0; i < row; … | |
I am new to php but have modified an entire code in two weeks. I have it all working, however the last change that i made is not being seen on the web page. I am dealing with php 5.1.6 and apache and since then whatever change i am making … | |
Hi all, I want to zip a files with directory structure. Suppose i have Folder name C:\examples This folder may contain sub folder and files also.. And i need code which zips with folder structure.. not only a just a file.. it should also zip folder to..! I search in … | |
Hello. I need some help. I have a function [icode]my_function(a, b, c, d)[/icode] which takes string parameters and output them in different combinations. It works well in IDLE, but I would like to output the result into a file. Such code [code=python]file = open("out_file.txt", 'w') file.write(my_function(a, b, c, d)) [/code] … | |
Hello All, I am interested in creating a bot to find the same info on the web each day and compile it in excel or access etc. I wondered where to start. I'm not a programer yet so I need advice on which language to learn and where to look … | |
How do i join two tables in MySQL to form a third table having certain columns from both the tables?:?: | |
Hi guys, Could anyone help me out with this... I have a multi form, which the user enter in the data and submits the data.. It also have a save button in it.. so user can save and then come back,.. then can save again, or submit.. I saved the … | |
hey i am new in javascript, i was having problem in including jquery in this file in Visual Studio but i resolved it by using ResolveUrl but after that its giving error "; expected" in the line1 i-e [CODE]<[COLOR="Red"]%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2"%>[/COLOR] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 … | |
I'm making program similar to keylogger (in vb2008), that detects keys pressed and then save it... How can i make, that program will name .txt file like "29.3.20010.txt"? im using this code to make a file: [CODE]Dim file As System.IO.FileStream file = System.IO.File.Create("C:\Key\Keylogg.txt")[/CODE] how can i insert Date: [CODE]Dim dtmDate … | |
How to use "c:if" to test for the boolean true? These does not work: [CODE]<c:if test="${model.value == 'true' }"> <c:if test="${model.value == "true" }"> <c:if test="${model.value == true }">[/CODE] | |
Swaps Two Elements Of An Array (So that say, indice1's value would become indice2's value, and vice versa). Simple Code Piece Really... | |
problem was first posted [URL="http://www.daniweb.com/forums/post1174806.html"]here[/URL]. lionaneesh got a problem with this question. I tried to solve that question myself. He solved himself, but i failed. the questions is: This program/function will delete all those characters in the first string i.e str1[] that matches any character in the second string i.e … | |
I'm working on my poker clock again now that I found the source, and I need some help with loops. I have a label that has the round number on it, and labels for the small and large blinds for the current round, and for the next round. I have … | |
Hello All, I have a problem regarding the grid view win C#.. i have a grid view called subGrid, i am using it to get the values sent by a Stored Procedure.. subGrid.DataSource = form.GetRegistrant(); Now this subGrid has the following values.. id name result 1 a Yes 2 b … | |
Hi all, I am a PHP programmer with no knowledge on VB, so I apologize for my intrusion :). What I need is to split a .doc file with N pages into N different documents, using the first word of each page as the name of the documents. In php … | |
Hi to all, I was wandering if there is build-in method to search in a string, I'll explain my self: I have the following string(for example) this- is; text, example for the forum I need to search for a certain word(lets say example) and look the closer char(from a list … | |
Just a quick one- I'm writing code that asks the user for a filename and checks that it exists. If it does it has to print the file's contents, if not print a message. [CODE]import os fileName = raw_input("Enter the name of the file: ") if os.path.exists(fileName) == True: fileName.read() … | |
Hi guys! Hope someone can help me out here. I'm using javascript to validate a form and if it's false it displays a message. If it's true in passes it to a php file to process it. The problem im having is even if it fails validation it still passes … | |
Hello Everybody, Im a VB hobbyist, ive been learning for about a month or so now, ive created a few basic handy applications. Ive mainly been using web browser controls and am now experimenting with httpwebrequests. Im the treasurer of the Mont-Tremblant Rugby Club, now the season is starting again … | |
hello all, I am reading a book on c++. It talks about pointers and how to use them. I dont understand what the point of pointers is. Mainly, why would someone need them and what can a programmer do with them. Please be as detailed as possible as i am … | |
Hello There, I M having Problem with Getting Page Name With JavaScript in WordPress. I have Used This Code To Get Page Name In WordPress. [CODE]function GetCurrentPageName() { //method to get Current page name from url. //return page name in small . var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf(‘/’) … |
The End.