14,946 Topics

Member Avatar for
Member Avatar for Tcll

I'm trying to build an interactive IDE... the IDE has a file testing interface which displays a tree of the called functions in relation to the data in the file being tested. what I want to do is when you select a function referenced in the tree, it'll highlight that …

Member Avatar for Tcll
0
546
Member Avatar for Tamara_1

Program For Standard Form def stnfrm(a,b,c): one = (b/(2.0*a)) two = c-((b**2.0)/(4.0*a)) axis = one/-1.0 x = -b/(2.0*a) y = a*(x**2.0)+(b*x)+c print x if a == 1: print "(x + %f)**2 + (%f)" % (one,two) elif a == -1: print "-(x + %f)**2 + (%d)" % (one,two) else: print "%d(x …

Member Avatar for ddanbe
1
529
Member Avatar for Spencer_3

Ok so I'm trying to make a inter face with a password. my plan is to have a window open up with an input box where you type the password and then when you have the right password it brings you to the second screen with the stuff on it. …

Member Avatar for woooee
0
4K
Member Avatar for thabo.tman.545

my code tries to generate a tree for reversi/othello but it runs into an infinite while loop and i am unable to debug it.The purpose of this code is to make minmax algorithm for the aiplayer.please help. import numpy board=numpy.array([[0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,1,2,0,0,0], [0,0,0,2,1,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0]]) matrix_list=[numpy.copy(board)] points=[] decoy_list=[] …

Member Avatar for woooee
0
529
Member Avatar for abaddon2031

I have two python script the first once contains my def callers and my command line arguments. The second one contains my defs that i want to use the command line arguments in. I was wondering if there was a way to call the command line arguments into the second …

Member Avatar for Gribouillis
0
407
Member Avatar for abaddon2031

I am working on s code that i want to add command line arguments to. I have read the docs.python page on this subject 3 or 4 times and it still has me conffused. I want to be able to set my base directory, change a send and recive email …

Member Avatar for abaddon2031
0
672
Member Avatar for ankit1122

hello all; <!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"> <title>Our Local site</title> </head> <body> <form action="welcome.php" method="post"> <input id="t1" name="t1"type="text" placeholder="table name"><br> …

Member Avatar for pritaeas
0
184
Member Avatar for Amyzz

Using python 2.4.3 I'm trying to make a HTTP server which: (1) receives a message with 'POST', (2) makes an answer message, (3) send the answer message back to sender. Step (1) and (2) go well, Step 3 fails.... **sometimes**. It looks like there is some threading issue with the …

0
51
Member Avatar for Gribouillis

This snippet implements a pointed set, that is to say an ordinary set of elements with a distinguished element called the basepoint of the set. For example the seven days of the week could be stored in a pointed set, the basepoint being monday because today is monday. It is …

6
266
Member Avatar for skusobny

Hello please i need some help to rewrite this code in PHP to Python i am totally new in this and need this baddly please help if u can. Thanks a lot. <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>phpChart - Basic Chart</title> </head> <body> <?php function array_delete($array, …

Member Avatar for itsnauman
0
183
Member Avatar for TrustyTony

I did code for challenge that I saw posted for C# by deceptikon: http://www.daniweb.com/software-development/csharp/threads/479304/coding-challenge-string-to-date Here it is. Of course normally the code would be without prints and put in function, but this is enough for now for me. There could also be normalization from '/' separated form not producing ambiguous …

1
267
Member Avatar for dany12

I have a simple menu like this **HTML** <div> <ul> <li> <a href="#">Demo</a> </li> <li> <a href="#">Demo2</a> </li> <li> <a href="#">Demo3</a> </li> <li> <a href="#">Demo4</a> </li> <li> <a href="#">Demo5</a> </li> </ul> </div> **CSS** ul li:nth-child(1){border-top:4px solid red;} ul li:nth-child(2){border-top:4px solid pink;} ul li:nth-child(3){border-top:4px solid blue;} ul li:nth-child(4){border-top:4px solid orange;} Now …

Member Avatar for dany12
0
285
Member Avatar for nouth

How can I return the indexes of RBG? Say `p` is my *Numeric Python array*. >>>x = 58 >>>y = 72 >>>p[y][x] array([255, 255, 255], dtype=uint8) I don't know what a *Numeric Python array* is or how to handle them but I found how to convert it to `['255', '255', …

Member Avatar for nouth
0
1K
Member Avatar for giancan

Dear friends, I'm having a strange issue with a simple python code involving wx and HTML2. It is a code to run a local html page (on windows) but when I close the browser, the process stays in memory and I have to manually kill it. Here is the code, …

Member Avatar for giancan
0
243
Member Avatar for alagez

Hi there, I am bit confused about this. I am doing assignment on neuron analysis by using python neurolab. Hidden layer Architecture 1 [9-1-1] // 9=input nodes 1=hidden nodes 1=output 1 [9-2-1] // 9="" 2=hidden nodes 1=output 1 [9-3-1] 1 [9-4-1] 1 [9-5-1] 1 [9-6-1] from the description above. I …

0
118
Member Avatar for abaddon2031

I have a python script that reads a csv file and converts it to two new files so that my database can add new emails or update existing ones. What im trying to do now is after it has converted them for it to send me a email with how …

Member Avatar for abaddon2031
0
388
Member Avatar for mark103

Hi guys, I need your help as I got stuck. I'm trying to fetch the data from my own xml which it looks like this: <?xml version="1.0" encoding="UTF-8" ?> <tv generator-info-name="www.mysite.com/xmltv"> <channel id='101 ABC FAMILY'> <display-name>101 ABC FAMILY </display-name> <programme channel="101 ABC FAMILY" start="20140520110000" stop="20140520120000"> <title lang="en">Gilmore Girls - Let …

Member Avatar for Gribouillis
0
249
Member Avatar for joseph_7

can someone help me am trying to create a game that scrambles words then you have guess the corect words for it this what i have doen so far but it dint seem to work can sometell me what the problem. import tinker import random words_list = [] f = …

Member Avatar for TrustyTony
0
158
Member Avatar for EnglishInfix

I am working on my first project. I am trying to create a program that can fetch a string from a text file when the number for that string is entered, and allow the user to edit that string if they wish. Right now I'm just trying to get menus …

Member Avatar for EnglishInfix
0
3K
Member Avatar for Dimaric

Using the following code as a foundation (it reddens the upper left corner of an image), I was told to create 2 different programs: one that would brighten the entire image, and one that would convert the entire image to grayscale. I need major help with this. Here's the code …

Member Avatar for Dani
0
338
Member Avatar for ZZucker

Challenge: change the code so that only .py and .txt files of a given directory are listed. ''' filename_list_given_dir1.py use module glob to list all the filenames of .jpg files or any extension(s) you specify in a given directory ''' import glob import os # all files (split off file …

Member Avatar for snippsat
0
506
Member Avatar for acrocephalus

Hello! I have started experimenting with GUI programming using TkInter. Up to now, I have written this code: [CODE]import Tkinter, tkFileDialog, Tkconstants from Tkinter import * root = Tk() root.title('Watermark Image Processing 1.0b') #Options for buttons button_opt = {'fill': Tkconstants.BOTH, 'padx': 5, 'pady': 5} #Define asking directory button dirname = …

Member Avatar for ronkalycarlos
0
17K
Member Avatar for satroan

Hi I am trying to write a code that finds approximations of sine and cosine using the equations below with a given value of theta in degrees basically as a novice programmer i am having trouble setting upa a while loop for the expansions. Also can you guys please quote …

Member Avatar for ZZucker
0
285
Member Avatar for perlinda

Hi everyone, I have 4 .py files : main.py , file1.py , file2.py , file3.py as : main.py: import sys import file1 import file2 import file3 def main(a,b): c=file1.somme(a,b) d=file2.mul(a,b) file3.div(a,b) print c,d if __name__ == '__main__': a,b=sys.argv[1:] a=int(a) b=int(b) main(a,b) file1.py: def somme(i1,i2): return i1+i2 file2.py: def mul(i1,i2): return …

Member Avatar for perlinda
0
498
Member Avatar for TrustyTony

I am looking for alternatives to setup a server in work place which does not allow to setup new software to computers to check and reserve rooms for meetings both through local network computers or possible from home / on the move. I of course would like to have thy …

Member Avatar for TrustyTony
0
291
Member Avatar for DXNNX

http://pastebin.com/piCzf2sT when put a token in vertical that the main windows is full appear all the line in selected color and not only one, anyone can know why?

Member Avatar for woooee
0
248
Member Avatar for Tut

I am new to programming and I am looking for a language that is easy to learn, and a relatively useful programming language. I don't know much about programming but I want to learn and I think here is the best place to start. I want to get started on …

Member Avatar for Hiroshe
0
199
Member Avatar for TrustyTony

To continue[ my quiz series](http://www.daniweb.com/search/query/0?q=%22quiz+of+the%22+pytony#gsc.tab=0&gsc.q=%22quiz%20of%20the%22%20pytony&gsc.page=1), explain what happens with this code (how you would name this action and is there other way to get same result), why, and what is actually the value of `a` at end. a = ['a', 'b','e'] a[2:2] = ['c', 'd']

Member Avatar for TrustyTony
0
255
Member Avatar for Gribouillis

This small script named `sourcecode.py` is a command line tool to open a python module's source file with the default editor. For example the line $ python sourcecode.py xml.dom.minidom opens the file minidom.py from the python distribution with the default editor. The same works with user-defined modules having a python …

2
628
Member Avatar for Tcll

so this project is basically nothing more than a python to GLSL translator. https://github.com/ncbray/pystream you have to follow the GLSL rules with the python code, so usage isn't exactly free. the problem though is Nick Bray only documented a little about how to code the shaders, and gives no examples …

0
96

The End.