url

MOSS开发知识积累

有些话、适合烂在心里 提交于 2020-01-21 03:29:42
SPListCollection转Datatable SPListItemCollection unprocessedItems = List.GetItems(query); DataTable dt1 = unprocessedItems.GetDataTable(); Folder类型添加自定义属性 mySite = new SPSite("http://richsql/"); myWeb = mySite.RootWeb; SPDocumentLibrary spDoc = myWeb.Lists["JackDocuments"] as SPDocumentLibrary; SPContentTypeCollection spcontents = spDoc.ContentTypes; string strCTName = string.Empty; foreach (SPContentType spContextType in spcontents) { if (spContextType.Name == "Folder") { spContextType.Sealed = false; spContextType.Update(); } } Sealed 属性设置成false就可以了. 多行文本取出换行 Replace(""r"n", "<br/>") 识别为垃圾邮件

HttpClient使用详解

霸气de小男生 提交于 2020-01-21 03:15:43
HttpClient的主要功能: 实现了所有 HTTP 的方法(GET、POST、PUT、HEAD、DELETE、HEAD、OPTIONS 等) 支持 HTTPS 协议 支持代理服务器(Nginx等)等 支持自动(跳转)转向 等等 引入依赖 <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient --> <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> <version>4.5.5</version> </dependency> 使用详解 1. get方法 public class GetUtils { //无参方式 public void get(String url) { getWithParams(url, new HashMap<>()); } //有参方式 public void getWithParams(String url, Map<String, Object> params) { CloseableHttpClient httpClient = HttpClientBuilder.create().build();

backgroundImage 路径问题 vue 图片的引入方式

旧巷老猫 提交于 2020-01-21 03:14:07
自:https://blog.csdn.net/MoLvSHan/article/details/78204972 自:https://blog.csdn.net/qq_35393869/article/details/80333564 项目中图片都放在src/img文件夹,img和background-image引用都用相对路径,即../../这种形式 在打包build的设置路径assetsPublicPath: ‘./‘,然后那些没有转成base64的背景图都失效了,,路径。 处理方法: 使用require引入图片 img标签 <img :src="require('assets/img/header/search.png')"> 背景图 <div :style="{backgroundImage:'url('+require('assets/img/common/bg.png')+')'}"></div> <span :style="{backgroundImage:'url('+require('../../assets/image/accounts/dayily.png')+')'}"> 也可以下面这种方式去写: 在前端开发中,background-image属性非常常见,有很多时候需要使用内联样式来绑定此属性,但是在vue-cli项目中

Find out Page Tab URL from Page ID and application ID

萝らか妹 提交于 2020-01-21 01:46:05
问题 I'm building a Facebook app that can be installed on Pages (a Page Tab app), and would like to redirect my users to their Page Tabs, knowing only the app ID, and the Page ID. Let's say for example that my app is installed on this page: http://www.facebook.com/coldplay whose ID is 15253175252 , and my app ID is 174314562666399 . I know I can access the Page using only its numerical ID: http://facebook.com/15253175252 redirects to the Coldplay page. And I can access the Page Tab with this URL:

How can I cut a substring from a string to the end using Javascript?

青春壹個敷衍的年華 提交于 2020-01-21 01:41:51
问题 I have a url: http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe I want to get the address after the last dash using javascript: dashboard.php?page_id=projeto_lista&lista_tipo=equipe 回答1: You can use indexOf and substr to get the sub-string you want: //using a string variable set to the URL you want to pull info from //this could be set to `window.location.href` instead to get the current URL var strIn = 'http://localhost/40ATV/dashboard.php?page_id=projeto_lista

How can I cut a substring from a string to the end using Javascript?

荒凉一梦 提交于 2020-01-21 01:41:47
问题 I have a url: http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe I want to get the address after the last dash using javascript: dashboard.php?page_id=projeto_lista&lista_tipo=equipe 回答1: You can use indexOf and substr to get the sub-string you want: //using a string variable set to the URL you want to pull info from //this could be set to `window.location.href` instead to get the current URL var strIn = 'http://localhost/40ATV/dashboard.php?page_id=projeto_lista

分布式session

青春壹個敷衍的年華 提交于 2020-01-21 01:17:59
什么是session session的官方定义是:Session:在计算机中,尤其是在网络应用中,称为“会话控制”。Session 对象存储特定用户会话所需的属性及配置信息。 说白了session就是一种可以维持服务器端的数据存储技术。session主要有以下的这些特点: 1. session保存的位置是在服务器端 2. session一般来说是要配合cookie使用,如果是浏览器禁用了cookie功能,也就只能够使用URL重写来实现session存储的功能 3. 单纯的使用session来维持用户状态的话,那么当同时登录的用户数量较多的时候,或者存在较多的数量的session会导致查询慢的问题 本质上:session技术就是一种基于后端有别于数据库的临时存储数据的技术 分布式session实现方式 tomcat+redis方案 方便,但是与tomcat容器重耦合 使用 session 的代码,跟以前一样,还是基于 tomcat 原生的 session 支持即可,然后就是用一个叫做 Tomcat RedisSessionManager 的东西,让所有我们部署的 tomcat 都将 session 数据存储到 redis 即可。 Spring session+redis 给 sping session 配置基于 redis 来存储 session 数据,然后配置了一个 spring

python提取url中的所有中文字符

戏子无情 提交于 2020-01-21 01:15:27
以“冠心病”百科首页为例: 复制url后,由于我们没有进行任何处理,此时javascript请求URL并传参数存在中文时,对URL的中文参数进行编码是按照浏览器机制进行编码的,此时编码存在乱码问题。 # -*- coding: UTF-8 -*- import re from urllib.request import quote, unquote # 冠心病百科url url = 'https://baike.baidu.com/item/%E5%86%A0%E7%8A%B6%E5%8A%A8%E8%84%89%E7%B2%A5%E6%A0%B7%E7%A1%AC%E5%8C%96%E6%80%A7%E' \ '5%BF%83%E8%84%8F%E7%97%85/2252719?fromtitle=%E5%86%A0%E5%BF%83%E7%97%85&fromid=547914&fr=aladdin' h = unquote(url, encoding='utf-8') # 解码,将url中转码的中文字符解码 pattern = re.compile("[^\u4e00-\u9fa5]") # 模式匹配所有中文字符 m = re.sub(pattern, '', h) # 将模式外的所有字符用空代替,即非中文字符 print(m) 运行结果: 来源: https://www

网站结构优化

拈花ヽ惹草 提交于 2020-01-21 01:07:21
前言 网站结构的第二意义指的是链接结构,或称为逻辑结构,也就是网站内部链接形成的链接的网络图。 对于搜索引擎来说更重要的是链接结构,而不是物理结构: 收录容易与否在于页面处于链接结构的什么位置,离首页有几次点击距离,而不是它的目录层次 禁止收录机制 要确保页面不被收录,需要使用robots文件或Meta Robots标签。 搜索引擎蜘蛛就相当于一个禁用了Cookies的浏览器 搜索引擎蜘蛛就相当于一个禁用了Cookies的浏览器,强制使用Cookies只能造成搜索引擎蜘蛛无法正常访问。 动态URL应尽量避免,因为它不利于搜索引擎蜘蛛爬行 动态URL指的是数据库驱动的网站所生成的、带有问好、等号及参数的网址。一般来说动态URL不利于搜索引擎蜘蛛爬行,应尽量避免。 尽量不要使用301转向以外的跳转 除了301转向以外,搜索引擎对其他形式的跳转都比较敏感,如302跳转、Flash跳转、JavaScript跳转、Meta Refresh跳转。 URL设计 1、URL越短越好 2.避免太多参数 3.目录层次尽量少 4、URL中包含关键词 连词符使用: 连词符使用是目录或文件中单词间一般建议使用短横线(-)分隔,不要使用下划线或其他更奇怪的字母。搜索引擎把URL中的短横线当作空格处理,下划线则被忽略。 所以文件名seo-tools.html将被正确读取出seo与tools两个单词

MVC MVC 路由详解

◇◆丶佛笑我妖孽 提交于 2020-01-20 23:39:41
在项目中我们引用了System.Web.Routing; Routing的作用: 确定Controller 确定Action 确定其他参数 根据识别出来的数据, 将请求传递给Controller和Action. Global.asax中 在App_Start目录中的RouteConfig.cs文件 注册一条路由规则 name 参数:  规则名称, 可以随意起名.不可以重名, 否则会发生错误,路由集合中已经存在名为 “Default” 的路由。 路由名必须是唯一的。 url 参数:  url获取数据的规则, 这里不是正则表达式, 将要识别的参数括起来即可, 比如: {controller}/{action} defaults 参数:  url参数的默认值. 我们只建立了一条url获取数据规则: {controller}/{action}  那么这时就会为action参数设置defaults参数中规定的默认值. new { controller = "Home", action = "Index" } 多条路由规则 RouteDebug.dll RouteDebug.dll调试类库放入packages包下,packages文件夹下包含项目用到的所有第三方库。 然后添加引用RouteDebug.dll到项目中。 在Global.asax.cs注册路由之后添加代码: