473,406 Members | 2,390 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

journal stuff


;; Fedora! Slask! .emacs!

;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)

;; turn on font-lock mode
(global-font-lock-mode t)

;; this command makes Emacs set the key "f5" to copy any text that is highlighted
(global-set-key [f5] "\M-w")

;; this command makes the "f6" key paste your copied text
(global-set-key [f6] "\C-y")

;; enable visual feedback on selections
(setq transient-mark-mode t)

(defun linux-c-mode ()
"C mode with adjusted defaults for use with the Linux kernel."
(interactive)
(c-mode)
(setq c-indent-level 8)
(setq c-brace-imaginary-offset 0)
(setq c-brace-offset -8)
(setq c-argdecl-indent 8)
(setq c-label-offset -8)
(setq c-continued-statement-offset 8)
(setq indent-tabs-mode nil)
(setq tab-width 8))

(setq auto-mode-alist (cons '("/home22/j/c/foster.*/.*\\.[ch]$" . linux-c-mode)
auto-mode-alist))

;; this sets syntax highlighting so that html, C and various other programming
;; languages and style appear colored - this allows for easier understanding of
;; text inside the Emacs buffer.
(global-font-lock-mode t)

;; Please do not make backup files
(setq make-backup-files nil)

;; Turn off auto-saving
(setq auto-save-default nil)

;; this sets line numbers
(setq line-number-mode t)

;; this sets the background to grey
(set-background-color "grey40")

;; this sets the foreground color or the text itself.
(set-foreground-color "black")

;; this sets the cursor color
(set-cursor-color "DarkOrange2")

(custom-set-variables
;; custom-set-variables was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
)
(custom-set-faces
;; custom-set-faces was added by Custom -- don't edit or cut/paste it!
;; Your init file should contain only one such instance.
'(mode-line ((((type x w32 mac) (class color)) (:background "grey75" :foreground "black" :box (:line-width -1 :color "gray2" :style pressed-button)))))
'(region ((((class color) (background dark)) (:background "DarkOrange2"))))
'(scroll-bar ((t (:background "grey75" :foreground "CadetBlue4" :box (:line-width 2 :color "AliceBlue" :style released-button))))))

#!/usr/bin/python
"""form.py - a python cgi script with forms"""

# import various functionality
import os
import sys
import cgi

# debugging
import cgitb; cgitb.enable()

# uncomment for more debugging
# cgi.test()

# The all-important header
print "Content-type: text/html\n\n"
print ""

print "<header><title>form.py</title></header>"
print """<link rel=stylesheet type="text/css" href="../css/form.css">"""

print '''<h1>Journals at Archemix.</h1> Simply select the journals you want to be included in your inbox from the pull-down menu. If you want to pick more than one journal simply hold down the control key when you select. This woll generate a message so that you can see that you have selected every thing you want to receive. This can be changed at anytime so feel free to adjust your list whenever you want to.
<hr>

<form method=POST action="form.py">
<p>Please enter your first name and last initial;
<p><input name="name" type="text" value="">
&nbsp <p> &nbsp
<p><select multiple name="Example">
<option selected label="none" value="none">No Magazine</option>
<optgroup label="Elsevier">
<option value="science">Science</option>
<option value="prosci">Protein Science</option>
<option value="cell">CELL</option>
</optgroup>
<optgroup label="Molecules">
<option label="4" value="MolecularCell">Molecular Cell</option>
</optgroup>
</select>

<form method=POST action="form.py">
<input type=submit value="Submit"> &nbsp <input type=reset value="Reset"></form>'''

# The fields and their values
form = cgi.FieldStorage()
field = form.getlist("Example")

print "<p><font size=+2>Your name:", form["name"].value
print "</font>"

for mag in field:
print "<br>You are on the list for:", mag

# write them to a file
file = open("file_cgi.txt", "a")
file.write("<p>name - " + form["name"].value)

for name in field:
file.write("<br><font color='orange'>")
file.writelines(name)
file.write("</font>")
file.close()

## InputFile = open("file_cgi.txt", "r")
## Input = InputFile.read()
## InputFile.close()
## print "<div class='InputFile'>", Input
## print "</div>"


Jul 18 '05 #1
0 1157

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Preston Crawford | last post by:
I'm looking to quickly get a photo album online. Very simple, thumbnails, a few pages, maybe a description, but hopefully a small script that's easy to edit and work into my existing site. I know...
0
by: Dianne Combs | last post by:
Dear Online Reader or Editor ... If you could ... please take a look at our new online treeless edition newspapers, The Northeast Progressive Advocate-Journal and our sister newspaper the San...
3
by: Gerhard Swart | last post by:
Hi all. I'm writing a queue browser that reads queues from a specified machine and then display the data that's on the queue. I am using the MessageQueue Class in .Net(C#). I get the problem...
0
by: Apostolos | last post by:
Hello, I am really happy to let you know that the "Internation Journal of Digital Typography" is now accepting submissions. IJDT is a new peer-reviewed e-journal that aims to provide a forum...
0
by: Sam Flywheel | last post by:
Hello, all: I am pleased to announce that the MySQL Journal is moving forward. During the past two weeks, I've been discussing the journal with MySQL AB, and the plan that's been devised...
4
by: tleeuwenburg | last post by:
To whom it may concern, I have been involved in putting together a new Python journal, called (oh so originally) The Python Journal. This isn't related to a previous project also called The...
0
by: Brent Freeborn | last post by:
Hi all, I am trying to create a C# console application to convert a Microsoft Journal file to a TIFF image file. I am using the Microsoft.Ink.DLL and the Microsoft.Ink.JournalReader.DLL to...
0
by: =?Utf-8?B?Umljaw==?= | last post by:
As I researched alternatives to filewatchers, I ran across the change journal. What is the best way to access the Change Journal through managed code? Thank you
0
by: tavares | last post by:
----------------------------------------------------------------------------------------------------------------------------------------- (Apologies for cross-posting) International Journal of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.