我已经在 textarea 上应用了 ckeditor 。它按原样显示粗体和斜体 txext,但当我从数据库中获取时不会在结果中显示编号列表和项目符号列表。相反,它将整个文本封装在 ol/ul 标签中。
应用ckeditor的Jquery代码:
$(document).ready(function(){
//Applying ckeditor on provider msg textarea.
CKEDITOR.replace( 'responsibilities',
{
uiColor: '#6C518F',
toolbar: [
{ name: 'basicstyles', items : [ 'Bold','Italic','TextColor',"BGColor", 'NumberedList','BulletedList' ] },
{ name: 'tools', items : [ 'Maximize','-' ] }
],
removePlugins : 'elementspath'
});
})
Run Code Online (Sandbox Code Playgroud) 我正在研究django应用程序,我有如下应用程序的基本URL:
127.0.0.1:8000/myblog/page
Run Code Online (Sandbox Code Playgroud)
其中127.0.0.1:8000是基本URL,myblog是应用程序名称,页面是页面名称.所以我的要求是在不改变应用程序内部代码的情况下将url更改为这样的内容:
127.0.0.1:8000/username/page
Run Code Online (Sandbox Code Playgroud)
基本上我想在URL中用用户名更改App名称.我已经尝试过在这个 SO问题中给出的解决方案.但它并没有多大帮助.
我必须在弹出窗口中显示 jwplayer,对于弹出窗口我使用 ngDialog(angular),ngDialog 的代码如下:
$scope.showVideoPlayerPopup = function(video_path)
{
$scope.ngDialog = ngDialog;
ngDialog.open({
animation: true,
scope:$scope,
template:'<div id="video_popup"></div>',
plain: true,
//className: 'ngdialog-theme-default',
closeByDocument: true
//backdrop : 'static'
});
playVideo(video_path);
}
Run Code Online (Sandbox Code Playgroud)
上面调用的播放视频函数包含jwplayer的代码,如下:
<script>
function playVideo(video_path)
{
jwplayer("video_popup").setup({
file: video_path,
width: "600px",
height: "600px",
stretching: "bestfit",
});
}
</script>
Run Code Online (Sandbox Code Playgroud)
当我对没有弹出窗口的简单 html 代码使用相同的 jwplayer 代码时,它工作正常,但我尝试将我的 html 放入弹出窗口中,它给了我以下错误:
错误:jwplayer(...).setup 不是函数
更新
我包含的文件:
<script src="https://content.jwplatform.com/libraries/qAkRysIB.js"></script>
Run Code Online (Sandbox Code Playgroud) 我的文件如下:
{
"_index": "abc_local",
"_type": "users",
"_id": "1",
"_version": 5,
"found": true,
"_source": {
"firstname": "simer",
"lastname": "kaur",
"gender": "1",
"Address": "Punjab House Fed. Housing Society, Amritsar, Punjab, India",
"email": "rav@yopmail.com",
"occupation": "Php Developer",
"work": "Development",
"fav_hunting_land": 2,
"zipcode": "",
"marital_status": "1",
"phone": "1234567899",
"school": "sdfergdfh",
"species": [{
"id": 1
}, {
"id": 2
}, {
"id": 3
}, {
"id": 4
}, {
"id": 5
}, {
"id": 6
}],
"activities": [{
"id": 1
}],
"fav_weapon": 6,
"weapons": [{ …Run Code Online (Sandbox Code Playgroud) 谁能解释一下下面的实现:
item = dict((i.tag, (type(i.text) == str and i.text.strip() or i.text)) for i in r if i.tag != "tid_item")
Run Code Online (Sandbox Code Playgroud)
我在各种变量中得到的值:
r is something like : <Element 'Rows' at 0x0000000003DA4540>
i.tag : resultNum
i : <Element 'resultNum' at 0x0000000003EA45A0>
i.text : 1
Run Code Online (Sandbox Code Playgroud)
我是 python 新手,我无法理解如何在字典中使用 forloop,因为值也是荒谬的。
感谢帮助!
我搜索了这个错误并修改了我的查询,并在聚合函数中按列使用了我的订单.可能是由于对sql的了解较少,我无法捕捉到此错误的确切含义.
我的表中有以下列:
- [ID]
- [POST_ID]
- [用户身份]
- [photo_id]
- [photo_group_id]
- [album_id]
我的查询:
SELECT TOP 3 MAX(share.id) as share_id, share.user_id
FROM share
WHERE share.post_id = 5468
GROUP BY share.user_id
ORDER BY share.id desc
Run Code Online (Sandbox Code Playgroud)
我正在使用聚合函数中的列按顺序显示它
"share.id"列在ORDER BY子句中无效,因为它不包含在聚合函数或GROUP BY子句中.
任何帮助将不胜感激.:)
我正在学习单元测试和Angular,所以我都是这方面的初学者。我已经以角度介绍了一些有关单元测试http的教程和文章。
我不明白httpMock使用HttpTestingController做了什么。我们称实际服务为函数,那么为什么称其为模拟呢?底层过程是什么?请参考一些文章以获得更好的理解。
提前致谢。
编辑: 这是我坚持使用httpMock 的问题。
我有一个如下列表:
ingredients = ['apple','cream','salt','sugar','cider']
Run Code Online (Sandbox Code Playgroud)
我想加入此列表以获取字符串,但我想从第二个索引加入到最后一个索引.
得到这个:"salt sugar cider"
列表的长度可能会有所不同.
是否可以使用join函数执行此操作,或者我必须通过循环元素来执行此操作?
有人与我分享了这个源代码。其中包括.Git、branches 和trunk 三个文件夹。
我熟悉 git 但通常当我们使用 git clone 时,我们会得到两个文件夹,一个是源代码,一个是其中的 .git 文件夹。我需要知道这些文件夹是什么意思,哪一个包含实际的源代码。
谢谢!
我尝试npm i @angular/material并将@angular/material包安装到我的 Angular CLI 项目中。
然后我尝试ng add @angular/material并提示我在不同的主题之间进行选择,我期待一些更改,style.scss但没有引入任何更改。
两个命令的输出有什么区别?
angular ×2
django ×2
python ×2
python-2.7 ×2
angularjs ×1
ckeditor ×1
dictionary ×1
git ×1
git-branch ×1
github ×1
jwplayer ×1
list ×1
ng-dialog ×1
sql-server ×1