64,152 Solved Topics
Remove Filter ![]() | |
I have tried using is_numeric to validate some form data to make sure it is only numbers that are entered into the form. I couldnt get it to work so I decided to try and put a-z\A-Z in preg_match. I cannot get either of them to work although there are … | |
When eval an equation does it follow the PEMDAS rules? For example: 2.0-1.0-3.0*6.0+5.0*4.0 when evaluated equals 3.0 when evaluated by python. To me that doesn't seem correct, I get a much larger number than 3.0 When I evaluate in python eval("6/2*3") it should equal 1 but in python it equals … | |
Hi, I've a csv file consisting of two columns - one with "Last Name" and other with "Email Address". I would like to match Last Name ( not an exact but a contain match), and if didn't match, populate third column with "0". Does anyone has a perl script to … | |
how can i add the last value to the current value using loop..? i tried so much but didn't find the answer :( [CODE]void main(void) { int numbers,add,sec; clrscr (); for (numbers=1;numbers<=49;numbers++) { for (sec=numbers;sec<=numbers;sec=numbers+sec) printf ("%d ",sec); } getch(); }[/CODE] here the loop is from 1 to 50, i … | |
how could I creat a file at desired folder? Below is my code and what I want to do is 1)I open the "newfile1.txt"and read the first line(e.g Cat) from this file 2) and then create the Cat.txt at "C:\user\user\Desktop\history" Currently, I could creat Cat.txt at the folder where my … | |
Hi people, My issue is more of a MySQL issue than php. I am trying to store a 3digit integer value with a leading Zeros in front such as 001 i have a company table , which auto increments the id as 001, 002, 003...and so on... In the company … | |
Hi guys , I am creating a timekeeping application to keep track of users. In my database I have a table which stores the time a user starts their break and finishes their break. I want to return the total time that the user is on break in minutes to … | |
I am trying to override setColour in the subclass callled ObjectB in the public void setColour(Colour xColour) method. So the OBjectB cannot change to purple. Can you see where I have gone wrong because the ObjectB is currently changing to purple colour. Please reply only if you know the answer. … | |
Hello. I have a small problem in my home assignment. A neverending loop occurs, if user enters everything but digits, when I expect him to enter only digits. How do I allow only int type variables to be entered by user? The value user enters is the index number of … | |
[CODE] for (int i = 0; i < 10; ++i) { i > 5 ? MethodA(i) : MethodB(i); } [/CODE] When trying to do the above I get this error [I]Type of conditional expression cannot be determined because there is no implicit conversion between 'void' and 'void' [/I] Does this … | |
[CODE]private void button1_Click(object sender, EventArgs e) { string m1; m1=cbmanganh.SelectedValue.ToString(); myds1.DSPT.DefaultView.RowFilter = "MaNganh='"+ m1 +"'" [COLOR="Red"]and[/COLOR] "Nam ='" +tbnamhoc.Text + "'" [COLOR="Red"]and[/COLOR] "HocKy ='" + tbhocky.Text + "'"[COLOR="Red"]and[/COLOR] "KhoaHoc= '" +tbkhoahoc.Text + "'"; dataGridView1.DataSource=myds1.DSPT.DefaultView; }[/CODE] error: expected ";" after each "and" Thank you so much! | |
Hi all I'm trying to figure out how to go about finding all <a> tags in a string and replacing the spaces within the <a> tag with underscores. Below is an example: Before [CODE=html]<a href="path/to/page" class="pageLink">Page Name</a>[/CODE] After [CODE=html]<a_href="path/to/page"_class="pageLink">Page_Name</a>[/CODE] Any help would be much appreciated. Thanks. | |
I need a java code for downloading files from the internet ..For example I want to download doc,pdf files from the internet means i have to do it through my code ..So can anyone help me | |
hallo there... is there a way to handle data from a POST method like [CODE]$listOfItems=$_POST['listOfItems'];[/CODE] on the variable though are inserted values of an array such as( 1234|john;3455|helen;.....e.t.c.) is there a way to "brake" the variable so as to get one by one the array values... thank you | |
Hello and thanks in advance for your time. Trying to learn how to throw App Exceptions. Is there any way to get this exception from properties so I can pass it to a JOptionPane? Model Resources UserException=Subscription failed. \ Please try another email address. ProfileException=Must Select a Profile \ UnenrollException=Unsubscription … | |
I'm trying to validate my xhtml page using the w3c validator, but there is 1 error: Line 103, Column 15: there is no attribute "name" <form name="checkForm" action="http://tl28serv.uws.edu.au/twainfo/form.asp" … You have used the attribute named above in your document, but the document type you are using does not support that … | |
Hy everyone, I got a problem with doin a sum of a column where are only "int" datas, I get those data from Sql Db with a Sql Data Source and use that sds with a nested gridview. I tried with select sum() but it for each employer i get … | |
Hi guys, I'm a bit of a newbie to PHP/MySQL, so please excuse me if I seem ignorant of something seemingly obvious. I'm writing a booking system for a holiday home rental company. I'm building it up slowly. What I have so far is trying to calculate the number of … ![]() | |
Hi everyone! I wrote a Python 2.5 application, with GUI from Tkinter module. To make it short, the user has to load a file and can start to work on it. I made it Windows executable with py2exe, and installable with Inno, with a file association setting. So now, if … | |
I am New TO Programming Am HAving 2 Table One Table Having Coloum ID and NAmeOf Eventt And Other Table Having Coloumn ID and Imagepath I want To Retrive Id related the NAme Of Event and Want To Insert That ID into other Table at the same time i want … | |
Hi Guys I'm New to web development. i need one help. I'm having list box on my form, in form load event i will bind the list box with database value. user should be able to select only 5 items from the list box and also i want to validate … | |
hello can you help me when i click the add button it will not add to the database.it will generate an error..can you help me please hoping for your positive responds...here's my code,please see my attachment.... [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.JPanel.*; import java.sql.*; public … | |
hello please help me on this i don't know how to trap the duplicate id_no..example if i have already added this id_no H-1010..then if i input again it should prompt that id_no is already exist on your database..please help me on this..hoping for your positive responds ..thanks in advance | |
Hello everyone! I am new to this forum (and C programming) but I hope that I will be able to master C help anyone out with problems in the coming months. But I am having trouble with my own program for an assignment. I am asked to simulate a user … | |
I am attempting to write some code that will open a sequintal file into arrays and will then can use the data to calculate monthly payment. the text file is as follows 1 5 10 20 50 2.5 4.1 5.3 7.1 8.3 With the top row being yrs and bottom … | |
I'm using Python and the Python CGI module to do some web development for a system's administrative access page. The problem I have is that the current features allow you to reboot the system, power off the system and stop/start/restart system services. The system is very limited in what's running … | |
i'm writing a program that reads the lines of a file. each line has a name and and number separated by one space. i want to split the string but i only want the number because i'm using it in calculations. i've skimmed through the python docs and i'm still … | |
[CODE][/CODE] def Given(rn): Given_lengths = [0] * 1000000 def rn2(n): if not Given_lengths[n]: Given_lengths[n] = rn(n) return memoized_lengths[n] return rn2 def cycle_length(n): if n == 1: return 1 if n % 2: return cycle_length(n * 3 + 1) + 1 return cycle_length(n / 2) + 1 def problem(i,j): for x … | |
I have three classes in the program. This is a part of my assignment. I am doing it for the first time; so you might find something stupid in there.. as i have just tried to get the output my way or based on the assignment requirements. I have one … | |
Hello, I have been searching for a solution on how to solve this problem for almost a month now. I'm at a point where I feel like I've traveled around the world 7 times and still haven't found the answer. I hate introductions so I'm just going to go ahead … | |
Hi all, I tried running the following code. [code] #! /usr/local/bin/python import threading import time print "Press any key to start timer!" input() threadBreak = False def TimeProcess(): while not threadBreak: print "How are you?" print (time.time() - startTime) startTime = time.time() threading.Thread(target = TimeProcess).start() input() threadBreak = True input … | |
Hi! I have a counter that increments by 1 for every page view. [CODE]$colname_Recordset1 = "-1"; if (isset($_GET['urlcode'])) { $colname_Recordset1 = $_GET['urlcode']; } mysql_query("UPDATE users SET counter = counter + 1 WHERE urlcode = '$colname_Recordset1'");[/CODE] It works in IE but counts twice in firefox the first time the page is … | |
I'm pretty lost on this. I have no idea how to get my program to work. Basically, when an option is selected a price should show up in the text box automatically. Thank you all for your help. Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: javax.swing.JComboBox cannot be cast to javax.swing.JTextField at … | |
ok I'm confused... my class is empty, apart from an inclusion file, but has alot of errors that i cant understand.... Here's the .h file: [CODE] #ifndef creator #define creator #include "stdafx.h" class creator { public: creator(); ~creator(); } #endif [/CODE] And here's the cpp file: [CODE] #include "creator.h" creator::creator() … | |
Hello :) I've got this resource (as in files on the pc) management system, that had been tested but now seems to be malfunctioning. I've been debugging for way too long now, and I can't figure out the issue. I'm going to post some of my code first, and then … | |
Hello All; I would like to start off by saying hello, and that this is actually my first post to the group, even though I have been a member for many years. I am a ASP Classic Programmer, professionally for a little over a year, I have developed some rather … | |
hi all i'm trying to draw an oval/ellipse over an existing square the problem is that the oval is drawn behind the rectangle how do i fix this? here is my form's code [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; … | |
I personally prefer the 3 syntax over 2, but I notice most of the code snippets in this forum are for Python 2. Is it because we are still in a steady transition from 2 to 3, or is it something else? | |
Here's my code. [CODE] (define L ()) (define (union L1 L2) ;continue until one list is empty (do() ((or (null? L1) (null? L2))) (cond ((<(car L1)(car L2)) (attach(car L1)(cdr L1)L2)) ((eq?(car L1)(car L2)) (attach(car L1)(cdr L1)(cdr L2))) (else(>(car L1)(car L2)) (attach(car L2)L1(cdr L2))) ) ) ;after which you continue to … | |
Hi, I want to send three text box values to server using jquery ajax. problem is that, i dont know the exact syntax to send three data. When i try sending one data(also change no.of parameters to one at server side method), its going good but when i try to … | |
Greetings! I have a form that's meant to be a rudimentary search engine. The forms calls the piece of code below and outputs successfully the results in a new tab. [CODE]<?php //Includes the db config file $dbconf = include '.../config/dbConfig.php'; //checks if fields are set. if(isset($_POST['submit'])) { if( !empty($_POST['search_string']) ) … | |
Hi all, I am working on a PHP project. Im having a problem giving the 'src' for a image, because the image file is placed outside of the www folder :(. Let me explain more. When I log in to my server using FTP logins, it gives the directory structure … | |
Hey. I'm pretty new to C# and programming overall. I'm trying to make a Hangman game. Let's say the user want to make a guess at the letter "t". Then he should just have to press "t" on his keyboard and the form should recognize it. I currently can't even … | |
Hi, i need help please! i have a page were users can upload images, the name and path to where the image is stored is stored in the database. I want the aministartor to be able to view all of the images. when i try this it returns the path … | |
This sample code is from [URL="http://msdn.microsoft.com/en-us/library/aa287786%28VS.71%29.aspx"]MSDN[/URL]. [CODE]private string name; public string Name { get { return name; } set { name = value; } }[/CODE] I looked several examples, and they are the same. Why do we keep two different properties to store the name, namely "name" and "Name". I … | |
For example if I have this int type variable X that increment from 1 at the beginning to 10 when the program ends, how to open and write to 10 different files (data1.txt,data2.txt,data3.txt....) everytime X increments? I've tried with the following but it didn't work: [CODE]string filename ("data"); int X; … | |
When I am going to modify hashtable data it is giving me the exception.`"Collection was modified; enumeration operation may not execute"` Here is the code.. foreach (DictionaryEntry Item in hashtable) { switch(Item.key.ToString()) { case "Color": { hashtable["Color"]="ffffff"; break; } case "Width": { hashtable["Width"]="40"; break; } } } My qustion is … | |
Hi, I am a php newbie. The site is a sports site, and contains information on about 10 teams. However each team has it's own admin section. I would like to have 1 general login page that lets a user access the database that relates to their team. I don't … | |
I'm trying to write a program and am having some major issues. I've written a decent program but people are complaining about some of the cosmetic issues. I have very little experience with code (maybe 10 days of frustrating Internet research). Here A few issues that i have that keep … | |
I am using Wampserver for my Windows Apache-PHP-MySQL stack. The file accessed has a header that defines it as utf-8, meta tag in HTML also defines it as utf-8. My best guess so far is that it has something to do with Apache. Searching through Google was of little help … |
The End.