小编Jer*_*ein的帖子

Ajax更新程序无法在Internet Explorer中工作

我有ajax更新程序的问题,我无法解决.我有这个代码Servicii

它在Firefox中完美运行,但在Internet Explorer中它什么都不做.如果我从我的硬盘打开网站它可以工作,但它只适用于链接一次然后我必须重新加载整个页面...

有没有人知道如何解决这个问题?

谢谢

ajax internet-explorer

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

C Prog.:结构作为函数的参数?

我正在尝试创建结构"出生日期",以及将为结构赋值的函数,我想知道可能以某种方式这样做:

(PS.对于第2行和第23行,我经常收到错误"参数列表语法错误".)

#include <stdio.h>
void input (dob_st *);
int main ()
{
    typedef struct
    {
        int year;
        int month;
        int day;
    }
    dob_st;

    dob_st date;
    dob_st *p;
    p=&date;
    input (*p);
    printf("%02i.",p->day);
    printf("%02i.",p->month);
    printf("%i.",p->year);

    return 0;
}
void upis (dob_st *p)
{
    printf ("Date of birth:\nDay?\n");
    scanf ("%i",&(p->day));
    printf ("Month?\n");
    scanf ("%i",&(p->month));
    printf ("Year?\n");
    scanf ("%i",&(p->year));
}
Run Code Online (Sandbox Code Playgroud)

c struct

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

实施缓存是否被认为是一个难题?

对于从HTTP到SQL查询,L1 / L2内存缓存等各种各样的事情,这里有很多关于缓存无法正常工作或询问如何正确实现缓存的问题。

从计算机科学的角度来看,它通常被认为是一个难题吗?

computer-science caching

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

Biztalk - 表达形状的局部变量

有时,当我在表达式形状中编写XLANG/s代码时,如果我只能在该代码块的范围内使用临时变量,那么它将更具可读性.我讨厌用变量声明来整理整个编排.有没有办法在表达式形状中声明变量?

biztalk biztalk2006r2

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

powershell:get-date.adddays不正确?

我要做的是创建一个PowerShell脚本,它获取目录中的文件夹列表,该目录由正则表达式筛选出来,用nnnnnnx31或nnnnnnddd筛选出文件夹名称,其中n =前6个字符的alpha字符和最后3个字符是静态字符串x31的数字.接下来,它会筛选文件是否为90天,这些文件将被复制到另一个目录.

当我尝试运行时:

get-childitem | where {$_.name -match "^\d{6}([a-zA-Z]{3}|x31)$"} | where {$_.lastwritetime -lt (get-date.adddays(-90)}
Run Code Online (Sandbox Code Playgroud)

我收到错误:

You must provide a value expression on the right-hand side of the -lt operator
At line: 1 char: 96
+ get-childitem | where {$_.name -match "^\d{6}([a-zA-Z]{3}|x31)$"} | where {$_.lastwritetime -lt  <<<< get-date.adddays(-90)}
Run Code Online (Sandbox Code Playgroud)

我也试过以下它并没有用:

get-childitem | where {$_.name -match "^\d{6}([a-zA-Z]{3}|x31)$"} | where {$_.lastwritetime -lt (get-date | foreach-object {$_.adddays(-90)}) }
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

powershell

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

当我第一次发现不需要的东西时,如何使正则表达式不匹配

我想使用正则表达式在我的示例中找到一个特定的字符串,但是如果我第一次找到另一个字符串,我希望正则表达式失败.让我举个例子:

find_me只有在我们没有第一次遇到时才匹配stop_here.(我不在乎是否stop_here会在样本中发生.)

所以,这应该匹配:

blah blah find_me blah stop_here

但这不应该:

blah blah stop_here blah find_me

(我正在使用.NET正则表达式引擎)

regex

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

python mysql连接问题

这段代码工作正常:

import  MySQLdb

db = MySQLdb.connect("localhost", "root", "","bullsorbit")
cursor = db.cursor()

cursor.execute("Select * from  table  where  conditions'")
numrows = int(cursor.rowcount)

print 'Total number of Pages :  %d ' % numrows
Run Code Online (Sandbox Code Playgroud)

但如果我提供我的IP地址

db = MySQLdb.connect("192.168.*.*", "root", "","bullsorbit")
Run Code Online (Sandbox Code Playgroud)

它会给出这个错误

super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (2003, "Can't connect to MySQL server on 'ip address' (111)")
Run Code Online (Sandbox Code Playgroud)

python mysql

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

如何在不获得太多重定向错误的情况下重定向到我的同一URL?

我需要将用户从http://myurl.com/Login.action重定向到http://myurl.com/app/Login.action

我尝试了这个但是我收到一个错误,说我得到了太多的重定向.

RedirectMatch ([A-Za-z]*)\.action$ http://myurl.com/app/$1.action

如何让apache重定向到同一个URL,但只重定向一次.

会这样的吗?

RedirectMatch ![app\/]([A-Za-z]*)\.action$ http://myurl.com/app/$1.action

regex apache mod-rewrite redirect

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

在java中匹配regexp

String text = "[! hello ¡world ¡] otra cosa ¡]";
String pt = "\\[!(.*)¡\\]";
Matcher mc = Pattern.compile(pt).matcher(text);
while( mc.find() ){
    System.out.println(mc.group(1));
}
Run Code Online (Sandbox Code Playgroud)

此代码打印hello ¡world ¡] otra cosa.

什么是只匹配的模式hello ¡world

我找不到的是一种否定文字字符串而不仅仅是字符串的方法.就像是:([^(¡\])]*)

问题是:
如何匹配不是文字字符串的所有内容?

java regex

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

Javascript:如何根据项属性值删除数组项(JSON对象)?

像这样:

var arr = [  
            { name: "robin", age: 19 },   
            { name: "tom", age: 29 },  
            { name: "test", age: 39 } 
          ];  
Run Code Online (Sandbox Code Playgroud)

我想删除像这样的数组项(数组原型方法):

arr.remove("name", "test");  // remove by name  
arr.remove("age", "29");  // remove by age
Run Code Online (Sandbox Code Playgroud)

目前,我通过这种方法(使用jQuery)来做到这一点:

Array.prototype.remove = function(name, value) {  
    array = this;  
    var rest = $.grep(this, function(item){    
        return (item[name] != value);    
    });  

    array.length = rest.length;  
    $.each(rest, function(n, obj) {  
        array[n] = obj;  
    });  
};  
Run Code Online (Sandbox Code Playgroud)

但我认为解决方案有一些性能问题,所以任何好主意?

javascript jquery

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