title

Chrome save to PDF custom filename

亡梦爱人 提交于 2020-01-22 12:18:04
问题 In Chrome, when hitting Ctrl + P you can choose 'Save to PDF'. The default file name is equal to the title of the html page the user wants to print. Can this be changed, without changing the actual title of the html page? I'd like to have a date & time in the PDF's name, but I don't want the date & time in the title of my html page. 回答1: So if you can put a print button in somewhere and link it to a function similar to the following: function printWithSpecialFileName(){ var tempTitle =

HTML页面自动关闭

爷,独闯天下 提交于 2020-01-21 21:31:04
<html> <head> <title>O_o&#@$%^*</title> </head> <body> <script language="javascript"> function fnPageClose() { i = i - 1 document.title = "页面" + i + "秒后关闭" + title; if (i > 0) setTimeout("fnPageClose();", 1000); else self.close(); } var i = 10 title = document.title; fnPageClose(); </script> </body> </html> 来源: CSDN 作者: awhitepanda 链接: https://blog.csdn.net/qq_35689096/article/details/104064704

How can I create this figure title in MATLAB?

£可爱£侵袭症+ 提交于 2020-01-21 16:13:10
问题 I want to combine Latex, numbers, and Tex into the title of a figure using the following ( beta_b and lambda are defined variables): title(['$\overline{\beta}=$' num2str(beta_b) 'TE0 , \lambda=' num2str(lambda*1e6) ' \mum'], 'interpreter','latex'); But it doesn't display properly. What's the problem? 回答1: You can't combine Latex and Tex in a title. You have to use one or the other (i.e. whichever one you set for the 'Interpreter' property). The following will work: title(['$\overline{\beta}=$

Python基础知识学习 Day7

霸气de小男生 提交于 2020-01-21 00:41:07
一、零碎知识点 1、面向对象示例 import datetime class Book : def __init__ ( self , title , price = 0.0 , author = '' , publisher = None , pubdate = datetime . date . today ( ) ) : self . title = title self . price = price self . author = author self . publisher = publisher self . pubdate = pubdate def __repr__ ( self ) : return '<图书> {} at {}' . formate ( self . title , id ( self ) ) def print_info ( self ) : print ( '当前这本书的信息如下:' ) print ( '标题:{}' . format ( self . title ) ) print ( '定价:{}' . format ( self . price ) ) print ( '作者:{}' . format ( self . author ) ) print ( '出版社:{}' . format ( self . publisher

nodejs实现简单爬虫

本秂侑毒 提交于 2020-01-20 00:47:09
nodejs结合cheerio实现简单爬虫 1 let cheerio = require("cheerio"), 2 fs = require("fs"), 3 util = require("util"), 4 html = "", 5 https = require('https'), 6 list = [], 7 buffer = null, 8 newslist = [], 9 url = 'https://www.yidaiyilu.gov.cn/'; 10 let req = https.request("https://www.yidaiyilu.gov.cn/",function(res){ 11 res.on("data",function(data){ 12 list.push(data) 13 }) 14 res.on("end",function(){ 15 buffer = Buffer.concat(list) 16 html = buffer.toString() 17 $ = cheerio.load(html) 18 for(var i=1;i<=3;i++){ 19 let dlist = `.con_yw_${i}`; 20 $(".mybox .main-1").find(dlist).find('a').each((index,ele)=

sqlzoo第七关More JOIN operations

一笑奈何 提交于 2020-01-19 03:18:53
第七关 More JOIN operations 电影数据库 表1 电影表(movie) id(编号) title(电影名) yr(年份) director(导演) budget(制作费) gross(票房收入) 10003 “Crocodile” Dundee II 1988 38 15800000 239606210 10004 Til There Was You 1997 49 10000000 … … … … … … 表2 演员表(actor) id(编号) 名字(name) 20 Paul Hogan 50 Jeanne Tripplehorn 表3 角色表(casting) movieid(电影编号) actorid(演员编号) ord(角色排序) 10003 20 4 10004 50 1 7.1题目及答案 列出1962年首影的電影, [顯示 id, title] SELECT id , title FROM movie WHERE yr = 1962 電影大國民 ‘Citizen Kane’ 的首影年份。 select yr from movie where title = 'Citizen Kane' 列出全部Star Trek星空奇遇記系列的電影,包括id, title 和 yr(此系統電影都以Star Trek為電影名稱的開首)。按年份順序排列。 select

时间排序

江枫思渺然 提交于 2020-01-18 04:35:20
var rows = [ { “title”: “第一条title”, “time”: “2008/08/27 05:30:45”, “data”: “这是数据” }, { “title”: “第二条title”, “time”: “2015/12/07 18:01:29”, “data”: “这是数据” }, { “title”: “第三条title”, “time”: “2011/09/14 22:56:17”, “data”: “这是数据” } ]; //降序将匿名函数参数a, b互换就行 rows.sort(function (a, b) { return new Date(a.time).getTime() - new Date(b.time).getTime() }); console.log(rows) 来源: CSDN 作者: _HaoJie 链接: https://blog.csdn.net/Me_LiuHaoJie/article/details/103821350

mongo DB的一般操作

故事扮演 提交于 2020-01-17 18:56:04
最近接触了一些mongoDB 。将一些指令操作记录下来,便于查询和使用 登录 [root@logs ~]# mongo -u loguser -p log123456 --authenticationDatabase admin MongoDB shell version: 2.4.10 connecting to: test > show users > post = {"title":"My Blog Post","Content":"Here is my blog Post.","Date":new Date()} { "title" : "My Blog Post", "Content" : "Here is my blog Post.", "Date" : ISODate("2015-02-11T03:12:03.061Z") } 插入 --插入文档对象 > db.blog.insert(post) > post = {"title":"Licz Blog Post","Content":"Here is my blog Post.","Date":new Date()} { "title" : "Licz Blog Post", "Content" : "Here is my blog Post.", "Date" : ISODate("2015-02-11T03:17

How do you get the value of the JFrame title? [closed]

谁说我不能喝 提交于 2020-01-17 05:05:12
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I want to be able to get the string from the JFrame . This is because the title of the JFrame is not constant and is dependent on variables. Is there a way to assign to a string variable the text of the title? private void submitButtonActionPerformed(java.awt.event.ActionEvent evt) { if(super.checkifEmptyFields

How to Limit the Length of the Title Tag using PHP

落爺英雄遲暮 提交于 2020-01-16 00:42:11
问题 I want to limit the character count of automatically generated page titles in php. Can you come up with any php or jquery code that can do this for me, with me just entering the character count maximum I want in page titles (70 characters)? 回答1: What about something like this? <title><?php echo substr( $mytitle, 0, 70 ); ?></title> 回答2: This is what substr is often used for. <title><?php print substr($title, 0, 70); ?></title> 回答3: You can use this simple truncate() function: function