64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for venkates.99

Hi all, my code is like.. [COde]string strConn; strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=C:\\ifocus\\Excel Worksheet.xls;" + "Extended Properties=Excel 8.0;"; OleDbDataAdapter myCommand = new OleDbDataAdapter("SELECT * FROM [Sheet1$]", strConn); myDataSet = new DataSet(); myCommand.Fill(myDataSet, "ExcelInfo");[/code] and My EXCEL data is like ------------------------------------------------------------------------------------- Gold --- [B]in@GLDM.1[/B] -- 14,917.00-- [B]Gold MCX[/B] -------------------------------------------------------------------------------------- ALUM--- …

Member Avatar for Geekitygeek
0
1K
Member Avatar for atch

Hi, Is it possible to have class template in non template class? I'm trying something like this and I'm getting errors: [code=c++] class Non_Template { //...other stuff public: template<class T> class some_Template; //declaration }; template<class T> //something WRONG with this syntax Non_Template::some_Template { }; [/code] Err msg I'm getting: error …

Member Avatar for atch
1
110
Member Avatar for AnGuRuSO

so I'm using code from [url]http://schmidt.devlib.org/java/file-download.html[/url] in the hopes of inputting a URL and getting the file that URL points to. It works, sometimes. 90% of the time it doesn't work. Also, it seems a lot of the pages I want to download do not end in html, although I'm …

Member Avatar for nalini.harsha
0
856
Member Avatar for fallopiano

hi everyone. Just out of curiosity more than anything; does anyone know of a library that can grab microphone input (on windows)? I'm looking into how to write a kind of VoIP (voice ip) program. I know how to use sockets for sending/receiving data, but I just need the microphone …

Member Avatar for Stefano Mtangoo
0
278
Member Avatar for yatman

Hi, I am trying to write strings to a file line by line and trying to format the output so that the alignment is proper. output should be it should appear in the output file as david 10 15 16 sam 11 15 16 but appears as david 10 15 …

Member Avatar for yatman
0
171
Member Avatar for jrosh

I created some data files with 'outfile ' command. The files are created in the mysql folder.{I use WAMP} I want to create those files in another directory. How can I do that? Thankx in advance.

Member Avatar for jrosh
0
166
Member Avatar for nccsbim071

What is the difference between following declarations: [CODE=C#] WebUserService.Service.IUserService userService = new WebUserService.Service.UserService(); WebUserService.Service.UserService userService = new WebUserService.Service.UserService(); [/CODE] I want to know the difference in usage and the the one that is most efficient in terms of programming in C#.

Member Avatar for nccsbim071
0
119
Member Avatar for Samyx

What is wrong with my code? [code] String[] movieString = {"movie1", "movie2", "movie3", "movie4"}; JComboBox movieList = new JComboBox(movieString); movieList.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent e) { JComboBox a = (JComboBox) e.getSource(); //String movies = (String)a.getSelectedItem(); if (e.isSelected()); return subpanel; } }); }[/code]

Member Avatar for BestJewSinceJC
0
80
Member Avatar for sebassn

Hey guys, I justs started this code to make a diamond with stars (*), but I get confused how to print the spaces that I need, I don't know if you understant what I'm trying to say. It is something like this: Prompt the user to enter (odd) height (of …

Member Avatar for restrictment
0
838
Member Avatar for lewashby

First of all, I'M reading the book "Microsoft XNA Game Studio 2.0". I understand the error I'M getting but I don't know what to do about it. The error says I can't use backgroundColor before it has been declared. I'M following along with the book so I don't see why …

Member Avatar for jbennet
0
140
Member Avatar for Mitja Bonca

I have a problem with alignment of the child form in a parent form. I would like to have this Form3 in the upper right corner of the Form1 - always - even when user changes the size of the form1. Form3 it has to be located there. The location …

Member Avatar for kvprajapati
0
100
Member Avatar for newbie_to_c

Hello everyone, I need help with this code, which does not work properly. It prints fine at the first instant and when I convert it into a double it prints some unknown value. I am trying to get the maximum of all the values in the row. First: I cant …

Member Avatar for newbie_to_c
0
83
Member Avatar for EAnder

I've noticed there is at least 1 thread regarding to artificial intelligence. I assume most people new and old to python would be interested in artificial intelligence and the even greater goal of artificial life. I personally do not know anything about them. If you have ever had any experience …

Member Avatar for lrh9
0
157
Member Avatar for Chromana

Hey. I'm importing an array in a text file via [icode]array=numpy.loadtxt("testdata.txt")[/icode]. Is there an easy way to count the number of rows and columns? Maybe something like [icode]x=numpy.countrow(array)[/icode]? I've had a look around and couldn't find anything suitable. Thanks, Alex

Member Avatar for Chromana
0
306
Member Avatar for raigs

I get this gcc warning with [I]-Wwrite-strings[/I] flag. I want to return a string of chars correctly but I also do not want to use [I]malloc[/I]. I've read other posts but can somebody explain how to acheive this in layman wording? [QUOTE]a.c:14: warning: passing argument 1 of ‘VAR1’ discards qualifiers …

Member Avatar for Dave Sinkula
0
396
Member Avatar for neighbordave

I am trying to get two numbers to overflow and print an error message stating this. it works for some numbers, but other numbers for example adding the numbers 1073741824 and 1073741825 results in a negative number -2147483647 which is clearly overflow. However, I cannot get these negative numbers to …

0
79
Member Avatar for jaison2

This is graphics.py from the zelle book. The following code seemed to be working but when i added the parameters to the function def drawEye(win, centre, radius): i get an error when i try to execute it Traceback (most recent call last): File "C:\Documents and Settings\Compaq_Owner\Desktop\t.py", line 22, in <module> …

Member Avatar for vegaseat
0
322
Member Avatar for ljvasil

I am having problems with my reverse polish calculator code. The code is as follows: [CODE]import operator OPERATORS = { '+': operator.add, '-': operator.sub, '*': operator.mul, '/': operator.div, } class Stack(object): "Creates a stack to enter numbers or operators into" def __init__(self): self.storage = [0,0,0,0] self.sptn = -1 def push(self, …

Member Avatar for vegaseat
0
619
Member Avatar for pyprog

Assume I have a file of the following format: a,1 b,2 c,3 d,4 Here is my code: [CODE]def junk(f): d1 = {} d2 = {} for line in f: columns = line.split(",") letters = columns[0] numbers = columns[1] d1[letters] = numbers d2[numbers] = letters return (d1, d2) def something(): print …

Member Avatar for vegaseat
0
270
Member Avatar for tjackson

I am new to c programming. I am trying to write a parking garage program that uses arrays to find the charge for each car and the total charge. Here is what I have so far. Please help me in any way that you can. [code=c]#include <stdio.h> #include <math.h> float …

Member Avatar for Chilton
0
145
Member Avatar for TheManual

I need to only allow integers and the letters "d" and "r" from raw input otherwise I need to run an exception. For example: [I]You entered 's' this is invalid[/I] I have tried to use try/except statements but can't work it out. Is this the best way? Can someone help? …

Member Avatar for vegaseat
0
124
Member Avatar for pyprog

Assume I have a file of the following format: a,1 b,2 c,3 d,4 Here is my code: [CODE] def junk(f): d1 = {} d2 = {} for line in f: columns = line.split(":") letters = columns[1] numbers = columns[2] d1[letters] = numbers d2[numbers] = letters return (d1, d2) def something(): …

Member Avatar for vegaseat
0
327
Member Avatar for gangster88

I have to get pthagaros to get the distance between 2 points. so the function distanceBetweenPoints(Point(1, 2), Point(4, 6)) should result in 5.0. the parameters are supposed to be P1, P2, which i think i have done?. The get an error when i try to execute this?.. help please def …

Member Avatar for gangster88
0
177
Member Avatar for sonygamer

Hello everyone, I'm currently having some problems with this code. I am getting many compiling errors and i was wondering if you guys could help get rid of them. [CODE]#pragma once #define CAPACITY 128; typedef int QueueElement; class Queue { public: Queue(); int empty(); void enqueue(const QueueElement & value); void …

Member Avatar for sonygamer
0
179
Member Avatar for valonesal

Ok so I created a small page using smarty, now what I need to do is create a link to the page(s). The set the page up so that it will display information for the individual user and not to everyone, also the pages are created dynamically. So I need …

0
77
Member Avatar for guccitan88

Hi! I'm really new to C++ and posting to forums so please excuse any mistakes I may make. I have to write a program that simulates throwing 2 die and printing their sum 25 times, seven sums per line. I'm stuck on the "seven sums per line." Do I need …

Member Avatar for guccitan88
1
2K
Member Avatar for StaticX

Hi, I have made a small program to check if character arrays are the same(similar to string compare).This is my code so far: [CODE] // string Compare () #include <iostream> using namespace std; main(){ char a[10] = {'a','b','c','d','e','f','g','h','i','j'}; char b[10] = {'a','b','c','d','e','f','g','h','i','j'}; for(int i = 0; i < 10; i++) …

Member Avatar for Dave Sinkula
0
111
Member Avatar for levsha

How do you declare your select menu in the PHP? Does it have to be an array of variables? One single variable? Something else? Let's say this one: [CODE] <select name="search" title="Search Criteria"> <option value="id">ID Status</option> <option value="ip">IP Status</option> <option value="pd">PD Status</option> <option value="nva">NVA Status</option> </select> [/CODE] Thank you!

Member Avatar for violarisgeorge
0
133
Member Avatar for deftones

Hi, Let's say I have a form full of objects and want to make all of them (or half of them, whatever) invisible. Is there a short way to do that without a need of setting visible to false individually to each object?

Member Avatar for deftones
0
182
Member Avatar for deftones
Member Avatar for deftones
0
149
Member Avatar for beta911

I really need help from you guys... my Insert statement doesn't work in C# but the Update statement was just fine. Possible to guide me on the delete statement as well? Here is my code: [CODE] string ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\Inetpub\\wwwroot\\H1N1\\TTH H1N1\\TTH H1N1\\bin\\Debug\\H1N1.mdb"; OleDbConnection conn = new OleDbConnection(ConnectionString); OleDbCommand …

Member Avatar for beta911
0
726
Member Avatar for Israelsimba

i am trying to make sure that one record is not entered twice into the same database but the code i am using is giving me an error [CODE]Set ri = deSub.conn.Execute("SELECT* FROM individualsubs WHERE firstname = '" & txtfname.Text & "' AND surname = '" & txtsurname.Text & "'") …

Member Avatar for vb5prgrmr
0
156
Member Avatar for Hummdis

I've been writing PHP for about two years now, nothing complex, mostly just HTML form processing scripts. My latest project for a customer has over 40 items in the form. It's a dynamic form using some JavaScript and PHP that displays certain parts of the form based on other options …

Member Avatar for Hummdis
0
178
Member Avatar for Ryujin89

Putting it out there that this is a school assignment. I have nearly all of the code figured out, but the instructions make getting the output and variables to match up. If anyone can assist in seeing what the instructor intends for us to do, I would greatly appreciate it. …

0
106
Member Avatar for theStruggler

Hey everyone, I am trying to write a code which would read a file and print the number of words and sentences in each of them. I want to take everything step by step; so I am making sure that all my methods work perfectly before proceeding. In the code …

Member Avatar for theStruggler
0
103
Member Avatar for sleign

I am building a website that's worked out very nicely so far with few problems. It's mainly coded in php and xhtml with css. This site also uses 1 inline frame. I don't know much about javascript - it seems to be such an immense scripting language to me, but …

Member Avatar for sleign
0
115
Member Avatar for thebluestar

[CODE=C] #include<stdio.h> #include<conio.h> #include<string.h> //typedef int BOOL; //#define TRUE 1 //#define FALSE 0 int a[3][4]; int Prime(int *x); void input(); void printOut(); void checkPrime(); int Prime(int *x) { int i; for( i=2; i< (int)sqrt(*x); i++ ) { if( *x%i == 0 ) return 0; } return 1; } void input() …

Member Avatar for thebluestar
0
195
Member Avatar for thebluestar

[CODE =C] #include "conio.h" #include "stdio.h" #include "math.h" int isPrime(int n) { int i,isTrue=1; for(i=2; i<(int)sqrt(n); i++) if(n%i==0) return 0; else return 1; } int main() { int N; printf("Enter n: "); scanf("%d",&N); if(isPrime(N)) printf("prime"); else printf("Not prime\n"); getch(); return 0; } [/CODE] here is my source code, but when …

Member Avatar for thebluestar
-1
150
Member Avatar for lcyew

Hi all. I have two date input fields. Is there any way to restrict date input from only date picker (users are not allowed to input date through keyboard). The reason I want it this way is to prevent users from entering invalid dates. Any help provided is greatly appreciated. …

Member Avatar for venkat0904
0
84
Member Avatar for dylank

Hi, I have a program that I am using to convert a string into binary. My current code is as follows: [CODE]int main(void) { string userInput; cout << "Enter a string to be converted:" << endl; cin >> userInput; for (int index = 0; index <= userInput.length(); index++) { cout …

Member Avatar for dylank
0
162
Member Avatar for Fo_Be_La

Hi everyone, I'm trying to write some code for this question. I believe I have the right answer but it says it isn't. Anyways here is the question. 1) Given that dict1 refers to a dictionary, change the value mapped to by the key 'Boo' to 'Hoo' . My code …

Member Avatar for Fo_Be_La
0
158
Member Avatar for pradeep.singh28

I have developed a ASP .net website now I want to enable AJAX for this website , so plz tell me the procedure to Upgrade this Website to AJAX enabled website.

Member Avatar for kvprajapati
0
136
Member Avatar for infernojmd

Im trying to use session variables to save the puzzle key, and than open a new file that prints it out, but it gives me Notice: Undefined index: puzzleName in C:\Apache2.2\htdocs\users\jmdrenning0\wordfind\wordfindkey2.php on line 13 i have no idea what it means, any help please. wordfind.php [CODE] function printPuzzle(){ //print puzzle …

Member Avatar for infernojmd
0
147
Member Avatar for daryll1

I am writing a PHP registration form but when i view my page i cannot see the form, any ideas all my code is below. i have noticed that if i remove the [CODE]print '<h1> Please Register To Continue </h1>'; print '<style type="text/" media="screen> .error { color: red; } </style>';[/CODE] …

Member Avatar for daryll1
0
159
Member Avatar for babylonlion

Hi guys, The following program works the way I want it to but there's one small problem; when it loads, it doesn't give a blank frame. It want it to show the output after I click on the blank area. Help me please. [CODE] import java.awt.*; import javax.swing.*; import java.awt.event.MouseAdapter; …

Member Avatar for babylonlion
0
175
Member Avatar for juniper2009

Dear All I would be very happy if you could help me! I need to create a main() program which is be able to; * reads in a list of words and their associated meanings from the given test file(file.txt)(This file contains 10 lines) * provide an interactive menu interface …

Member Avatar for juniper2009
0
804
Member Avatar for nevets04

How do I make something like [code] x = 5 while 0 < x b = raw_input("something: ") [/code] However each time it loops, I want it to change, like: first loop - b = raw_input("something: ") second loops - c = raw_input("something: ") third loop - d = raw_input("something: …

Member Avatar for nevets04
0
184
Member Avatar for gerard4143

Is this the proper way to zero the first 12 bits of an address? [CODE] void *ans = (void*)((unsigned long)addr & ((0UL - 1) ^ 0xfff)); [/CODE] Where addr is any user process memory address.. Note this method works...I just want to know if there is a better way

Member Avatar for Dave Sinkula
0
164
Member Avatar for nevets04

I know Remembering secure passwords is difficult. So I made this. [code] import random, os a= ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','{',':','>','?','}','|','!','@','#','$','%','^','&','*','(',')','-','+'] z = int(raw_input("How many words in your password?: ")) os.system("clear") List = [] for x in xrange(z): List.append(random.choice(a)) print "".join(List) print "1) Yes" print "2) No" b = int(raw_input("Would you like to save …

Member Avatar for sneekula
0
166
Member Avatar for ddanbe

Hi all, For a combobox I was trying to imitate the behaviour of this code example:[url]http://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.valuemember.aspx[/url] So I have this class: [CODE=c#]class Planet { private string myName; private double myGravitationalAcceleration; public Planet(string strName, double Acceleration) { this.myName = strName; this.myGravitationalAcceleration = Acceleration; } public string Name { get { return …

Member Avatar for ddanbe
0
120

The End.