小编the*_*mhz的帖子

JqPlot在数据点上添加click事件

我正在尝试使用jqplot http://www.jqplot.com/tests/cursor-highlighter.php.我已经在我的框架中成功安装了它.但我需要在图表中的数据点上推送点击事件.

到目前为止这是我的代码,

<script class="code" type="text/javascript">
    $(document).ready(function () {
        var line1 = [['23-May-08', 578.55], ['20-Jun-08', 566.5], ['25-Jul-08', 480.88], ['22-Aug-08', 509.84],
      ['26-Sep-08', 454.13], ['24-Oct-08', 379.75], ['21-Nov-08', 303], ['26-Dec-08', 308.56],
      ['23-Jan-09', 299.14], ['20-Feb-09', 346.51], ['20-Mar-09', 325.99], ['24-Apr-09', 386.15]];
        var plot1 = $.jqplot('chart1', [line1], {
            title: '???????? ??? 23-May-08 ????? 24-Apr-09',
            axes: {
                xaxis: {
                    renderer: $.jqplot.DateAxisRenderer,
                    tickOptions: {
                        formatString: '%b&nbsp;%#d'
                    }
                },
                yaxis: {
                    tickOptions: {
                        formatString: '€%.2f'
                    }
                }
            },
            highlighter: {
                show: true,
                sizeAdjust: 9.5
            },
            cursor: {
                show: …
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-plugins

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

SQL Server 2008选择由变量定义的前100个

有没有办法选择顶级@top通过变量定义值,如SQL Server 2008中的以下代码?

declare @top as integer;
set @top=100;

SELECT top @top
    T1.id as clientInfoId
    ,T1.ucsId
    ,T1.phoneHome
    ... (more columns here)......
    ,T1.businessTitle
FROM
    YELLOW_OUT_CLIENT_INFO AS T1    
LEFT JOIN 
    YELLOW_OUT_BUSINESS T2 on T2.clientInfoId = T1.id
WHERE
    T1.AgentId=5
    AND 
    T1.deleted IS NULL
    ... (more conditions here)......
ORDER BY NEWID()
Run Code Online (Sandbox Code Playgroud)

sql sql-server-2008

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

根据c#中创建的日期搜索文件

我有这个功能,我用来读取目录并获取具有特定搜索模式的文件.有没有办法根据创建日期或修改日期使用搜索模式?

public static List<FileInfo> GetFileList(string fileSearchPattern, string rootFolderPath)
{
    DirectoryInfo rootDir = new DirectoryInfo(rootFolderPath);

    List<DirectoryInfo> dirList = new List<DirectoryInfo>(
        rootDir.GetDirectories("*", SearchOption.AllDirectories));
    dirList.Add(rootDir);

    List<FileInfo> fileList = new List<FileInfo>();

    foreach (DirectoryInfo dir in dirList)
    {
        fileList.AddRange(
            dir.GetFiles(fileSearchPattern, SearchOption.TopDirectoryOnly));
    }

    return fileList;
}
Run Code Online (Sandbox Code Playgroud)

.net c#

3
推荐指数
2
解决办法
5826
查看次数

如何使用jQuery选择属性不透明度为1的元素

我有这些元素,我需要选择ul里面的li,其中opacity = 1.我怎样才能做到这一点?

<ul class="class" id="ul">
                <li style="width: 100%; list-style: none outside none; position: absolute; top: 0px; left: 0px; z-index: 98; opacity: 0;"><a title="title1" href=""><img alt="alt" class="class_name" src="/images/7dfc294d5c3bcebecb2ec0e44fd27d1c.jpg"></a></li>
                <li style="width: 100%; list-style: none outside none; position: absolute; top: 0px; left: 0px; z-index: 98; opacity: 0;"><a title="title2" href=""><img alt="alt" class="class_name " src="/images/a9c9eb42934df4576b352d88f607f292.jpg"></a></li>
                <li style="width: 100%; list-style: none outside none; position: absolute; top: 0px; left: 0px; z-index: 98; opacity: 0;"><a title="title3" href=""><img alt="alt" class="class_name " src="/images/b64264692c0d648068c9d1380e9099c1.jpg"></a></li>
                <li style="width: 100%; list-style: none outside …
Run Code Online (Sandbox Code Playgroud)

jquery attributes opacity

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

如何查找附加到按钮的单击事件的方法

如何从firebug中找出哪个方法或方法附加到按钮的单击事件处理程序?

这是按钮的代码

<button class="rsmg_button_save ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-primary ui-state-focus" type="button" role="button" aria-disabled="false" style="display: inline-block;"><span class="ui-button-icon-primary ui-icon ui-icon-disk"></span><span class="ui-button-text">Save</span></button>
Run Code Online (Sandbox Code Playgroud)

javascript jquery firebug

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

Joomla 2.5显示错误的日期时间

我在我制作的自定义组件中创建了此代码:

$date = date('m/d/Y h:i:s a', time())."<br>";
echo  'Current date and time is: ' . $date;

$date = JFactory::getDate();
echo 'Current date and time is: ' . $date->toFormat() ."<br>";
Run Code Online (Sandbox Code Playgroud)

第一个代码正确显示日期时间,但第二个代码显示时间+3小时

我检查了configuration.php文件和public $ offset ='Europe/Athens'; 并且是正确的.我也在更改系统配置菜单中的设置,但似乎没有修复JFactory :: getDate()来显示正确的时间.我错过了什么?

joomla joomla2.5

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

如何将php对象数组从一种形式转换为另一种形式

有没有一种从这里转换对象数组的简单方法

stdClass Object
(
    [Title] => Array
        (
            [0] => Title 1
            [1] => Title 2
            [2] => Title 3
            [3] => Title 4
        )

    [description] => Array
        (
            [0] => Description 1
            [1] => Description 2
            [2] => Description 3
            [3] => Description 4
        )

    [myimage] => Array
        (
            [0] => images/events/568a7048f22f9/sizes/athens-img_XS.jpg
            [1] => images/collections/56b2294894c08/islamiki.png
            [2] => images/multimedia/item6.jpg
            [3] => 
        )

)
Run Code Online (Sandbox Code Playgroud)

对此:

stdClass Object
(

    [0] => Array
        (
            [Title] => Title 1
            [description] => Description 1
            [myimage] …
Run Code Online (Sandbox Code Playgroud)

php

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

如果未传递参数,如何避免vb.net中的请求查询字符串异常

如果未传递参数变量,则此代码抛出"从字符串转换""到"类型'日期'无效的异常."

这是我的代码.

 Public Shared ReadOnly Property Request_projectStartDate() As Date
        Get
            Dim _value As String = Nothing

            If Not HttpContext.Current.Request.QueryString("projectStartDate") Is Nothing Then
                _value = HttpContext.Current.Request.QueryString("projectStartDate").ToString()
            End If

            Return CDate(_value)
        End Get
    End Property
Run Code Online (Sandbox Code Playgroud)

.net vb.net asp.net

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

SQL SERVER 2008 TRIGGER ON CREATE TABLE

在SQL SERVER 2008中的数据库中创建表时,是否有办法运行某些函数,如触发器?

sql-server sql-server-2008

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

如何检查 JFactory::getSession() 中的会话是否已设置?

viewform.php鉴于组件,我在 joomla 2.5 中有以下几行

 $session = & JFactory::getSession();
 if(empty($session->get('MasterIndex'))) $session->set('MasterIndex',0);
Run Code Online (Sandbox Code Playgroud)

我得到

致命错误:无法在 /var/www/ 中的写入上下文中使用方法返回值。

我也尝试过

 if(empty($session->get('MasterIndex'))) $session->set('MasterIndex',0);
Run Code Online (Sandbox Code Playgroud)

如何检查会话值是否已设置?

php joomla joomla2.5

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