Computing desk | ||
---|---|---|
< August 26 | << Jul | August | Sep >> | August 28 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
"Order of Operations" is such a simple process, we all learn it in grade school. I needed to use the term in an email, and it took me over one-half hour to find it!
Everything that was being returbed by your search engine were articles at the college level and beyond.
Maybe you need a "Kidapedia"? — Preceding unsigned comment added by Drexpert007 ( talk • contribs) 00:32, 27 August 2012 (UTC)
Let me clarify a few details:
I know python and a little bit about django (at least, enough about urls.py and views.py to copy and paste a working example.) I'd like to have a simple function:
Button, when pressed, it processed the text obtained from a text field and does two thing: shows it on screen and saves it to a file (append to text file or SQLite, whatever is easier). How can I do that? Comploose ( talk) 17:27, 27 August 2012 (UTC)
#!/usr/bin/python
import os.path
from bottle import get, post, request, run, Bottle
NAMEFILE = 'names.txt'
app = Bottle()
def generate_page(msg=None):
if msg:
html = '<div style="color:red;">'+msg+'</div>'
else:
html = ""
if os.path.exists(NAMEFILE):
f = open(NAMEFILE,'r')
for name in f.readlines():
html += name.strip() + '<br>'
f.close()
return html + '''<form method="POST" action="/">
<input name="name" type="text">
<input type="submit" value="add name">
</form>'''
@app.route('/')
def page():
return generate_page()
@app.post('/')
def page_submit():
name = request.forms.get('name')
if len(name)>0:
if os.path.exists(NAMEFILE):
f = open(NAMEFILE,'a')
else:
f = open(NAMEFILE,'w')
f.write(name+'\n')
f.close()
return generate_page('added:'+name)
else:
return generate_page()
run(app, host='localhost', port=8080)
Has anyone ever got
The Ur-Quan Masters to actually work on a Linux system? I installed the game on my fresh Fedora 17 system, eager to play it, because I played the original
Star Control intensively on my old
Amiga 500, but the sequel never appeared on the Amiga. uqm --version
reports I have version 0.7.0. When I start it, I get as far as the main menu, and when I select "New game", I get a screen saying "IGL - Interstellar Frungy League presents", after which the program crashes. Is there a working version available anywhere?
JIP |
Talk 18:54, 27 August 2012 (UTC)
What is the max size of a file you can attach to a personal message on facebook? — Preceding unsigned comment added by KobiNew ( talk • contribs) 19:37, 27 August 2012 (UTC)
Computing desk | ||
---|---|---|
< August 26 | << Jul | August | Sep >> | August 28 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
"Order of Operations" is such a simple process, we all learn it in grade school. I needed to use the term in an email, and it took me over one-half hour to find it!
Everything that was being returbed by your search engine were articles at the college level and beyond.
Maybe you need a "Kidapedia"? — Preceding unsigned comment added by Drexpert007 ( talk • contribs) 00:32, 27 August 2012 (UTC)
Let me clarify a few details:
I know python and a little bit about django (at least, enough about urls.py and views.py to copy and paste a working example.) I'd like to have a simple function:
Button, when pressed, it processed the text obtained from a text field and does two thing: shows it on screen and saves it to a file (append to text file or SQLite, whatever is easier). How can I do that? Comploose ( talk) 17:27, 27 August 2012 (UTC)
#!/usr/bin/python
import os.path
from bottle import get, post, request, run, Bottle
NAMEFILE = 'names.txt'
app = Bottle()
def generate_page(msg=None):
if msg:
html = '<div style="color:red;">'+msg+'</div>'
else:
html = ""
if os.path.exists(NAMEFILE):
f = open(NAMEFILE,'r')
for name in f.readlines():
html += name.strip() + '<br>'
f.close()
return html + '''<form method="POST" action="/">
<input name="name" type="text">
<input type="submit" value="add name">
</form>'''
@app.route('/')
def page():
return generate_page()
@app.post('/')
def page_submit():
name = request.forms.get('name')
if len(name)>0:
if os.path.exists(NAMEFILE):
f = open(NAMEFILE,'a')
else:
f = open(NAMEFILE,'w')
f.write(name+'\n')
f.close()
return generate_page('added:'+name)
else:
return generate_page()
run(app, host='localhost', port=8080)
Has anyone ever got
The Ur-Quan Masters to actually work on a Linux system? I installed the game on my fresh Fedora 17 system, eager to play it, because I played the original
Star Control intensively on my old
Amiga 500, but the sequel never appeared on the Amiga. uqm --version
reports I have version 0.7.0. When I start it, I get as far as the main menu, and when I select "New game", I get a screen saying "IGL - Interstellar Frungy League presents", after which the program crashes. Is there a working version available anywhere?
JIP |
Talk 18:54, 27 August 2012 (UTC)
What is the max size of a file you can attach to a personal message on facebook? — Preceding unsigned comment added by KobiNew ( talk • contribs) 19:37, 27 August 2012 (UTC)