prefix

Remove “d1p1” namespace prefix in DataContractSerializer XML output

会有一股神秘感。 提交于 2019-12-04 01:23:30
I'm using DatacontractSerializer to serialize my domainModel into a xml file. I'm getting output like below. <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="1" xmlns:d1p1="DCSerialization_IGITApproach" i:type="d1p1:X" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/"> <d1p1:Name z:Id="2">Ankit</d1p1:Name> <d1p1:PointsDictionary xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" z:Id="3" z:Size="1"> <d2p1:KeyValueOfstringPointsArrayq9VX7VJJ> <d2p1:Key z:Id="4">key1</d2p1:Key> <d2p1:Value xmlns:d4p1="http://schemas.datacontract.org/2004/07

sorting list in python

烂漫一生 提交于 2019-12-04 00:49:52
问题 if I have a list of strings e.g. ["a143.txt", "a9.txt", ] how can I sort it in ascending order by the numbers in the list, rather than by the string. I.e. I want "a9.txt" to appear before "a143.txt" since 9 < 143 . thanks. 回答1: It's called "natural sort order", From http://www.codinghorror.com/blog/2007/12/sorting-for-humans-natural-sort-order.html Try this: import re def sort_nicely( l ): """ Sort the given list in the way that humans expect. """ convert = lambda text: int(text) if text

常用命令及操作;

此生再无相见时 提交于 2019-12-03 23:53:54
(一 )windows完全杀死nginx进程的命令; taskkill /fi "imagename eq nginx.EXE" /f (二)服务器后台运行jar文件(两种方式,linux下推荐第一种;windows下推荐第二种; nohup java -jar -Dspring.profiles.active=test -Dserver.port=8080 ###.jar >payment.log & nohup java -jar --spring.profiles.active=test --server.port=8080 ###.jar >payment.log & tail -f 日志文件 (实时查看日志) (三)安装NPM时使用全局目录 配置全局目录(注:目录中间尽量不要出现空格,尤其是使用命令设置的时候) 1.cmd命令,重启无效 npm config set prefix "D:\Program Files\Nodejs\node_global" npm config set cache "D:\Program Files\Nodejs\node_cache" 2.修改npm文件夹下的npmrc文件,打开修改里面的内容,原来的内容删掉,写入 prefix=D:\Program Files\Nodejs\node_global cache=D:\Program

How can I change the Prefix Mapping in a Git-Svn Repository?

﹥>﹥吖頭↗ 提交于 2019-12-03 17:35:26
问题 I've created a Git Clone of a SVN repository using git-svn. When doing this I specified the --prefix option to prefix my remote branches. I now want to get rid of this prefix. Is there a way to update or remove the prefix without re-cloning the repository? Essentially I did the initial clone using --prefix=Project so I ended up with Project/trunk and Project/feature-branch as my remote tracking branches. What I want is to have the trunk just be called trunk and the feature-branch be called

mybatis-动态sql-trim、where、set

主宰稳场 提交于 2019-12-03 17:14:45
1. where标签的作用:如果该标签包含的元素中有返回值,就插入一个where;如果where后面的字符是以AND和OR开头的,就讲他们剔除。 int findUserByWhere(@Param("name") String name, @Param("phone") String phone); <select id="findUserByWhere" resultType="User"> SELECT * FROM user <where> <if test="name != null and name != ''"> AND name LIKE concat('%', #{name}, '%') </if> <if test="phone !=null and phone !=''"> OR phone=#{phone} </if> </where> </select> 如果两个if条件不满足的时候,where标签包着的这一段代码就会被剔除掉,在SQL中就不会出现这一段代码。 2.set标签的作用:如果该标签包含的元素中有返回值,就插入一个set;如果set后面的字符串是以逗号结尾的,就将这个逗号剔除。 int updateUser(@Param("user") User user); <update id="updateUser"> UPDATE user <set>

LAMP的源码编译安装

纵然是瞬间 提交于 2019-12-03 15:00:34
LAMP源码编译安装 实验环境 lamp server:Centos7 192.168.10.121 client:Windows10 192.168.10.1 环境配置 关闭防火墙 关闭selinux 源码包下载 Mariadb-10.2 Apache(HTTPD-2.4.33) download PHP-7.2.5 download wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz wget http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz wget http://archive.apache.org/dist/httpd/httpd-2.4.33.tar.gz wget http://mirrors.neusoft.edu.cn/mariadb//mariadb-10.2.14/source/mariadb-10.2.14.tar.gz wget http://us1.php.net/distributions/php-7.2.5.tar.bz2 依赖包安装(需要连外网与配置yum环境) yum groups mark convert(groupinstall失败时执行该命令) yum groupinstall "Development Tools"

pch文件的创建

三世轮回 提交于 2019-12-03 11:33:21
在开发中,我们常用pch文件来把一些常用的量放在一块,便于整个项目中各个文件都能够使用这些量,pch文件配置如下: 1 在xcode工程中,创建pch文件: 2、修改buildsetting配置文件 在搜索框里输入prefix搜索一下,比较好找 (1)将绿色部分,也就是Precompile Prefix Header的值设置为YES (2)修改Prefix Header的路径: 注意: 要使用相对路径,使用相对路径可以在不同电脑设备上运行而不因为路径的问题报错;如果使用绝对路径,将是当前电脑中的路径,当运行到其他电脑时,由于电脑名称的不同,导致路径查找不到而错误,因此必须使用相对路径$(SRCROOT) + pch文件名.pch(注意$(SRCROOT)只得到当前工程目录下的路径,这个路径 + pch文件在该工程目录下的具体路径才构成完整的需要的绝对路 径,pch文件在该工程目录下的具体路径才构成完整的需要的绝对路径对不同的工程是不一样的,要自己看看,可以在绝对路径中去除 $(SRCROOT)获得路径就是pch文件在该工程下的具体路径 查看绝对路径的方法:教一个方法:打开终端。将项目中的.pch文件拖入到终端中即可。然后复制路径--填写到项目。或者直接拖动pch文件到路径输入框中即可看到 来源: oschina 链接: https://my.oschina.net/u

postgresql-12编译安装

放肆的年华 提交于 2019-12-03 11:24:19
postgresql-12编译安装 1 准备环境 修改yum源 mkdir -p /etc/yum.bak mv /etc/yum.repos.d/* /etc/yum.bak/ &&\ curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo &&\ curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo &&\ yum clean all &&\ yum makecache 安装基础安装包 yum install -y readline-devel zlib-devel make gcc 创建组和用户 groupadd postgres useradd -g postgres -G postgres -d /home/postgresql postgres 将安装包放在/opt 路径中并解压 tar xf /opt/postgresql-12.0.tar.gz -C /home/postgresql/postgresql-12.0 2 编译安装 编译 cd /home/postgresql/postgresql-12.0 ./configure --prefix=

源码编译安装httpd

时间秒杀一切 提交于 2019-12-03 10:54:26
Linux安装软件采用源码编译安装灵活自由,适用于不同平台,维护也十分方便。 源码编译的安装方式一般由3个步骤组成: 1、配置(configure) 2、编译(make) 3、安装(make install) 第一步,上传httpd的安装包: 第二步:检查是否安装gcc 如果没有安装,需要先安装gcc yum –y install gcc yum –y install gcc-c++ 第三步:解压 :tar -xvf apr-1.6.3.tar.gz 第四步:进入刚才解压的目录 第四步:执行命令 ./configure -prefix=/usr/local/apr 安装最后如果出现如下报错: 解决方法: 编辑configure文件 vi configure 搜索 cfgfile 把该行进行注释,如下图 修改完成之后 :wq保存 重新执行 ./configure -prefix=/usr/local/apr 第五步: 执行make 命令 输入 make 最后出现如下即成功 第六步:执行make install 命令 输入 make install 编译安装apr-uril,如下: 8.1.解压:tar -xvf apr-util-1.5.1.tar.gz 8.2.切换目录: 8.3.配置:./configure -prefix=/usr/local/apr-util -with

Can I configure Jena Fuseki with inference and TDB?

匿名 (未验证) 提交于 2019-12-03 09:05:37
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I want to configure Fuseki with an inference model supported by TDB. I have been able to configure it with a Memory Model, but not with a TDB Model where I could update triples. I am using the following assembler description: @prefix tdb : < http : //jena.hpl.hp.com/2008/tdb#> . @prefix rdf : < http : //www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs : < http : //www.w3.org/2000/01/rdf-schema#> . @prefix ja : < http : //jena.hpl.hp.com/2005/11/Assembler#> . @prefix tdb : < http : //jena.hpl.hp.com/2008/tdb#> . [] ja :