当前位置: 首页>>代码示例>>PHP>>正文


PHP p_locale_xhtml函数代码示例

本文整理汇总了PHP中p_locale_xhtml函数的典型用法代码示例。如果您正苦于以下问题:PHP p_locale_xhtml函数的具体用法?PHP p_locale_xhtml怎么用?PHP p_locale_xhtml使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了p_locale_xhtml函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: p_wiki_xhtml

/**
 * Returns the parsed Wikitext in XHTML for the given id and revision.
 *
 * If $excuse is true an explanation is returned if the file
 * wasn't found
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 */
function p_wiki_xhtml($id, $rev = '', $excuse = true, $date_at = '')
{
    $file = wikiFN($id, $rev);
    $ret = '';
    //ensure $id is in global $ID (needed for parsing)
    global $ID;
    $keep = $ID;
    $ID = $id;
    if ($rev || $date_at) {
        if (@file_exists($file)) {
            $ret = p_render('xhtml', p_get_instructions(io_readWikiPage($file, $id, $rev)), $info, $date_at);
            //no caching on old revisions
        } elseif ($excuse) {
            $ret = p_locale_xhtml('norev');
        }
    } else {
        if (@file_exists($file)) {
            $ret = p_cached_output($file, 'xhtml', $id);
        } elseif ($excuse) {
            $ret = p_locale_xhtml('newpage');
        }
    }
    //restore ID (just in case)
    $ID = $keep;
    return $ret;
}
开发者ID:yjliugit,项目名称:dokuwiki,代码行数:34,代码来源:parserutils.php

示例2: handle_ajax_call

 /**
  * Preview Comments
  *
  * @author Michael Klier <chi@chimeric.de>
  */
 function handle_ajax_call(&$event, $params)
 {
     if ($event->data != 'discussion_preview') {
         return;
     }
     $event->preventDefault();
     $event->stopPropagation();
     print p_locale_xhtml('preview');
     print '<div class="comment_preview">';
     if (!$_SERVER['REMOTE_USER'] && !$this->getConf('allowguests')) {
         print p_locale_xhtml('denied');
     } else {
         print $this->_render($_REQUEST['comment']);
     }
     print '</div>';
 }
开发者ID:nickharambee,项目名称:plugin-discussion,代码行数:21,代码来源:action.php

示例3: hide

 /**
  * @param Doku_Event $event
  * @param array $param
  */
 function hide(Doku_Event &$event, $param)
 {
     if (!$this->hlp->isActive()) {
         return;
     }
     if (!$this->hlp->isHiddenForUser()) {
         return;
     }
     global $ACT;
     if (!in_array($ACT, array('show', 'edit', 'source', 'diff'))) {
         return;
     }
     $ACT = 'denied';
     $event->preventDefault();
     $event->stopPropagation();
     print p_locale_xhtml('denied');
 }
开发者ID:hefanbo,项目名称:dokuwiki-plugin-publish,代码行数:21,代码来源:hide.php

示例4: p_wiki_xhtml_summary

/**
 * Returns starting summary for a page (e.g. the first few
 * paragraphs), marked up in XHTML.
 *
 * If $excuse is true an explanation is returned if the file
 * wasn't found
 *
 * @param string wiki page id
 * @param reference populated with page title from heading or page id
 * @deprecated
 * @author Harry Fuecks <hfuecks@gmail.com>
 */
function p_wiki_xhtml_summary($id, &$title, $rev = '', $excuse = true)
{
    $file = wikiFN($id, $rev);
    $ret = '';
    //ensure $id is in global $ID (needed for parsing)
    global $ID;
    $keep = $ID;
    $ID = $id;
    if ($rev) {
        if (@file_exists($file)) {
            //no caching on old revisions
            $ins = p_get_instructions(io_readWikiPage($file, $id, $rev));
        } elseif ($excuse) {
            $ret = p_locale_xhtml('norev');
            //restore ID (just in case)
            $ID = $keep;
            return $ret;
        }
    } else {
        if (@file_exists($file)) {
            // The XHTML for a summary is not cached so use the instruction cache
            $ins = p_cached_instructions($file);
        } elseif ($excuse) {
            $ret = p_locale_xhtml('newpage');
            //restore ID (just in case)
            $ID = $keep;
            return $ret;
        }
    }
    $ret = p_render('xhtmlsummary', $ins, $info);
    if ($info['sum_pagetitle']) {
        $title = $info['sum_pagetitle'];
    } else {
        $title = $id;
    }
    $ID = $keep;
    return $ret;
}
开发者ID:Harvie,项目名称:dokuwiki,代码行数:50,代码来源:parserutils.php

示例5: handle_ajax_call

 /**
  * Handles the AJAX calls
  *
  * @author Michael Klier <chi@chimeric.de>
  */
 function handle_ajax_call(&$event, $param)
 {
     global $lang;
     if ($event->data == 'snippet_preview' or $event->data == 'snippet_insert') {
         $event->preventDefault();
         $event->stopPropagation();
         $id = cleanID($_REQUEST['id']);
         if (page_exists($id)) {
             if ($event->data == 'snippet_preview') {
                 if (auth_quickaclcheck($id) >= AUTH_READ) {
                     print p_wiki_xhtml($id);
                 } else {
                     print p_locale_xhtml('denied');
                 }
             } elseif ($event->data == 'snippet_insert') {
                 if (auth_quickaclcheck($id) >= AUTH_READ) {
                     print "\n\n";
                     // always start on a new line (just to be safe)
                     print trim(preg_replace('/<snippet>.*?<\\/snippet>/s', '', io_readFile(wikiFN($id))));
                 }
             }
         }
     }
 }
开发者ID:houshuang,项目名称:folders2web,代码行数:29,代码来源:action.php

示例6: startEditForm

function startEditForm(&$renderer, $erase = true)
{
    global $DOKUTRANSLATE_EDITFORM;
    global $DOKUTRANSLATE_NEST;
    global $ACT;
    global $TEXT;
    # Insert saved edit form
    $renderer->doc .= '<div class="preview" id="scroll__here">';
    $renderer->doc .= $DOKUTRANSLATE_EDITFORM;
    # Render preview from submitted text (the saved page may look different
    # if dokutranslate markup is present in the text)
    if ($ACT == 'preview') {
        $renderer->doc .= p_locale_xhtml('preview');
        $DOKUTRANSLATE_NEST++;
        $previewIns = p_get_instructions($TEXT);
        $DOKUTRANSLATE_NEST--;
        $renderer->nest($previewIns);
    }
    $renderer->doc .= '</div>';
    if ($erase) {
        # Insert erasure start marker
        $renderer->doc .= '<!-- DOKUTRANSLATE ERASE START -->';
    }
}
开发者ID:nextghost,项目名称:Dokutranslate,代码行数:24,代码来源:syntax.php

示例7: tpl_subscribe

/**
 * Display the subscribe form
 *
 * @author Adrian Lang <lang@cosmocode.de>
 */
function tpl_subscribe()
{
    global $INFO;
    global $ID;
    global $lang;
    global $conf;
    $stime_days = $conf['subscribe_time'] / 60 / 60 / 24;
    echo p_locale_xhtml('subscr_form');
    echo '<h2>' . $lang['subscr_m_current_header'] . '</h2>';
    echo '<div class="level2">';
    if ($INFO['subscribed'] === false) {
        echo '<p>' . $lang['subscr_m_not_subscribed'] . '</p>';
    } else {
        echo '<ul>';
        foreach ($INFO['subscribed'] as $sub) {
            echo '<li><div class="li">';
            if ($sub['target'] !== $ID) {
                echo '<code class="ns">' . hsc(prettyprint_id($sub['target'])) . '</code>';
            } else {
                echo '<code class="page">' . hsc(prettyprint_id($sub['target'])) . '</code>';
            }
            $sstl = sprintf($lang['subscr_style_' . $sub['style']], $stime_days);
            if (!$sstl) {
                $sstl = hsc($sub['style']);
            }
            echo ' (' . $sstl . ') ';
            echo '<a href="' . wl($ID, array('do' => 'subscribe', 'sub_target' => $sub['target'], 'sub_style' => $sub['style'], 'sub_action' => 'unsubscribe', 'sectok' => getSecurityToken())) . '" class="unsubscribe">' . $lang['subscr_m_unsubscribe'] . '</a></div></li>';
        }
        echo '</ul>';
    }
    echo '</div>';
    // Add new subscription form
    echo '<h2>' . $lang['subscr_m_new_header'] . '</h2>';
    echo '<div class="level2">';
    $ns = getNS($ID) . ':';
    $targets = array($ID => '<code class="page">' . prettyprint_id($ID) . '</code>', $ns => '<code class="ns">' . prettyprint_id($ns) . '</code>');
    $styles = array('every' => $lang['subscr_style_every'], 'digest' => sprintf($lang['subscr_style_digest'], $stime_days), 'list' => sprintf($lang['subscr_style_list'], $stime_days));
    $form = new Doku_Form(array('id' => 'subscribe__form'));
    $form->startFieldset($lang['subscr_m_subscribe']);
    $form->addRadioSet('sub_target', $targets);
    $form->startFieldset($lang['subscr_m_receive']);
    $form->addRadioSet('sub_style', $styles);
    $form->addHidden('sub_action', 'subscribe');
    $form->addHidden('do', 'subscribe');
    $form->addHidden('id', $ID);
    $form->endFieldset();
    $form->addElement(form_makeButton('submit', 'subscribe', $lang['subscr_m_subscribe']));
    html_form('SUBSCRIBE', $form);
    echo '</div>';
}
开发者ID:neosunchess,项目名称:dokuwiki,代码行数:55,代码来源:template.php

示例8: p_index_xhtml

/**
 * Renders the Index
 *
 * copy of html_index located in /inc/html.php
 *
 * TODO update to new AJAX index possible?
 *
 * @author Andreas Gohr <andi@splitbrain.org>
 * @author Michael Klier <chi@chimeric.de>
 */
function p_index_xhtml($ns, $pos)
{
    require_once DOKU_INC . 'inc/search.php';
    global $conf;
    global $ID;
    $dir = $conf['datadir'];
    $ns = cleanID($ns);
    #fixme use appropriate function
    if (empty($ns)) {
        $ns = dirname(str_replace(':', '/', $ID));
        if ($ns == '.') {
            $ns = '';
        }
    }
    $ns = utf8_encodeFN(str_replace(':', '/', $ns));
    // extract only the headline
    preg_match('/<h1>.*?<\\/h1>/', p_locale_xhtml('index'), $match);
    print preg_replace('#<h1(.*?id=")(.*?)(".*?)h1>#', '<h1\\1sidebar_' . $pos . '_\\2\\3h1>', $match[0]);
    $data = array();
    search($data, $conf['datadir'], 'search_index', array('ns' => $ns));
    print '<div id="' . $pos . '__index__tree">' . DOKU_LF;
    print html_buildlist($data, 'idx', 'html_list_index', 'html_li_index');
    print '</div>' . DOKU_LF;
}
开发者ID:RockyRoad29,项目名称:dokuwiki-template-arctic,代码行数:34,代码来源:tpl_functions.php

示例9: html_resendpwd

/**
 * Form to request a new password for an existing account
 *
 * @author Benoit Chesneau <benoit@bchesneau.info>
 * @author Andreas Gohr <gohr@cosmocode.de>
 */
function html_resendpwd()
{
    global $lang;
    global $conf;
    global $INPUT;
    $token = preg_replace('/[^a-f0-9]+/', '', $INPUT->str('pwauth'));
    if (!$conf['autopasswd'] && $token) {
        print p_locale_xhtml('resetpwd');
        print '<div class="centeralign">' . NL;
        $form = new Doku_Form(array('id' => 'dw__resendpwd'));
        $form->startFieldset($lang['btn_resendpwd']);
        $form->addHidden('token', $token);
        $form->addHidden('do', 'resendpwd');
        $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size' => '50')));
        $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size' => '50')));
        $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
        $form->endFieldset();
        html_form('resendpwd', $form);
        print '</div>' . NL;
    } else {
        print p_locale_xhtml('resendpwd');
        print '<div class="centeralign">' . NL;
        $form = new Doku_Form(array('id' => 'dw__resendpwd'));
        $form->startFieldset($lang['resendpwd']);
        $form->addHidden('do', 'resendpwd');
        $form->addHidden('save', '1');
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block'));
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeTag('br'));
        $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
        $form->endFieldset();
        html_form('resendpwd', $form);
        print '</div>' . NL;
    }
}
开发者ID:evacomaroski,项目名称:dokuwiki,代码行数:42,代码来源:html.php

示例10: tpl_flush

                <div class="page group">
                    <?php 
tpl_flush();
?>
                    <?php 
tpl_includeFile('pageheader.html');
?>
                    <!-- detail start -->
                    <?php 
if ($ERROR) {
    echo '<h1>' . $ERROR . '</h1>';
} else {
    ?>
                        <?php 
    if ($REV) {
        echo p_locale_xhtml('showrev');
    }
    ?>
                        <h1><?php 
    echo nl2br(hsc(tpl_img_getTag('simple.title')));
    ?>
</h1>

                        <?php 
    tpl_img(900, 700);
    /* parameters: maximum width, maximum height (and more) */
    ?>

                        <div class="img_detail">
                            <?php 
    tpl_img_meta();
开发者ID:kevinlovesing,项目名称:dokuwiki,代码行数:31,代码来源:detail.php

示例11: revised_html_show

 /**
  * Revised version of the html_show()
  */
 function revised_html_show($txt = null)
 {
     // ---> Copied from html_show() - No code cleanups
     global $ID;
     global $REV;
     global $HIGH;
     global $INFO;
     //disable section editing for old revisions or in preview
     if ($txt || $REV) {
         $secedit = false;
     } else {
         $secedit = true;
     }
     if (!is_null($txt)) {
         //PreviewHeader
         echo '<br id="scroll__here" />';
         echo p_locale_xhtml('preview');
         echo '<div class="preview">';
         $html = html_secedit(p_render('xhtml', p_get_instructions($txt), $info), $secedit);
         if ($INFO['prependTOC']) {
             $html = tpl_toc(true) . $html;
         }
         echo $html;
         echo '<div class="clearer"></div>';
         echo '</div>';
     } else {
         if ($REV) {
             print p_locale_xhtml('showrev');
         }
         $html = p_wiki_xhtml($ID, $REV, true);
         $html = html_secedit($html, $secedit);
         if ($INFO['prependTOC']) {
             $html = tpl_toc(true) . $html;
         }
         $html = $this->revised_html_hilight($html, $HIGH);
         // <= REPLACED
         echo $html;
     }
     // <--- Copied from html_show() - No code cleanups
 }
开发者ID:kazmiya,项目名称:dokuwiki-plugin-asiansearch,代码行数:43,代码来源:action.php

示例12: html_resendpwd

/**
 * Form to request a new password for an existing account
 *
 * @author Benoit Chesneau <benoit@bchesneau.info>
 */
function html_resendpwd()
{
    global $lang;
    global $conf;
    global $ID;
    print p_locale_xhtml('resendpwd');
    print '<div class="centeralign">' . NL;
    $form = new Doku_Form(array('id' => 'dw__resendpwd'));
    $form->startFieldset($lang['resendpwd']);
    $form->addHidden('do', 'resendpwd');
    $form->addHidden('save', '1');
    $form->addElement(form_makeTag('br'));
    $form->addElement(form_makeTextField('login', $_POST['login'], $lang['user'], '', 'block'));
    $form->addElement(form_makeTag('br'));
    $form->addElement(form_makeTag('br'));
    $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));
    $form->endFieldset();
    html_form('resendpwd', $form);
    print '</div>' . NL;
}
开发者ID:nefercheprure,项目名称:dokuwiki,代码行数:25,代码来源:html.php

示例13: revisionsfull_html_diff


//.........这里部分代码省略.........
        }
        // when both revisions are empty then the page was created just now
        if (!$l_rev && !$r_rev) {
            $l_text = '';
        } else {
            $l_text = rawWiki($ID, $l_rev);
        }
        $r_text = rawWiki($ID, $r_rev);
        list($l_head, $r_head, $l_minor, $r_minor) = html_diff_head($l_rev, $r_rev, null, false, $type == 'inline');
    }
    /*
     * Build navigation
     */
    $l_nav = '';
    $r_nav = '';
    if (!$text) {
        list($l_nav, $r_nav) = html_diff_navigation($pagelog, $type, $l_rev, $r_rev);
    }
    /*
     * Create diff object and the formatter
     */
    $diff = new Diff(explode("\n", $l_text), explode("\n", $r_text));
    if ($type == 'inline') {
        $diffformatter = new InlineDiffFormatter();
    } elseif ($type == 'sidebyside') {
        $diffformatter = new TableDiffFormatter();
    } else {
        $diffformatter = new FullTableDiffFormatter();
    }
    /*
     * Display intro
     */
    if ($intro) {
        print p_locale_xhtml('diff');
    }
    /*
     * Display type and exact reference
     */
    if (!$text) {
        ptln('<div class="diffoptions group">');
        $form = new Doku_Form(array('action' => wl()));
        $form->addHidden('id', $ID);
        $form->addHidden('rev2[0]', $l_rev);
        $form->addHidden('rev2[1]', $r_rev);
        $form->addHidden('do', 'diff');
        $form->addElement(form_makeListboxField('difftype', array('full' => 'Full Side by Side', 'sidebyside' => $lang['diff_side'], 'inline' => $lang['diff_inline']), $type, $lang['diff_type'], '', '', array('class' => 'quickselect')));
        $form->addElement(form_makeButton('submit', 'diff', 'Go'));
        $form->printForm();
        ptln('<p>');
        // link to exactly this view FS#2835
        echo html_diff_navigationlink($type, 'difflink', $l_rev, $r_rev ? $r_rev : $INFO['currentrev']);
        ptln('</p>');
        ptln('</div>');
        // .diffoptions
    }
    /*
     * Display diff view table
     */
    ?>
    <div class="table">
    <table class="diff diff_<?php 
    echo $type;
    ?>
">

        <?php 
开发者ID:richmahn,项目名称:Door43,代码行数:67,代码来源:action.php

示例14: _print

    /**
     * function _print
     * @author  Myron Turner
     */
    function _print()
    {
        global $INFO;
        global $lang;
        global $ckgedit_lang;
        global $ID;
        global $REV;
        global $DATE;
        global $PRE;
        global $SUF;
        global $SUM;
        $wr = $INFO['writable'];
        if ($wr) {
            if ($REV) {
                print p_locale_xhtml('editrev');
            }
            $ro = false;
        } else {
            // check pseudo action 'source'
            if (!actionOK('source')) {
                msg('Command disabled: source', -1);
                return false;
            }
            print p_locale_xhtml('read');
            $ro = 'readonly="readonly"';
        }
        if (!$DATE) {
            $DATE = $INFO['lastmod'];
        }
        $guest_toolbar = $this->getConf('guest_toolbar');
        $guest_media = $this->getConf('guest_media');
        if (!isset($INFO['userinfo']) && !$guest_toolbar) {
            $toolbar = "DokuwikiNoGuest";
        } else {
            if (!isset($INFO['userinfo']) && !$guest_media) {
                $toolbar = "DokuwikiGuest";
            } else {
                $toolbar = 'Dokuwiki';
            }
        }
        $height = isset($_COOKIE['ckgEdht']) && $_COOKIE['ckgEdht'] ? $_COOKIE['ckgEdht'] : 250;
        $doku_url = rtrim(DOKU_URL, '/');
        $ckeditor_replace = <<<CKEDITOR_REPLACE

\t\t   ckgeditCKInstance = CKEDITOR.replace('wiki__text',
\t\t       { 
                  toolbar: '{$toolbar}' ,    
                  height: {$height},
                  filebrowserImageBrowseUrl :  '{$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector={$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php',
                  filebrowserBrowseUrl: '{$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/browser/default/browser.html?Type=File&Connector={$doku_url}/lib/plugins/ckgedit/fckeditor/editor/filemanager/connectors/php/connector.php',                                
               }
\t\t   );
           FCKeditor_OnComplete(ckgeditCKInstance);
           
               
CKEDITOR_REPLACE;
        echo $this->helper->registerOnLoad($ckeditor_replace);
        global $skip_styling;
        ?>

 
   <form id="dw__editform" method="post" action="<?php 
        echo script();
        ?>
"  accept-charset="<?php 
        echo $lang['encoding'];
        ?>
">
    <div class="no">
      <input type="hidden" name="id"   value="<?php 
        echo $ID;
        ?>
" />
      <input type="hidden" name="rev"  value="<?php 
        echo $REV;
        ?>
" />
      <input type="hidden" name="date" value="<?php 
        echo $DATE;
        ?>
" />
      <input type="hidden" name="prefix" value="<?php 
        echo formText($PRE);
        ?>
" />
      <input type="hidden" name="suffix" value="<?php 
        echo formText($SUF);
        ?>
" />
      <input type="hidden" id="ckgedit_mode_type"  name="mode" value="" />
      <input type="hidden" id="fck_preview_mode"  name="fck_preview_mode" value="nil" />
      <input type="hidden" id="fck_wikitext"    name="fck_wikitext" value="__false__" />     
       <input type="hidden" id="styling"  name="styling" value="styles" />
      <?php 
        if (function_exists('formSecurityToken')) {
            formSecurityToken();
//.........这里部分代码省略.........
开发者ID:a-gundy,项目名称:ckgedit,代码行数:101,代码来源:edit.php

示例15: tpl_content_core

function tpl_content_core()
{
    global $ACT;
    global $TEXT;
    global $PRE;
    global $SUF;
    global $SUM;
    global $IDX;
    switch ($ACT) {
        case 'show':
            html_show();
            break;
        case 'preview':
            html_edit($TEXT);
            html_show($TEXT);
            break;
        case 'recover':
            html_edit($TEXT);
            break;
        case 'edit':
            html_edit();
            break;
        case 'draft':
            html_draft();
            break;
        case 'wordblock':
            html_edit($TEXT, 'wordblock');
            break;
        case 'search':
            html_search();
            break;
        case 'revisions':
            $first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
            html_revisions($first);
            break;
        case 'diff':
            html_diff();
            break;
        case 'recent':
            if (is_array($_REQUEST['first'])) {
                $_REQUEST['first'] = array_keys($_REQUEST['first']);
                $_REQUEST['first'] = $_REQUEST['first'][0];
            }
            $first = is_numeric($_REQUEST['first']) ? intval($_REQUEST['first']) : 0;
            html_recent($first);
            break;
        case 'index':
            html_index($IDX);
            #FIXME can this be pulled from globals? is it sanitized correctly?
            break;
        case 'backlink':
            html_backlinks();
            break;
        case 'conflict':
            html_conflict(con($PRE, $TEXT, $SUF), $SUM);
            html_diff(con($PRE, $TEXT, $SUF), false);
            break;
        case 'locked':
            html_locked();
            html_edit();
            break;
        case 'login':
            html_login();
            break;
        case 'register':
            html_register();
            break;
        case 'resendpwd':
            html_resendpwd();
            break;
        case 'denied':
            print p_locale_xhtml('denied');
            break;
        case 'profile':
            html_updateprofile();
            break;
        case 'admin':
            tpl_admin();
            break;
        default:
            $evt = new Doku_Event('TPL_ACT_UNKNOWN', $ACT);
            if ($evt->advise_before()) {
                msg("Failed to handle command: " . hsc($ACT), -1);
            }
            $evt->advise_after();
            unset($evt);
            return false;
    }
    return true;
}
开发者ID:jalemanyf,项目名称:wsnlocalizationscala,代码行数:90,代码来源:template.php


注:本文中的p_locale_xhtml函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。