首页 \ 问答 \ 如何用javascript消除
  • (how to eliminate
  • with javascript)
  • 如何用javascript消除
  • (how to eliminate
  • with javascript)
  • 实际上,我的问题并没有完全解决......事情是,我在mvc中制作了一棵树,并且为了展开和折叠树,我添加了这个可以在下面看到的Java脚本代码。 起初我给每个人增加了一个'句柄'类

  • 节点,然后我将添加展开它的崩溃。但在应用此代码后,我的树不能正确显示...

    在这里输入图像描述

    在图像中你可以看到'fff'和'ggg'必须处于同一个水平,因为他们都是'eee'的子女。 'ccc'似乎是'bbb'的孩子,但它也必须与'bbb'处于同一水平。因为'bbb'和'ccc'都是'aaa'的孩子....

    我不知道为什么Java脚本代码不起作用。

    $(document).ready(function(){jQuery(“#tree ul”)。hide();

       jQuery("#tree li").prepend("<span class='handle'></span>");
    
        jQuery("#tree li:has(ul)")
          .children(":first-child").addClass("collapsed")
          .click(function () {
              jQuery(this).toggleClass("collapsed expanded")
                .siblings("ul").toggle();
          });
    });
    
    $(function () {
        $("ul#tree li").each(function () {
            as = $(this).children('a');
            if (!as.length) {  //
                $(this).hide();
            }
        })
    });
    

  • Actually,my problem is not solved completely...The thing is that i made a tree in mvc and for having expanded and collapsed tree ,i added this java script code which you can see below. at first i add a 'handle' class to each

  • node and then i will add collapse expanded on it.But after applying this codes my tree is not displayed properly...

    enter image description here

    in the image u can see that 'fff' and 'ggg' must be in a same level because they are both children of 'eee' . 'ccc' seems to be the child of 'bbb' but it also must be in the same level as 'bbb'.Because both 'bbb' and 'ccc' are children of 'aaa'....

    i dont know why java script code does not work.

    $(document).ready(function () { jQuery("#tree ul").hide();

       jQuery("#tree li").prepend("<span class='handle'></span>");
    
        jQuery("#tree li:has(ul)")
          .children(":first-child").addClass("collapsed")
          .click(function () {
              jQuery(this).toggleClass("collapsed expanded")
                .siblings("ul").toggle();
          });
    });
    
    $(function () {
        $("ul#tree li").each(function () {
            as = $(this).children('a');
            if (!as.length) {  //
                $(this).hide();
            }
        })
    });
    

  • 原文:https://stackoverflow.com/questions/43925343
    更新时间:2021-12-12 12:12

    最满意答案

    我通过在编译function.cpp时静态链接MKL来解决这个问题(我之前是动态链接的)。

    我发现这个链接也很有帮助: https : //software.intel.com/en-us/articles/intel-mkl-custom-static-linkage

    当我做动态链接时,我不清楚为什么会有这么奇怪的结果。 我能想到的是,也许一些MKL的依赖关系是从R自动加载的OpenBLAS或LAPACKE库中提取的。 我真的不知道。


    I solved this problem by statically linking the MKL when compiling function.cpp (I was dynamically linking before).

    I found this link also helpful: https://software.intel.com/en-us/articles/intel-mkl-custom-static-linkage

    It is not clear to me why I had such strange results when I was doing the dynamic linkage. All I can think is that perhaps some of the MKL's dependencies were being pulled from OpenBLAS or LAPACKE libraries that R automatically loads. I really do not know.

    相关问答

    更多
    • 为什么浮动和双打之间存在差异? 现代CPU使用向量指令来执行浮点算术。 这些指令具有固定的吞吐量和长度,例如Intel Xeon E7530的每个核心都能够处理每个周期两个128位的加法或乘法。 这导致每个循环4个双倍或8个浮点数。 为什么我不能使用整数? ublas示例中的模板将float和double模板的矩阵乘法映射到MKL SGEMM和DGEMM函数。 当您将矩阵模板从float / double更改为int时BOOST使用矩阵乘法的参考实现,因为MKL不提供对整数矩阵乘法的支持。 Why the ...
    • 我同意@ tim18你应该使用链接顾问。 但是要使用gfortran从英特尔编译测试奇异值分解程序,可以进行以下工作: gfortran -I${MKLROOT}/include -fopenmp -o dgesvd dgesvd.f \ -L${MKLROOT}/lib/ -lmkl_core -lmkl_gnu_thread -lmkl_gf_lp64 I agree with @tim18 that you should use the link advisor. However ...
    • 该文档告诉您在提供的compilervars.sh脚本上使用“source”命令来使所有资源可用。 例如: 来源//bin/compilervars.sh 这会将MKL添加到include和library路径,以便编译器和链接器可以找到它们。 如果您需要更多帮助,请访问https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x您可以获得MKL特定的帮助https://software.intel. ...
    • 在Unix / Linux系统上, sudo命令( S uper U ser DO )设置为使用为root用户定义的环境变量,而不是运行该命令的用户。 如果您在非标准位置安装程序,则需要以超级用户权限运行它,这可能会导致问题。 例如,在OS X系统(运行在BSD Unix上), /usr/local/bin默认不包含在PATH环境变量中。 您可以设置用户的帐户以在PATH包含此目录,但是如果您尝试将sudo与其中的程序一起使用,则无法找到它,除非您修改root的环境(或系统的环境)以包含/usr/local ...
    • 您可以在[matlabroot]\bin\ARCH\mkl.dll (例如C:\ Program Files \ MATLAB \ R2013b \ bin \ win64 \ mkl.dll)找到该库,但这只是运行时库。 我认为你无能为力。 要使用英特尔MKL实际开发,您将需要标题,库等, 这些只能通过购买产品获得 。 似乎MATLAB通过extern\lib\[arch]\[compiler]的导入库libmwblas.lib和libmwlapack.lib提供了有关如何使用MEX文件中的LAPACK和 ...
    • 您可以使用带有自定义分配器的std::vector ,就像这里提到的那样,以确保16字节对齐。 然后,您可以将第一个元素的地址作为MKL函数的输入指针。 重要的是你有16字节对齐,因为MKL广泛使用SIMD来提高性能。 You could use a std::vector with a custom allocator like the ones mentioned here to ensure 16 byte alignment. Then you can just take address of th ...
    • 我通过在编译function.cpp时静态链接MKL来解决这个问题(我之前是动态链接的)。 我发现这个链接也很有帮助: https : //software.intel.com/en-us/articles/intel-mkl-custom-static-linkage 当我做动态链接时,我不清楚为什么会有这么奇怪的结果。 我能想到的是,也许一些MKL的依赖关系是从R自动加载的OpenBLAS或LAPACKE库中提取的。 我真的不知道。 I solved this problem by statically ...
    • 英特尔®MKL主要针对服务器和高性能台式机和移动处理器而设计和优化。 Celeron D是一款性能相对较低的处理器,因此MKL从未针对它进行过优化。 例如,如果您检查最近的英特尔酷睿i7桌面上的SVD性能,启用MKL的NumPy可以比启用ATLAS的NumPy快80%。 请看: http : //software.intel.com/en-us/articles/numpy-scipy-with-mkl/ 顺便说一下,为了更快地响应MKL相关问题,请加入英特尔MKL论坛: http : //software ...
    • 两者都是正确的...你从numpy获得的v的行是M.dot(MT)的特征向量(转置将是复杂情况下的共轭转置)。 特征向量在一般情况下仅定义为乘法常数,因此您可以将v的任何行乘以不同的数字,并且它仍然是特征向量矩阵。 对v的附加约束是它是一个酉矩阵 ,它松散地转换为正交的行。 这会将每个特征向量的可用选择减少到仅2:指向任一方向的归一化特征向量。 但你仍然可以将任意行乘以-1并仍然有一个有效的v 。 如果你想测试它的矩阵,我已经加载为: >>> u, d, v = np.linalg.svd(a) >>> D ...
    • svd可以接受nu和nv参数,指定要发出的U和V的大小。 这些默认为min(# of rows, # of cols) ,默认情况下在R中表示SVD是“瘦”或经济模式SVD,而Matlab默认为完整SVD,除非您要求瘦版。 以下是如何获得完整的V : S = svd(M, nu=3, nv=4) 。 更一般地, nu=nrow(M)和nv=ncol(M) nu=nrow(M) nv=ncol(M) 。 完整示例: > M = matrix(c(2,3,4,5,1,2,3,4,0,1,2,3), nrow=3 ...

    相关文章

    更多

    最新问答

    更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)