64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for max.yevs

so i was trying to make a very simple counter (although not sure if that's what you call it) [code]import time a = 0 def main(): time.sleep(5) b = a + 1 print (b) del(a) a = b del(b) main() main()[/code] i know this is very unefficient and there is …

Member Avatar for max.yevs
0
137
Member Avatar for curtissumpter

I wrote this simple java program to test the repaint mechanism in Java for my Eclipse IDE (not that it works on XCode either). The repaint() mechanism is not repainting, it does not erase the code previous to it in the graphic. It should according to everything I've read. Help …

Member Avatar for toucan
0
3K
Member Avatar for Rohinir

Hi all, I have set CheckedListbox multicolumn property =true. I wants to add two columns in checklistbox first one will contain Groupname and second column will contain descr . How can i add items in these two columns ?

Member Avatar for Teme64
0
3K
Member Avatar for solocky

Hello all i have (after much googleing) written a php script which when activated appends to a main text file with the text seen below in this exact format type= name=---------------------------------------------------------------------------------------------- # type= name=(USER INPUT HERE) # type= name=---------------------------------------------------------------------------------------------- # what i need is a simple webform with one input …

Member Avatar for solocky
0
153
Member Avatar for misticles

im trying to display the results of a search when users use the drop down menus. ive been at this for 2 wks and cannot get it to work at all. please help :( [ICODE] <?php $programme = $progyear = $subjectname = $examyear = null; //declare vars $conn= mysql_connect("localhost", "root", …

Member Avatar for misticles
0
149
Member Avatar for Stefano Mtangoo

Hi all, I have MP3 player from [url]http://www.premiumbeat.com/flash_resources/free_flash_music_player/multiple_tracks_mp3_player_menu.php[/url] and I want to put it in my page. I want it to appear in every page. I'm pretty new to many PHP stuffs and with PHP page I judt do simple include statement. How do I do that? Here is their …

Member Avatar for Stefano Mtangoo
0
110
Member Avatar for Nawsheen

I am a begginer in vb.net. Actually i am having problems to do my homework. I will be posting both the question and my answer. [B]Question[/B] Create a small program that allows you to enter a number. If the number is greater than 100, you will see the "You win …

Member Avatar for Nawsheen
0
125
Member Avatar for nimbusania

Hi, I'm having trouble with 'stringBuilder'. this the snippet of code: [CODE]using (StreamReader sr = new StreamReader("file.txt")) { word = sr.ReadLine(); listBox1.Items.Add(word.ToString()); label1.Text = word.Length.ToString(); StringBuilder sb = wr.GetStringBuilder(); [COLOR="Red"]sb.Remove(0,word.Length);[/COLOR] }[/CODE] it gives this error: "Index was out of range. Must be non-negative and less than the size of the …

Member Avatar for thoughtcoder
0
138
Member Avatar for xXxWiredxXx

hi.. is it possible.. when i type a letter "S" all the records begins with "S" will be shown or highlighted? its like when you register in a website.. in choosing country section.. thanks

Member Avatar for xXxWiredxXx
0
51
Member Avatar for turbomen

Dear Sir, After finishing the 1st part, I still have many problem of the question. Program Student_millionaire; {$APPTYPE CONSOLE} { } uses SysUtils, OurCrt; Var User_Choice:Integer; Procedure ContestantsList; Begin WriteLn('1 pressed,listing all the contestants...'); ReadLn; End; Procedure Generate10finalists; Begin WriteLn('2 pressed,generating the 10 finalist''s numbers...'); ReadLn; End; Procedure UpdateFinalists; Begin …

Member Avatar for FlamingClaw
0
116
Member Avatar for anjaly grace

//This code works for turbo c++ //Solution for strongly connected components or Kosaraju's algorithm //for nitc students //I use this because there is no other way i know how to do post a //code. ///////code:- #include<iostream.h> //#include<math.h> #include<conio.h> //int time; //time=0; char color[10]; int s[10]; int f[10]; int nn; int …

-1
87
Member Avatar for tivrfoa

Hi! I'm using IDLE. [CODE]Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> test = 1 >>> if test: print "ok" SyntaxError: invalid syntax (<pyshell#2>, line 2) >>> [/CODE] Does someone can help me? Thanks.

Member Avatar for tivrfoa
0
173
Member Avatar for max.yevs

i made another extremely simple script, but i've looked through all the random python commands(10.6) and can't figure out how can i write a nonunique random script? as in all the random numbers can be the same? like random.sample? say i have a list [1,2,3,4] and i want to pick …

Member Avatar for max.yevs
0
128
Member Avatar for macfi

Hi All I am a bit of a begginer in PHP. How do I store multiple vales in a cookie? I am going along the lines of: [code=php]$data = array('apple'=>'green', 'orange'=>'orange', 'banana'=>'yellow');[/code] then something like (not sure about the sytax here):: [code=php]$var=implode($data); setcookie('data', $var, time() +3600);[/code] Basically how do I …

Member Avatar for macfi
0
4K
Member Avatar for max.yevs

yet another quick question... I wrote this at the end of a script [code]y = 1 n = 0 i = input("Again? Y/N: ") if i is 0: print ("Good bye!") exit if i is 1: execfile ("program2.py")[/code] now of course if i is 0, they won't be able to …

Member Avatar for adam1122
0
108
Member Avatar for txwooley

I am working on a function to find the slope of a line if given x1, y1 and x2, y2. Not too hard. But I need the results to be floating point not integers even though the x and y inputs are integers. I have : [code=python] def slope(x1, y1, …

Member Avatar for txwooley
0
134
Member Avatar for BruenorBH

I am trying to create radio buttons in Dev-C++ using C. I am new to Win32 API programming also. What I have done so far is create the main app window, added textboxes, check boxes and a few radio buttons. The only issue I have now is that You cannot …

Member Avatar for BruenorBH
0
316
Member Avatar for neutralfox

Hello everyone, I am currently learning assembly language and I am using MASM 615 but I don't like the interface, can someone recommend me a good assembler. The assembler should make the same work as MASM 615 . Which assembler is easy to use and have intellisense if possible. In …

Member Avatar for neutralfox
0
203
Member Avatar for jtok

I am using Visual Studio 2008 developing a web app front-end for a T-SQL DB using asp.net and vb.net. I have a label inside a list like so: [CODE] <ul id="ul" class="class"> <li id="li"> <asp:Label runat="server" ID="label"></asp:Label> </li> </ul> [/CODE] I cannot access the label directly in my code-behind file …

Member Avatar for jtok
0
141
Member Avatar for Newbie 123

Hi I have some code where the user inputs some stuff and then i would like it to get added to a database. The problem is dont know how to make it so that it only adds to the database when the user has submited it? Any ideas ?

Member Avatar for Newbie 123
0
184
Member Avatar for Alv45525

helo guys...am doing my website in asp.net and its gonna be an ecommerce site with shopping cart and all..I learned that i will need to makke use of session in the login form and pass it to the other forms...can anyone help and gimme some explanation

Member Avatar for Alv45525
0
190
Member Avatar for ning2009

Hi, there I have the code (from Jice) using List below [CODE=syntax] targetlines=["*beam section,section=%s, elset=%s, material=%s", "%s", "%f, %f, %f"] resultlines=[targetlines[0] % (dResult['SEC'],section_type,mat_data), targetlines[1] % section_data, targetlines[2] % (math.sin(float(dResult['ANG'])*math.pi/180), math.cos(float(dResult['ANG'])*math.pi/180), 0)][/CODE] , which worked well However when I modified it to [CODE=syntax] targetlines=["*element,type=b31, elset=%s", "%s", "*beam section,section=%s, elset=%s, material=%s", "%s", …

Member Avatar for ning2009
0
96
Member Avatar for veledrom

Hi, When try to validate the textbox generated by innerHTML, it returns "Undefined" for the textbox. Therefore, i cannot validate it. Thanks [code] <html> <head> <script type="text/javascript"> function validateForm () { if (document.form1.textContactname.value.length == 0) { alert ("ERROR"); return false; } return true; } function createInvoice () { document.getElementById("hiddenPayment").innerHTML = …

Member Avatar for veledrom
0
131
Member Avatar for nav33n

Hi all ! I have been assigned a task to implement an insert query into table a [i] only if [/i] a record doesn't exist in table c. I have been scratching my head for past 2 days and even my best friend [i] google [/i] didn't help me much, …

Member Avatar for nav33n
0
1K
Member Avatar for Mearah

Hey, is there somebody who tried to use pyOpenGL with wxPython? I want to have a GUI, where I have a frame integrated, that shows a 3D image computed by an OpenGL algorithm build in the PyOpenGL environment. Mearah

Member Avatar for Mearah
0
683
Member Avatar for max.yevs

so i was trying to make a very simple counter (although not sure if that's what you call it) [code=python]import time a = 0 def main(): time.sleep(5) b = a + 1 print (b) del(a) a = b del(b) main() main()[/code] i know this is very unefficient and there is …

Member Avatar for adam1122
0
146
Member Avatar for aixing

Hello, I'm doing a school project in .JSP and I came across this syntax error while inserting data in my database. [CODE] DB Query: INSERT INTO MainApplicant (MainApplicantId,FullName, MaritalStatus, Height, Weight, Gender, AgeAsOfLastBDay, DateOfBirth, PlaceOfBirth, IDNo, CountryOfIssue, Nationality, Race, HomeNo, OfficeNo, MobileNo, Address, PostalCode, CorrAddress, CorrPostalCode, EmailAddress) VALUES [COLOR="Red"]('P-8915710B,[/COLOR]'Jaslyn ', …

Member Avatar for aixing
0
154
Member Avatar for k2k

hi, i have a JFrame... one menuBar placed on a JPanel.. and then two JPanel with different things (let me call them ActionPanelOne, and ActionPanelTwo). i put the JPanel (with JMenuBar) North of the JFrame, and menuIteam will call the 2 ActionPanel individually to come up. my problem is: Once …

Member Avatar for k2k
0
182
Member Avatar for txwooley

I have an assignment to: "Wrap this code in a function called compare(x, y). Call compare three times: one each where the first argument is less than, greater than, and equal to the second argument." So I came up with this: [code=syntax] def compare(x, y): if x < y: print …

Member Avatar for txwooley
0
111
Member Avatar for songweaver

Hey guys, I am working on a fraction program where you can add, divide, subtract, multiply, and divide and it uses addressing. Anyway I got it to work except when I added an error message if to make sure that the 2nd Numerator, 1st and 2nd Denominator are not zero. …

Member Avatar for songweaver
0
90
Member Avatar for weblover

hi all ..i'm working on php application .......and i need to insert data into a filed in my table but in a certain condition ......exp:(insert into users (posts) values(...) where ...) i can't do this .....what should i do ? please help and thnx in advance

Member Avatar for Designer_101
0
346
Member Avatar for halfnode

[CODE=Cplusplus]#include "STDAFX.H" #include <iostream> #include <iomanip> #include <string> #include <fstream> #include <cstdlib> using namespace std; class Subject { private: string code; int cu; char pf; public: Subject(void); void setCode(string); void setCU(int); void setPF(char); }; class Student { private: string name; int count; int totalCU; Subject subjects[4]; public: Student(void); void setName(string); …

Member Avatar for halfnode
0
196
Member Avatar for txwooley

I am trying to learn Python. I have browsed through a few tutorials and tried to follow them until they get too complex and I try to find another one to give a different perspective. I am currently trying (and very much enjoying) the very basic "How to Think Like …

Member Avatar for txwooley
0
105
Member Avatar for Bladtman242

Hi, which C# enviroment (i like to keep compiler, editer and debugger in the same program) can you guys recommend?

Member Avatar for Bladtman242
0
168
Member Avatar for scarebyte

Hi guys, I have a question concerning the following code I have written for a final project in an entry level C++ course. My task requires 3 level hierarchy (which i have) and use of polymorphism. The program works in this state, but I dont think I am actually exercising …

Member Avatar for scarebyte
0
769
Member Avatar for ning2009

Hi, there Let me put my resource line and target lines here firstly resource line: 56 J=7224,164 SEC=CON450X450 ANG=45 target lines: *beam section,section=R, elset=CON450X45056,material=con2 0.45,0.45 0.707107,0.707107,0 I have a dictionary below (created using woooee's code) Frame_Section contains {'CON450X450': [['MAT', 'CONC2'], ['SH', 'R'], ['T', '.45,.45']], 'B400': [['MAT', 'CONC2'], ['SH', 'R'], ['T', …

Member Avatar for ning2009
0
213
Member Avatar for Lareman

Hi folks! I'm an experienced web developer who finally has time to teach himself ASP.NET. I've worked with it from time to time, but have been delving deeper and deeper, lately. I've created user controls that are dynamically loaded into a Wizard control. (I'm no veteran, but not sure if …

Member Avatar for Lareman
0
105
Member Avatar for konczuras

Hello Everybody! I'm trying to catch the entering event (when the control becomes active in a form) of an hScrollBar. It would be used for an undo/redo process, and whenever I click on it, or just tabbing to it or anything else, the enter event won't fire. Anybody got some …

Member Avatar for konczuras
0
83
Member Avatar for oracle123

Hi all, I am a newbie to C programming world. In my program I want to log information into a log file whose file name should be filename_date_time I am using following code to write information but need help in changing the file name from filename to filename_date_time. [CODE] #include …

Member Avatar for jephthah
0
4K
Member Avatar for h2onet

I am trying to display/hide different div tags when a checkbox is checked and when a California is selected as a drop-down value. I have it working when the check-box is selected and choosing the drop-down value, but not when the drop-down is selected and clicking the check-box. I hope …

Member Avatar for h2onet
0
108
Member Avatar for dulahdaglace

i want to read to a 2d-array from a file, but for some reason the file is not opening (at least thats what the output says) [code=cplusplus] #include <fstream> #include<string> #include <iostream> using namespace std; int main(){ string filename; cout<<"Please type the name of the file"; cin>>filename; fstream file(filename.c_str());//same result …

Member Avatar for dulahdaglace
0
244
Member Avatar for want_to_code

[code=c] // a code which prints "hello world" #include<stdio.h> int main() { (&printf)("hello world"); return 0; } why does the above code work? #include<stdio.h> int main() { char str1[]="hello"; int j=762; char str2[]="hello"; if(str1==str2) printf("true %d\n",--j); else printf("\nfalse %d\n",j--); return 0; } [/code] //the above code prints "false 762", why? …

Member Avatar for Nick Evan
0
299
Member Avatar for Clockowl

Hey guys, How do you handle exceptions in your programs? For instance, I have this function: [code=cpp]bool load_file(const char *filepath, std::string &dest) throw (std::bad_alloc, std::runtime_error) { using namespace std; ifstream file; file.open(filepath, ios::binary); if (!file.good()) { throw runtime_error("Couldn't open the file"); } //get filesize in bytes from ifstream //seek end, …

Member Avatar for Clockowl
0
108
Member Avatar for neutralfox

Hello everyone, Actually I want to learn more about thread, can we have more than one "run" for thread in a program ? [code] package ignisftpv20; import javax.swing.JFileChooser; import java.io.*; import java.net.*; import javax.swing.JOptionPane; public class FTPClient extends javax.swing.JFrame implements Runnable { JFileChooser fileChooser = new JFileChooser(); File fileUpload; ObjectInputStream …

Member Avatar for BestJewSinceJC
0
264
Member Avatar for chriscross86

hi, i am using visual web developer 2005 express. i am trying to locate the web.config in the solution explorer, but it is not there and i don't know any other alternative way to know where it is located. please help.

Member Avatar for chriscross86
0
279
Member Avatar for everard

I have two MFC Window Form. The main window will call the second window to process a necessary input then the result generated by the second window should appear in the main window's edit box. But the problem is I don't know how to do it. Does anyone knows how …

Member Avatar for everard
0
95
Member Avatar for Merovingian

I need to execute the following SQL command from within VB: [CODE]CREATE LOGIN [rx] WITH PASSWORD=N'rx', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF[/CODE] I've been trying to find info for days but everything always deals with updating tables etc If someone could show me the connection string and have to execute the statement …

Member Avatar for Teme64
0
123
Member Avatar for lancevo3

Hey guys I need to copy multiple string arrays into one array to use to display output. I need to copy the name, addr, telephone, carinfo, payment array to the output array. How would I go about doing that. [code=cplusplus] #include <iostream> #include <iomanip> #include <fstream> using namespace std; void …

Member Avatar for Ancient Dragon
0
111
Member Avatar for max.yevs

alright i know you're tired of explaining simple things to me, but i've looked around and really can't figure how to do this... i'm trying to write a simple python script like when you type in a number for n, and press enter, it finds n+2? i thought it will …

Member Avatar for jlm699
0
115
Member Avatar for TuX4020

Hi all, So I've got an assignment of creating a priority queue using a heap data structure. I've read lots of pages online about the heap data structure, but I keep coming up with questions. In my class, I got the impression that a heap was structured similarly to a …

Member Avatar for jrw0267
0
138

The End.