Go Back   CodingForums.com > Search Forums

Before you post, read our: Rules & Posting Guidelines

Showing results 1 to 25 of 153
Search took 0.37 seconds.
Search: Posts Made By: Kakao
Forum: Python 03-06-2011, 10:18 AM
Replies: 2
Views: 3,247
Posted By Kakao
Use the code tag to format your code. Otherwise...

Use the code tag to format your code. Otherwise it is very difficult to read Python code.
Forum: Python 02-25-2011, 01:00 PM
Replies: 1
Views: 2,621
Posted By Kakao
i = raw_input("Type a number = ") try: i =...

i = raw_input("Type a number = ")
try:
i = float(i)
except ValueError:
print("Illegal")
Forum: Python 02-20-2011, 12:09 PM
Replies: 5
Views: 3,328
Posted By Kakao
What do you mean by "it wont let me" ? Any error...

What do you mean by "it wont let me" ? Any error message or what?
Forum: Python 01-29-2011, 09:50 AM
Replies: 1
Views: 1,602
Posted By Kakao
Divide by 100.0: interestRate/100.0 ...

Divide by 100.0:


interestRate/100.0


I will leave to you the pleasure to discover why.
Forum: Python 01-25-2011, 10:27 AM
Replies: 1
Views: 2,536
Posted By Kakao
You only coded the communication part. There is...

You only coded the communication part. There is no code on the server to execute the command. Look at the subprocess module to achieve the execution of commands.
Forum: Python 01-09-2011, 11:44 AM
Replies: 2
Views: 1,918
Posted By Kakao
urllib.request.urlopen returns a file like object...

urllib.request.urlopen returns a file like object so you need to use the read method of a file like object:


youtubelink = re.search(youtubere, youtubesearch.read())
Forum: Python 09-02-2010, 11:14 AM
Replies: 1
Views: 3,503
Posted By Kakao
if the equal sign will always be present then you...

if the equal sign will always be present then you split the string at it and get the second part:


string1 = "attachement; filename=test1234.mov"
filename = string1.split('=')[1]
Forum: Python 08-28-2010, 10:22 AM
Replies: 1
Views: 2,807
Posted By Kakao
If the strings are well formed then just compare...

If the strings are well formed then just compare as you did but the opposite (the smaller is older):

if(date1 < date2):
older = True # date1 is older
Forum: Python 08-05-2010, 01:06 PM
Replies: 2
Views: 4,865
Posted By Kakao
import re pattern = '[a-zA-Z0-9]' input =...

import re
pattern = '[a-zA-Z0-9]'
input = 'asdf@$%aasdf..{}}.jpg'
output = ''.join(re.findall(pattern, input))
Forum: Python 05-07-2010, 01:49 PM
Replies: 3
Views: 2,568
Posted By Kakao
Save it as a .py file like myfile.py then import...

Save it as a .py file like myfile.py then import it in your program:


from myfile import clear

clear()
Forum: Python 09-15-2009, 03:15 PM
Replies: 5
Views: 6,047
Posted By Kakao
from os import listdir from os.path import...

from os import listdir
from os.path import join, isfile

def main():
print "This program allows you to input a keyword..."
print
print "...to be searched through files in the folder Python26...
Forum: Python 09-14-2009, 01:15 PM
Replies: 5
Views: 6,047
Posted By Kakao
And where is your code? If you don't show you are...

And where is your code? If you don't show you are trying nobody will work for free.
Forum: Python 07-12-2008, 12:28 PM
Replies: 2
Views: 6,263
Posted By Kakao
Ajax is a client technology. You can use whatever...

Ajax is a client technology. You can use whatever you want in the server to receive and process the Ajax requests.

If you are new (or not) to Javascript you had better use a Javascript framework...
Forum: HTML & CSS 05-28-2008, 02:07 AM
Replies: 0
Views: 869
Posted By Kakao
Accented characters in mailto link

I need to have this subject in a mailto link: "Dúvidas, críticas e sugestões". That is portuguese. The page is utf-8 encoded. So I urlencoded the subject like this:

<a...
Forum: Python 05-17-2008, 11:29 AM
Replies: 7
Views: 6,895
Posted By Kakao
I think i don't understand what you mean. In case...

I think i don't understand what you mean. In case this helps i wrote a CGI terminal that runs in a browser:

http://code.google.com/p/cgpy-shell/
Forum: DOM and JSON scripting 03-09-2008, 06:31 PM
Replies: 1
Views: 1,382
Posted By Kakao
This is what I came up with: <!DOCTYPE...

This is what I came up with:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<head>
<title><!-- Insert your title here --></title>
<script type="text/javascript">
function...
Forum: DOM and JSON scripting 03-09-2008, 01:03 AM
Replies: 1
Views: 1,382
Posted By Kakao
How to copy an iframe to another place?

I want to copy (not move) an iframe from one table cell to another. I have been trying but can't get it. Any hints would be appreciated.
Forum: Python 12-13-2007, 12:17 PM
Replies: 2
Views: 6,053
Posted By Kakao
A generic version: import random ...

A generic version:


import random

list_size = 4
range_top = 9
assert list_size <= range_top and list_size > 0 and range_top > 0

r = list()
Forum: Python 10-29-2007, 08:00 PM
Replies: 2
Views: 9,435
Posted By Kakao
Sure, just click the links.

Sure, just click the links.
Forum: HTML & CSS 05-12-2007, 04:28 PM
Replies: 7
Views: 1,859
Posted By Kakao
My intent is not to double the height of the...

My intent is not to double the height of the cells but your post made it clear. Thanks.
Forum: HTML & CSS 05-12-2007, 01:12 PM
Replies: 7
Views: 1,859
Posted By Kakao
TD rowspan problem

When I span a table row to 3 rows it works as expected:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<style type="text/css">...
Forum: Python 02-23-2007, 09:52 AM
Replies: 1
Views: 5,345
Posted By Kakao
Python has plenty of utilization as a sysadmin...

Python has plenty of utilization as a sysadmin tool and can be used as a replacement for bash although for very simple tasks bash is still easier.


Yes, sometimes I use a bit of bash and never...
Forum: Python 02-20-2007, 10:46 AM
Replies: 2
Views: 9,501
Posted By Kakao
You can use exec: ...

You can use exec:

http://php.net/manual/en/function.exec.php
Forum: Python 02-05-2007, 10:19 AM
Replies: 2
Views: 4,157
Posted By Kakao
A parameter starting with ** means the...

A parameter starting with ** means the function/method accepts named parameters that will be available as a dictionary:
>>> def f(**keywords):
... for key in keywords:
... print key,...
Forum: Python 12-11-2006, 11:02 AM
Replies: 2
Views: 7,348
Posted By Kakao
Saving a hit counter in a file is the worst...

Saving a hit counter in a file is the worst solution. There will be concurrency problems without very good solutions.

The correct approach is to store the hits in a database.

Create the hit_log...
Showing results 1 to 25 of 153

 
Forum Jump

All times are GMT +1. The time now is 05:34 AM.