惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Check Point Blog
Hacker News: Ask HN
Hacker News: Ask HN
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
WordPress大学
WordPress大学
P
Proofpoint News Feed
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
N
Netflix TechBlog - Medium
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 聂微东
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 叶小钗
Cisco Talos Blog
Cisco Talos Blog
S
Schneier on Security
T
Threat Research - Cisco Blogs
腾讯CDC
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
The Hacker News
The Hacker News
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
GbyAI
GbyAI
N
News | PayPal Newsroom
L
LINUX DO - 最新话题
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Palo Alto Networks Blog
T
Tenable Blog
S
Secure Thoughts
T
Threatpost
V2EX - 技术
V2EX - 技术
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Vercel News
Vercel News
罗磊的独立博客
P
Privacy & Cybersecurity Law Blog
Engineering at Meta
Engineering at Meta
小众软件
小众软件
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
Y
Y Combinator Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
L
Lohrmann on Cybersecurity
P
Privacy International News Feed
H
Heimdal Security Blog
量子位
B
Blog

博客园 - Amwpfiqvy

如何查看执行计划 SQL Server 堆表与栈表的对比(大表) SQL Server中CURD语句的锁流程分析 树表分级统计 SQL:查询购买了所有指定商品的人 在SQL Server中使用正则表达式 查看SQL Server性能时常用的性能计数器 SQL Server中行列转换 Pivot UnPivot Apq本地工具集 Apq.aspx 第一个:_Config.js JScript.Encode.js - Amwpfiqvy - 博客园 Apq.Threading.js - Amwpfiqvy - 博客园 Script/_Config.js Apq.js - Amwpfiqvy - 博客园 prototype.js Apq.aspx - Amwpfiqvy - 博客园 查看数据库所有用户表及其列信息 利用JScript的Literal Syntax特性用字符串表示对象
Apq.Text.js
Amwpfiqvy · 2006-06-14 · via 博客园 - Amwpfiqvy

     // 1110 xxxx    10xx xxxx    10xx xxxx
     case 14:
      var n2 = Bytes[i++];
      var n3 = Bytes[i++];
      str += String.fromCharCode( ((n & 0x0F) << 12) | ((n2 & 0x3F) << 6) | (n3 & 0x3F) );
      break;
    }
   }
   return str;
  }
 };
 
 Apq.Text.Base64Encoding = {
  strEncode: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  /// 将字符转为对应的Base64序号('='对应-1)
  getEncode: function( c ){
   var n = c.charCodeAt(0);
   if( n >= 65 && n <= 90 )
   {
    return n - 65;
   }
   else if( n >= 97 && n <= 122 )
   {
    return n - 71; // n - 97 + 26
   }
   else if( n >= 48 && n <= 57 )
   {
    return n + 4; // n - 48 + 52
   }
   else if( c == '+' )
   {
    return 62;
   }
   else if( c == '/' )
   {
    return 63;
   }
   else
   {
    return -1;
   }
  },
  
  /// 解码
  /// <str>Base64字符串</str>
  GetBytes: function( str, index, length, Bytes, bindex ){
   index = index || 0;
   length = length || str.length;
   Bytes = Bytes || new Array();
   bindex = bindex || 0;
   
   var i = 0;
   while( i < length )
   {
    var cary = new Array();
    for( var j = 0; j < 4; j++ )
    {
     cary.push( this.getEncode( str.charAt(index+i++) ) );
    }
    
    Bytes[bindex++] = (cary[0] << 2) | (cary[1] >>> 4);
    var n = ((cary[1] << 4) | (cary[2] >>> 2)) & 0xFF;
    if( n != 0xF )
    {
     Bytes[bindex++] = n;
     n = ((cary[2] << 6) | (cary[3] & 0x3F )) & 0xFF;
     if( n != 0x3F )
     {
      Bytes[bindex++] = n;
     }
    }
   }
   return Bytes;
  },
  /// 编码
  /// <Bytes>UFT8数组</Bytes>
  GetString: function( Bytes, index, length ){
   index = index || 0;
   length = length || Bytes.length;
   
   var ary = new Array();
   
   var nRest = length % 3;
   var i = 0; // 位置指针
   while( i < length - nRest )
   {
    var bary = new Array();
    for( var j = 0; j < 3; j++ )
    {
     bary.push( Bytes[index+i+j] );
    }
    var n = i/3*4;
    ary[n] = this.strEncode.charAt( bary[0] >>> 2 );
    ary[n+1] = this.strEncode.charAt( ((bary[0] << 4) | (bary[1] >>> 4)) & 0x3F );
    ary[n+2] = this.strEncode.charAt( ((bary[1] << 2) | (bary[2] >>> 6)) & 0x3F );
    ary[n+3] = this.strEncode.charAt( bary[2] & 0x3F );
    i += 3;
   }
   
   if( nRest )
   {
    var bary = new Array();
    for( var j = 0; j < nRest; j++ )
    {
     bary.push( Bytes[index+i+j] );
    }
    bary.push( 0 );
    
    var n = i/3*4;
    ary[n] = this.strEncode.charAt( bary[0] >>> 2 );
    ary[n+1] = this.strEncode.charAt( ((bary[0] << 4) | (bary[1] >>> 4)) & 0x3F );
    if( nRest == 2 )
    {
     ary[n+2] = this.strEncode.charAt( (bary[1] << 2) & 0x3F );
    }
   
    for( var j = 0; j < 3 - nRest; j++ )
    {
     ary.push( "=" );
    }
   }
   
   return ary.join("");
  }
 };
}