64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for macobex

I'm in the middle of a project development, and I'm frustrated with this problem. Im running XAMPP under Ubuntu 10.04 (Lucid Lynx) mySQL version : Ver 14.14 Distribution 5.1.41 The problem is that, mySQL is accepting null values even if the field is declared with the NOT NULL constraint. Example: …

Member Avatar for macobex
0
265
Member Avatar for ranu jain

I am using ASPNETDB.mdf database (default database) in my application . to create a user i am using CreateUerWizard .i want to costomize and want to add new field-"Contact No" in it . how can i store contact no in database? i m working in vb.net with visual stdio 2008 …

Member Avatar for ranu jain
0
71
Member Avatar for gotjeff5

So here is my problem. I have been working on a program that impliments a tic tac toe game, but for some reason my array gets messed up after the switch statement in playerX function. If you could take a look that would be great. Heres my program: [CODE]#include<iostream> using …

Member Avatar for Intrade
0
140
Member Avatar for TySkby

So, not so much of a coding question but more of a development question. [B]Some background:[/B] I have finished writing a scheduling program (in part thanks to the folks at Daniweb) in PHP (using MySQL) for a small business that sells musical instruments, music lessons, and the like. The program …

Member Avatar for TySkby
0
230
Member Avatar for iwanttolearnc

ive been trying my hand on using modules to make my codes cleaner. i started off with a simple case. i created a module, usermodule.py, which i will pass to a main program openme.jpg - 640x480 [CODE] #this is usermodule.py import Image #image = Image.open ('openme.jpg') #imload = image.load() def …

Member Avatar for iwanttolearnc
0
133
Member Avatar for novice20

hi... am using pysnmp module to do an snmp get on a USB key status from pysnmp.entity.rfc3413.oneliner import cmdgen #--query on ccmSDIDUKeyStatus errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd( cmdgen.CommunityData('xxx', 'xxx', 1), cmdgen.UdpTransportTarget(('192.168.5.157', 161)), (1,3,6,1,4,1,18489,1,2,4,2,8,0)) varBinds gives the following: [(ObjectName('1.3.6.1.4.1.18489.1.2.4.2.8.0'), Integer('2'))] I need to print the key status, based on varBinds, …

Member Avatar for novice20
0
994
Member Avatar for templersstorms

Ok, basically, I have a datagrid with a button column, and the goal is, to be able to load specific things into a second datagrid depending on which rows button was clicked. But I seem to be completely unable to figure out how to get the row index. The program …

Member Avatar for templersstorms
0
100
Member Avatar for pythonlearning

When handling command-line arguments, I roughly know getopt will work, but have never used it before. The documents on some books seems not very informative, if read multiple arguments from the command line, is it right to use sys.argv[1], sys.argv[2], etc to assign the arguments to respective variable in the …

Member Avatar for pythonlearning
0
172
Member Avatar for Bigbrain99

Hi guys, I'm still new to C++ and get confused by the codes below.. [CODE]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} };[/CODE] [CODE]class DUTY { FLATMATE resident; //name of the flatmate int RequestOffer; //amount …

Member Avatar for Bigbrain99
0
119
Member Avatar for Barrett1
Member Avatar for LevyDee

Hi guys, as the thread says, im new to java. My department is more in the c++ side of things. My form class... [code] import javax.swing.*; import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionListener; import java.awt.*; import java.awt.event.*; import java.util.ArrayList; import java.util.Vector; public class DogForm extends JFrame { private String _adminLogin = new String("admin"); …

0
67
Member Avatar for gtr1971

Hello all! I'm a newbie to Javascript and I have what seems to be a simple task that has stumped me. I have a parent/child scenario where the child is a pop-up "control panel" with hyperlinks that control the parent page. The idea is to click a link and it …

Member Avatar for gtr1971
0
12K
Member Avatar for insanely_sane

Yeah... I have a headache... So I have the following code: [CODE]public class inc { public static void main (String args[]) { new inc(); } public inc() { System.out.println (addTwo(7)); } public int addTwo(int n) { System.out.println (n); if (n < 1) { return 2; } else { return addTwo(n-1)+2; …

Member Avatar for insanely_sane
0
166
Member Avatar for knan

I have a set of text files in a folder. I want to read each file, convert the contents of the file to lowercase, remove punctuations and save them all in another directory with the same filenames. How can i do that???

Member Avatar for griswolf
0
322
Member Avatar for ace8957

Hey Everyone! So I'm a super beginner trying to teach myself the ins and outs of stacks (ever so slowly). Specifically, I'm trying to work out a programming challenge in which the objective is to write a function to tell if a string in the format of word1$word2 satisfies the …

Member Avatar for ace8957
0
172
Member Avatar for VectorAKA

ok the guy helpes me with my problem in my last post but I need to switch this: #This module determines highest value in list def highestMonthNumber (rainfall): month = ['January','Febuary','March','April','May','June','July','August'\ ,'September','October','November','December'] highestMonthly = 0 for m, n in enumerate(rainfall): if n > highestMonthly: highestMonthly = n highestMonth = m …

Member Avatar for woooee
0
270
Member Avatar for ausops

I'm working on a constructor which lets the player input a starting sudoku grid and also checks if it's valid and can be played, ie, it doesn't already have duplicate numbers. The code listed here is my newest attempt and works on making each number +1 to another array. So …

Member Avatar for ausops
0
149
Member Avatar for Mona..

hello.. What do we mean by binary search and how we can do it using C++ thanks..

Member Avatar for Mona..
0
118
Member Avatar for lulemurfan

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Edit</title> </head> <body> <?php $con = mysql_connect("************"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("**************", $con); $1 = ($_POST['1']); $2 = ($_POST['2']); $3 = ($_POST['3']); $4 = ($_POST['4']); $5 = ($_POST['5']); $6 = ($_POST['6']); …

Member Avatar for lulemurfan
0
90
Member Avatar for kezkez

I am having a hard time figuring out how to use the db object created in the first action event within the second action... how can i make the object visible there? i am trying to say add a record to db object by saying something like ... class Action2 …

Member Avatar for kezkez
0
158
Member Avatar for daneuchar

i want to use two different css for firefox and chrome but unable to do it.. :( please help !! the code i tried is given below !! [CODE] <script> function css_append(file){ var css = document.createElement('link') css.setAttribute("rel", "stylesheet"); css.setAttribute("type", "text/css"); css.setAttribute("href", file); document.getElementByTagName("head")[0].appendChild(css) } if(navigator.userAgent.indexOf("Firefox") > -1){ alert("Firefox"); css_append('css/default_ff.css'); } …

0
86
Member Avatar for Mona..

hello.. can u tell me how i can determine if a certain number is a perfect number or not?! please help me.. thanks.

Member Avatar for mike_2000_17
0
83
Member Avatar for Amrinder07

Hi!..I am Amrinder and i am new to java language as i am a student of Engg. i have to make a program using Swings or Frame in which Loop would be handled by Two different Buttons named as Start & Stop.....but how can i make a loop in ActionEvent …

Member Avatar for Amrinder07
0
148
Member Avatar for mcosta

Hello all, I'm sorry if this is an easy fix, but I've searched everywhere and spent 3 days on this and would like my life back. I'm trying to Select data from a database using a PreparedStatement and it isn't working for me. No errors, just no data. I can …

Member Avatar for mcosta
0
84
Member Avatar for AaronLLF

Hi. Hopefully this is my final question for this code. As you may know, I got a code from lloydgoodall.com for a Java & LWJGL FPCamera. It came with several errors, which I got to fixing, and after many, many Google searches, Option+Space's, and hitting my head against my desk's, …

Member Avatar for JamesCherrill
0
587
Member Avatar for jemimaloh

Hey, my code fragment is now this: [CODE]File fileName = "E:\\Major Project\\FinalLap\\278d.gz.txt.txt"; int index = fileName.toString().lastIndexOf("\\"); filed = fileName.toString().substring(0, index);[/CODE] And I hope to just get the file's name "278d.gz.txt.txt" after the last instance of "\\" and assign it to variable "filed". Can anyone tell me what am I doing …

Member Avatar for jemimaloh
0
124
Member Avatar for Pooch74

I'm trying to learn using pointers, and in the code below I can send variables to a function. But the return is obviously wrong and I can't seem to figure it out. What I want the function to return is the number of even number occurrences. Any suggestions to where …

Member Avatar for Pooch74
0
99
Member Avatar for Khodz

So I'm working on a database-type program for the Java course that i'm doing and i seem to have run into a bit of a roadblock. This class compiles and runs alright but where i have a problem with it is when i try to amend the text file using …

Member Avatar for Khodz
0
193
Member Avatar for ponens

So I am fairly new to Java and I have been trying to create a simple program that reads a list of names and a number from an external text file. So I will show you that code first. [CODE] public static void startReadFile() { // Get an ArrayList of …

Member Avatar for quuba
0
138
Member Avatar for gpjacks

I am new to programming so our assignment was to create a number guessing game, where the user picks a number from 1 to 100. The initial guess in 50 and then the program asks the user if it is higher or lower than my guess. Once the answer is …

Member Avatar for gpjacks
0
167
Member Avatar for facarroll

Hi everyone, I don't know whether this is a PHP or MySql problem, but I think it is the former. The following code queries the database correctly, (and before you ask, there are no duplicate database entries), but the output duplicates every row. e.g., hammer (jpg image) hammer hammer (jpg …

Member Avatar for facarroll
0
99
Member Avatar for facarroll

Can anyone see what is wrong here? This is my first serious attempt at this.[CODE]<?php $query1 = mysql_query(" SELECT topics.url_big, topics.url_small, topics.title, topics.".$egroup.", quiz.passState FROM topics INNER JOIN quiz ON (topics.managerId = quiz.".$managerId.") WHERE topics.".$egroup." = 1 ORDER BY title ASC"); ?>[/CODE]

Member Avatar for facarroll
0
96
Member Avatar for achieve_goals

Hi, I am having trouble comparing characters from two strings. This is what I have [CODE] void encrypt(string plaintext, string vigenere_table[length][length], string keyword, string& ciphertext) { int row, col; for(int i=0; i<20; i++) { for(int x=0; x<length; x++) { if(vigenere_table[x][1] == plaintext[i]) //wont let me use == row = x; …

Member Avatar for myk45
0
154
Member Avatar for losh177

Hi, I need some help figuring out what's wrong with my code. I'm getting quite a few of syntax errors for missing ';' which I have and missing type identifier. This errors are happening on my intarray.h file for string declaration (line 34). I get more errors that still need …

Member Avatar for losh177
0
183
Member Avatar for xcarbonx

Hello, i'm having trouble opening a text file to process and order the data in it. When i try to read the first line of characters an error message occurs saying: 'Variable words1 is used before it has been assigned a value.' I dont understand what i am doing wrong …

Member Avatar for xcarbonx
0
119
Member Avatar for iwanttolearnc

[CODE]im=Image.open ("trial.jpg") a = im.resize((300,300), Image.ANTIALIAS) b = a.save("im.jpg") im1 = Image.open ("im.jpg") loadres = numpy.array(im1)[/CODE] ive resized image trial to 300x300 image and saved it as im.jpg. but once i turn it into an array and check image sizes this is what i get [CODE]>>> im.size (450, 400) >>> …

Member Avatar for iwanttolearnc
0
84
Member Avatar for Crucial

I have been reading up on this forum looking for answers to my own questions but i find myself stumpped. I basically have to read from a file the last ten lines of input. Yes this is for a homework assignment and i have spent hours on it reading my …

Member Avatar for mike_2000_17
0
184
Member Avatar for VectorAKA

I have been messing with this program for my class for days now. I can get the program to run fine....I can get it to return highest value in list but i need it to return the month it occurs in. Here is the exercise as it appears in my …

Member Avatar for Schol-R-LEA
0
5K
Member Avatar for OneRunner

So, Daniweb. My teacher has been teaching us some old C++ (a problem I've been trying with little avail to rectify). I need y'all wonderful people to look over a section of code that I'm having trouble with. It has to do with recognizing a letter in an if statement. …

Member Avatar for doolali
0
121
Member Avatar for ccube921

I wanted the program to display each piece with its assigned color preceding it (eg a white rook would be 'WR'). [CODE]#include <iostream> using namespace std; struct attrib{ char x; int y; char cont[5]; char clr; }; attrib brd[8][8]; void prntbrd(void) { for ( int y =0; y<8; y++) //accesses …

Member Avatar for doolali
0
86
Member Avatar for AutoPython

Hey, it's me again. I have a Ceaser Cypher here: [CODE]letters=list("abcdefghijklmnopqrstuvwxyz") def Encrypt(): for i in range(int((len(word)-1))): curletter="".join(letters).find(word[i]) if (curletter+key)>(25): if (curletter+key)<0: i=(curletter+key) i=[(curletter+key)-(curletter+key)] else: i=(curletter+key)-(25) print (curletter+key) word[i]=letters[curletter+key] return def Decrypt(): return word=list(input("Type in some letters:")) key=int(input("Type in a key:")) choice=int(input("1) Encrypt\n2) Decrypt\n:")) if choice==1: Encrypt() else: Decrypt() print("".join(word))[/CODE] …

Member Avatar for AutoPython
0
200
Member Avatar for TayKaye

This is my code which determines it a lottery number is a winner or a loser. I have specific numbers that it needs to go by. My code compiles and it congratulates the user if when I type any of the numbers, however, if I type in 12345 or several …

Member Avatar for TayKaye
0
491
Member Avatar for myk326

I simplified an issue I'm having in another program with the small program here. The program is supposed to open the file with function openFile(). Then I want to initialize char a to the first character in the file via function accessFile() and output that character. My problem seems to …

Member Avatar for myk326
0
98
Member Avatar for zarifin99ska

hi. i'm have 2 form and a listview in form1 with items, but when the row has no item in it,like row 4 until row 8, an error showed up like this "InvalidArgument=Value of '1' is not valid for 'index'. Parameter name: index". can someone help me fix this? i …

Member Avatar for zarifin99ska
0
319
Member Avatar for Brosa

I am trying to retrieve a value from mysql and put it into an Area box with php and I have been having some trouble's I wouldn't know how to go about this I would really appriciate some help. So far I have just made the textarea and retrieve and …

Member Avatar for Brosa
0
108
Member Avatar for reemhatim

how could I start my way in programming ?I have taken structured programming in c++ in university and I took a course about object oriented programming in c# but I still feel I'm not on right track .please give me an advice that could help me. thanks :) :)

Member Avatar for ashishkumar008
0
91
Member Avatar for loligator

Hello all, I have a feeling this is easy to deal with (at least I hope so) but couldn't find much on google, probably because I'm not 100% sure how to word it. Here goes... We all know how there's different representations for apostrophes. There's the ’ character and then …

Member Avatar for sneldog
0
232
Member Avatar for mikeflash

Hey all, I have several cron jobs running but some of them take a lot of time to complete, since it requires fetching data from an external website and then updates my site's database. My hosting provider has a 120 second time limit for PHP scripts, which is too low …

Member Avatar for maba001
0
253
Member Avatar for Violet_82

Hi guys, quick question. Does the structure [CODE] try { } catch { exit(0); } [/CODE] require the preprocessor directive [CODE]#include<cstdlib>[/CODE] to be declared at the beginning of the program? The thing is if I don't declare it the visual c++ compiler works fine but if I try in Unix …

Member Avatar for thelamb
0
164
Member Avatar for nssltd

Hey there in may web browser program their is something i am struggling on. That thing is you know when you go on a log on website and the address bar goes green? Well that is what i want to do but i am struggling on how to determine whether …

Member Avatar for nssltd
0
124

The End.