doc

Use PHP to create a DOC file on a Unix Box based on an HTML webform selection

拥有回忆 提交于 2019-12-02 09:36:25
I have an HTML file which contains a webform with multiple questions which have a YES / NO responses. If the question has a YES answer, I would like a predefined ( per question ) section of text to be written to a DOC file on the server, but only AFTER the submit button has been pressed ( this way, if the user changes their mind and changes an answer form YES to NO, I won't have to re-write the doc ). When the user has clicked Submit, The file should be presented as a download. Any Ideas jochil you only have to link your html form to some script (php, jsp, ...) like this <form action="

linux rpm包,安装路径查看及改变rpm包默认安装路径

倾然丶 夕夏残阳落幕 提交于 2019-12-02 09:10:19
查看: easwy:~$ rpm -qpl ext3grep-0.10.0-1.el5.rf.i386.rpm   /usr/bin/ext3grep   /usr/share/doc/ext3grep-0.10.0   /usr/share/doc/ext3grep-0.10.0/INSTALL   /usr/share/doc/ext3grep-0.10.0/LICENSE.GPL2   /usr/share/doc/ext3grep-0.10.0/NEWS   /usr/share/doc/ext3grep-0.10.0/README 改变: rpm -i --relocate /usr/bin=/home/easwy/bin --relocate /usr/share/doc=/home/easwy/doc ext3grep-0.10.0-1.el5.rf.i386.rpm 现在,ext3grep就会被安装到/home/easwy/bin目录中了。   以上就是Linux修改RPM安装目录的方法了,如果你没有root权限,无法把RPM安装在默认目录下,就可以用这个方法修改RPM安装目录。 RPM默认安装路径: /etc 一些设置文件放置的目录如/etc/crontab /usr/bin 一些可执行文件 /usr/lib 一些程序使用的动态函数库 /usr/share/doc

Elasticsearch 快速入门

感情迁移 提交于 2019-12-02 05:01:12
Elasticsearch 是一个分布式的 RESTful 风格的搜索和数据分析引擎。 查询 : Elasticsearch 允许执行和合并多种类型的搜索 — 结构化、非结构化、地理位置、度量指标 — 搜索方式随心而变。 分析 : 找到与查询最匹配的十个文档是一回事。但是如果面对的是十亿行日志,又该如何解读呢?Elasticsearch 聚合让您能够从大处着眼,探索数据的趋势和模式。 速度 : Elasticsearch 很快。真的,真的很快。 可扩展性 : 可以在笔记本电脑上运行。 也可以在承载了 PB 级数据的成百上千台服务器上运行。 弹性 : Elasticsearch 运行在一个分布式的环境中,从设计之初就考虑到了这一点。 灵活性 : 具备多个案例场景。数字、文本、地理位置、结构化、非结构化。所有的数据类型都欢迎。 HADOOP & SPARK : Elasticsearch + Hadoop 准备开始 Elasticsearch是一个高度可伸缩的开源全文搜索和分析引擎。它允许您快速和接近实时地存储、搜索和分析大量数据。 这里有一些使用Elasticsearch的用例: 你经营一个网上商店,你允许你的顾客搜索你卖的产品。在这种情况下,您可以使用Elasticsearch来存储整个产品目录和库存,并为它们提供搜索和自动完成建议。 你希望收集日志或事务数据

Elasticsearch 快速开始

一笑奈何 提交于 2019-12-02 04:58:31
Elasticsearch 是一个分布式的 RESTful 风格的搜索和数据分析引擎。 查询 : Elasticsearch 允许执行和合并多种类型的搜索 — 结构化、非结构化、地理位置、度量指标 — 搜索方式随心而变。 分析 : 找到与查询最匹配的十个文档是一回事。但是如果面对的是十亿行日志,又该如何解读呢?Elasticsearch 聚合让您能够从大处着眼,探索数据的趋势和模式。 速度 : Elasticsearch 很快。真的,真的很快。 可扩展性 : 可以在笔记本电脑上运行。 也可以在承载了 PB 级数据的成百上千台服务器上运行。 弹性 : Elasticsearch 运行在一个分布式的环境中,从设计之初就考虑到了这一点。 灵活性 : 具备多个案例场景。数字、文本、地理位置、结构化、非结构化。所有的数据类型都欢迎。 HADOOP & SPARK : Elasticsearch + Hadoop 准备开始 Elasticsearch是一个高度可伸缩的开源全文搜索和分析引擎。它允许您快速和接近实时地存储、搜索和分析大量数据。 这里有一些使用Elasticsearch的用例: 你经营一个网上商店,你允许你的顾客搜索你卖的产品。在这种情况下,您可以使用Elasticsearch来存储整个产品目录和库存,并为它们提供搜索和自动完成建议。 你希望收集日志或事务数据

create word doc file from linux command line

喜欢而已 提交于 2019-12-02 03:25:06
I have some HTML files that I need to distribute in MS Word doc format (don't ask!). I can manually open each in OpenOffice and then save as a doc file. But I have quite a few files so I want to automate this. Do you know a way? Havn't tested but there is pyuno package to access OpenOffice API and following program show some ways to do like that. ooextract.py A command line tool, that extracts the text, html or pdf content from a StarWriter document and writes it to a different file or (optionally) prints it to stdout (grep your office documents). Abiword can convert files from the command

java doc/docx文档转PDF 加水印

允我心安 提交于 2019-12-01 19:35:35
本文实例讲述了java实现word文档转pdf并添加水印的方法。分享给大家供大家参考,具体如下: 前段时间,项目需要将上传的Word文档在浏览器浏览,思来想去,把word文档转成pdf就好了,于是乎研究了一下。 将word文档转化为PDF是项目中常见的需求之一,目前主流的方法可以分为两大类,一类是利用各种Office应用进行转换,譬如Microsoft Office、WPS以及LiberOffice,另一种是利用各种语言提供的对于Office文档读取的接口(譬如Apache POI,jacob,docx4j,openoffice),这些要么收费,要么要装插件,要么转换之后样式走形,乱码等等。 我使用Aspose.Words for Java 可以导出复杂WORD PDF HTML 多种数据格式 官方下载地址: http://www.aspose.com/java/word-component.aspx 我所用的版本是aspose-words-14.9.0-jdk16。分享给大家: 链接: https://pan.baidu.com/s/1xt7P9YFjoHmPCzQHJV65Xg&shfl=sharepset 提取码:1zdt 废话不多说,直接上代码: /** * * @param originalFile doc文件 * @param toFilePath 文件夹路径 *

Convert docx, doc to base64 android

夙愿已清 提交于 2019-12-01 14:00:14
I am trying to get the docx file as shown below public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (resultCode == MainActivity.RESULT_OK) { if (resultCode == RESULT_OK) { // Get the Uri of the selected file Uri uri = data.getData(); String uriString = uri.toString(); File myFile = new File(uriString); String path = myFile.getAbsolutePath(); filepath =path; String displayName = null; if (uriString.startsWith("content://")) { Cursor cursor = null; try { cursor = this.getContentResolver().query(uri, null, null,

Android Display .Doc File in WebView?

青春壹個敷衍的年華 提交于 2019-12-01 12:24:23
In my app,I have link http://mymobilece.com/api/api_getexammaterials.php?id=28 , I want to view in webview ,I try with google document viewer its work fine But i need it without google document viewer,How to show it?? Hardik Gajjar you can use the js for google Doc viever myScript="<html><iframe src='http://docs.google.com/gview? url='http://mymobilece.com/api/api_getexammaterials.php? id=28'&embedded='true' style='width:600px; height:500px;' frameborder='0'></iframe></html>" mWebView = (WebView) findViewById(R.id.webview); mWebView.getSettings().setJavaScriptEnabled(true); mWebView.loadData

Android Display .Doc File in WebView?

我只是一个虾纸丫 提交于 2019-12-01 12:00:22
问题 In my app,I have link http://mymobilece.com/api/api_getexammaterials.php?id=28, I want to view in webview ,I try with google document viewer its work fine But i need it without google document viewer,How to show it?? 回答1: you can use the js for google Doc viever myScript="<html><iframe src='http://docs.google.com/gview? url='http://mymobilece.com/api/api_getexammaterials.php? id=28'&embedded='true' style='width:600px; height:500px;' frameborder='0'></iframe></html>" mWebView = (WebView)

pdfkit

一曲冷凌霜 提交于 2019-12-01 09:56:16
官方文档 0、准备 需要引入两个包,首先要 npm install pdfkit 安装pdfkit包 const PDF = require('pdfkit'); const fs = require('fs'); 通过下面方法创建pdf对象,如果没有传入任何的参数,默认自动创建第一页,页面大小为A4 doc = new PDF(); 通过管道流创建名为 test.pdf 的文件 doc.pipe(fs.createWriteStream('test.pdf')); 写入内容 doc.text('test') 结束写入,生成文件 doc.end() 1、页面和文本设置 首先要解决的问题就是页面的设置了,在这里我们要求的是16:9的页面比例,而并非默认的A4纸的页面。 创建对象,取消生成第一页 doc = new PDF({ autoFirstPage: false }); 添加页面,设置页面大小 doc.addPage({ margin: 10, size: [960,540] }); 设置中文字体,支持中文 此时,需要有一个本地中文文件,在 C:\Windows\Fonts 中可以找到,这里使用的是微软雅黑 doc.font('../WeiRuanYaHei-1.ttf'); 在输入文本前,创建文件流 doc.pipe(fs.createWriteStream('test.pdf