10 Topics

Member Avatar for
Member Avatar for NuGG

I have been trying to figure out how to populate a html template with data from a multi dimensional array, but i cant figure it out. The template is taken from MySQL. This is what I have: $template=addslashes($row['content']); eval("\$body=\"$template\";"); print($body); Now the template is as follows: $row['content'] = "<html><p>array item …

Member Avatar for NuGG
0
225
Member Avatar for TrustyTony

I googled little around for correct way to not reinventing of the wheel for expression evaluation (even I had done some simple evaluation check for my [Tkinter calculator snippet](http://www.daniweb.com/software-development/python/code/282548/simple-calculator) earlier). After getting totally upset with [this example](http://www.bestcode.com/html/evaluate_math_expressions_pyth.html), I made this with some struggles with `__builtins__` globals parameter of eval. First …

0
638
Member Avatar for TrustyTony

I am trying to write safyfied evaluator class, and get unexpected `__builtins__` added to dictionary after evaluation. Can somebody explain why/how it happens? import math def echo(n): print n return n def nothing(n): return n debug = nothing class MathParser(object): ''' Mathematical Expression Evaluator class. call evaluate() function that will …

Member Avatar for HiHe
0
284
Member Avatar for AdampskiB

In my code they're instructed to enter a width and height. However obviously these will be intergers, but I need to perform checks that they are intergers before they're used. Atm I've got this: [CODE] while True: if width.isdigit() == True and height.isdigit() == True: if width >= 2 and …

Member Avatar for TrustyTony
0
194
Member Avatar for etm9413

Hi, I am new to Unix/Linux... I have a TCSH shell script (on AIX4) in which, at a certain point, I want the user to be able to pass commands to the TCSH interpreter. What I do is I create the illusion that the user is at his usuall shell …

Member Avatar for etm9413
0
436
Member Avatar for garrypeace

Hi, I'm new to ASP.NET. I began learning as I had to make a website for a college project using a language I didn't already know (I know PHP pretty well so I'm not a total noob :P). Basically what I'm trying to do is get a list of products, …

Member Avatar for aspproject
0
143
Member Avatar for stepamil

Hi All, I'm using SOAP::Lite to do some online payments. The whole mechanism is set on separate machine which is communicating with payment gateway. So WWW machine sends a message to invoke SOAP::Lite and SOAP message is sent to payment gateway. In development I had both "machines" running on one …

Member Avatar for d5e5
0
214
Member Avatar for omeralper

Hello, I am newbie at ASP.net. I got stuck at a point that hopefully you can help me. I use mssql as database and fetch all my records and images from there by using <asp:SqlDataSource>. I also use [CODE]<asp:Repeater>[/CODE] to show data at every iteration. After fetching data from database, …

Member Avatar for omeralper
0
164
Member Avatar for daudiam

[CODE]cmd='date | wc' $cmd [/CODE] If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument". What is meant by expansion of pipe. When we execute [B]date | wc[/B] on …

0
98
Member Avatar for TrustyTony

This function I did to improve calculator program by eliminating problems with Pythons problem of dividing integer with integer and giving integer division result.

Member Avatar for TrustyTony
0
391

The End.