Dokuwiki 二次开发记录

【转】http://www.syyong.com/other/Dokuwiki-Secondary-Development-Record.html

DokuWiki 是一种在 GPLv2 下获得许可并以 PHP 编程语言编写的 wiki 应用程序。 它适用于纯文本文件,因此不需要数据库。它的语法与 MediaWiki 使用的语法类似。

DokuWiki 具有丰富的插件,如Markdown、sidebar、流程图、时序图、svg、数学公式、ToDo等等这些实用的插件。

但由于直接安装 DokuWiki 和使用她的插件,对有些地方和样式不是很满意。如 Markdown 插件存在 bug,样式风格过于传统,登录方式需要自定义等。由于这些问题的存在,也就需要在源码的基础上做些配置和二次开发。

下载安装Dokuwiki

https://www.dokuwiki.org/

安装插件

  1. SVG-Edit plugin
  2. DokuWiki Upgrade
  3. Wrap Plugin
  4. Sequencediagram plugin
  5. Plugin: Numbered Headings
  6. Note Plugin
  7. Move plugin
  8. MathJax plugin
  9. PHP Markdown Extra plugin
  10. Indexmenu Plugin
  11. imgpaste plugin
  12. Gallery Plugin
  13. Flowchartjs Plugin
  14. S5 Slideshow Plugin
  15. edittable plugin
  16. color syntax plugin
  17. ToDo
  18. Copy Page Plugin
  19. Page Redirect
  20. Remove irrelevant entries from the change history
  21. Searchindex Manager
  22. CSV Plugin
  23. ShortURL Plugin

data目录名支持中文

inc/pageutils.php

# utf8_encodeFN()
// $file = urlencode($file);
// $file = str_replace('%2F','/',$file);
return $file;
# utf8_decodeFN()
// return urldecode($file);
return $file;

配置管理器

DokuWiki 设置

  1. title: 聚美wiki
  2. 语言:zh
  3. 高级设置:自动检查更新关闭

显示设置

toptoclevel -> 1
tocminheads -> 1
maxtoclevel -> 3
maxseclevel -> 3

Mathjax配置

plugin»mathjax»url

// 先从网上下载MathJax到指定目录.
/lib/plugins/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML.js

plugin»mathjax»config

MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ["\\$","\\$"] ],
displayMath: [ ["\\$\\$","\\$\\$"] ],
processEscapes: true
}
});

Indexmenu

生成管理左侧目录树。

添加sidebar页面,内容为:

{{indexmenu>..#1|js navbar}}

Markdownextra

lib/plugins/markdownextra/action.php

if (preg_match('/^---\s*\n(.*?\n?)^---\s*$\n?(.+)/sm',$event->data, $match)){
$event->data = preg_replace('/^---\s*\n(.*?\n?)^---\s*$\n?/sm', "</markdown>\n\\1<markdown>\n" ,$event->data, -1);
$event->data = "<markdown>\n".$event->data."\n</markdown>";
$event->data = preg_replace('/^<markdown>\s*\n*<\/markdown>\s*$\n?/sm', "" ,$event->data);
}else{
$event->data = "<markdown>\n".$event->data."\n</markdown>";
}

lib/plugins/markdownextra/syntax.php

Warning: DOMDocument::loadHTML(),加上 @ 屏蔽报错

解决解析md时概率性出错问题

1)inc/parserutils.php -> p_cached_instructions():

$isMD = strtolower(substr($file, -7)) === '.md.txt';
if (!$isMD && ($cacheonly || $cache->useCache() || (isset($run[$file]) && !defined('DOKU_UNITTEST')))) {
return $cache->retrieveCache();
} else {
if (file_exists($file)) {
// no cache - do some work
$ins = p_get_instructions(io_readWikiPage($file, $id));
if (!$isMD) {
if ($cache->storeCache($ins)) {
$run[$file] = true; // we won't rebuild these instructions in the same run again
} else {
msg('Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.', -1);
}
}
return $ins;
}
}

2)inc/parserutils.php -> p_cached_output():

# 130
+ $isMD = strtolower(substr($file, -7)) === '.md.txt';
* if (!$isMD && $cache->useCache()) {

其他修改文件

  1. lib/plugins/markdownextra/lib/meltdown/js/jquery.meltdown.js
  2. lib/plugins/markdownextra/lib/meltdown/css/meltdown.css
  3. lib/plugins/markdownextra/lib/meltdown-tweaks/meltdown-tweaks.js
  4. lib/plugins/markdownextra/lib/meltdown-tweaks/meltdown-tweaks.css
  5. lib/scripts/editor.js

svgedit

lib/plugins/svgedit/script.js

* var svgeditor_path = DOKU_BASE+'lib/plugins/svgedit/svg-edit/'; //offline

网上下载embedapi.js文件放到 lib/plugins/svgedit/svg-edit/ 目录下。

外部链接新tab打开

在conf/local.php加上:

$conf['target']['extern'] = '_black';

copypage

修改图片顺序

修改右侧“页面复制”按钮的顺序由默认的倒数第一变为倒数第二。

lib/plugins/copypage/action.php

public function add_tool_button(Doku_Event &$event, $param) {
$newitem = '<li>' .
'<a href="#" class="action copypage copypageplugin__copy" rel="nofollow">' .
'<span>' .
$this->getLang('copypage') .
'</span>' .
'</a>' .
'</li>';
$offset = count($event->data['items']) - 1;
$event->data['items'] =
array_slice($event->data['items'], 0, $offset, true) +
array('copypage' => $newitem) +
array_slice($event->data['items'], $offset, null, true);
}

添加中文翻译

进入 lib/plugins/copypage/lang

cp -r en zh

修改lang.php

<?php
$lang['copypage'] = '页面复制';
$lang['js']['enter_page_id'] = "输入新文档地址";
$lang['js']['different_id_required'] = '不能和当前文档重名.';

S5

可添加一个自定义的模板,自定义样式。

imgpaste

图片粘贴后默认是wiki语法,如果是Markdown类型的文档则需要做兼容性支持:

lib/plugins/imgpaste/script.js

// insert syntax and close dialog
success: function (data) {
$box.find('.content').addClass('success').text(data.message);
var _id = getUrlParam('id');
if (_id == null || _id.substr(-3, 3).toLowerCase() != '.md') {
insertAtCarret('wiki__text', '{{ :' + data.id + ' |}}');
} else {
insertAtCarret('wiki__text', '![Title](/lib/exe/fetch.php?media=' + data.id + ')');
}
$box.delay(500).fadeOut(500, function () {
$box.dialog('destroy').remove()
});
},

配置设置

管理 -> 模板样式设置

  1. 全站的宽度 :100em
  2. 侧边栏的宽度 :18em

修改样式

1、lib/scripts/editor.js

300px -> 550px;

2、conf目录下添加userstyle.css文件:

.dokuwiki div.page, .dokuwiki .pageId span, pre.code, pre, code {
box-shadow: none;
} .dokuwiki .group p, .dokuwiki li, .dokuwiki dd {
line-height: 1.7;
} .dokuwiki div.page {
border: 1px solid #a7d7f9;
font-size: 15px;
padding: 1.556em 1.5em 1.5em;
} #dokuwiki__pagetools {
top: 2.5em;
} div.mode_edit #dokuwiki__header, div.mode_preview #dokuwiki__header, div.mode_draft #dokuwiki__header, div.mode_recover #dokuwiki__header {
display: none;
} div.mode_edit #dokuwiki__content div.page, div.mode_preview #dokuwiki__content div.page, div.mode_draft #dokuwiki__content div.page, div.mode_recover #dokuwiki__content div.page {
padding: 10px 0px 0px 0px;
background: inherit;
border: 0px;
} div.mode_edit #dokuwiki__footer, div.mode_preview #dokuwiki__footer, div.mode_draft #dokuwiki__footer, div.mode_recover #dokuwiki__footer {
display: none;
} div.mode_edit .dokuwiki.hasSidebar div.preview, div.mode_preview div.preview, div.mode_draft div.preview, div.mode_recover div.preview {
border-right: 0px;
background: #fff;
} div.mode_edit .dokuwiki.hasSidebar div.preview, div.mode_preview div.preview .pad, div.mode_draft div.preview .pad, div.mode_recover div.preview .pad {
padding-left: 5px;
padding-right: 5px;
} div.mode_edit textarea, div.mode_preview textarea, div.mode_draft textarea, div.mode_recover textarea {
padding-left: 5px;
padding-right: 5px;
} div.mode_edit #edbtn__save, div.mode_preview #edbtn__save, div.mode_draft #edbtn__save, div.mode_recover #edbtn__save {
background: #4285f4;
border: 1px solid #4285f4;
color: #fff;
} div.mode_edit div.docInfo, div.mode_preview div.docInfo, div.mode_draft div.docInfo, div.mode_recover div.docInfo {
display: none;
} div.mode_edit button, div.mode_preview button, div.mode_draft button, div.mode_recover button {
padding: .1em 1.5em;
} div.mode_edit #dokuwiki__pagetools, div.mode_preview #dokuwiki__pagetools, div.mode_draft #dokuwiki__pagetools, div.mode_recover #dokuwiki__pagetools {
top: 6em;
} html, body {
background: #fbfaf9;
-webkit-font-smoothing: antialiased;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
} a:link, a:visited, a:hover, a:active {
color: #4183c4
} form.search {
display: inline-block; /*float: left;*/
} #dokuwiki__header .tools li#site_home_l {
float: left;
margin-left: 0px;
font-size: 20px;
font-weight: bold;
margin-top: -6px;
} div.mode_show #dokuwiki__content div.page pre.code, div.mode_edit #dokuwiki__content div.page pre.code {
background: #f6f8fa;
border: 0px;
font-size: 14px;
} div.mode_show #dokuwiki__content div.page code {
font-size: 14px;
} div.mode_show #dokuwiki__content div.page pre, div.mode_edit #dokuwiki__content div.page pre {
background: #f6f8fa;
border: 0px;
box-shadow: none;
} .dokuwiki dl.code dt, .dokuwiki dl.file dt {
background: #f6f8fa;
border: 0px;
} div.mode_show p code {
padding: 3px;
} div.mode_show p a {
padding: 0 3px;
} .dokuwiki .page ul li, .dokuwiki .aside ul li, .dokuwiki .page ol li, .dokuwiki .aside ol li {
color: #333;
} .dokuwiki .fc_flowchartjs {
overflow: auto;
background: #f6f8fa;
} #dokuwiki__site .wrapper {
margin-top: -10px;
} form.search input {
padding: .35em 22px .35em 0.5em;
border: 1px solid #a7d7f9;
box-shadow: none;
} code {
background: #f6f8fa;
} .code .re0 {
color: #008;
} strong, b {
color: #555;
} .mode_preview #dokuwiki__content div.preview {
border: 1px solid #a7d7f9;
padding: 1.556em 1.5em 1.5em;
margin: 0 0 0 0;
} .mode_preview #dokuwiki__content div.preview div.pad {
margin: 0px;
padding: 0px;
} #dw__toc {
margin: -1.556em -1em .5em 1.4em;
} pre.code, pre, code {
border: 0px;
background: #f6f8fa;
font-size: 14px;
} #dokuwiki__usertools {
position: inherit;
} #dokuwiki__header .headings, #dokuwiki__header .tools {
width: 100%;
margin-bottom: 5px;
margin-top: 0px;
} #dokuwiki__header {
padding: 1em 0 1.5em;
} #size__ctl img {
margin-left: 10px;
} fieldset {
border-radius: 5px;
} fieldset input {
padding: 3px;
} #wiki__text {
height: 500px;
} .dokuwiki .editBar .summary input.missing {
background-color: #fff;
} #TZT {
display: none;
} .dokuwiki div.toolbar {
margin-top: .5em;
} .dokuwiki .wrapper {
margin-bottom: 0px;
} #wiki__editbar .summary span, #draft__status {
color: #555;
font-size: 13px;
} table tbody tr:hover {
background: #f6f8fa
} div.export {
background: #fff;
padding: 10px;
} div.export #dw__toc {
margin-top: 0px;
} #dokuwiki__content ul li {
list-style: disc;
} #dokuwiki__content ul li ul li {
list-style: circle;
} #dokuwiki__content #dw__toc ul li {
list-style: circle;
} #dokuwiki__content div.meltdown_bar ul li {
list-style: none;
} #dokuwiki__content div.diagram {
margin-bottom: 1.5em;
} #dokuwiki__content div.flowchartjs {
overflow: auto;
background: #f6f8fa;
} .noteclassic, .noteimportant, .notewarning, .notetip {
border-radius: 0px;
} #dokuwiki__content h1,#dokuwiki__content h2{
border-bottom: 1px solid #eaecef;
padding-bottom: 0.3em;
} .dokuwiki .plugin_wrap{
overflow: auto;
} ul, ol{
padding: 0 0 0 0;
}
.dtree{
font-size:13px;
}
.dokuwiki a.wikilink1{
color:#08c;
}
del{
color:#808080;
}
span.todohlght:hover{
background: #eee;
border-radius: 3px;
}
div.mode_show p a{
display: inline-block;
}
.mode_search dl.search_results dt{
color: #999;
font-size:small;
}
dl.search_results dt a.wikilink1{
color: #609;
font-size: 18px;
}
.mode_search dl.search_results dd{
color: #000;
font-size:small;
margin: 0 0 26px 0;
}
.mode_search .search_results strong.search_hit{
color: #dd4b39;
background: none;
}
.mode_search .page h1.sectionedit1,.mode_search .page div.level1 p{
display: none;
}
.dokuwiki div.search_quickresult ul li{
width: 24em;
}
.dokuwiki div.editbutton_table form div.no button, .dokuwiki div.editbutton_table form div.no input.button{
background: #fefefe;
border: 1px solid #eee;
margin-left:0px;
}
.noteclassic, .noteimportant, .notewarning, .notetip{
min-height: auto;
}
blockquote{
color: #6a6a6a;
} .dokuwiki .pageId {
float: left;
margin-top: 0px;
padding-left: 0px;
position: absolute;
width: 5em;
padding: 5px 0;
} .dokuwiki .pageId #short-url{
margin-top: -10px;
width: 10px;
height: 12px;
border:#fff 0px solid;
background: #fff;
color: #fff;
margin-left: 2px;
} .dokuwiki .pageId #copy-url-btn {
width: 5em;
height: 20px;
line-height: 20px;
position: absolute;
left: 1px;
top: 1px;
background: #eee;
color: #08c;
border: 0;
border-radius: 0 0 5px 0;
font-size: 13px;
padding: 0px;
}

3、lib/tpl/dokuwiki/tpl_header.php 改为:

<?php
/**
* Template header, included in the main and detail files
*/ // must be run from within DokuWiki
if (!defined('DOKU_INC')) {
die();
}
?> <!-- ********** HEADER ********** -->
<div id="dokuwiki__header">
<div class="pad group">
<?php tpl_includeFile('header.html') ?>
<div class="tools group">
<!-- USER TOOLS -->
<?php if ($conf['useacl']): ?>
<div id="dokuwiki__usertools"> <h3 class="a11y"><?php echo $lang['user_tools']; ?></h3>
<ul>
<li id="site_home_l">
<?php
tpl_link(
wl(),
$conf["title"]
);
?>
</li>
<li><?php tpl_searchform(); ?></li>
<?php
if (!empty($_SERVER['REMOTE_USER'])) {
echo '<li class="user">';
tpl_userinfo(); /* 'Logged in as ...' */
echo '</li>';
}
tpl_toolsevent('usertools', array(
tpl_action('recent', true, 'li', true),
tpl_action('media', true, 'li', true),
tpl_action('index', true, 'li', true),
tpl_action('admin', true, 'li', true),
tpl_action('profile', true, 'li', true),
tpl_action('register', true, 'li', true),
//tpl_action('login', true, 'li', true)
));
if ($_SERVER['REMOTE_USER']) {
tpl_toolsevent('usertools', array(
tpl_action('login', true, 'li', true)
));
}
?>
<?php
function get_current_url(){
$current_url='http://';
if(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']=='on'){
$current_url='https://';
}
if($_SERVER['SERVER_PORT']!='80'){
$current_url.=$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
}else{
$current_url.=$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
}
return $current_url;
}
if (empty($_SERVER['REMOTE_USER'])) {
echo '<li><a href="https://auth.xxx.com/api/login/?camefrom=dokuwiki&login_url='.rawurlencode(get_current_url()).'" class="action login" rel="nofollow" title="登录">登录</a></li>';
}
?>
</ul>
</div>
<?php endif ?>
</div> <!-- BREADCRUMBS -->
<?php if ($conf['breadcrumbs'] || $conf['youarehere']): ?>
<div class="breadcrumbs">
<?php if ($conf['youarehere']): ?>
<div class="youarehere"><?php tpl_youarehere() ?></div>
<?php endif ?>
<?php if ($conf['breadcrumbs']): ?>
<div class="trace"><?php tpl_breadcrumbs() ?></div>
<?php endif ?>
</div>
<?php else: ?>
<div class="breadcrumbs">
</div>
<?php endif ?> <hr class="a11y"/>
</div>
</div><!-- /header -->

4、lib/tpl/dokuwiki/css/content.less

.dokuwiki.hasSidebar div.preview -> border-right:0px;
[dir=rtl] .dokuwiki.hasSidebar div.preview -> border-left:0px; .dokuwiki table.inline tr:hover td {
* //background-color: @ini_background_alt;
} .dokuwiki table.inline tr:hover th {
//background-color: @ini_border;
}

5、lib/tpl/dokuwiki/main.php

<!--<div class="pageId"><span><?php echo hsc($ID) ?></span></div>-->

6、lib/tpl/dokuwiki/css/mobile.less

#dokuwiki__aside > .pad, [dir=rtl] #dokuwiki__aside > .pad
border: 1px solid #a7d7f9;
/* box-shadow: 0 0 .5em @ini_text_alt;*/

7、inc/html.php

if(false && $wr && $conf['license']){...}

8、lib/tpl/dokuwiki/css/basic.less

address {
margin: 0 0 0.85em 0; /* bottom margin = line-height */
padding: 0;
}

短链

安装 ShortURL Plugin 插件 修改 lib/tpl/dokuwiki/main.php

# 61
function copyShortUrl() {
var obj = document.getElementById("short-url");
obj.select();
document.execCommand("Copy");
document.getElementById("copy-url-btn").innerText = "已复制";
}
</script>
<?php
$shorturl =& plugin_load('helper', 'shorturl');
if ($shorturl) {
$shortID = $shorturl->autoGenerateShortUrl($ID);
$schema = $_SERVER['HTTPS'] ? 'https://' : 'http://';
$shortUrl = $schema . $_SERVER['HTTP_HOST'] . '/' . $shortID;
echo "<div class=\"pageId\">";
echo "<input type=\"text\" id=\"short-url\" value=\"{$shortUrl}\">";
echo "<button id=\"copy-url-btn\" onclick=\"copyShortUrl()\">复制短链</button>";
echo "</div>";
}
?>

修改index.php

# 开头加上
$shortId = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';
if(preg_match('/\/[a-z0-5]{6}/', $shortId)) {
header("Location: /x.php?id=" . $shortId);
exit;
}

自定义注册 & 登录支持

案例:在根目录下新加 login.php 文件,内容为:

<?php
define('AUTH_APP_KEY', 'xxx');
define('DEFAULT_USER_PASS', '123456');
define('LOGIN_TOKEN_SALT', 'xxx'); if (isset($_GET['_ltoken']) && isset($_GET['username']) && isset($_GET['fullname']) && isset($_GET['mail'])) {
$token = md5($_GET['username'] . $_GET['fullname'] . $_GET['mail'] . LOGIN_TOKEN_SALT);
if ($token != $_GET['_ltoken']) {
exit('Login token verify failed!');
}
$userInfo = array(
'username' => $_GET['username'],
'fullname' => rawurldecode($_GET['fullname']),
'mail' => $_GET['mail'],
);
} else {
if (!isset($_REQUEST['token']) || !isset($_REQUEST['username'])) {
exit('Paramater invalid.');
}
$sessionId = md5($_REQUEST['token'] . AUTH_APP_KEY . $_REQUEST['username']);
$resp = file_get_contents('https://auth.xxx.com/api/info/?session_id=' . $sessionId);
$userInfo = @json_decode($resp, true);
if (!isset($userInfo['username']) || !isset($userInfo['fullname']) || !isset($userInfo['mail'])) {
exit($resp);
}
}
$username = $userInfo['username'];
$fullname = $userInfo['fullname'];
$mail = $userInfo['mail'];
$_POST['u'] = $username;
$_POST['p'] = DEFAULT_USER_PASS;
$_SERVER['REQUEST_METHOD'] = 'post';
//========Doku======== if (!defined('DOKU_INC')) {
define('DOKU_INC', dirname(__FILE__) . '/');
} // define all DokuWiki globals here (needed within test requests but also helps to keep track)
global $ACT, $INPUT, $QUERY, $ID, $REV, $DATE_AT, $IDX, $DATE, $RANGE, $HIGH, $TEXT, $PRE, $SUF, $SUM, $INFO, $JSINFO; $ACT = 'login';
// load and initialize the core system
require_once(DOKU_INC . 'inc/init.php');
// check user exists.
$authplain = new auth_plugin_authplain();
// user not exists & create a new user.
if ($authplain->getUserData($username) == false) {
if ($authplain->createUser($username, DEFAULT_USER_PASS, $fullname, $mail, 'user') == null) {
exit('Login failed(MESSAGE:write user infomation to file failed;CODE:1024)...');
}
$query = array(
'username' => $username,
'fullname' => rawurlencode($fullname),
'mail' => $mail,
'_ltoken' => md5($username . rawurlencode($fullname) . $mail . LOGIN_TOKEN_SALT)
);
$location = '/login.php?' . http_build_query($query, null, '&');;
header('Location: ' . $location);
} //import variables.
$id = 'sitemap';
if (!empty($_REQUEST['login_url'])) {
$urlArr = parse_url(rawurldecode($_REQUEST['login_url']));
if (!empty($urlArr['query'])) {
$tArr = explode('&', $urlArr['query']);
foreach ($tArr as $param) {
$tItem = explode('=', $param);
if (count($tItem) == 2 && $tItem[0] == 'id') {
$id = $tItem[1];
break;
}
}
}
}
//$INPUT->set('id', str_replace("\xC2\xAD", '', $INPUT->str('id')));
$INPUT->set('id', str_replace("\xC2\xAD", '', $id));
$QUERY = trim($INPUT->str('id'));
$ID = getID();
$INFO = pageinfo(); // No event data
$tmp = array();
trigger_event('DOKUWIKI_STARTED', $tmp); //close session
session_write_close(); //do the work (picks up what to do from global env)
act_dispatch(); $tmp = array(); // No event data
trigger_event('DOKUWIKI_DONE', $tmp);

其他

  1. inc/lang/{zh,en}/edit.txt \ 内容清空.

Dokuwiki 二次开发记录的更多相关文章

  1. OBS-Studio二次开发记录

    OBS-Studio 是一款跨平台的,开源的视频直播客户端软件. 公司需要对他进行二次开发,开发的目的是使用它的录屏功能. 开发的要求是:定制全新的界面,所见即所得,window系统兼容要好. 开发步 ...

  2. jquery easyui根据需求二次开发记录

    1.tree需要显示多个图标 实际需求:设备树上节点需搁三个图片,分别标识运行状态.告警状态.设备类型 解决方法:给tree的iconCls传入一个数组,分别是各状态下的class(css),然后要改 ...

  3. (dede)织梦系统二次开发笔记

    (dede)织梦系统二次开发记录 --soulsjie 一.模板常用文件说明 模板文件都在文件夹templets下,我们以默认模板(default)为例,对模板文件结构进行分析: 首页模板文件目录 \ ...

  4. NopCommerce上二次开发 触发器记录

    最近要在NopCommerce上二次开发. 开发也就算了,该项目的架构设计很好,但性能不可谓不低. 扯远了,为了保持项目以后升级顺利,开次开发不允许在原项目基础上大改,只能以插件形式开发…… 因一个功 ...

  5. 23 Pro/E二次开发中的问题记录

    0 引言 由于项目中涉及到Pro/E的二次开发技术,因此在边用边学的情况下,解决了不少问题,也积攒了不少问题.其中有些问题可能不是调个函数就能搞定的,得了解CAD底层的东西. 1 问题描述 (1)CA ...

  6. CozyRSS开发记录9-快速实现一个RSS解析器

    CozyRSS开发记录9-快速实现一个RSS解析器 1.再读RSS标准 既然需要自己实现一个RSS解析器,那自然需要仔细的读一读RSS的标准文档.在网上随便找了两份,一份英文一份中文: http:// ...

  7. 蓝凌OA二次开发手册

    1.蓝凌OA表单前端调用后台数据 一.后台存储过程: create procedure sp_test @ftext nvarchar(50) as begin select @ftext as '测 ...

  8. 关于FlexPaper 2.1.2版本 二次开发 Logo 、打印、搜索、缩略图、添加按钮、js交互、右键菜单、书签等相关问题

    2015-03-02 更新文章,由于需求修改,更改了flexpaper插件,故增加第9.10.11小节,下载代码时请注意. 先废话几句.最近用到文档在线浏览功能,之前用的是print2flash(一个 ...

  9. Android VLC播放器二次开发1——程序结构分析

    最近因为一个新项目需要一个多媒体播放器,所以需要做个视频.音频.图片方面的播放器.也查阅了不少这方面的资料,如果要从头做一个播放器工作量太大了,而且难度也很大.所以最后选择了VLC作为基础,进行二次开 ...

随机推荐

  1. C++11中std::move的使用

    std::move is used to indicate that an object t may be "moved from", i.e. allowing the effi ...

  2. cgi、fastcgi、php-cgi、php-fpm的关系

    1. CGI CGI全称是"公共网关接口"(Common Gateway Interface),HTTP服务器与你的或其它机器上的程序进行"交谈"的一种工具,其 ...

  3. iOS开发中常见的一些异常

    iOS开发中常见的异常包括以下几种NSInvalidArgumentExceptionNSRangeExceptionNSGenericExceptionNSInternallnconsistency ...

  4. 「日常训练」 Soldier and Traveling (CFR304D2E)

    题意 (CodeForces 546E) 对一个无向图,给出图的情况与各个节点的人数/目标人数.每个节点的人只可以待在自己的城市或走到与他相邻的节点. 问最后是否有解,输出一可行解(我以为是必须和答案 ...

  5. bam文件测序深度统计-bamdst

    最近接触的数据都是靶向测序,或者全外测序的数据.对数据的覆盖深度及靶向捕获效率的评估成为了数据质量监控中必不可少的一环. 以前都是用samtools depth 算出单碱基的深度后,用perl来进行深 ...

  6. nginx初探,下载安装配置负载均衡

    上一篇我讲了正向代理和反向代理的概念,这个是为nginx做准备的前置技能,网上百度nginx可以知道nginx是什么: Nginx是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/PO ...

  7. 阿里云SLB漏选“健康检查正常的http状态码”导致url重定向失败问题处理

    背景:           一客户将线下电商网站迁移到阿里云上,公网出口使用阿里云SLB,SLB后端实例为ECS(webserver)web服务使用nginx.后端APP服务器使用了tomcat:to ...

  8. 寻找完全数(C++)

    [问题描述] 输入一个大于 1 的正整数 n,请你将大于 1 和小于或等于 n 的所有完全数输出.所谓完全数就是因子(不算其本身)之和等于它本身的数.例如 1+2+4+7+14=28,所以 28 是完 ...

  9. http长连接和短连接以及连接的本职

    HTTP长连接和短连接原理浅析 本文主要讲了,http长连接本质是tcp的长连接. 网络通信过程中,建立连接的本质是什么? 连接的本质 建立连接这个词,是从早期的电话系统中来的,那个时候,“建立连接” ...

  10. exec族

    在之前我们已经知道用fork创建子进程后执行的是和父进程相同的程序(但有可能执行不同的代码分支),子进程往往要调用一种exec函数以执行另一个程序.当进程调用一种exec函数时,该进程的用户空间代码和 ...