64,152 Solved Topics
Remove Filter ![]() | |
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: … | |
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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
Is there a way of checking if a YouTube user exists? | |
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"); … | |
![]() | 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 … ![]() |
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; … | |
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??? | |
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 … | |
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 … | |
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 … | |
hello.. What do we mean by binary search and how we can do it using C++ thanks.. | |
<!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']); … | |
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 … | |
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'); } … | |
hello.. can u tell me how i can determine if a certain number is a perfect number or not?! please help me.. thanks. | |
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 … | |
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 … | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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] | |
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; … | |
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 … | |
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 … | |
[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) >>> … | |
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 … | |
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 … | |
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. … | |
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 … | |
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] … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 :) :) | |
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 … | |
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 … | |
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 … | |
![]() | 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 … ![]() |
The End.