小编Col*_*let的帖子

在jsTree树中的节点图标,字体很棒

我有一个使用jsTree的树结构,像这样:

<div id="jstree">
        <ul>
           <li>Root 1
             <li> Child 1</li>  
           </li>   
        </ul>
</div>
Run Code Online (Sandbox Code Playgroud)

我想为root和children添加font-awesome的图标.下面解释如何使用bootstrap,下面和示例:

 <li data-jstree='{"icon":"glyphicon glyphicon-leaf"}'>Child</li>
Run Code Online (Sandbox Code Playgroud)

我试过这样做:

<li data-jstree='{"icon":"fa fa-user fa-2x"}'>
Run Code Online (Sandbox Code Playgroud)

这是浏览器告诉我的错误:

表达式"icon"中的字符(:)无效:"fa fa-user fa-2x"

我还要提一下,我正在使用XML和XSL.

有没有人对这个问题有所了解?

xml xslt jstree font-awesome

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

运行时错误中的 string&amp; 与 wstring&amp;

我需要继承的异常类runtime_class来接受wstring&。这是MyExceptions.h

using namespace std;

class myExceptions : public runtime_error
{

public:
    myExceptions(const string &msg ) : runtime_error(msg){};
    ~myExceptions() throw(){};

};
Run Code Online (Sandbox Code Playgroud)

我愿意这样myExceptions接受: 。但是当我运行它时,我收到了这个错误:wstring&myExceptions(const **wstring** &msg )

C2664: 'std::runtime_error(const std__string &): cannot convert parameter 1 from 'const std::wstring' to 'const std::string &'
Run Code Online (Sandbox Code Playgroud)

我了解runtime_error接受string&而不是wstring&按照C++ 参考 - runtime_error中的定义:

> explicit runtime_error (const string& what_arg); 
Run Code Online (Sandbox Code Playgroud)

我如何使用wstring&with runtime_error

c++ runtime-error

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

Github页面,远程引导css:无法加载资源:服务器响应状态为404(未找到)

我有自定义的引导程序网站,我推送github页面.本地它工作得非常好,完全没问题,但是在线时样式很乱,这些消息出现在控制台上:

Failed to load resource: the server responded with a status of 404 (Not Found)   https://nickname.github.io/repo/vendor/font-awesome/css/font-awesome.min.css Failed to load resource: the server responded with a status of 404 (Not Found)
Run Code Online (Sandbox Code Playgroud)

在我的代码中,css声明如下:

<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
Run Code Online (Sandbox Code Playgroud)

为什么本地工作而不是远程?

css twitter-bootstrap github-pages

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