问题列表 - 第43698页

当悬停父绝对div的子元素而没有jQuery时,防止onmouseout

onmouseout在绝对positoned div 中遇到了这个函数的问题.当鼠标命中div中的子元素时,mouseout事件会触发,但我不希望它触发,直到鼠标超出父,绝对div.

如何mouseout在遇到没有jquery的子元素时阻止事件触发.

我知道这与事件冒泡有关,但我没有找到如何解决这个问题的运气.

我在这里找到了类似的帖子:如何禁用子元素触发的mouseout事件?

但是该解决方案使用jQuery.

javascript css onmouseout dom-events

149
推荐指数
10
解决办法
12万
查看次数

f#编译速度太慢

我是f#的新手.我下载了Visual Studio 2010 shell和F#ctp,并使用以下代码编写了一个小的hello world脚本

printfn "Hello World"
let _ = System.Console.ReadLine()
Run Code Online (Sandbox Code Playgroud)

编译大约需要13到15秒,这与运行类似的C#脚本(大约需要2秒)相比非常慢.我希望F#脚本编译得更快,这样我的开发(即实验)时间就会减少,我不关心运行时性能.

有没有办法让F#脚本编译得更快,可能打开/关闭Visual Studio中的某些Build设置或类似的东西?

仅供参考,我使用4年前的奔腾4,1.5 gb RAM机器,如果有帮助的话.

f# visual-studio

19
推荐指数
3
解决办法
2934
查看次数

适用于Mac的仪表板应用程序,这些可可也是基于?

我下载了安装在我的仪表板区域的这个Mac应用程序,这些特殊应用程序还是只是安装在我计算机上特定区域的常规可可应用程序?

这是应用程序:http://bit.ly/8xKiH

macos cocoa

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

我的Apache不用<?执行PHP代码 ?>标签

可能重复:
如何启用PHP短标签?

我在用

Apache Friends XAMPP(基础包)版本1.7.3
  • Apache 2.2.14(启用IPV6)
  • 带有PBXT引擎的MySQL 5.1.41(社区服务器)1.0.09-rc
  • PHP 5.3.1(PEAR,Mail_Mime,MDB2,Zend)

我正在运行php文件,我用<? ?>标签编码而不是<?php ?>.但是apache服务器不会执行我的代码,但如果我尝试使用<?php ?>标签,代码就可以运行.任何人都知道如何使服务器使用<? ?>标签执行PHP代码?

php

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

如何从summaryRprof制作情节?

这是大学任务的问题.

我得到了三个算法来计算我已经做过的GCD.我的问题是将Rprof结果变成一个图,所以我可以将它们并排比较.

从我对Rprof的简单理解,summaryRprof和plot是如下使用Rprof:

Rprof() #To start
#functions here
Rprof(NULL)  #TO end
summaryRprof() # to print results
Run Code Online (Sandbox Code Playgroud)

我知道情节有很多不同类型的输入,x和y值以及一些叫做数据框的东西,我认为这是一个奇特的表格.并绘制我需要使用的不同的线条和东西:http://www.harding.edu/fmccown/r/

我无法弄清楚如何将summaryRprof结果传递给plot()函数.

> Rprof(filename="RProfOut2.out", interval=0.0001)
> gcdBruteForce(10000, 33)
[1] 1
> gcdEuclid(10000, 33)
[1] 1
> gcdPrimeFact(10000, 33)
[1] 1
> Rprof(NULL)
> summaryRprof()
?????plot????
Run Code Online (Sandbox Code Playgroud)

我一直在阅读堆栈溢出和其他网站,我也可以尝试使用profr和proftools虽然我对使用情况不是很清楚.

我能够制作的唯一图表是使用图表(system.time(gcdFunction(10,100)))

一如往常任何帮助表示赞赏.

r

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

python 3.1 - 创建正态分布

我有scipy和numpy,Python v3.1

我需要创建一个长度为3百万的一维数组,使用100到60,000之间的随机数.它必须符合正态分布.

使用'a = numpy.random.standard_normal(3000000)',我获得了所需长度的正态分布; 不确定如何达到要求的范围.

python

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

这是如何在Python中有条件的工作?

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
    def get(self):
        user = users.get_current_user()

        if user:
            self.response.headers['Content-Type'] = 'text/plain'
            self.response.out.write('Hello, ' + user.nickname())
        else:
            self.redirect(users.create_login_url(self.request.uri))

application = webapp.WSGIApplication(
                                     [('/', MainPage)],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
Run Code Online (Sandbox Code Playgroud)

我不明白这条线的工作原理:

    if user:
        self.response.headers['Content-Type'] = 'text/plain'
        self.response.out.write('Hello, ' + user.nickname())
    else:
        self.redirect(users.create_login_url(self.request.uri))
Run Code Online (Sandbox Code Playgroud)

我猜这些users.get_current_user()返回一个布尔值?那么,如果是这样的话怎么能得到一个.nickname()方法呢?

感谢您的指导.

python conditional

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

perl dancer:将数据库信息传递给模板

关注舞者教程:

http://search.cpan.org/dist/Dancer/lib/Dancer/Tutorial.pod

我正在使用我自己的sqlite3数据库与此架构

CREATE TABLE if not exists location (location_code TEXT PRIMARY KEY, name TEXT, stations INTEGER);
CREATE TABLE if not exists session (id INTEGER PRIMARY KEY, date TEXT, sessions INTEGER, location_code TEXT, FOREIGN KEY(location_code) REFERENCES location(location_code));
Run Code Online (Sandbox Code Playgroud)

我的舞者代码(helloWorld.pm)用于数据库:

package helloWorld;
use Dancer;
use DBI;
use File::Spec;
use File::Slurp;
use Template;

our $VERSION = '0.1';

set 'template' => 'template_toolkit';
set 'logger'   => 'console';

my $base_dir = qq(/home/automation/scripts/Area51/perl/dancer);

# database crap
sub connect_db {
 my $db = qw(/home/automation/scripts/Area51/perl/dancer/sessions.sqlite);
 my $dbh = DBI->connect("dbi:SQLite:dbname=$db", …
Run Code Online (Sandbox Code Playgroud)

perl templates dancer

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

Mac OS X和静态提升库 - > std :: string失败

我在使用GCC 4.5的Mac OS X 10.6.6下遇到静态加速库(来自MacPorts的Boost 1.45.0-2,编译为fat/universal(x86/x86_64)库)的一些非常奇怪的问题.

错误消息是

main(78485) malloc: *** error for object 0x1000e0b20: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
[1]    78485 abort (core dumped)
Run Code Online (Sandbox Code Playgroud)

以及一小段示例代码将触发此问题:

#define BOOST_FILESYSTEM_VERSION 3
#include <boost/filesystem.hpp>
#include <iostream>

int main (int argc, char **argv) {
  std::cout << boost::filesystem::current_path ().string () << '\n';
}
Run Code Online (Sandbox Code Playgroud)

将静态boost库链接到二进制文件时,总会出现此问题.但是,动态链接可以正常工作.

更多信息:

测试/使用的gcc版本: Apple GCC 4.2.1(工作/运行),MacPorts GCC 4.5.2(失败)

标记测试/使用:无,-fPIC,-fPIC -g,-fPIC -g -ggdb3 -gdwarf-2 -O0

MP GCC 4.5.2的gdb输出/上述任何标志:

(gdb) run
Starting program: /Users/ionic/crashtest/bin/ctest  Reading …
Run Code Online (Sandbox Code Playgroud)

c++ macos boost static-libraries

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

delphi .net可以为windows phone开发应用程序吗?

我是德尔福程序员.我希望将我的一些应用程序在Windows上移动到Windows手机上.我觉得这种语言很容易学习的是Delphi .net.

我只是想知道Delphi.net是否支持Windows手机的开发.

欢迎任何评论

谢谢

InterDev中

.net delphi

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