<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ID_CODE &#8211; 良的世界</title>
	<atom:link href="https://www.lemonary.cn/tag/id_code/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.lemonary.cn</link>
	<description></description>
	<lastBuildDate>Thu, 07 May 2026 08:18:45 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.lemonary.cn/wp-content/uploads/2024/12/profile-150x150.jpg</url>
	<title>ID_CODE &#8211; 良的世界</title>
	<link>https://www.lemonary.cn</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>达梦数据库版本号解析</title>
		<link>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93%e7%89%88%e6%9c%ac%e5%8f%b7%e8%a7%a3%e6%9e%90/</link>
					<comments>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93%e7%89%88%e6%9c%ac%e5%8f%b7%e8%a7%a3%e6%9e%90/#respond</comments>
		
		<dc:creator><![CDATA[shine]]></dc:creator>
		<pubDate>Fri, 13 Feb 2026 07:44:08 +0000</pubDate>
				<category><![CDATA[DM]]></category>
		<category><![CDATA[ID_CODE]]></category>
		<guid isPermaLink="false">https://www.lemonary.cn/?p=2614</guid>

					<description><![CDATA[达梦ID_CODE版本解析]]></description>
										<content:encoded><![CDATA[
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>达梦ID_CODE版本解析</title>
</head>
<body>
    <!-- ★ 双重隔离盾：外层内联强制白底 + 内部Shadow DOM重置 ★ -->
    <dm-version-tool style="all: initial; display: block; background: white !important; max-width: 1100px; margin: 2rem auto;"></dm-version-tool>

    <script>
        (function() {
            // 如果自定义元素已定义则跳过
            if (customElements.get('dm-version-tool')) return;

            class DmVersionTool extends HTMLElement {
                constructor() {
                    super();
                    const shadow = this.attachShadow({ mode: 'open' });
                    shadow.innerHTML = `
                        <style>
                            /* ========== 全重置 + 暴力 important ========== */
                            :host {
                                all: initial;
                                display: block;
                                background: white !important;
                            }
                            .container {
                                all: initial;
                                display: block;
                                max-width: 1100px;
                                width: 100%;
                                margin: 0 auto;
                                background: white !important;
                                border-radius: 28px;
                                padding: 2.2rem 2.5rem;
                                box-shadow: 0 15px 35px -8px rgba(0,0,0,0.08);
                                border: 1px solid rgba(203, 213, 225, 0.2);
                                color: #1e293b;
                                box-sizing: border-box;
                                font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
                            }
                            h1 {
                                all: initial;
                                display: block;
                                margin: 0 0 1.6rem 0;
                                padding: 0 0 0.6rem 0;
                                font-size: 1.95rem;
                                font-weight: 600;
                                color: #0f172a;
                                border-bottom: 3px solid #e6f0ff;
                                background: transparent !important;
                            }
                            /* ===== 输入提示区 · 绝对白底 ===== */
                            .input-desc {
                                all: initial;
                                display: block;
                                font-size: 0.95rem;
                                color: #2c3e50;
                                background: white !important;
                                background-color: white !important;
                                padding: 1.1rem 1.5rem;
                                border-radius: 18px;
                                margin-bottom: 1.4rem;
                                border: 1px solid #f0f4fa;
                                border-left: 6px solid #4f9cf7 !important;
                                box-shadow: 0 4px 12px rgba(0,0,0,0.02);
                                line-height: 1.65;
                            }
                            .input-desc:hover {
                                box-shadow: 0 6px 16px rgba(79,156,247,0.06);
                            }
                            /* 输入框——强控宽度 */
                            .dm-input {
                                all: initial;
                                display: block;
                                width: 100% !important;
                                max-width: 100% !important;
                                min-width: 300px;
                                padding: 0.95rem 1.4rem;
                                font-size: 1.05rem;
                                border: 1.5px solid #e2e8f0;
                                border-radius: 20px;
                                background: white !important;
                                color: #0f172a;
                                box-shadow: 0 2px 4px rgba(0,0,0,0.02);
                                box-sizing: border-box;
                                font-family: inherit;
                            }
                            .dm-input:focus {
                                border-color: #3b82f6;
                                box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
                            }
                            .dm-input::placeholder {
                                color: #94a3b8;
                                font-weight: 300;
                            }
                            /* 错误提示——琥珀色 */
                            .error-tip {
                                all: initial;
                                display: none;
                                margin-top: 0.8rem;
                                padding: 0.75rem 1.2rem;
                                background: #fff7e6 !important;
                                color: #7a5c00;
                                border-radius: 16px;
                                font-size: 0.92rem;
                                border-left: 6px solid #ffaa33 !important;
                                border: 1px solid #ffe0a5;
                                border-left-width: 6px !important;
                                border-left-color: #ffaa33 !important;
                                font-weight: 500;
                                animation: fadeIn 0.2s ease;
                            }
                            @keyframes fadeIn {
                                from { opacity: 0; transform: translateY(-4px); }
                                to { opacity: 1; transform: translateY(0); }
                            }
                            /* 按钮组 */
                            .btn-group {
                                all: initial;
                                display: flex;
                                flex-wrap: wrap;
                                gap: 0.8rem;
                                margin-top: 1.8rem;
                                background: transparent !important;
                            }
                            .btn {
                                all: initial;
                                display: inline-flex;
                                align-items: center;
                                justify-content: center;
                                padding: 0.7rem 1.8rem;
                                font-size: 0.98rem;
                                font-weight: 500;
                                border: none;
                                border-radius: 40px;
                                background: #2563eb !important;
                                color: white !important;
                                cursor: pointer;
                                transition: all 0.18s ease;
                                box-shadow: 0 4px 8px rgba(37,99,235,0.2);
                                min-width: 100px;
                                border: 1px solid transparent;
                            }
                            .btn:hover {
                                background: #1d4ed8 !important;
                                transform: translateY(-1px);
                                box-shadow: 0 8px 14px rgba(37,99,235,0.25);
                            }
                            .btn-secondary {
                                background: #f1f5f9 !important;
                                color: #334155 !important;
                                box-shadow: none;
                                border: 1px solid #e2e8f0;
                            }
                            .btn-secondary:hover {
                                background: #e2e8f0 !important;
                                color: #0f172a !important;
                                border-color: #cbd5e1;
                            }
                            /* 结果区域 */
                            .result-area {
                                all: initial;
                                display: block;
                                margin-top: 2.2rem;
                                background: transparent !important;
                            }
                            .result-title {
                                all: initial;
                                display: flex;
                                align-items: center;
                                font-size: 1.2rem;
                                font-weight: 600;
                                color: #0f172a;
                                margin-bottom: 0.8rem;
                                background: transparent !important;
                            }
                            .result-title::before {
                                content: "📋";
                                margin-right: 8px;
                            }
                            textarea#versionInfo {
                                all: initial;
                                display: block;
                                width: 100%;
                                min-height: 140px;
                                padding: 1.2rem 1.5rem;
                                font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
                                font-size: 0.98rem;
                                line-height: 1.6;
                                color: #0f172a;
                                background: #f9fbfd !important;
                                border: 1.5px solid #e9edf2;
                                border-radius: 18px;
                                resize: vertical;
                                white-space: pre-wrap;
                                box-sizing: border-box;
                            }
                            textarea#versionInfo[readonly] {
                                background: #f8fafc !important;
                                border-color: #e0e7ef;
                            }
                            @media (max-width: 600px) {
                                .container { padding: 1.5rem; }
                                .btn-group { flex-direction: column; }
                                .btn { width: 100%; }
                            }
                        </style>
                        <div class="container">
                            <h1>达梦ID_CODE版本解析工具</h1>
                            <div class="input-desc">
                                输入ID_CODE<br>
                                ID_CODE格式：03134xxxxxx-版本日期-rev号-分支号 或 03134xxxxxx-版本日期-rev号-分支号 PackXX<br>
                                例如：03134284058-20240205-217834-20046 pack26 → 8.1.3.26 Pack26
                            </div>
                            <input type="text" id="idCodeInput" class="dm-input" placeholder="请输入ID_CODE，例如 03134284058-20240205-217834-20046 pack26">
                            <div class="error-tip" id="errorTip"></div>
                            <div class="btn-group">
                                <button class="btn" id="parseBtn">查看版本</button>
                                <button class="btn btn-secondary" id="clearBtn">清空</button>
                            </div>
                            <div class="result-area">
                                <div class="result-title">版本信息</div>
                                <textarea id="versionInfo" readonly placeholder="解析后的版本信息将显示在这里..."></textarea>
                            </div>
                        </div>
                    `;

                    // 绑定事件（内部函数不变）
                    const el = (id) => shadow.getElementById(id);
                    const input = el('idCodeInput');
                    const parseBtn = el('parseBtn');
                    const clearBtn = el('clearBtn');
                    const errorTip = el('errorTip');
                    const versionInfo = el('versionInfo');

                    const parseVersion = () => {
                        errorTip.style.display = 'none';
                        let idCode = input.value.trim();
                        if (!idCode) {
                            showError('请输入ID_CODE！');
                            versionInfo.value = '';
                            return;
                        }
                        try {
                            let packPart = '';
                            const packMatch = idCode.match(/pack(\d+)/i);
                            if (packMatch) {
                                packPart = ' Pack' + packMatch[1];
                                idCode = idCode.replace(/pack\d+/i, '').trim();
                            }
                            const firstSegment = idCode.split('-')[0];
                            if (!firstSegment) {
                                showError('ID_CODE格式错误，未找到有效分段！');
                                versionInfo.value = '';
                                return;
                            }
                            const substrVer = firstSegment.substring(2);
                            if (isNaN(Number(substrVer))) {
                                showError('ID_CODE分段包含非数字字符，解析失败！');
                                versionInfo.value = '';
                                return;
                            }
                            const intVer = parseInt(substrVer, 10);
                            let hexVer = intVer.toString(16).toUpperCase();
                            while (hexVer.length < 8) hexVer = '0' + hexVer;
                            const v1 = parseInt(hexVer.substring(0, 2), 16);
                            const v2 = parseInt(hexVer.substring(2, 4), 16);
                            const v3 = parseInt(hexVer.substring(4, 6), 16);
                            const v4 = parseInt(hexVer.substring(6, 8), 16);
                            const innerVer = `${v1}.${v2}.${v3}.${v4}`;
                            const currentVersion = innerVer + packPart;
                            versionInfo.value = `输入的ID_CODE: ${input.value.trim()}\n当前版本: ${currentVersion}`;
                        } catch (e) {
                            showError(`解析失败：${e.message}`);
                            versionInfo.value = '';
                        }
                    };

                    const clearInput = () => {
                        input.value = '';
                        versionInfo.value = '';
                        errorTip.style.display = 'none';
                    };

                    const showError = (msg) => {
                        errorTip.innerText = msg;
                        errorTip.style.display = 'block';
                    };

                    parseBtn.addEventListener('click', parseVersion);
                    clearBtn.addEventListener('click', clearInput);
					input.addEventListener('keydown', (e) => {
						if (e.key === 'Enter') {
							parseVersion();
							e.preventDefault(); // 避免回车触发表单提交
						} else if (e.key === ' ') {
							e.preventDefault();              // 阻止页面滚动
							e.stopPropagation();             // 防止事件冒泡到外部
							// 在光标位置手动插入空格
							const start = input.selectionStart;
							const end = input.selectionEnd;
							input.value = input.value.substring(0, start) + ' ' + input.value.substring(end);
							input.selectionStart = input.selectionEnd = start + 1;
							// 触发 input 事件，便于其他依赖此事件的逻辑响应
							input.dispatchEvent(new Event('input', { bubbles: true }));
						} else if (e.key === 'ArrowLeft') {
							e.preventDefault();              // 阻止外部可能的干扰
							e.stopPropagation();
							// 手动左移光标
							let newPos = input.selectionStart;
							if (newPos > 0) {
								newPos--;
							}
							input.selectionStart = input.selectionEnd = newPos;
						} else if (e.key === 'ArrowRight') {
							e.preventDefault();              // 阻止外部可能的干扰
							e.stopPropagation();
							// 手动右移光标
							let newPos = input.selectionEnd;
							if (newPos < input.value.length) {
								newPos++;
							}
							input.selectionStart = input.selectionEnd = newPos;
						}
					});
                }
            }
            customElements.define('dm-version-tool', DmVersionTool);
        })();
    </script>
</body>
</html>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.lemonary.cn/%e8%be%be%e6%a2%a6%e6%95%b0%e6%8d%ae%e5%ba%93%e7%89%88%e6%9c%ac%e5%8f%b7%e8%a7%a3%e6%9e%90/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
