泛前端开发

泛前端开发
javascript
Comments

1.backbonejs中的getter和setter

所说的backbonejs中的getter和setter就是内部自定义get和set方法,set方法嵌入了Pub/Sub模型,
例如 book.on("change:title change:author", ...);book.set('title':'othertitle');触发change对用的function,
解开二重锁 (不等于自身和并且非正在执行change function)。

Read on →
python
Comments

import os
 
_reName = "ABC,BJBANK,BOC,BSB,CCB,CEB,CITIC,CMB,CMBC,COMM,DBSCN,GDB,HANABANK,HSBC,HXBANK,HZCB,ICBC,JSBANK,KLB,PSBC,SCB,SDB,SJBANK,SPABANK,BHB,SHBANK,WHCCB,BOCD,HBRCU,HDBANK,HSBK,XTB,ZJKCCB,CZCCB,JINCHB,JSB,JZBANK,YQCCB,H3CB,ORBANK,WHBANK,BOCY,BODD,BOJZ,BOYK,FSCB,FXCB,JLRCU,DAQINGB,NBBANK,NJCB,WZCB,BOSZ,CSRCB,CZRCB,EGBANK,GCB,HSBANK,JRCB,KSRB,LSBANK,TCRCB,WJRCB,WRCB,ZRCBANK,FJHXBC,JHBANK,JXBANK,NBYZ,NDHB,SXCB,ZJNX,ARCU,BOD,JJBANK,GZB,JXRCU,NCB,SRBANK,BANKWF,DYCCB,DZBANK,JNBANK,LSBC,QDCCB,QLBANK,RZB,SDRCU,TACCB,AYCB,BOP,BOZK,BZMD,CBKF,HNRCU,NYCB,SCBBANK,SCCB,XCYH,XXBANK,XYBANK,ZZBANK,HBC,HKB,HURCB,WHRCB,HNRCC,DRCBCL,GDRCC,GLBANK,GRCB,NHB,SDEB,SRCB,XLBANK,BGB,GXRCU,LZCCB,CCQTGB,CDCB,CQBANK,CRCBANK,CDRCB,CGNB,DYCB,GYCB,LSCCB,PZHCCB,SCRCU,YBCCB,ZGCCB,GZRCU,ZYCBANK,YNRCC,YXCCB,CABANK,SXRCCU,XABANK,GSRCU,LZYH,NXRCU,SZSBK".split(',')
path = 'F:\\PSD2.0\\bankalipay\\sprite\\images\\'
for file in os.listdir(path):
    if os.path.isfile(os.path.join(path,file))==True:
        _baseName = os.path.basename(file)
        _id = int(_baseName[9:_baseName.index('.')])
        _newName = _reName[_id - 1 ] + '.png'
        os.rename(os.path.join(path,file),os.path.join(path,_newName))
Read on →
javascript
Comments

0.测试如此简单:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>QUnit basic example</title>
  <link rel="stylesheet" href="/resources/qunit.css">
</head>
<body>
  <h1 id="qunit-header">QUnit</h1>
  <h2 id="qunit-banner"></h2>
  <div id="qunit-testrunner-toolbar"></div>
  <h2 id="qunit-userAgent"></h2>
  <ol id="qunit-tests"></ol>
  <div id="qunit-fixture"></div>

  <script src="/resources/qunit.js"></script>
  <script>
    test( "a basic test example", function() {
      var value = "hello";
      equal( value, "hello", "We expect value to be hello" );
    });
  </script>
</body>
</html>
Read on →
javascript
Comments

分子 原子 质子 中子 电子 原子核 离子

宇宙 银河系 太阳系 地月系

例:我的地址是:宇宙银河系太阳系地月系地球中国广东省广州天河区XXX。

假如外星人来我家作客,必须知道我的地址,才能来我家作客。。。

我的私有财产你不能动,除非我允许(民主社会):

在javascript或其他语言的作用域中同样有类似的,就是说addClass的内部方法或变量你是不能访问的,除非它定义为全局对象(window.xxxx)。。。
Read on →

music
Comments

</embed>

Lyrics:

Title: Blue Caravan
Artist: Vienna Teng
Album: Dreaming Through the Noise
Year: 2006

me and my baby on a february holiday
‘cause we got the news
yeah, we got the news
500 miles and we’re gonna make it all the way
we’ve got nothing to lose
we’ve got nothing to lose
Read on →