问题列表 - 第29464页

开发模式下的异常页面渲染时间超过15-30秒,为什么会这样?

我正在使用Rails 3 beta 4,出于某种原因,我有每个例外需要15-30秒才能显示.这是我的踪迹:

Started GET "/something/something/approvals/new" for 127.0.0.1 at Thu Jun 24 21:17:12 -0400 2010
  SQL (1.8ms)  describe `approvals_users`
  SQL (24.6ms)  describe `clients_users`
  SQL (1.4ms)  describe `agencies_users`
  SQL (1.2ms)  describe `clients_users`
  SQL (1.2ms)  describe `approvals_users`
  SQL (1.7ms)  describe `permissions_users`
  Processing by ApprovalsController#new as HTML
  Parameters: {"project_id"=>"tricked", "client_id"=>"deez-nutz"}
  SQL (1.4ms)  describe `agencies_users`
  Agency Load (0.4ms)  SELECT `agencies`.* FROM `agencies` WHERE (`agencies`.`subdomain` = 'subdomain') LIMIT 1
  Plan Load (0.3ms)  SELECT `plans`.* FROM `plans` WHERE (`plans`.`id` = 3) LIMIT 1
  User Load …
Run Code Online (Sandbox Code Playgroud)

activerecord ruby-on-rails exception

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

在发布Web应用程序之前,我应该检查什么?

我差不多完成了一个Web应用程序.我需要测试它并在发布之前发现安全问题.是否有任何方法/指南来进行此类测试?或者是否有任何工具可以帮助我检查我的应用程序是否已准备好上线?谢谢.  

testing debugging

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

Python:__ init __()只需2个参数(给定3个)

我正在编写一个程序来查找适配器,并创建了一个名为"Adapter"的类.当我传入两个参数时,IDLE给了我一个错误,说我传了三个!这是代码和堆栈跟踪:

#This is the adapter class for the adapter finder script

class Adapter:
    side1 = (None,None)
    side2 = (None,None)
    '''The class that holds both sides of the adapter'''
    def __init__((pType1,pMF1),(pType2,pMF2)):
        '''Initiate the adapter.

        Keyword Arguments:
        pType1 -- The passed type of one side of the adapter. ex: BNC, RCA
        pMF1 -- The passed gender of pType1. ex: m, f

        pType2 -- The passed type of one side of the adapter. ex: BNC, RCA
        pMF2 -- The passed gender of pType2. …
Run Code Online (Sandbox Code Playgroud)

python

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

有效地调整C#中图像的对比度

有没有一种有效的方法来调整C#中图像的对比度?

我看过这篇文章主张进行逐像素操作.不快

我已经在地方使用了颜色矩阵并且发现它们很快.有没有办法调整对比度?(注意:这家伙弄错了.)

我也在使用EmguCV.我注意到OpenCV(Emgu包装)似乎有一个对比功能 - 有没有办法通过Emgu访问它?目前我在Emgu所能做的就是对直方图进行标准化,这确实会改变对比度,但不会对我有任何程度的控制.

有人有任何想法吗?

c# image contrast

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

如何在Emacs中为自定义次要模式创建键绑定

题:

如何为次要模式创建自定义键绑定?像这样的东西.

这是我到目前为止所拥有的.我试图让一个自定义键绑定工作:

(define-minor-mode num-mode
       "Toggle the Num pad keys.
     With no argument, this command toggles the mode.
     Non-null prefix argument turns on the mode.
     Null prefix argument turns off the mode.

     When Num mode is enabled, the num pad inserts the
     keys you see on the pad. This may over ried existing
     definitions, and is probably only usefule if you aref
     running Emacs through a terminal."
      ;; The initial value.
      nil
      ;; The indicator for the mode …
Run Code Online (Sandbox Code Playgroud)

emacs elisp keyboard-shortcuts minor-mode

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

架构和数据字典有什么区别?

模式的定义是数据库中数据的逻辑结构.它由用户拥有,并且与数据库用户具有相同的名称.模式包含表的名称,它的列类型等.数据字典也只包含元数据(在数据库级别而不是在用户级别).架构和数据字典之间的确切区别是什么?

rdbms

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

Kohana错误:`日志目录不可写`

我有一个我在Kohana检查的项目,我试图让它在本地服务器上运行,我在这里遇到问题:http://djaffry.selfip.com:8081 /

logs文件夹的权限与其他所有权限相同,

drwxr-xr-x  3 tipu tipu 4096 2010-06-24 12:37 cache
drwxr-xr-x  3 tipu tipu 4096 2010-06-24 15:21 config
drwxr-xr-x  4 tipu tipu 4096 2010-06-24 15:23 controllers
drwxr-xr-x  8 tipu tipu 4096 2010-06-24 15:23 css
drwxr-xr-x  5 tipu tipu 4096 2010-06-24 15:24 fckeditor
drwxr-xr-x  3 tipu tipu 4096 2010-06-24 15:17 helpers
drwxr-xr-x  3 tipu tipu 4096 2010-06-24 12:35 hooks
drwxr-xr-x 12 tipu tipu 4096 2010-06-24 15:24 images
drwxr-xr-x  7 tipu tipu 4096 2010-06-24 15:24 js …
Run Code Online (Sandbox Code Playgroud)

php file-permissions kohana

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

学习iPhone编程来自C#背景

我想深入了解iPhone编程世界.我对C#编码有一点经验.

我是否应该在触摸可可之前开始学习Objective-C [或]有更好的方法(我对iphone编程一无所知).

我的学习曲线是否有任何推荐的书籍/博客.

**如果这是一个重复的问题,有人可以指出我的原始问题**

谢谢

cocoa cocoa-touch objective-c iphone-sdk-3.0

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

使用C或C++中的可变数量的条目解析一行(无增强)

我有一个包含表格行的文件,

double mass, string seq, int K, int TS, int M, [variable number of ints]
688.83       AFTDSK      1      1       0       3384 2399 1200
790.00       MDSSTK      1      3       1       342 2
Run Code Online (Sandbox Code Playgroud)

我需要一种(最好是简单的)方法来解析这个文件而不需要提升.如果每行的值的数量是恒定的,那么我会在这里使用解决方案.

每一行都将成为Peptide类的对象:

class Peptide {
    public:
        double mass;
        string sequence;
        int numK;
        int numPTS;
        int numM;
        set<int> parents;
 }
Run Code Online (Sandbox Code Playgroud)

前三个整数在对象中具有特定的变量名称,而所有以下整数都需要插入到集合中.


我很幸运能得到两个非常棒的响应,但运行时差异使C实现成为我的最佳答案.

c c++ parsing

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

如何使用javascript转义正则表达式特殊字符?

我需要使用java脚本转义正则表达式特殊字符.如何实现这一点?任何帮助都应该被理解.


感谢您的快速回复.但我需要逃避正则表达式的所有特殊字符.我已经尝试了这段代码,但我无法达到结果.

RegExp.escape=function(str)
            {
                if (!arguments.callee.sRE) {
                    var specials = [
                        '/', '.', '*', '+', '?', '|',
                        '(', ')', '[', ']', '{', '}', '\\'
                    ];
                    arguments.callee.sRE = new RegExp(
                    '(\\' + specials.join('|\\') + ')', 'gim'
                );
                }
                return str.replace(arguments.callee.sRE, '\\$1');

            }

function regExpFind() {
            <%--var regex = new RegExp("\\[munees\\]","gim");--%>
                    var regex= new RegExp(RegExp.escape("[Munees]waran"));
                    <%--var regex=RegExp.escape`enter code here`("[Munees]waran");--%>
                    alert("Reg : "+regex);
                }
Run Code Online (Sandbox Code Playgroud)

这段代码我错了什么?请指导我.

javascript regex

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