directory

webpack require.Context功能作用

余生长醉 提交于 2020-03-28 20:53:40
1.require 1.1完整路径的require语句: require('tools'); //preset alias tools require('./js/main'); 1.2带表达式的 require 语句:自动创建一个上下文(context) 如果你的 require参数含有表达式(expressions),会自动创建一个上下文(context),因为在编译时(compile time)并不清楚具体是哪一个模块被导入。 如: require('./template/' + name + '.ejs'); webpack 解析 require() 的调用,提取出来如下这些信息: Directory: ./template Regular expression: /^.*\.ejs$/ 会返回template目录下的所有后缀为.ejs模块的引用,包含子目录: { "./table.ejs": 42, "./table-row.ejs": 43, "./directory/folder.ejs": 44 } 2.require.context:手动创建一个上下文(context) require.context(directory, useSubdirectories = false, regExp = /^\.\//); directory:指定要打包的目录;

AD恢复误删除账号

六月ゝ 毕业季﹏ 提交于 2020-03-27 23:17:59
在删除 Active Directory 对象时,这些对象会被存放在“已删除对象”容器中。默认情况下,不显示 CN=Deleted Objects 容器。   Domain Admins 中的成员身份或同等身份是完成此过程所需的最低要求。 LDP管理工具 一、准备实验环境   本实验将首先删除一个用户帐户,然后再使用LDP工具进行恢复。该帐户的DN(distinguishedName)为:CN=PatColeman,OU=employees,OU=User Accounts,DC=contoso,DC=com 二、启用LDP 在DC服务器上打开“命令提示符”,输入:LDP 绑定一个帐户。   若要连接并绑定到承载 AD DS 环境的林根域的服务器,请单击“连接”下的“连接”,然后单击“绑定”。 加载控件   在“选项”菜单中,单击“控制”。   在“控制”对话框中,展开“预定义加载”下拉菜单,单击“返回已删除对象(Return deleted objects)”,然后单击“确定”。 查看AD树。   依次单击“查看”、“树”。 <mydomain> 和 <com> 表示 AD DS 环境对应的林根域名   在 BaseDN 中从下拉列表中选择或者键入 DC=<mydomain>,DC=<com>,其中 <mydomain> 和 <com> 表示 AD DS 环境对应的林根域名 三

Python 3.5 OS.Walk for selected folders and include their subfolders

大城市里の小女人 提交于 2020-03-26 07:54:08
问题 I'm writing a python script where I search a specific string across a tree directory. I ask the end-user to define which folders they would like to include in the search, and once the script finds one of the folders that the user would like to scan, the script is supposed to also scan all the sub-folders for this selected folder. I'm trying to do a couple of for loops, but I can't get it to work. The beginning of the script looks like: startTime = datetime.datetime.now() option = input("Do

linux Samba搭建

限于喜欢 提交于 2020-03-25 06:16:06
关闭防火墙和SElinux systemctl stop firewalld setenforce 0 1.安装samba应用 systemctl start smb nmb 2.启动Samba应用 systemctl start smb nmb 3.查看Samba服务进程 ps -ef | grep -E 'smb | nmb' 4.查看Samba应用服务端口 netstat -tunlp | grep -E 'smbd|nmbd' 创建文件夹 cd / mkdir storage mkdir logger shared ls 创建用户 useradd -s /sbin/nologin logadmin useradd -s /sbin/nologin admin useradd -g admin -s /sbin/nologin shared cat /etc/passwd 6建立Samba用户 smbpasswd -a logadmin smbpasswd -a admin smbpasswd -a shared 7.更改目录属性 chown logadmin.logadmin logger chown admin.admin shared chmod -R 777 logger chmod -R 777 shared 8.配置Samba服务 vim /etc/samba

Lucene 初识

柔情痞子 提交于 2020-03-24 14:20:45
因为业务需要,虽然自己不是专门写搜索的,但是需要自己拼一些搜索条件去调用搜索的接口,而之前看的JVM crash里也涉及到了Lucene,所以大概了解一下。 参考文档: http://www.iteye.com/topic/839504 http://www.cnblogs.com/xing901022/p/3933675.html 一、Lucene简介 Lucene 是一个基于 Java 的全文信息检索工具包,它不是一个完整的搜索应用程序,而是为你的应用程序提供索引和搜索功能。Lucene 目前是 Apache Jakarta 家族中的一个开源项目。也是目前最为流行的基于 Java 开源全文检索工具包。 目前已经有很多应用程序的搜索功能是基于 Lucene 的,比如 Eclipse 的帮助系统的搜索功能。Lucene 能够为文本类型的数据建立索引,所以你只要能把你要索引的数据格式转化的文本的,Lucene 就能对你的文档进行索引和搜索。比如你要对一些 HTML 文档,PDF 文档进行索引的话你就首先需要把 HTML 文档和 PDF 文档转化成文本格式的,然后将转化后的内容交给 Lucene 进行索引,然后把创建好的索引文件保存到磁盘或者内存中,最后根据用户输入的查询条件在索引文件上进行查询。不指定要索引的文档的格式也使 Lucene 能够几乎适用于所有的搜索应用程序。

外部表External table

有些话、适合烂在心里 提交于 2020-03-23 04:27:02
外部表External table 把一个普通的文本格式的OS文件看作是Oracle数据库的外部表,Oracle可以象普通表一样进行select 操作,可以建视图,可以与其他进行连接等,但不能对其进行DML操作,即该表是只读的!(10g里可借此导出数据至平面dmp文件)。 External table和正规的表很相似,以下的几点需要注意: l 数据在数据库的外部组织,是操作系统文件。  l 操作系统文件在数据库中的标志是通过一个逻辑目录来映射的。     l 数据是只读的。(外部表相当于一个只读的虚表)  l 不可以在上面运行任何DML操作,不可以创建索引。   l 可以查询操作和连接,可以并行操作。 假设如下的两个平面文件     1.dat: 7301,SMITH,CLERK,7902,17-DEC-80,100,0,20 7402,ALLEN,SALESMAN,7698,20-FEB-81,250,0,30 7503,WARD,SALESMAN,7698,22-FEB-81,450,0,30 7504,JONES,MANAGER,7839,02-APR-81,1150,0,20  2.dat: 7611,MARTIN,SALESMAN,7698,28-SEP-81,1250,0,30 7612,BLAKE,MANAGER,7839,01-MAY-81,1550,0,30

laravel 5 change app directory to match namespace [closed]

时间秒杀一切 提交于 2020-03-18 11:54:06
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago . If you want to rename your app folder this is just one of several ways to go about it. 1) run php artisan app:name YourNamespace 2) rename your app folder to YourNamespace 3) in your bootstrap folder create a file called application.php 4) paste this in there class Application extends Illuminate

Linux System Programming 学习笔记(八) 文件和目录管理

…衆ロ難τιáo~ 提交于 2020-03-17 07:15:39
1. 文件和元数据 每个文件都是通过inode引用 ,每个inode索引节点都具有文件系统中唯一的inode number 一个inode索引节点是存储在Linux文件系统的磁盘介质上的物理对象,也是LInux内核通过数据结构表示的实体 inode存储相关联文件的元数据 ls -i 命令获取文件的inode number /* obtaining the metadata of a file */ #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> int stat (const char *path, struct stat *buf); int fstat (int fd, struct stat *buf); int lstat (const char *path, struct stat *buf); 注意:lstat函数可以获取 符号链接的文件元数据,lstat() returns information about the link itself and not the target file struct stat { dev_t st_dev; /* ID of device containing file */ ino_t st_ino; /* inode number */ mode

oracle自动备份

冷暖自知 提交于 2020-03-17 01:38:01
本文章详细介绍备份过程中遇到的坑。 导出: expdp vids/vids123 @orclvids directory=dpdata dumpfile=db20200311214001.dmp logfile=20200311214001.log 删除线部分非必须,可以不要 导出常见错误: 连接到: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production ORA-39002: 操作无效 ORA-39070: 无法打开日志文件。 ORA-29283: 文件操作无效 ORA-06512: 在 "SYS.UTL_FILE", line 536 ORA-29283: 文件操作无效 错误原因:目录授权问题,如果备份目录是自定义目录,必须拥有oracle用户的权限和权限组。这种情况在root和oracle用户混用的情况下比较常见 解决: #备份目录查询(目录拥有者都在sys下,需要对expdp导出用户进行授权) select * from dba_directories; #创建并授权 create directory dpdata as '/data/backup/'; grant create any directory to vids; 导入: impdp vids/vids123@xe

Varnish 安装部署

跟風遠走 提交于 2020-03-16 17:49:52
准备环境:Centos 7 关闭防火墙、修改 seLinux 为警告模式 [root@fp-21 ~]# systemctl stop firewalld.service [root@fp-21 ~]# setenforce 0 安装所属依赖 [root@fp-21 ~]# yum -y install autoconf.noarch automake.noarch jemalloc-devel.x86_64 libedit-devel.x86_64 libtool.x86_64 ncurses-devel.x86_64 pcre-devel.x86_64 pkgconfig.x86_64 python-docutils.noarch python-sphinx.noarch graphviz.x86_64 Loaded plugins: fastestmirror Determining fastest mirrors …… Complete! 上传源码包 [root@fp-21 ~]# cd /opt/ [root@fp-21 opt]# mkdir varnish [root@fp-21 opt]# cd varnish [root@fp-21 opt]# rz [root@fp-21 varnish]# ls varnish-6.3.2.tgz 查看一下这个包的类型