小编sae*_*dan的帖子

检查字符串是否包含非数字字符

如何检查给定字符串是否包含非数字字符,示例:

x11z returns > 0
x$1 also returns > 0
1111~ also returns > 0
Run Code Online (Sandbox Code Playgroud)

我的意思是说不是之间的一切0-9.我看到类似的线程,但没有他们谈论"非0-9",除了他们显示它a-zA-Z.

bash grep

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

在动态创建的 html 中调用 javascript 函数

我有一个 javascript 文件,如下图所示。
在这个文件中,我为我的网页创建了一个 html 代码,在这个 html 中,我调用了一个在 javascript 文件中定义的函数。但是当我运行它时,我发现该函数未定义。
附加信息 :

http://s8.postimg.org/nqwv1na6d/js_function.png

http://s1.postimg.org/mqyu5zalr/js_function.png

加上提到的函数(“cButton”)是在 javascript 文件中的另一个函数中定义的。

(function () {
    var thecid = 0;

    function cButton (ii) {
        document.getElementById(ii).style.display = 'none';
        alert('fdgfg');
    }

    $("#subber").on("click", function () {
        var thelm = "#c0"+thecid;
        var newcommhtml = '<div id="c0' + thecid + '" class="cnew clearfix">';
        var ii='c0'+thecid;
        newcommhtml += '<section class="c-content">';
        newcommhtml += '<a href="#" onclick="cButton(\'' + ii + '\');" style="color:black;">x</a>';
        newcommhtml += '<p>' + nl2br(textval) + '</p> </section></div>';        
    });
})()
Run Code Online (Sandbox Code Playgroud)

html javascript jquery

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

编译linux内核

有人可以指导我完成编译linux内核的过程,

  1. 如果我改变了一些文件,/usr/src/linux/我需要编译什么?
  2. 我什么时候还需要编译内核模块(如果你可以列出那些很好的目录/文件)
  3. 如果我想添加一个对system_call_table的调用,即条目号#240,我为该条目写了一个.c,.h文件,我把它放在哪里?

编译内核的步骤是:

  • cd /usr/src/linux
  • make bzImage
  • make modules
  • make modules_install
  • cd arch/i386/boot
  • cp bzImage /boot/vmlinuz-"linux version"
  • cd /boot
  • mkinitrd "the image".img "version ..."
  • reboot

有问题的步骤是make modulesmake modules_install.

linux linux-device-driver linux-kernel

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