我是,使用Ubuntu 12.04服务器,默认情况下有两个版本的Python:2.7和3.2.当我使用python setup.py installterminal命令安装PIL时,PIL将与Python 2.7一起安装.如何使用Python 3.2安装PIL?因为我使用Python 3来编写我的脚本.如果我的Eclipse使用Python 2.7,则成功导入PIL.但如果我选择Python 3作为我的语法语言,PIL将无法导入.
P/S:我尝试过以下方法:
更新:
使用该python3命令会导致错误消息.
例1:
root@sys:~/Downloads/Pillow-1.7.8# python3.2 setup.py install
Traceback (most recent call last):
File "setup.py", line 10, in <module>
from setuptools import Extension, setup, find_packages
ImportError: No module named setuptools
Run Code Online (Sandbox Code Playgroud)
例2:
root@sys:~/Downloads/Pillow-1.7.8# python3 setup.py install
Traceback (most recent call last):
File "setup.py", line 10, in <module>
from setuptools import Extension, setup, find_packages
ImportError: No module named setuptools
Run Code Online (Sandbox Code Playgroud)
我运行此终端命令后
sudo apt-get install …Run Code Online (Sandbox Code Playgroud) 这是保存在web.config以下位置的连接字符串:
<appSettings>
<add key="conn" value="Driver={MySQL ODBC 5.1 Driver};server=127.0.0.1;uid=root;pwd=1234;database=gis_server;option=3"/>
</appSettings>
Run Code Online (Sandbox Code Playgroud)
这是连接数据库的代码:
protected bool CheckPasswordBySqlServer(string strEmail, string strPsw)
{
if (strEmail.ToLower() == "admin")
{
return false;
}
string str = "select id,Rank,RankEnc,ParentUser,Company from tbl_User where userName=@UserName and password1=@password";
private string strConn = ConfigurationManager.AppSettings["conn"].ToString();
SqlConnection sqlConnection = new SqlConnection(strConn);
bool flag = false;
try
{
try
{
sqlConnection.Open();
SqlCommand sqlCommand = new SqlCommand(str, sqlConnection);
sqlCommand.Parameters.AddWithValue("UserName", strEmail);
sqlCommand.Parameters.AddWithValue("Password", strPsw);
SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
if (!sqlDataReader.Read())
{
flag = false;
}
else
{ …Run Code Online (Sandbox Code Playgroud) 原始的MySQl Tbl_driver
delimiter $$
CREATE TABLE `tbl_driver` (
`_id` int(11) NOT NULL AUTO_INCREMENT,
`Driver_Code` varchar(45) NOT NULL,
`Driver_Name` varchar(45) NOT NULL,
`AddBy_ID` int(11) NOT NULL,
PRIMARY KEY (`_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1$$
Run Code Online (Sandbox Code Playgroud)
mysql2sqlite.sh
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use …Run Code Online (Sandbox Code Playgroud) Ext.define('MyApp.view.MyVehicleGridPanel', {
extend: 'Ext.grid.Panel',
alias: 'widget.mygrid',
header: false,
store: UserStore,
multiSelect: false,
columns: [
{
xtype: 'gridcolumn',
dataIndex: '_id',
text: 'Vehicle ID'
},
{
xtype: 'gridcolumn',
width: 126,
dataIndex: 'Plat_No',
text: 'Plat Number'
},
{
xtype: 'gridcolumn',
width: 200,
dataIndex: 'Name',
text: 'Added By'
}
]
})
Run Code Online (Sandbox Code Playgroud)
我在gridpanel中没有任何id声明,因为它会动态使用,
所以,我使用别名来查找我的网格组件,如下面的代码
var grid = Ext.ComponentQuery.query('mygrid');
console.log( Ext.ComponentQuery.query('mygrid') );
if (grid.getSelectionModel().hasSelection()) { //error at here
var row = grid.getSelectionModel().getSelection()[0];
console.log(row.get('Plat_No'));
};
Run Code Online (Sandbox Code Playgroud)
但是,firebug返回错误 TypeError: grid.getSelectionModel is not a function
任何其他方式来找到我的网格面板组件?
var btnLogin = new Ext.Button({
text: 'Login',
scale : 'large',
width : 100,
iconCls: 'checkicon',
iconAlign: "right",
handler: function(){
if(Ext.getCmp('username').getValue() !== '' && Ext.getCmp('password').getValue() !== ''){
loginForm.getForm().submit({
url: 'authenticate.php',
method: 'POST',
params: {
response: hex_md5(Ext.getCmp('challenge').getValue()+hex_md5(Ext.getCmp('password').getValue()))
},
success: function(){
window.location = 'tabs-adv.html';
},
failure: function(form, action){
Ext.MessageBox.show({
title: 'Error',
msg: action.result.message,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
}
});
}else{
Ext.MessageBox.show({
title: 'Error',
msg: 'Please enter user name and password',
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
}
}
})
Run Code Online (Sandbox Code Playgroud)

在Login与选中图标差距太大,如何让检查图标和文本登录粘在一起,还是让iconCls左对齐升技. …
当我的MySQl数据类型为bit(1)时,但是用php打印时json_encode会用unicode写吗?IIS工作正常,
但是在我的专用服务器上,Apache托管将变为unicode。为什么?

您可以看到Locating,Locating在Mysql数据类型上是位,但打印\ u0001?为什么?
这是我的编码GET方法get-googlemarker.php以获得此结果
<?php
mysql_connect("localhost", "root", "123456") or die("Could not connect");
mysql_select_db("db_gps") or die("Could not select database");
$parent_id = $_GET['mainid'];
$query = "SELECT *
FROM tbl_locate AS a
INNER JOIN
(
SELECT MainID, Max(DateTime) AS DateTime
FROM tbl_locate
GROUP BY MainID
) AS b
ON a.MainID = b.MainID
AND a.DateTime = b.DateTime
LEFT JOIN
(
SELECT b.PicData
, b.PicUploadedDateTime
, b.MainID
FROM (SELECT MainID,Max(PicUploadedDateTime) as PicUploadedDateTime
FROM tbl_picture
group by …Run Code Online (Sandbox Code Playgroud) Ext.define('GoogleMarkerModel', {
extend: 'Ext.data.Model',
fields: ['Locating','MainPower','Acc','PowerOff','Alarm','Speed','Direction','Latitude','Longitude','DateTime','MainID', 'DeviceID','IOState','OilState']
});
var MarkerStore = Ext.create('Ext.data.JsonStore', {
model: 'GoogleMarkerModel',
autoLoad: true,
proxy: {
type: 'ajax',
url: 'get-googlemarker.php',
baseParams: { //here you can define params you want to be sent on each request from this store
mainid: 'value1'
},
reader: {
type: 'json',
root: 'images'
}
}
});
tree.on('checkchange', function(node){
var data = node.data;
Ext.MessageBox.show({
title: 'Changed checkbox status',
msg: 'MainID: ' + data.MainID + ' <br /> Checkbox status: ' + data.checked,
icon: Ext.MessageBox.INFO …Run Code Online (Sandbox Code Playgroud) protected override void Finalize()
{
try
{
this.FtcpSock.Close();
this.FudpSock6800.Close();
this.FudpSock6801.Close();
this.FudpSock6802.Close();
this.FudpSock6803.Close();
this.FudpSock6804.Close();
this.FudpSock6806.Close();
}
finally
{
this.Finalize();
}
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误信息:
Error 1 Do not override object.Finalize. Instead, provide a destructor.
顺便说一句,这是由第三方公司遵守的原始代码.
如何解决这个问题呢?如何用覆盖结束?

我有一个选项卡面板,在加载网格面板时,用户可以切换选项卡和工具栏菜单.任何想法让用户在加载标签内容后禁用整页网站.用户只能访问其他组件.
这是我在加载数据存储时设置网格面板的方法:
grid.setLoading(true);
当页面加载网格时,网格只显示加载掩码,如何在加载选项卡页面时设置然后设置掩码.不是当页面加载网格时只启动掩码并等待数据存储获取数据.
车辆管理是我的默认标签页.
我的意思是当用户在网址中键入http://mywebsite.com然后有一个掩码时,等到车辆管理页面全部加载,然后取消屏蔽整个页面.当用户单击驱动程序管理器,然后再次屏蔽整个页面,等待所有页面加载后才取消屏蔽它.怎么做?