我正在尝试使用我的angualar 6项目添加Datatables插件(datatables.net)工具.我不知道如何使用npm安装程序将必要的css,js和其他必需文件包含到我的项目中.选择我必要的选项后,我遵循NPM Install方法:
npm install --save datatables.net-bs4
npm install --save datatables.net-buttons-bs4
npm install --save datatables.net-colreorder-bs4
npm install --save datatables.net-responsive-bs4
npm install --save datatables.net-rowgroup-bs4
npm install --save datatables.net-scroller-bs4
Run Code Online (Sandbox Code Playgroud)
安装后,我不确定如何在我的项目中使用这些.我的项目使用ngx-bootstrap(https://www.npmjs.com/package/ngx-bootstrap)进行样式设计.
style.scss // where I am only importing my css theme from node_modules
Run Code Online (Sandbox Code Playgroud)
在ngx-bootstrap中,样式是组件明智的,我很容易使用它们.那么,我如何将数据表功能用作组件?换句话说,我应该在哪里包含css和必需的js文件来实现页面上的数据表设施?
如果有人这样做,请告诉我,否则任何建议将不胜感激.
谢谢.
简而言之,这就是我想要做的事情:(我想使用jsoup)
所以,第一点我现在所拥有的:
String url = "http://stackoverflow.com/questions/28149254/using-a-regex-in-jsoup";
Document document = Jsoup.connect(url).get();
Run Code Online (Sandbox Code Playgroud)
现在在这里我想了解“文档”是哪种格式,是否已经从html或任何类型的网页类型中解析出来了?
然后第二点我现在所拥有的:
Pattern p = Pattern.compile("\\d{4}-[01]\\d-[0-3]\\d", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
Elements elements = document.getElementsMatchingOwnText(p);
Run Code Online (Sandbox Code Playgroud)
在这里,我正在尝试匹配日期正则表达式以在页面中搜索日期并存储在字符串中以备后用(第3点),但我确定我离它不远了,在这里需要帮助。
我已经完成了第4点。
因此,请任何可以帮助我理解并带我正确方向的人,我如何才能达到上述4点。
提前致谢 !
更新: 所以这是我想要的:
public static void main(String[] args){
try {
// using USER AGENT for giving information to the server that I am a browser not a bot
final String USER_AGENT =
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.112 Safari/535.1";
// My only one url which …Run Code Online (Sandbox Code Playgroud) 我尚未在互联网上找到解决方案。
Angular带来了类似的Github Issue,但是在那里找不到任何解决方案。
我已经将脚本文件添加到angular.json中,例如(在构建和测试范围中):
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": [
"src/assets/plugins/jquery/jquery-1.11.3.min.js",
"src/assets/plugins/jquery-ui-1.11.4.custom/jquery-ui.min.js",
"src/assets/plugins/bootstrap/js/bootstrap.min.js",
"src/assets/plugins/owl-carousel/owl.carousel.min.js",
"src/assets/plugins/bootstrap-select/js/bootstrap-select.min.js",
"src/assets/js/jquery.subscribe-better.js",
"src/assets/js/moment-with-locales.min.js",
"src/assets/plugins/countdown/jquery.plugin.min.js",
"src/assets/plugins/countdown/jquery.countdown.min.js",
"src/assets/js/theme.js"
]
Run Code Online (Sandbox Code Playgroud)
我正在获取CSS样式,但是某些脚本无法正常工作。
有什么办法吗?
我有一个名为UserController的控制器,通用类型为T:
public class UserController<T> : Controller
{
}
Run Code Online (Sandbox Code Playgroud)
然后,在这个类中,我有一个名为Select()的方法,带有泛型类型:
public override T Select<T>(ushort id)
{
// UserModel is just a Class where I is an integer typed property
UserModel.I = 2;
object result = UserModel.I;
return (T)Convert.ChangeType(result, typeof(T));
throw new NotImplementedException();
}
Run Code Online (Sandbox Code Playgroud)
现在在另一个表单类中,我正在访问此方法,如下所示:
// This is so far working
UserController<int> us = new UserController<int>(0);
label1.Text = us.Select<string>(0);
Run Code Online (Sandbox Code Playgroud)
现在我有这个警告:
Severity Code Description Project File Line Suppression State
Warning CS0693 Type parameter 'T' has the same name as the type
parameter from …Run Code Online (Sandbox Code Playgroud)