书签收藏

// bookmark_page.js, ver. 1.0

// visit: www.pdfhacks.com/bookmark_page/

// edit:cjs 2008-02-17 

// 1 修改为中文标签

// 2 设置书签时可以自动获取当前的书名

// 3 自动获取当前所在的页码与总页数,方便查阅

// 4 实现更多功能可以参看Adobe Reader的SDK

 

 

// use this delimiter for serializing our array

var bp_delim= '%#%#';

 

function SaveData( data )  {

  // data is an array of arrays that needs

  // to be serialized and stored into a persistent

  // global string

  var ds= '';

  for( ii= 0; ii< data.length; ++ii )  {

    for( jj= 0; jj< 3; ++jj )  {

      if( ii!= 0 || jj!= 0 )

        ds+= bp_delim;

      ds+= data[ii][jj];

    }

  }

  global.bookmarks= ds;

  global.setPersistent( "bookmarks", true );

}

 

function GetData()  {

  // reverse of SaveData; return an array of arrays

  if( global.bookmarks== null )  {

    return new Array(0);

  }

 

  var flat= global.bookmarks.split( bp_delim );

  var data= new Array();

  for( ii= 0; ii< flat.length; )  {

    var record= new Array();

    for( jj= 0; jj< 3 && ii< flat.length; ++ii, ++jj )  {

      record.push( flat[ii] );

    }

    if( record.length== 3 )  {

      data.push( record );

    }

  }

  return data;

}

 

//Get Current Date

function DateNow() {

   var d, s ;

   d = new Date();

   s = d.getFullYear()+"/";

   s += (d.getMonth() + 1) + "/";

   s += d.getDate() ;

   /**//*

   s += d.getHours() + ":";

   s += d.getMinutes() + ":";

   s += d.getSeconds() ;

   */

   return(s);

}

 

 

function AddBookmark()  {

  // query the user for a name, and then combine it with

  // the current PDF page to create a record; store this record

  var thisfilename=this.documentFileName;

  thisfilename=thisfilename.substr(0,thisfilename.lastIndexOf("."));

  var numPlugInss=this.pageNum+1;

  var currentdate=DateNow();

  var label= app.response( "书签名称,可以修改以便于记忆:",

                           "书签名称",

                           "《"+thisfilename+"》第 "+numPlugInss+" 页/共 "+this.numPages+" 页  "+currentdate,

                           false );

  if( label!= null )  {

    var record= new Array(3);

    record[0]= label;

    record[1]= this.path;

    record[2]= this.pageNum;

    data= GetData();

    data.push( record );

    SaveData( data );

  }

}

 

function ShowBookmarks()  {

  // show a pop-up menu; this seems to only work when

  // a PDF is alreay in the viewer;

  var data= GetData();

  var items= '';

  for( ii= 0; ii< data.length; ++ii )  {

    if( ii!= 0 )

      items+= ', ';

    items+= '"'+ ii+ ': '+ data[ii][0]+ '"';

  }

  // assemble the command and the execute it with eval()

  var command= 'app.popUpMenu( '+ items+ ' );';

  var selection= eval( command );

  if( selection== null )  {

    return; // exit

  }

 

  // the user made a selection; parse out its index and use it

  // to access the bookmark record

  var index= 0;

  // toString() converts the String object to a string literal

  // eval() converts the string literal to a number

  index= eval( selection.substring( 0, selection.indexOf(':') ).toString() );

  if( index< data.length )  {

    try  {

      // the document must be 'disclosed' for us to have any access

      // to its properties, so we use these FirstPage NextPage calls

      //

      app.openDoc( data[index][1] );

      app.execMenuItem( "FirstPage" );

      for( ii= 0; ii< data[index][2]; ++ii )  {

        app.execMenuItem( "NextPage" );

      }

    }

    catch( ee )  {

      var response= 

        app.alert("打开书签错误. 是否删除本书签?", 2, 2,"删除书签");

      if( response== 4 && index< data.length )  {

        data.splice( index, 1 );

        SaveData( data );

      }

    }

  }

}

 

function DropBookmark()  {

  // modelled after ShowBookmarks()

  var data= GetData();

  var items= '';

  for( ii= 0; ii< data.length; ++ii )  {

    if( ii!= 0 )

      items+= ', ';

    items+= '"'+ ii+ ': '+ data[ii][0]+ '"';

  }

  var command= 'app.popUpMenu( '+ items+ ' );';

  var selection= eval( command );

  if( selection== null )  {

    return; // exit

  }

 

  var index= 0;

  index= eval( selection.substring( 0, selection.indexOf(':') ).toString() );

  if( index< data.length )  {

    data.splice( index, 1 );

    SaveData( data );

  }

}

 

function ClearBookmarks()  {

  if( app.alert("确认要清除所有的书签吗?", 2, 2,"删除书签" )== 4 )  {

    SaveData( new Array(0) );

  }

}

 

app.addMenuItem(  {

cName: "-",              // menu divider

cParent: "View",         // append to the View menu

cExec: "void(0);" } );

 

app.addMenuItem(  {

cName: "设置本页为书签(&B)",

cParent: "View",

cExec: "AddBookmark();",

cEnable: "event.rc= (event.target != null);" } );

 

app.addMenuItem(  {

cName: "转到指定书签(&T)",

cParent: "View",

cExec: "ShowBookmarks();",

cEnable: "event.rc= (event.target != null);" } );

//cEnable: "event.rc= true;" } );

 

app.addMenuItem(  {

cName: "删除一个书签(&D)",

cParent: "View",

cExec: "DropBookmark();",

cEnable: "event.rc= (event.target != null);" } );

 

app.addMenuItem(  {

cName: "清除所有书签(&C)",

cParent: "View",

cExec: "ClearBookmarks();",

cEnable: "event.rc= true;" } );

内容概要:《中文大模型基准测评2025年上半年报告》由SuperCLUE团队发布,详细评估了2025年上半年中文大模型的发展状况。报告涵盖了大模型的关键进展、国内外大模型全景图及差距、专项测评基准介绍等。通过SuperCLUE基准,对45个国内外代表性大模型进行了六大任务(数学推理、科学推理、代码生成、智能体Agent、精确指令遵循、幻觉控制)的综合测评。结果显示,海外模型如o3、o4-mini(high)在推理任务上表现突出,而国内模型如Doubao-Seed-1.6-thinking-250715在智能体Agent和幻觉控制任务上表现出色。此外,报告还分析了模型性价比、效能区间分布,并对代表性模型如Doubao-Seed-1.6-thinking-250715、DeepSeek-R1-0528、GLM-4.5等进行了详细介绍。整体来看,国内大模型在特定任务上已接近国际顶尖水平,但在综合推理能力上仍有提升空间。 适用人群:对大模型技术感兴趣的科研人员、工程师、产品经理及投资者。 使用场景及目标:①了解2025年上半年中文大模型的发展现状与趋势;②评估国内外大模型在不同任务上的表现差异;③为技术选型和性能优化提供参考依据。 其他说明:报告提供了详细的测评方法、评分标准及结果分析,确保评估的科学性和公正性。此外,SuperCLUE团队还发布了多个专项测评基准,涵盖多模态、文本、推理等多个领域,为业界提供全面的测评服务。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值