PHP中有没有办法访问压缩的RTF并将RTF代码输出到浏览器?
我在SQL中有一个文本列,我想从中提取RTF - 我已设法将数据输出为0x1F8B
我相信这个数据是压缩的RTF - http://www.freeutils.net/source/jtnef/rtfcompressed.jsp
使用[MS-OXRTFCP]:RTF格式(RTF)压缩算法http://msdn.microsoft.com/en-us/library/cc463890%28v=exchg.80%29
样本数据 :
0x1F8B0800000000000000654E316EC3300CEC5CA07FE0D6AD909D1628E0A1C8D01F74E422CB94CD46A11C4A6E5018F97B6967EC72381EC9BB5B516B6CD04BE11DC23C36ED5B8B03C5E8364C5EC6C61D0E2BC62CB5F6C988C358AE5C0AC6592F2DC630792D541D1C957DEA6E76D260144EFF57B7A7C715434E59CD0A3A541A1C8E4A240EFBB490EBEC027F98AE2796E11597D0E0EC75C013D1BC8360F1EF0EC316B115695BF89A08CE390B70816ABC571EA74AA542EEBF295460D975642B069F5EEBF45C6CB27707E5F4FBB14558EC1D83D9EEEC28D9BE142E8B59719697BB6C051FFE00D09796A337010000
Run Code Online (Sandbox Code Playgroud)
这看起来像我想要的,但它在VB中http://www.vbforums.com/attachment.php?attachmentid=87371&d=1326754610
我有一个具有以下表格的数据库,但我没有办法解密它
DATA, TYPE, FILE TYPE, SIZE, DOC TYPE
0x15234324 , Word.Document.8 ,DOC, 19968, WORD.DOCUMENT.8
Run Code Online (Sandbox Code Playgroud)
该字段似乎包含存储在SQL Server IMAGE列中的word文档
有没有人遇到过这种情况或以可读格式提取这些数据?
到目前为止,我已经尝试使用PHP来提取文件并将其写入word文档,但没有太多运气.
更新:我现在有Visual Studio Express,想要一种提取这些数据并保存到word文档的方法
UPDATE2:这就是我在VB中的功能
Imports System.Data.SqlClient
Imports System.IO
Public Class Form1
Private Shared Function RetrieveFile(ByVal filename As String) As Byte()
Dim connection As New SqlConnection("Server=sqlsrv;database=database;Trusted_Connection=Yes;")
Dim command As New SqlCommand("select data from objects where object_ref in (select data from parts where object_ref =239804)", connection)
command.Parameters.AddWithValue("test", filename)
connection.Open()
Dim reader As SqlDataReader = command.ExecuteReader(System.Data.CommandBehavior.SequentialAccess)
reader.Read()
Dim memory As New …Run Code Online (Sandbox Code Playgroud) 这个列表对我很有用,但<li>元素中的文本不是居中的.
在<li>小号必须自动调整其内容.
#nav-menu {
font-family: Verdana, Arial, Helvetica, sans-serif;
height: 30px;
background-image: url(../img/menu_bg.png);
background-repeat: repeat-x;
border-bottom: dotted thin #666666;
border-top: dotted thin #666666;
text-align: center;
width: 800px;
}
#nav-menu ul {
list-style: none;
padding: 0;
margin: auto 0;
}
#nav-menu li {
float: left;
border-right: dotted thin #666666;
list-style: none;
padding: 0.5em 2em 0.5em 0.75em;
}
#nav-menu li a {
line-height: 1.5em;
color: #333333;
text-decoration: none;
font-size: 12px;
font-weight: bold;
display: block;
}Run Code Online (Sandbox Code Playgroud)
<div id="nav-menu">
<ul> …Run Code Online (Sandbox Code Playgroud)我的特定模式的grep -c命令返回文件,如下所示
A:2
B:6
c:1
d:9
Run Code Online (Sandbox Code Playgroud)
现在我想根据此命令对文件进行排序.所以我的最终操作将是
c:1
A:2
B:6
d:9
Run Code Online (Sandbox Code Playgroud)
如何使用grep和排序?
我有一个表中的数据看起来像这样(值得注意的是它不是CSV分离)
它需要分成单个字符
Data
abcde
Run Code Online (Sandbox Code Playgroud)
想把它转换成这个
Data
a
b
d
c
e
Run Code Online (Sandbox Code Playgroud)
我在互联网上看了但没有找到答案
我有一个父母表看起来像这样
CHILD_ID | PARENT_ID | NAME
1 | Null | Bill
2 | 1 | Jane
3 | 1 | Steve
4 | 2 | Ben
5 | 3 | Andrew
Run Code Online (Sandbox Code Playgroud)
我喜欢得到这样的结果集
Bill
---Jane
------Ben
---Steve
------Andrew
Run Code Online (Sandbox Code Playgroud)
我知道我需要做一个排名查询来排名水平和自我加入,但我能在网上找到的只是CTE递归
我以前在Oracle中完成了这个,但在MS SQL中没有
我有一个跟踪表,看起来像这样

我想获得一个看起来像以下输出的运行总计 - 保留订单非常重要 - 因为这是存储的部分的执行顺序 - 它将帮助我分析系统中的瓶颈

我试过了
select max(RowNumber),objectname, count(1) from rob
where eventclass = 42
group by objectname
Run Code Online (Sandbox Code Playgroud)
但这破坏了秩序
这在SQL中是否可行?
更新:我试过这个
select RowNumber,objectname, count(1) from rob
where eventclass = 42
group by objectname,RowNumber
order by RowNumber
Run Code Online (Sandbox Code Playgroud)
但是这个(因为查询非常正确地说rownumber的组(必须有它按顺序排列))
我想将 mattext 节点重命名为 text,但保留其属性和所有子节点/属性
输入 XML
<material>
<mattext fontface="Tahoma">
<p style="white-space: pre-wrap">
<font size="11">Why are the astronauts in the video wearing special suits? (Select two)</font>
</p>
</mattext>
</material>
Run Code Online (Sandbox Code Playgroud)
输出
<material>
<text fontface="Tahoma">
<p style="white-space: pre-wrap">
<font size="11">Why are the astronauts in the video wearing special suits? (Select two)</font>
</p>
</text>
</material>
Run Code Online (Sandbox Code Playgroud)
我使用了以下 xsl:
<xsl:template name="content">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<!-- Build stem -->
<xsl:template match="mattext">
<text>
<!-- Option text -->
<xsl:call-template name="content"/>
</text>
</xsl:template>
Run Code Online (Sandbox Code Playgroud)
但它不保留初始 fontface 属性,并且似乎输出剥离标签的纯文本