64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for RichardSchollar

Given the following two code snippets, how come I get different output? [code]Sub test() Dim str As String Dim b() As Byte str = "hello" b() = str str = "" For i = LBound(b) To UBound(b) str = str & b(i) & " " Next i Debug.Print str End …

Member Avatar for Comatose
0
114
Member Avatar for rubiton

Can someone please write the script for connecting to MySQLdb Also if anyone knows a good tutorial form transfering info from a python module into a MySQL table. Thanks in advance.

Member Avatar for rubiton
0
171
Member Avatar for girish_sahani

I want to generate 'substrings' from a string as follows: for each substring j of string,generate the 2 lists [j,string - j] and [string -j,j] e.g If i have a string 'abc' i want to generate the list [['a','bc'],['bc','a'],['c':'ab'],['ab','c'],['b':ac],['ac':b]] Now i tried the following but its not giving me the …

Member Avatar for girish_sahani
0
211
Member Avatar for puddin

Hello, When I select my images they are opening. Only the jpg will not come in clearly. If you know the code to correct this can you please tell me, Thanks puddin Here is my code: <?php include'db.php'; // get the variables from home page $password = $_SESSION['password']; $email_address = …

Member Avatar for digital-ether
0
197
Member Avatar for yuzhang

Hi people: Here is a very basic question, but it has been bugging the living hell out of me. I am using Visual Studio 2005 and progamming in C. The whole program's skeleton was given to me, and NOT to be altered. There are several header files in the "header" …

Member Avatar for LieAfterLie
0
105
Member Avatar for ber

Hi, I'm very new to programming and Python. I need to process two separate files, one containing words, the other frquencies of these words. What is the best way to process these files and obtain a new file with frequencies*words in there? Btw i'm afraid the files cannot be read …

Member Avatar for vegaseat
0
97
Member Avatar for aeinstein

Hi All, As a non-required, ungraded, "activity", I coded the following program, and I'm wondering if there was an easier way for me to of solved the problem. Please note that this is only a second semester type course, and to this point we've only covered basic variables and constants, …

Member Avatar for aeinstein
0
1K
Member Avatar for Fel

Hey, I've been trying to code my own news/ blogging script, by following a tutorial, but unfortunately I keep getting these mysql errors when I submit an entry, and on the page where I want it to be displayed. And I don't know how to recognize the errors just by …

Member Avatar for Fel
0
215
Member Avatar for mikki2

hi, i'm new to c++(just 3 days) and new to this forum too (so pls go easy on me). my problem is i can't remember how to use the for, while and do loops. but when i see a program with these loops in them i completely understand the program …

Member Avatar for Dave Sinkula
0
188
Member Avatar for Rikus

Hi there I just want to know if it is posible to write a batch file wich can change your IP when you click on it?

Member Avatar for Comatose
0
205
Member Avatar for Maroll

Hi there...im the new member here and the beginner in vb application im from Malaysia...can u all show me the [B]format of the vb scripts or the one example of vb scripts[/B]..Im really need it... Thanks and Regards Maroll

Member Avatar for Maroll
0
341
Member Avatar for Confucius

Ive looked many places but the answer to this question has eluded me, once a script is executed how can you make it so that it re-starts. Oh, and what is the meaning of life?:cheesy:

Member Avatar for Confucius
0
105
Member Avatar for Ene Uran

I read somewhere that you should avoid using a leading underline in a variable name. It is supposed to have a special meaning in Python. I can't find anything more detailed. Does anybody know?

Member Avatar for vegaseat
0
309
Member Avatar for Ene Uran

Does Python have a static variable like C has? I like to avoid a global variable for the usual reasons. Note: A static variable in a C function will retain its last value.

Member Avatar for vegaseat
0
149
Member Avatar for girish_sahani

I need to map one list onto another.l1 is a list of lists of lists and l2 is a list of numbers.I want elements of l1 to be the keys and elements of l2 as the values.I tried to convert l1 into a tuple and then mapping but it doesnt …

Member Avatar for girish_sahani
0
250
Member Avatar for phovasia

Below is a piece of code given me for debugging. I have made a number of changes (noted in code) but still recieve a compile error. Any thoughts will be much appreciated. My changes- this was Debug d = new Debug(); this was public method2() [code] // this class should …

Member Avatar for phovasia
0
92
Member Avatar for Blujacker

I have an problem with Python, i am trying to create a game. I did mapeditor for this game. I create map by creating a lot of pictures, like 2000 or more. But if i want to create moore i get an RunTimeError:( [IMG]http://blujacker.wz.cz/omg!.PNG[/IMG]

Member Avatar for Blujacker
0
124
Member Avatar for Stewie

I am not sure if this is an HTML question or a Coldfusion question. Since I am using both I will ask in the in the CF forum. I can not get the title to show up on the top task bar in IE. I am not sure if it …

Member Avatar for Stewie
0
397
Member Avatar for girish_sahani

When i tried the following in python interpreter,i got a syntax error: [code] d = {[[['a': 1,'b': 2],['a': 4,'b': 3]][['a': 2,'c': 2],['a': 1,'c': 3]]] : 0.4} [/code] Pleeeez help :sad:

Member Avatar for bumsfeld
0
86
Member Avatar for vissor3

i'm taking a computer programming class, and i was given a chalange to create a program in "C++" that would tell you if the number you entered was a Perfect number, being that the sum of all the factors of a number minus itself would = the original number. aka. …

Member Avatar for WolfPack
0
259
Member Avatar for ejai

I am working on an assignment that involves simulating a volley ball game and I have NO idea. Can anyone help. Here is the question Thanks

Member Avatar for ejai
0
116
Member Avatar for girish_sahani

If i have a list (or list of lists) with elements of size k and i want to generate all higher level elements (of size k + 1) from it,what should i do??Any pointers would be of a great help I tried the following for lists...for list of lists i …

Member Avatar for girish_sahani
0
212
Member Avatar for girish_sahani

this doesnt work when the file is in the same directory as the .py file. [code] def get_colocations(filename): sentences = open(filename).read().split("\n") colocations = [] for sent in sentences: colocations.append(sent) return colocations def main(): get_colocations("colocations.txt") print "Colocations are",colocations [/code] Can anyone help????????

Member Avatar for girish_sahani
0
127
Member Avatar for Dazpenn

Please Help!! I am designing a program in vb6 that is to be linked up to databases in both access and excel. The problem is when I try to link up the database's using the data control I get the following message: "Couldn't find the installable ISAM". I am kinda …

Member Avatar for Comatose
0
165
Member Avatar for INI

Good Morning All, I am trying to write a code that will allow me open up a powerpoint file and an adobe file in VB. I have checked the Microsoft Powerpoint library under "references". Please could anybody give me code that can do that? Thanks. Ini :-|

0
69
Member Avatar for oceanboi

Hi! I'm trying to teach myself VB.NET and having some troubles right now... please help me out :sad: I'm working with NorthWind database in MS SQL Server. I suppose I'm trying to populate tables into ListBoxes and the following highlighted lines are giving me an error (Value of type '1-dimensional …

Member Avatar for oceanboi
0
103
Member Avatar for grindit

hi im new to the forums and im stuck on a part of my code that i need to do for homework in the code below in my loadPuzzle function it seems to skip my cin.getline and i dont know why. [code] #include <cstdlib> #include <iostream> #include <fstream> #include <cstring> …

Member Avatar for SpS
0
216
Member Avatar for brounemmanuel

Hello I am new in Perl and CGI. I want to write a program in perl that enables me to call executables, some of them maybe GUI. My starting point was to write a small program that would call an interface because this is on a local machine. Ultimately i …

Member Avatar for KevinADC
0
145
Member Avatar for DATABASE

Hi everybody :sad: need help plz how can i list items from a database into a CheckedListBox , using VB.Net and MS Access db ??

Member Avatar for DATABASE
0
327
Member Avatar for hockmasm

i bought a prozilla automall website and i have found a glitch in it. currently, if a member purchases a package from me that contains 5 profile listings that last for 1 month, at the end of the month they will get an email that says that their listings are …

0
88
Member Avatar for Joncamp

I wrote a cgi-bin program to run with Apache/Linux. When I do a form-post operation from a web page to my cgi-bin program, the form fields are not passed to the cgi-bin program? The cgi-bin program runs ok and returns some html through stdout, but doesn't read any form fields …

Member Avatar for Dave Sinkula
0
163
Member Avatar for CStallion

disclaimer I'm a programming n00b so I may not know what I'm talking about. /disclaimer My question boils down to scopes. Let say I have code [code] { string mystring1; string mystring2; string mystring3; //code dealing with mystring1 //code dealing with mystring2 //code dealing with mystring3 } [/code] versus [code] …

Member Avatar for CStallion
0
151
Member Avatar for yuzhang

:sad: Codes: if (sock!=INVALID_SOCKET) { if(send(sock,s,(int)strlen(s),0)==SOCKET_ERROR) { WSAGetLastError(); } } s is a char pointer pointing to the very first memory location of the data string. While in debugging mode, there was no error from `WSAGetLastError()`, but the data string was not displayed in the server. Why? Thanks

Member Avatar for yuzhang
0
148
Member Avatar for CStallion

[code] int r = rand()%2; switch(r) { case 0: string x[] = "Hi."; break; case 1: string x[] = "Bye."; break; } [/code] Will this code produce a conflict on the string "x"?

Member Avatar for CStallion
0
96
Member Avatar for drock9975

I've never seen this before and am perplexed beyond belief... by the way I'm using Visual Studio I have a rather large program/game i'm working on right now, and it reads in via ifstream file i/o from binary files in several locations to initialize variables. For some reason for one …

Member Avatar for drock9975
0
190
Member Avatar for CStallion

I know how to change the console text color using this code [code]HANDLE hConsole; hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hConsole, ###)[/code] But suppose I need to change colors frequently and on different output lines. Is there a shorter way to do it, like [code] cout[color=red] << "text"; [/code] ??? Rant: Google searching …

Member Avatar for CStallion
0
307
Member Avatar for aeinstein

Hi all, I'm transistioning from the networking end of things and moving to the programming side, so, even though I've been around here for quite awhile, I have a pretty basic queston: since the char data type has a minimum range values between -127 to 128, how is a letter …

Member Avatar for aeinstein
0
173
Member Avatar for vidya_m

can anyone suggest some websites which has code snippets for creating shopping carts using jsp, servlets and javabeans. I am seriously looking for a career in J2EE. pls help Thanks

Member Avatar for aniseed
2
384
Member Avatar for gbs

Hi, I am having the problem of running ps2pdf from a python script. From the command line, ps2pdf works just fine. However, when I tried the following code: os.chdir("/tmp/test") # file.ps resides in this dir os.system("ps2pdf file.ps file.pdf") The script generated an empty file.pdf with no pages. Does anyone know …

Member Avatar for G-Do
0
2K
Member Avatar for madloch

Hi All I'm new to Python and have created the below little program but would like to be able to print the loop final count (eg. 8 years) rather than every loop. Any hints on how to do this? def main(): print "This program calculates how long it takes for …

Member Avatar for madloch
0
3K
Member Avatar for NumNut

Hello, I am using fedora 5 and installed wxpython in an effort to program in python/wxpython (installed wxPython-2.6.3.2-1.fc5.i386.rpm, wxGTK-2.6.3-2.6.3.2.1.fc5.i386.rpm and wxGTK-gl-2.6.3-2.6.3.2.1.fc5.i386.rpm). When I run my test script to create a frame, a notebook and an image on one of the pages of the notebook, I get a GDK error when …

Member Avatar for NumNut
0
223
Member Avatar for Aenima

First of all, hello everyone. My problem is this. In writing a program which accepts multiple user inputs of type [B]int, [/B]during the first run through the program, after the first [B]cout << [/B]statement prints, I have to press enter twice in order for the second [B]cout [/B]statement to display. …

Member Avatar for Aenima
0
264
Member Avatar for watkins6878

Hi I am trying to fill a combobox with the files from a FileListBox the code i am using is [CODE]Private Sub Form_Load() File1.Path "C:\Images" File1.Refresh If File1.ListCount > 0 Then For i = File1.ListCount To -1 Combo1.AddItem File1.List(i) Next End If End Sub [/CODE] The FileListBox fills with the …

Member Avatar for watkins6878
0
168
Member Avatar for yyuuvvaall

hi, can someone understand how the new element is being attached to the list in this code? [CODE] void insertSortedList (Node **head, int value) { /* creating a new node */ Node *ptr = createNode (value); Node **pCurrent = head; /* adding the new node to the correct place in …

Member Avatar for dude543
0
343
Member Avatar for Ene Uran
Member Avatar for bumsfeld
0
5K
Member Avatar for newgurl

Hello, Can you please assist, why my Dev C++ program, wont see that I am trying to introduce the string library? Eaxmple: [code]#include <iostream> #include <string.h> using namespace std; ... ... ... int id; string name; int item; float cost;[/code] int is bold, float is bold, but string is not... …

Member Avatar for WaltP
0
272
Member Avatar for newgurl

Hello, I am new at this. I am trying to work with calling functions here. (Eventually I want to do some simple calcs on cost of going through a station...)but am getting an error on line marked with ***** initialise line within main int(). Can someone kindly suggest why it …

Member Avatar for WaltP
0
3K
Member Avatar for blacklocist

Hi All, Well once again I go round and round with IIS. I have got it to run with a little tweaking with ASP 1.1v but I can't get it to run with ASP 2.0. Here are the variables: Server Hosted on IIS 6.0 Running Windows 2k3 Server Not a …

Member Avatar for blacklocist
0
210
Member Avatar for katli

Hi i have a CipherLab CCD 1000 barcode scanner that i need to use with a windows form, and have no clue as to how to focus the scanned data to the textbox. i have already set the scanner up, but somehow i cannot seem to get the .dll file …

Member Avatar for Paladine
0
100
Member Avatar for moloza

Helloe all I have this small program using switch statment. the problem that when I complie this C code using gcc under Linux I get message: switch guantity not integer!! Now, when I use switch(*hello) instead switch(hello), I got run time error: segmentation fault!! I want to know where is …

Member Avatar for Dave Sinkula
0
3K

The End.