Archive for 一月, 2010



方法一: 'scriptData': {'sessionID': '<?php echo session_id();?>'}, if (isset($_REQUEST['sessionID'])) session_id($_REQUEST['sessionID']); session_start(); 方法2 scriptData : {'Cookie' : document.cookie} http://www.uploadify.com/forum/viewtopic.php?f=7&t=2062&start=0&sid=7290c95100866f8848096091497a0d93

import decimal,datetime from diango.utils import simplejsom class MapFishJSONEncoder(simple.JSONEncoder): def default(self,obj): if isinstance(obj,decimal.Decimal): return str(obj) if isinstance(obj , datetime.date) or ininstance (obj,datetime.datetime): return str(obj) return simplejson.JSONEncoder.default(self,obj) 用dump cls=MapFishJSONEncoder 调用

var voicePanel = new Ext.TabPanel({ activeTab: 0, defaults:{autoScroll: true, autoHeight: true, autoWidth: true}, items:[{ title: 'OB Traffic', id: 'OB_TRAFFIC_CONTENT', autoLoad: {url: '/pas/controller/MAIN?MAIN_EVENT=DISPLAY_VOICE_TRAFFIC_EVENT', method:'POST', params: 'DIV_ID=OB_TRAFFIC_CONTENT&PARAM1=OB&PARAM2='} },{ title: 'IB Traffic', id: 'IB_TRAFFIC_CONTENT', autoLoad: {url: '/pas/controller/MAIN?MAIN_EVENT=DISPLAY_VOICE_TRAFFIC_EVENT', method:'POST', params: 'DIV_ID=IB_TRAFFIC_CONTENT&PARAM1=IB&PARAM2='} },{ title: 'OB Rates', id: 'OB_RATES_CONTENT', autoLoad: {url: '/pas/controller/MAIN?MAIN_EVENT=DISPLAY_VOICE_RATE_EVENT', method:'POST', params: 'DIV_ID=OB_RATES_CONTENT&PARAM1=OB&PARAM2='} },{ title: 'IB Rates', id: 'IB_RATES_CONTENT', [...]

wxpython组件介绍

In: python

4 2010

静态文本框: text=wx.staticText(panel,-1,(长,宽),(坐标X,坐标Y)对齐方式(wx.ALIGN_CENTER)) text.setForeground(‘green’) 前景色 text.setBackground(‘green’)背景色 font=wx.Font(大小,样式,斜体,外观形式,编码) text.setFone(font) //定义字体样式 文本框  

#!/usr/bin/python # -*- coding: utf-8 -*- import wx   class App(wx.App):     def __init__(self, redirect=True, filename=None):         wx.App.__init__(self, redirect, filename)         def OnInit(self):         dlg = wx.MessageDialog(None, ‘普通选择是或者不是对话框!’,                           ‘消息框’, wx.YES_NO | wx.ICON_QUESTION)         result = dlg.ShowModal()#获取值         # if choose no then exit         if result == wx.ID_NO:             exit()         dlg.Destroy()         [...]

 常见wxPython事件函数 事件函数   EVT_SIZE:        由于用户干预或由程序实现,当一个窗口大小发生改变时发送给窗口。   EVT_MOVE:        由于用户干预或由程序实现,当一个窗口被移动时发送给窗口。   EVT_CLOSE:  当一个框架被要求关闭时发送给框架。除非关闭是强制性的,否则可以调用event.Veto(true)来取消关闭。   EVT_PAINT:    无论何时当窗口的一部分需要重绘时发送给窗口。   EVT_CHAR:   当窗口拥有输入焦点时,每产生非修改性(Shift键等等)按键时发送。   EVT_IDLE:    这个事件会当系统没有处理其它事件时定期的发送。   EVT_LEFT_DOWN:  鼠标左键按下。   EVT_LEFT_UP: 鼠标左键抬起。   EVT_LEFT_DCLICK: 鼠标左键双击。   EVT_MOTION:  鼠标在移动。   EVT_SCROLL:  滚动条被操作。这个事件其实是一组事件的集合,如果需要可以被单独捕捉。   EVT_BUTTON:  按钮被点击。   EVT_MENU:    菜单被选中。


About this blog

QK31欢迎你的到来.

Photostream

search_extends

 

2010年一月
« 十二   二 »
 123
45678910
11121314151617
18192021222324
25262728293031

36
Unique
Visitors
Powered By Google Analytics

分类目录

标签云