199,114 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for harsimran05

i have a program that has a database in access and i want to update data but when i click on update button on my frame nothing happens no error no exception and no work. here is my code [CODE]bUpdate=new JButton("Update"); bUpdate.setBounds(275,600,100,50); c.add(bUpdate); bUpdate.addActionListener(this); public void actionPerformed(ActionEvent ae){ Object o=ae.getSource(); …

Member Avatar for peter_budo
0
105
Member Avatar for Eternal Newbie

I'm using VB.net to create a Crystal Report and using DataGridView to show the data before print it out by Crystal Report. But now I want to: - Add another column into the DataGridView named: "Print/Not Print" - Using the value we add permanently into the "Print/Not Print" column as …

Member Avatar for adam_k
0
1K
Member Avatar for champu8

[CODE]#include<iostream> using namespace std; int main() { int *number=new int[1000]; int c=0; int i=0; cout<<"Enter no sir\n"; cin>>number[i]; while(number[i]>0) { number[i]/=10; c++; } cout<<"\n\n"<<"TOTAL NO OF DIGITS = "<<c; delete[]number; return 0; } [/CODE]

Member Avatar for champu8
0
116
Member Avatar for dwiniers

Hello there Good Day! I need your expertise in VB6 i have an assignment we made a small program with search button with combobox. I have a code with almost working. My problem is i want my search button enter any fiels to search with the combo box list. I …

Member Avatar for dwiniers
0
241
Member Avatar for twalton42

I have a form with multiple combo boxes and text boxes making an invoice.. I have the combo boxes linked to my database and I want each selection to fill a different textbox. The comboboxes fill on form load... How can I fill the textbox with the selected index from …

Member Avatar for lolafuertes
0
727
Member Avatar for johnnyboyslim

I have a two dimensional array that needs to be loaded from a data file that contains last names and phone numbers and then I need to load another array with the addresses of those elements in the array. Is there a certain way to load a phone number since …

Member Avatar for johnnyboyslim
0
199
Member Avatar for b3hr0uz

I have been working on this code for a while and for some reason I can't figure out why it won't compile I get a lot of errors. [code] #include "rational.h" Rational::Rational () { _p = 0; _q = 1; } Rational::Rational (long P, long Q ) { if ( …

Member Avatar for b3hr0uz
0
347
Member Avatar for BlurrieBlue

Good day. I'm new here and I'm nt sure this post should belong in here or not. I had done my programming on the virtual machine while having mysql database set up in my PC. I was unable to get the data from my PC unless I installed another database …

Member Avatar for BlurrieBlue
0
753
Member Avatar for shrikant_77

[CODE]if(isset($_POST['listingType'])) { ini_set('magic_quotes_gpc', false); // magic quotes will only confuse things like escaping apostrophe //Get the item entered $listingType = $_POST['listingType']; $primaryCategory = $_POST['primaryCategory']; $itemTitle = $_POST['itemTitle']; if(get_magic_quotes_gpc()) { // print "stripslashes!!! <br>\n"; $itemDescription = stripslashes($_POST['itemDescription']); } else { $itemDescription = $_POST['itemDescription']; } $itemDescription = $_POST['itemDescription']; $listingDuration = $_POST['listingDuration']; $startPrice …

0
163
Member Avatar for Khodz

Hello All I'm not quite sure you can do this but it seems to me like something python is probably able to do. Basically, I need to assert that somewhere in my list of lists i have a '2', and a '1'. Now my lists in the biglist are all …

Member Avatar for Khodz
0
3K
Member Avatar for aecha

Hi.. I have problem with my system which is the bar code image cannot been display after the bar code generate from the database. can anyone show me the correct way to call the data from database to generate and display in my system? when user click view card in …

Member Avatar for rpv_sen
0
2K
Member Avatar for kleyva

I have to write a program that that reads an array of integer numbers, stores them in array, sort the numbers in ascending order, and print the sorted array: using the buble sort technique. Unfortunately I can't seem to get it to work at all, and I know <stdio.h> is …

Member Avatar for WaltP
0
657
Member Avatar for JoshuaBurleson

Does anybody know how to clear all widgets; labels, buttons, etc. from a tkinter frame so that new ones may be put in their place? I've tried self.destroy() but that makes the frame unreachable, and self.grid_forget() followed by, "and without" self.grid() neither of these work, at least not as expected. …

Member Avatar for JoshuaBurleson
0
30K
Member Avatar for yakovm

I have the following code example (in windows): [CODE] int fd = _dup(fileno(stdout)); freopen("tmp","w",stdout); printf("1111"); close(stdout); char buf[100]; FILE *fp; fp = fopen("tmp","r");//in this line fd turns to be 0 if(NULL == fp) return -1; fgets(buf,100 , fp) != NULL ); fclose(fp); [/CODE] I need the value of fd for …

Member Avatar for D33wakar
0
143
Member Avatar for techlawsam

Ok I think im getting better at these but not quite still have these implicit convert from int to string problems and the usual "does not exist in the current context" dilemma. [CODE]/* * */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Calories { class Calories { static …

Member Avatar for arunkumars
0
210
Member Avatar for Asotop

Hey! I'm currently writing a program which converts a number from binary to int. That part is done, but I'm now trying to check wheither the input string only consists of 1 and 0. This is what I've tried so far, but it doesnt work the way I want. [CODE] …

Member Avatar for arunkumars
0
194
Member Avatar for francisgan9

[CODE]# phonebook dictionary phonebook={'francis':'francis@gmail.com','iris': 'iris@gmail.com','karen':'karen@gmail.com'} name=raw_input('what name you want to check :') # check if the name is in the dictionary if name in phonebook.items() : name=key print phonebook.get(key) # if yes, print the email else: print 'not here' # check the correctness of the program # I could not …

Member Avatar for JoshuaBurleson
0
1K
Member Avatar for nathanhaigh

I'm new to this stuff, so bare with me! I'm trying to determine the time complexity of a recursive algorithm which reverses the branches of a tree. The algorithm in R goes as follows: [CODE]rev <- function (x) { if (is.leaf(x)) return(x) k <- length(x) if (k < 1) stop("dendrogram …

Member Avatar for Mavericks
0
422
Member Avatar for techyworld

Given the coin denominations 1, 3, and 5, what is the minimum number of coins needed to make change for a given value? Hint: Value 1 2 3 4 5 6 7 8 9 10 Min. no. Coins 1 2 1 2 1 2 3 2 3 2 Parameter to …

Member Avatar for techyworld
0
276
Member Avatar for Jonathan C

i don't know how use to a timer. I'm supposed to do is After the Roll button is pressed, a timer will be enabled to generate random die rolls every 1/10 of a second... [CODE] public partial class Form1 : Form { Random m_rnd = new Random(); List<int> diceResults = …

Member Avatar for Jonathan C
0
269
Member Avatar for andimiami

I am writing a Java program, and I need to be able to call these two methods, but I'm kind of confused. These methods need to be able to match the following data: This would be a sample input if what I am checking... LASTNAME "Rosemont" # LASTNAME "Rose Mont" …

Member Avatar for andimiami
0
116
Member Avatar for shawn.reynz
Member Avatar for sfuo
0
97
Member Avatar for Curtisq

So my problem is writing a program that asks the user to input a number wich is stored with scanf then print the binary representation of that number in 32 bits, as in if the number is 1 i would need 31 0's and a 1. [CODE]#include <stdio.h> void dec_bin(long …

0
108
Member Avatar for schoolboy2010

Hi, could someone tell me what's wrong. The code works for the data set, answers but doesn't for data set answers2... the program crashes after displaying the data set2 and never gets data set 3, I will appreciate any help. Thanks. [CODE] import java.io.*; import java.util.Scanner; import java.util.*; import java.lang.*; …

Member Avatar for schoolboy2010
0
207
Member Avatar for supersport

i have to write a program for generating 20 tosses of a die and then grouping them by placing parentheses around them like this: 1 3 ( 2 2 ) 3 5 2 ( 6 6 ) 5 ( 1 1 1 ) ( 4 4 ) 2 3 ( …

Member Avatar for inthearmynow99
0
1K
Member Avatar for Tom_Weston

So, as you can see... [code] #include <iostream> #include <string> using namespace std; int main() { char comma = ','; string str1 = "hello,friend"; string str2 = str1.substr(str1.find(comma)+1, str1.length()); //i guess this line... cout << str2 << endl; system("pause"); return 0; } [/code] What is being output is str2, and …

Member Avatar for gerard4143
0
137
Member Avatar for Moderns

Hello Fellows :) I am trying to find a way to get more than one characters pasted on html text field (input type=text), using onkeydown or onkeypress, I am NOT interested in onkeyup(it works), so please do not suggest me this solution. Also I am not interested in Jquery, I …

Member Avatar for Moderns
0
411
Member Avatar for NoviceCoder37

I keep on getting this error "Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in" from both of my while loop conditions. Can anyone review my code and let me know what I'm doing wrong? [code] <html> <head> <title>Task # 4 - Test Page</title> </head> <body> <?php $link …

Member Avatar for cbemerine
0
335
Member Avatar for atalkingfish

I have a page full of user-submitted updates and stuff. Basically the basic stuff. I am taking it out of a database. I have this so far: [CODE]$getnews = mysql_query("SELECT * FROM news ORDER BY $order LIMIT 50"); [/CODE] and $order is determined by a drop down menu on the …

Member Avatar for atalkingfish
0
1K
Member Avatar for AndyPants

Hello, I'm currently working on an advanced 4x4 multilayer tic tac toe(will include servers, and accounts with levels and xp). Now the problem i have is that i have a image (.png) of a piece(representing X or O) and I want the button that you click to place your X …

Member Avatar for AndyPants
0
489
Member Avatar for Labdabeta

What does it mean if my opengl objects are opaque from one side and translucent from another?

Member Avatar for Labdabeta
0
88
Member Avatar for mohamed moamen

how i can convert my java code I do to a setup program work in other computer with example and please don't tell me use java launcher

Member Avatar for mohamed moamen
0
130
Member Avatar for Joe Shmoe

I wrote the following code in Python. It does not sort the list. Can anyone help me out? [CODE] theList = [] def simpleSort(): pos = 1 comps = 0 while pos < len(theList): comps += 1 if ord(theList[pos]) >= ord(theList[pos - 1]): pos += 1 else: temp = theList[pos] …

Member Avatar for JoshuaBurleson
0
116
Member Avatar for atalkingfish

I have a website where you can log in with a session or with cookies (remember me) and I can't seem to get the logout to work. I have a code that goes on top of most pages (all pages that require one to be logged in) and it goes …

Member Avatar for atalkingfish
0
82
Member Avatar for Ich bin würdig

Can someone help me in building a syntax for this problem Write a program that accepts a positive integer and gives its prime factorization that expresses the integer as a product of primes. Here's one that I did: [CODE] #include<stdio.h> #include<conio.h> void main() int N,R; clrscr(); printf("Please enter a no.:\n"); …

Member Avatar for rubberman
0
237
Member Avatar for AWorkTool

I am building a tool for my team at work to search a XML file for a particular item and return back the nodes associated with it. I have searched the web to no abounds and was wondering if someone would mind letting me know what I am missing. Here …

0
108
Member Avatar for asif49

I use the following function to expand the footer border for a website I'm creating: [CODE] <script type="text/javascript"> var x=5; <!--original height--> function expand() { document.getElementById("footer").style.height=x+'em'; <!--Gets the height from css.css in the div "move"--> if(x>10) { <!--Desired height after expansion--> clearTimeout(t); return; } x++; <!--desired height isn't yet reached, …

Member Avatar for asif49
0
179
Member Avatar for Zssffssz

Ok the thing I searched into google brought up a ton of nonsense. I want to use variables from a function in main and (more important) variables from main in a function. I am already using file I/o as a loophole but I want an easier way. PS How do …

Member Avatar for gerard4143
0
170
Member Avatar for J-Dub

I am trying to load a background in full screen mode, but when i run my program the screen is just white. Can someone point me to the reason why? [CODE]import java.awt.*; import javax.swing.*; public class DrawComponents { GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice device = env.getDefaultScreenDevice(); GraphicsConfiguration gc = device.getDefaultConfiguration(); …

Member Avatar for sirlink99
0
258
Member Avatar for BenzZz

Hi, Basically I'm creating and implementing a dynamic website as part of my uni final year project but i am a beginner in php so need some help. First, I'm not entirely sure about how i should go about creating the database, tables and inserting data. I don't mean in …

Member Avatar for BenzZz
0
114
Member Avatar for sjgood

I am having trouble with a python homework question. The problem is the following: You are to write a program that counts the frequencies of each word in a text file (text.in), and outputs each word with its count to a file (word.out). Here a word is defined as a …

Member Avatar for JoshuaBurleson
0
330
Member Avatar for Labdabeta

here is the question, what does str(X) become [CODE]#define str_(X) #X #define str(X) str_(X)[/CODE] when X is a string? is it ""string"" or "\"string\""?

Member Avatar for Labdabeta
0
113
Member Avatar for Mona..

Hi everybody.. I have a homework on 2-Dimentional arrays, I have to creat a class and pass the parameters int it, i have to overload operators( +, -, *, << ) how do I Add the matrices?? Subtract?? and Multiply them using operator?? what should I pass and what should …

Member Avatar for Mona..
0
184
Member Avatar for wonderlhily

[code=php] <?php $conn = mysql_connect("localhost", "root", "dotherz"); //connecting to database if($conn) //testing if the connection was stablished { mysql_select_db("orders", $conn); //selecting database from your localhost $qry = "SELECT * FROM customer WHERE customerId = 1"; //the query to get the first user $result = mysql_query($qry); //executing the qry and passing …

Member Avatar for diafol
0
164
Member Avatar for woojungkyu

What is the best algorithm for finding the number of integers divisible by X? I can easily do a: [code]for(num=1;num<maxRange;num++) { int result = 0; if(num%Y==0) { result++; } }[/code] but what if the maxRange is a really huge number (say a 9 or 10 digit number)? I need something …

Member Avatar for hfx642
0
167
Member Avatar for kaizokupuffball

Hi! I can't say im familiar with the .htaccess file. I need to create a htaccess file that will redirect the user if he manually tries to open a .txt file on the server, or tries to download it (example if the user tries to navigate to [url]www.domain.com/users/username/bio.txt[/url], then he …

Member Avatar for diafol
0
124
Member Avatar for anujthefuhrer

If a binary tree can be represented with the array data structure in an efficient way(it means there is no blank key in b/w two non-zero elements) then it cannot be designed uniquely with the help of which of the following traversals? 1.Preorder 2.Inorder 3.Postorder Please answer this question.It is …

Member Avatar for Taywin
0
133
Member Avatar for Sunshine2011

Hello, I wrote a little program (Create a vector and give it back via pointer.) for a better understanding of pointers. First it works but when I would like get access to the vector alloacated with "new", problems occur. For example saving a element is not possible. [ICODE] #include <iostream> …

Member Avatar for Fbody
0
237
Member Avatar for hemj

Hi, I have to write a program which makes changes and writes to a different text file. The point at which I am stuck is that I am unable to add the value 10 to ASCII value of each of the first 6 characters in the file. Can someone tell …

Member Avatar for Fbody
0
2K
Member Avatar for extemer

Hello guys i learn something new so i thought to share it with you people.This tutorial is about when you search some data in a search bar and as you enter any key word e.g 'a' so it start looking for keywords starting with 'a' and highlight it.In this way …

Member Avatar for Taywin
0
167

The End.