小编roc*_*tar的帖子

如何在谷歌地图中设置缩放级别

这是我编写的代码,通过提供纬度和经度将标记添加到谷歌地图.问题是我得到了一个非常高度缩放的谷歌地图.我已经尝试将缩放级别设置为1,但这对高度缩放的地图没有影响.

 <script src="http://maps.google.com/maps/api/js?v=3&sensor=false" type="text/javascript"></script>
     <script type="text/javascript">
        var icon = new google.maps.MarkerImage("http://maps.google.com/mapfiles/ms/micons/blue.png",new google.maps.Size(32, 32), new google.maps.Point(0, 0),new google.maps.Point(16, 32));
        var center = null;
        var map = null;
        var currentPopup;
        var bounds = new google.maps.LatLngBounds();
        function addMarker(lat, lng, info) {
            var pt = new google.maps.LatLng(lat, lng);
            bounds.extend(pt);
            var marker = new google.maps.Marker({
                position: pt,
                icon: icon,
                map: map
            });
            var popup = new google.maps.InfoWindow({
                content: info,
                maxWidth: 300
            });
            google.maps.event.addListener(marker, "click", function() {
                if (currentPopup != null) {
                    currentPopup.close();
                    currentPopup = null; …
Run Code Online (Sandbox Code Playgroud)

javascript google-maps google-maps-api-3

60
推荐指数
5
解决办法
21万
查看次数

在Zend框架中使用gmail发送电子邮件

我正在尝试使用Zend框架中的gmail帐户发送电子邮件.这是我到目前为止所得到的:

$mailTransport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', array(
    'auth'     => 'login',
    'username' => 'myaddress@gmail.com',
    'password' => 'password',
    'port'     => '587',
    'ssl'      => 'tls',
));
Zend_Mail::setDefaultTransport($mailTransport);
$mail = new Zend_Mail();
$mail->setBodyText('This is the text of the mail.');
$mail->setFrom('myaddress@gmail.com', 'sender');
$mail->addTo('reciever@gmail.com', 'receiver');
$mail->setSubject('TestSubject');
$mail->send();
Run Code Online (Sandbox Code Playgroud)

使用此代码,我收到以下错误:

Message: Unable to connect via TLS
Run Code Online (Sandbox Code Playgroud)

我该如何解决?我有一个默认的XAMPP安装设置,在php.ini中没有设置SMTP.

php zend-framework zend-mail

4
推荐指数
1
解决办法
2409
查看次数

如何将视图中的页脚添加到android中的listview?

我有一个列表视图,editText和按钮.editText和button是我对listview的页脚.想要的是页脚位于屏幕底部,列表视图可以在页脚上方滚动.我的布局是这样的:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<ListView
    android:id="@android:id/list"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:>

</ListView>


<EditText
    android:id="@+id/txtType"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:layout_toLeftOf="@+id/add" />

<Button
    android:id="@+id/add"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:onClick="onClick"
    android:text="Add" />
 </RelativeLayout>
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

我已经实现了上面的图片,但我的问题是listview滚动到我的页脚下面.页脚就像漂浮在列表视图上一样.我希望listview只能在这个页脚上方滚动.帮我

android listview

2
推荐指数
1
解决办法
2466
查看次数

如何将按钮或图像添加到dojo网格

我有一个带有json数据存储区的dojo网格(mysql结果集转换为json格式).目前我的网格显示5列,如下图所示: 在此输入图像描述

我有一个名为'Action'的列.此"操作"列下的行应包含带有超链接的按钮或图像(编辑图标,删除图标),例如edit.php?id = 1用于编辑,或者delete.php?id = 1用于删除.这是我的dojo网格代码:

<span dojoType="dojo.data.ItemFileReadStore" data-dojo-id="studentsStore" url="http://localhost/newsmis/public/studentManagement/student/fetchdata/data/1"></span>
<table dojoType="dojox.grid.DataGrid" id="studentsGrid" data-dojo-id="studentsGrid" columnReordering="true" sortFields="['idstudents','first_name','middle_name','last_name']" store="studentsStore"  clientSort="true" selectionMode="single" rowHeight="25" noDataMessage="<span class='dojoxGridNoData'>No students found</span>">
    <thead>
        <tr>
            <th field="idstudents" width="20%">Student ID</th>
            <th field="first_name" width="20%">First Name</th>
            <th field="middle_name" width="20%">Middle Name</th>
            <th field="last_name" width="20%">Last Name</th>
            <th field="action" width="20%">Action</th>
        </tr>
    </thead>
</table>
Run Code Online (Sandbox Code Playgroud)

我的json数据格式是

 {"identifier":"idstudents","items":[{"idstudents":"11","first_name":"Pradip","middle_name":"Maan","last_name":"Chitrakar"}]}
Run Code Online (Sandbox Code Playgroud)

我该怎么做?请给我一些想法

dojo json zend-framework dojox.grid.datagrid

1
推荐指数
1
解决办法
8278
查看次数