text:
'use strict';

import GithubApi from 'github-api';

/**
 * The class that extends Github.js
 *
 * @extends GithubApi
 */
export
 default class Github extends GithubApi {
   /**
    * @constructor
    * @param {Object} options The object containing the information to work with the GitHub API
    * @param {string} options.username The username used on GitHub
    * @param {string} options.password The password of the GitHub account
    * @param {string} options.auth The type of authentication to use. It can be either `basic` or `oauth`
    * @param {string} options.token The token to access the GitHub API
    */
   constructor(options) {
      super(options);

      let superGetRepo = this.getRepo;
      let request = this.request || this._request; // jscs:ignore disallowDanglingUnderscores

      /**
       * Returns an object representing a specific repository
       *
       * @param {string} user The username that possesses the repository
       * @param {string} repo The name of the repository to work on
       *
       * @returns {Object}
       */
      this.getRepo = (user, repo) => {
         let repository = superGetRepo(user, repo);
         let superRemove = repository.remove;
         let superFork = repository.fork;

         function getRepositoryInfo(repository) {
            return new Promise((resolve, reject) => {
               repository.show((error, repo) => {
                  if (error) {
                     reject(error);
                  }

                  resolve(repo);
               });
            });
         }

         /**
          * Searches files and folders
          *
          * @param {string} string The string to search
          * @param {Object} [options={}] Possible options
          * @param {string} [options.branch] The name of the branch in which the search must be performed
          * @param {boolean} [options.caseSensitive=false] If the search must be case sensitive
          * @param {boolean} [options.excludeFiles=false] If the result must exclude files
          * @param {boolean} [options.excludeFolders=false] If the result must exclude folders
          *
          * @returns {Promise}
          */
         repository.search = (string, options = {}) => {
            const FILE = 'blob';
            const FOLDER = 'tree';

            options = Object.assign({
               branch: 'master',
               caseSensitive: false,
               excludeFiles: false,
               excludeFolders: false
            }, options);

            return new Promise((resolve, reject) => {
               repository.getSha(options.branch, '', (error, sha) => {
                  if (error) {
                     reject(error);
                  }

                  resolve(sha);
               });
            })
               .then(sha => {
                  return new Promise((resolve, reject) => {
                     repository.getTree(`${sha}?recursive=true`, (error, list) => {
                        if (error) {
                           // No matches
                           if (error.error === 404) {
                              resolve([]);
                           } else {
                              reject(error);
                           }
                        }

                        resolve(list);
                     });
                  });
               })
               .then(list => {
                  let regex = new RegExp(string, options.caseSensitive ? '' : 'i');

                  return list.filter(content => {
                     let fileCondition = options.excludeFiles ? content.type !== FILE : true;
                     let folderCondition = options.excludeFolders ? content.type !== FOLDER : true;
                     let extractName = (path) => path.substring(path.lastIndexOf('/') + 1);

                     return fileCondition && folderCondition && regex.test(extractName(content.path));
                  });
               });
         };

         /**
          * Merges a pull request
          *
          * @param {Object} pullRequest The pull request to merge
          * @param {Object} [options={}] Possible options
          * @param {string} [options.commitMessage] The commit message for the merge
          *
          * @returns {Promise}
          */
         repository.mergePullRequest = (pullRequest, options = {}) => {
            options = Object.assign(
               {
                  commitMessage: `Merged pull request gh-${pullRequest.number}`
               },
               options
            );

            return getRepositoryInfo(repository)
               .then(repositoryInfo => {
                  return new Promise((resolve, reject) => {
                     request(
                        'PUT',
                        `/repos/${repositoryInfo.full_name}/pulls/${pullRequest.number}/merge`, // jscs:ignore
                        {
                           commit_message: options.commitMessage, // jscs:ignore
                           sha: pullRequest.head.sha
                        },
                        (error, mergeInfo) => {
                           if (error) {
                              reject(error);
                           }

                           resolve(mergeInfo);
                        }
                     );
                  });
               });
         };

         /**
          * Deletes a file or a folder and all of its content from a given branch
          *
          * @param {string} [branchName='master'] The name of the branch in which the deletion must be performed
          * @param {string} [path=''] The path of the file or the folder to delete
          *
          * @returns {Promise}
          */
         repository.remove = (branchName = 'master', path = '') => {
            function removeFile(branchName, path) {
               return new Promise((resolve, reject) => {
                  superRemove(branchName, path, error => {
                     if (error) {
                        reject(error);
                     }

                     resolve();
                  });
               });
            }

            function removeFolder() {
               return new Promise((resolve, reject) => {
                  repository.getRef(`heads/${branchName}`, (error, sha) => {
                     if (error) {
                        reject(error);
                     }

                     resolve(sha);
                  });
               })
                  .then(sha => {
                     return new Promise((resolve, reject) => {
                        repository.getTree(`${sha}?recursive=true`, (error, tree) => {
                           if (error) {
                              reject(error);
                           }

                           resolve(tree);
                        });
                     });
                  })
                  .then(tree => {
                     let filesPromises = Promise.resolve();

                     // Filters all items that aren't in the path of interest and aren't files
                     // and delete them.
                     tree
                        .filter(item => item.path.indexOf(path) === 0 && item.type === 'blob')
                        .map(item => item.path)
                        .forEach(path => {
                           filesPromises = filesPromises.then(() => removeFile(branchName, path));
                        });

                     return filesPromises;
                  });
            }

            // Remove any trailing slash from the path.
            // GitHub does not accept it even when dealing with folders.
            path = path.replace(/\/$/, '');

            let removeFilePromise = removeFile(branchName, path);

            return removeFilePromise
               .then(
                  () => removeFilePromise,
                  error => {
                     // If the operation fails because the path specified is that of a folder
                     // keep going to retrieve the files recursively
                     if (error.error !== 422) {
                        throw error;
                     }

                     return removeFolder();
                  });
         };

         /**
          * Creates a fork of the repository
          *
          * @returns {Promise}
          */
         repository.fork = () => {
            return new Promise((resolve, reject) => {
               superFork((err, forkInfo) => {
                  function pollFork(fork) {
                     fork.contents('master', '', (err, contents) => {
                        if (contents) {
                           resolve(forkInfo);
                        } else {
                           setTimeout(pollFork.bind(null, fork), 250);
                        }
                     });
                  }

                  if (err) {
                     reject(err);
                  } else {
                     pollFork(superGetRepo(options.username, repo));
                  }
               });
            });
         };

         return repository;
      };
   }
}


text:
html,body,h1,h2,h3{font-family:arial, 'Hiragino Sans GB', 'Microsoft Yahei', '微软雅黑', '宋体', \5b8b\4f53, Tahoma, Arial, Helvetica, STHeiti}
.ng-cloak{display:none;}
body{overflow-y:scroll;background:#f9f9f9;overflow-x: hidden;}
a:hover{text-decoration:none;}
a:focus{outline:none; -moz-outline:none}
.list-group .list-group-item.active{background-color:#428bca;border-color:#428bca;}
.list-group .list-group-item a{color:#555;}
.list-group .list-group-item a:hover{text-decoration:none;}
.list-group .list-group-item.active a{color:#fff;}
.row .row, .form-group .form-group{margin-left:auto;margin-right:auto;}
.row.row-fix, .form-group.form-group-fix{margin-left:-15px;margin-right:-15px;}
.breadcrumb{background:#F9F9F9;}
/*登录注册*/
.login,.register{background:#3a3a3a url('../images/gw-bg.jpg') no-repeat fixed; background-size:cover; -webkit-background-size:cover; -o-background-size:cover;padding-top:5em;}
.login .logo,.register .logo{width:100%; text-align:center; margin-bottom:2em;}
.login .logo a,.register .logo a{background:url('../images/gw-logo.png') no-repeat; display:inline-block;width:420px;height:95px;margin-left:0 !important;}
.login .panel,.register .panel{padding:30px 15px;}
.login i,.register i{color:#999999;}
.login .footer,.register .footer{padding:2em 0;}
.login .footer,.register .footer,.login .footer a,.register .footer a{color:#ffffff;}
/*首页*/
.home .panel{border-radius:0;}
.home .panel-default{border-color:#EEE;}
.home .content h4{border-bottom:1px #E9E9E9 solid; padding:15px 15px 15px 25px; margin:0; font-weight:normal; font-size:18px;}
.home .content h6{font-size:16px; color:#333;}
.home .content .con .panel-body .row{text-align:center;}
.home .content .con .panel-body .row>div{overflow:hidden; text-align:center;}
.home .content .con .panel-body .row p{color:#666;}
.home .content .con .panel-body .system-announcement{margin:0 10px;}
.home .content .con .panel-body .system-announcement li{margin:15px 0; height:40px; line-height:40px; background:#f7f7f9;}
.home .content .con .panel-body .system-announcement li a{display:block; float:left; text-align:left; padding:0 15px; color:#666;}
.home .content .con .panel-body .system-announcement li span{display:inline-block; float:left; color:#FFF; width:50px;}
.home .content .con .panel-body .system-announcement li span.style-1{background:#6592df;}
.home .content .con .panel-body .system-announcement li span.style-2{background:#60bc6a;}
.home .content .con .panel-body .system-info>div{display:inline-block; margin:20px 0;}
.home .content .con .panel-body .system-info .icon{display:inline-block; width:100px; height:100px; border-radius:50%; background:#4eacea;}
.home .content .con .panel-body .system-info .icon i{font-size:50px; color:#FFF; margin-top:25px;}
.home .content .con .panel-body .module-info>div{display:inline-block; margin:20px 0;}
.home .content .con .panel-body .module-info .icon img{width:62px; height:62px;}
.home .content .contact .info{font-size:16px;}
.home #head{position:absolute; z-index:1; text-align:center; width:100%; top:10%;}
.home #head .logo{display:inline-block; background:url('../images/gw-logo.png') no-repeat; width:420px; height:95px;}
.home #head .advertisement{font-size:50px; color:#FFF; margin:5% 0 10% 0;}
.home #head .btns .btn{margin:0 10px;}
.home #banner{width:100%; margin:0 auto;}
.home #banner .item{width:100%; background-size:cover; background-position:50% 50%;}
.home #banner .carousel-indicators .fa{color:#FFF; font-size:50px; background:none !important;}
.home .content .banner{background-image:url('../images/banner-bg.png'); background-size: 990px 380px; background-position: center 15px; border-top: 1px solid #EEEEEE; border-bottom: 1px solid #EEEEEE; background-repeat: no-repeat; height:380px; background-color:#FFFFFF; min-width: 1014px; min-height: 180px;}
.home .content .con{padding-top:20px;}
.home .footer{height:50px; line-height:25px; margin-bottom:30px; color:#666;}
.home .footer a{color:#666;}
.home .footer a:hover{color:#428bca; text-decoration:none;}

.navbar-inverse ul li i{display:inline-block; margin-right:5px;}
.nav.navbar-nav .dropdown{z-index:1001;}
.welcome-container .shortcut a{display:block;float:left;text-align:center;margin-right:1.2em;padding:8px 5px;width:7em;height:7em;overflow:hidden;color:#333;}
.welcome-container .shortcut a:hover{text-decoration:none;background:#eee;border-radius:3px;padding:7px 4px;border:1px solid #d5d5d5;}
.welcome-container .shortcut a i{display:block;font-size:3em;margin:.28em .2em;}
.welcome-container .shortcut a img{display:block;height:3em;margin:.85em auto;}
.welcome-container .shortcut a span{display:block;font-size:1em;overflow:hidden;white-space:nowrap;}
.welcome-container .account img{width:6em;height:6em;}
.nav.nav-tabs{margin-bottom:20px; border-color:#428bca;}
.nav-tabs>li>a:hover{border-color:#eee #eee #428bca #eee;}
.nav-tabs>li.active>a, .nav-tabs>li.active>a:hover, .nav-tabs>li.active>a:focus{color:#FFF; background-color:#428bca; border-color:#428bca;}
.page-header{padding-bottom:0;}
.page-header:first-child{margin-top:0;}
.gw-logo{background:url('../images/gw-logo.png') no-repeat;display:inline-block;width:420px;height:95px;margin-left:0 !important;}
.gw-container .footer{font-size:1.1em;padding:2em 0;}
.gw-container{background:#3a3a3a url('../images/gw-bg.jpg') no-repeat fixed; background-size:cover; -webkit-background-size:cover; -o-background-size:cover;}
.gw-container .page-header{border:none; border-left:0.3em #333 solid; padding-left:1em;}
.gw-container .tile{display:block; float:left; margin:0.4em;padding:.2em 1em .5em 1em; width:8em; text-align:center; background:#EEE; color:#333; text-decoration:none;}
.gw-container .tile.tile-2x{width:10em;margin-top: 0.5em}
.gw-container .tile.tile-3x{width:15em;}
.gw-container .tile:hover{background:#7dacdd; color:#FFF;}
.gw-container .tile > i{display:block; font-size:2em; margin:0.3em auto 0 auto;}
.gw-container .tile > span{display:block;}
.gw-container .navbar-toggle {border-color: #ddd;}
.gw-container .navbar-toggle .icon-bar{background-color: #ccc;}
.gw-container .navbar-toggle:hover, .navbar-default .navbar-toggle:focus {background-color: #ddd;}
.gw-container .navbar-nav.navbar-right:last-child {margin-right: 0;}
.gw-container .navbar-nav .tile{background:#31b8ef; color:#FFF; box-shadow:0 2px 4px rgba(0, 0, 0, 0.05);}
.gw-container .navbar-nav .tile:hover{background:#4ccafd;}
.gw-container .navbar-nav .tile.active{background:#1e95c9;}
.gw-container .well .breadcrumb{padding-left:0;padding-right:0;}
.gw-container .breadcrumb{margin-bottom:0.5em; background:#F5F5F5;}
.gw-container .breadcrumb a{color:#333;}
.gw-container .footer, .gw-container .footer a{color:#fff;}
.gw-container .well .account{margin:15px 0;}

.gw-container .well .account .panel-heading{border-bottom:1px solid #E9E9E9; background:#FFF;}
.gw-container .well .account .panel-heading a{display:inline-block; color:#66667C; text-align:center; font-size:14px; padding:0 6px; font-weight:bold;}
.gw-container .well .account .panel-heading a i{margin-right:5px;}
.gw-container .well .account .panel-heading a:focus{text-decoration:none;}
.gw-container .well .account .panel-heading a.manage{color:#d9534f;}
.gw-container .well .account .panel-heading .manage{color:#d9534f;}
.gw-container .well .account .panel-body{padding:0 15px;}
.gw-container .well .account .panel-body li{padding:0;}
.gw-container .well .account .panel i{display:inline-block;}
.gw-container .well .account .panel .list-group-bottom{height:40px; line-height:40px; background:#f5f5f5;}
.gw-container .well .account .panel .list-group-bottom-left > span{display:inline-block; color:#999;}
.gw-container .well .account .panel .list-group-bottom-right > a{color:#999; padding:0 6px;}
.gw-container .well .account .panel .list-group-bottom-right > a i{margin-right:5px;}
.table-responsive.panel-body{overflow:auto;}
.table{table-layout:fixed;}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{vertical-align:middle;}
.table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.table>thead>tr>th{border-top:none;}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th{border-top:none;}
@media screen and (max-width:767px){.tpl-calendar>div,.tpl-district-container>div{margin-bottom:10px;}}
/*左侧菜单*/
.big-menu .panel{margin-bottom:0; border-bottom:0; border-top-width:0; border-top-left-radius:0; border-top-right-radius:0; border-radius:0;}
.big-menu .panel .panel-heading{border-top-left-radius:0; border-top-right-radius:0; position:relative; overflow:hidden; padding-right:50px;}
.big-menu .panel .panel-heading .panel-title,.big-menu .panel .list-group-item{overflow:hidden; white-space:nowrap; text-overflow:clip;}
.big-menu .panel>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:0; border-bottom-left-radius:0; border-bottom:1px #DDD solid;}
.big-menu .panel:first-child{border-top-width:1px; border-top-left-radius:3px; border-top-right-radius:3px;}
.big-menu .panel:first-child .panel-heading{border-top-left-radius:3px; border-top-right-radius:3px;}
.big-menu .panel:last-child{margin-bottom:10px; border-bottom-right-radius:4px; border-bottom-left-radius:4px;}
.big-menu .panel:last-child>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:3px; border-bottom-left-radius:3px;}
.big-menu .panel .panel-collapse{width:50px; height:38px; line-height:38px; position:absolute; top:0; right:0; color:#CCC; text-align:center; background:#EEE; border-left:1px #DDD solid;}
.big-menu .btn-group{width:100%;}
.big-menu .btn-group>.btn{border-radius:0; width:33.5%; text-align:center; border-top:0;}
/*更新提醒*/
.upgrade-tips{width:100%; position:absolute; top:0; text-align:center; z-index:99999;}
.upgrade-tips a{display:inline-block; margin:0 auto; height:25px; line-height:25px; padding:0 5px; color:#FFF; background:#EE5023; }
.upgrade-tips a.module{background:#3C9D40;}
.upgrade-tips span{display:inline-block; height:25px; line-height:25px; background:#328233; padding:0 10px; color:#FFF; cursor:pointer;}

/*多图上传*/
.multi-img-details{margin-top:.5em;}
.multi-img-details .multi-item{height: 150px; max-width: 150px; position:relative; float: left; margin-right: 18px;}
.multi-img-details .multi-item img{max-width: 150px; max-height: 150px;}
.multi-img-details .multi-item em{position:absolute; top: 0; right: -14px;}

.modal-dialog .avatar-browser{min-height:480px;line-height:0;color:#428bca;}
.modal-dialog .avatar-browser .thumbnail{display:block;float:left;width:100px;height:100px;margin-right:13px;cursor:pointer;overflow:hidden;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#428bca;}

.modal-dialog .avatar-browser{min-height:480px;line-height:0;color:#428bca;}
.modal-dialog .avatar-browser .thumbnail{display:block;float:left;width:100px;height:100px;margin-right:13px;cursor:pointer;overflow:hidden;}
.modal-dialog .avatar-browser .thumbnail:hover{border-color:#428bca;}
.pagination { margin:0;}

.history .img-list { margin: 4px; display: block; clear: both; list-style: outside none none; padding:0px;}
.history .img-list .img-item { float: left; padding: 1px; cursor: pointer; position: relative;}
.history .img-list .img-item .img-container { position: relative; width:75px; height:75px; text-align:center; background-color:#eee; background-size: contain; background-repeat: no-repeat; background-position: 50% 50%;}
.history .img-list .img-item .img-container:hover .img-meta{display:none; }
.history .img-list .img-item .img-container .img-meta { width:100%; position: absolute; bottom: 0; z-index:1; background:rgba(0,0,0,0.5); color:#eee;}
.history .img-list .img-item .img-container .select-status {display:inline-block; width:50px; height:50px; position: absolute; bottom:0; right:0; z-index:2;}
.history .img-list .img-item-selected .img-container .select-status {display:inline-block; width:50px; height:50px; position: absolute; bottom:0; right:0; background: url('../images/success-small.png') no-repeat right bottom; z-index:2;}
.history .img-list .img-item-selected .img-container .img-meta {display:none;}
.history .img-list .img-item .btnClose{text-align:right; position:absolute; top:-10px; right:-5px; display:none; z-index:10;}
.history .img-list .img-item:hover .btnClose{display:block;}
.history .img-list .img-item .btnClose a{display:inline-block; width:20px; height:20px; text-align:center; line-height:20px; color:#fff; background:rgba(0,0,0,.3); border-radius:50%;}
.history .img-list .img-item .btnClose a i.fa-times{font-size:14px; padding:3px;margin-top: 0;}
.history .img-list .img-item .btnClose a:hover{background:rgba(0,0,0,1);}
.pagination { margin:0;}

/*图文回复列表样式*/
.reply .panel-group .panel:first-child{margin:0; border-bottom-left-radius:0; border-bottom-right-radius:0;}
.reply .panel-group .panel:first-child .img{overflow:hidden; position:relative; height:160px; background-color:#ececec; color:#c0c0c0; text-align:center; line-height:132px;}
.reply .panel-group .panel:first-child .img img{max-height:160px; max-width:100%; vertical-align:middle;}
.reply .panel-group .panel:first-child .img span{display:block; position:absolute; bottom:0; left:0; height:28px; line-height:28px; width:100%; background:rgba(0,0,0,0.7); color:#fff; padding:0 10px;}
.reply .panel-group .panel+.panel{border-radius:0; margin-top:0; border-top:0;}
.reply .panel-group .panel+.panel .panel-body{height:104px; padding-right:105px; position:relative; overflow:hidden;}
.reply .panel-group .panel+.panel .img{float:right; position:absolute; right:15px; top:12px; height:80px; width:80px; background-color:#ececec; color:#c0c0c0; line-height:80px; text-align:center; overflow:hidden;}
.reply .panel-group .panel+.panel .img img{max-width:80px; max-height:80px; vertical-align:middle; border:0;}
.reply .panel-group .panel+.panel .text h4{word-break:break-all; font-size:14px; line-height:1.5em; height:54px; overflow:hidden; text-overflow:ellipsis;}
.reply .panel-group .panel-body .mask{position:absolute; width:100%; height:100%; line-height:104px; left:0; top:0; z-index:999; background-color:rgba(229, 229, 229, 0.85) !important; text-align:center; display:none;}
.reply .panel-group .panel:first-child .panel-body .mask{line-height:160px;}
.reply .panel-group .panel-body .mask a{color:#333; display:inline-block; margin:0 3px; cursor:pointer;}
.reply .panel-group .panel-body:hover .mask{display:block;}
.reply .panel-group .panel-body .default{ font-style:normal; font-size:16px;}
.reply .panel-group .panel:last-child{margin-bottom:20px; border-bottom-left-radius:4px; border-bottom-right-radius:4px;}
.reply .panel-group .panel:last-child .panel-body{padding:15px;}
.reply .panel-group .panel-body .add{border:3px dotted #b8b8b8; height:72px; line-height:72px; text-align:center; cursor:pointer; border-radius:5px;}
.reply .panel-group img{position:absolute; left:0; top:0; display:inline-block; width:100%; height:100%;}
.reply .panel-group{clear: both;margin-bottom: 20px; position: relative;}
.reply .panel-group .del,.panel-group .no{position: absolute; top:-10px; width:20px; height:20px; color:#fff; background:rgba(0,0,0,0.3); text-align:center; line-height:20px; cursor:pointer; border-radius:100%;}
.reply .panel-group .del{right:-10px;}
.reply .panel-group .no{left:-10px;background: #3071a9}
.reply .panel-group .del:hover{background:rgba(0,0,0,0.7);}
.reply .panel-group .panel:last-child{margin-bottom: 0;}

/*素材回复列表样式*/
.material .panel-group{position:relative; cursor:pointer;}
.material .panel-group .panel:first-child{margin:0; border-bottom-left-radius:0; border-bottom-right-radius:0;}
.material .panel-group .panel:first-child .img{overflow:hidden; position:relative; height:160px; background-color:#ececec; color:#c0c0c0; text-align:center; line-height:132px;}
.material .panel-group .panel:first-child .img img{max-height:160px; max-width:100%; vertical-align:middle;}
.material .panel-group .panel:first-child .img span{display:block; position:absolute; bottom:0; left:0; height:28px; line-height:28px; width:100%; background:rgba(0,0,0,0.7); color:#fff; padding:0 10px;}
.material .panel-group .panel+.panel{border-radius:0; margin-top:0; border-top:0;}
.material .panel-group .panel+.panel .panel-body{height:104px; padding-right:105px; position:relative; overflow:hidden;}
.material .panel-group .panel+.panel .img{float:right; position:absolute; right:15px; top:12px; height:80px; width:80px; background-color:#ececec; color:#c0c0c0; line-height:80px; text-align:center; overflow:hidden;}
.material .panel-group .panel+.panel .img img{max-width:80px; max-height:80px; vertical-align:middle; border:0;}
.material .panel-group .panel+.panel .text h4{word-break:break-all; font-size:14px; line-height:1.5em; height:54px; overflow:hidden; text-overflow:ellipsis;}
.material .panel-group .panel-body .default{ font-style:normal; font-size:16px;}
.material .panel-group .panel:last-child{margin-bottom:0px; border-bottom-left-radius:20px; border-bottom-right-radius:4px;}
.material .panel-group .panel:last-child .panel-body{padding:15px;}
.material .panel-group img{position:absolute; left:0; top:0; display:inline-block; width:100%; height:100%;}
.material .panel-group .mask{position:absolute; width:100%; height:100%; left:0; top:0; z-index:10; background-color:rgba(0,0,0,0.6 ) !important; text-align:center; display:none; border-radius:4px;}
.material .panel-group:hover .mask,.panel-group.selected .mask{display:block;}
.material .panel-group>i{display:none; width:46px; height:46px; color:#fff; text-align:center; line-height:46px; z-index:20; position:absolute; top:50%; left:50%; margin-top:-23px; margin-left:-23px; font-size:46px; font-weight:200;}
.material .panel-group.selected>i{display:inline-block}

/*图文回复编辑样式*/
.reply .aside{}
.reply .aside .card{position:relative;}
.reply .aside .panel-body{min-height:50px;}
.reply .aside .arrow-left,.reply .aside .arrow-left:after{width: 0; height: 0; border-style: solid; border-width: 8px 10px 8px 0; border-color: transparent #d1d1d1 transparent transparent; position: absolute; left: -10px; top: 15px;}
.reply .aside .arrow-left:after{content: ""; border-right-color: #fff; left: 1px; top: -8px;}
.reply .aside .img{height:92px; text-align:center; position:relative; overflow:hidden; padding:0;}
.reply .aside .img img{display:inline-block; max-width:100%; vertical-align:middle; margin:0; border:0;}
.reply .aside .img h3{position:absolute; bottom:0; left:0; width:100%; text-align:center; z-index:2; color:#fff; background:rgba(51,51,51,0.5); padding:5px 15px; font-size:14px; line-height:1.5em; margin:0; cursor:pointer;}
.reply .aside .img>span{display:block; border:1px solid #eee; height:100%; text-align:center; line-height:92px; cursor:pointer;}
.reply .aside .img>span i{color:green;}

/*导航栏公告样式*/
.topbar-notice{cursor: pointer;}
.topbar-notice .dropdown-menu{width:440px; left:-183px; padding:0;}
.topbar-notice .topbar-notice-arrow,.topbar-notice .topbar-notice-arrow:after{width: 0; height: 0; border-style: solid; position: absolute; border-width: 0 8px 10px 8px; border-color:transparent transparent rgba(0,0,0,.4) transparent; left: 50%; top:-11px; margin-left:-9px;}
.topbar-notice .topbar-notice-arrow:after{content: ""; border-bottom-color:#eaedf1; left:1px; top:1px;}
.topbar-notice .topbar-notice-head{height:50px; padding:0 15px; font-size:14px; line-height:50px; background:#eaedf1; color:#333; border-top-left-radius:4px; border-top-right-radius:4px;}
.topbar-notice .topbar-notice-body ul{margin:0; padding:0; list-style:none; height:305px; overflow-y:auto; background:#fff;}
.topbar-notice .topbar-notice-body ul li{border-bottom:1px solid #eaedf1;}
.topbar-notice .topbar-notice-body ul li a{display:table; width:100%; padding:10px; overflow:hidden; background-color:#fff;}
.topbar-notice .topbar-notice-body ul li:hover a{background-color:#f2f2f2;}
.topbar-notice .topbar-notice-body ul li a div{display:table-cell; }
.topbar-notice .topbar-notice-body ul li a div:first-child{width:20px; vertical-align:middle; font-size:10px}
.topbar-notice .topbar-notice-body ul li a div:first-child i.new{color:#ff9900}
.topbar-notice .topbar-notice-body ul li a div:first-child i.old{color:#d5d5d5}
.topbar-notice .topbar-notice-body ul li a h3{font-size:14px; max-width:300px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; height:20px; line-height:20px; margin:0;}
.topbar-notice .topbar-notice-body ul li a .date{color:#333;}
.topbar-notice .topbar-notice-body ul li a div:nth-of-type(3){width:60px; text-align:right; vertical-align:middle; height:10px;}
.topbar-notice .topbar-notice-footer{height:50px; line-height:50px; text-align:center;}

/*新闻公告页面样式*/
.notice-show .breadcrumb{padding-left:0;}
.notice-show .category-btn{margin-bottom:10px;}
.notice-show .panel{padding:0 50px;}
.notice-show .panel .panel-heading{background-color:#fff; padding-left:0;}
.notice-show h5{color:#428BCA; border-left:3px solid #428BCA; padding-left:15px;}
.notice-show .small span{display:inline-block; margin:0 10px 0 0;}
.notice-show .panel ul{list-style:none; padding:0; margin:0;}
.notice-show .panel ul li{height:30px; line-height:30px; white-space:nowrap; overflow:hidden; padding-right:150px; position:relative;}
.notice-show .panel ul li a{display:inline-block; width:100%; overflow:hidden; text-overflow:ellipsis;}
.notice-show .date{ position:absolute; right:0;}
.notice-show h6{font-size:24px;}

/*图片弹出框*/
#modal-webuploader{z-index:1000000000}

/*表单验证插件*/
.bv-form .help-block{margin-bottom: 0}
.has-error .help-text, .has-success .help-text{color:#737373}

/*系统弹窗模态框*/
#modal-message{z-index:10000000000}
#map-dialog{z-index:10000000001}

/*优惠券列表*/
#counpon-Modal .table td, #counpon-Modal .table th{text-align:center;}
#counpon-Modal .coupon-content .info{height:100px; line-height:100px; text-align:center; font-size:22px; font-weight:normal}

/*素材列表*/
#material-Modal #wxcard .table td, #material-Modal #wxcard .table th{text-align:center;}
#material-Modal .material-content .info{height:100px; line-height:100px; text-align:center; font-size:22px; font-weight:normal}

/*工具类*/
.padding-b-0{padding-bottom:0;}

/*计划任务日志弹出框*/
.mass-log:hover{cursor:wait;}
.table-cron.table{margin-bottom:0}
.table-cron.table tr td{white-space:normal; overflow:auto}
.table-cron.table tr:first-child td{border-top:none}

/*菜单样式*/
.menu .page-header{border:none; border-left:0.3em #333 solid; padding-left:1em;}
.menu .tile{display:block; float:left; margin:0.4em;padding:.2em 1em .5em 1em; width:8em; text-align:center; background:#EEE; color:#333; text-decoration:none;}
.menu .tile:hover{background:#7dacdd; color:#FFF;}
.menu .tile > i{display:block; font-size:2em; margin:0.3em auto 0 auto;}
.menu .tile > span{display:block;}

.module .thumbnails{padding:0; margin:0 0 0 -15px;}
.module li{position:relative; margin-left:15px; float:left;}
.module-priority{vertical-align:middle; height:30px; line-height:30px;cursor:pointer;}
span.module-priority{cursor:default;}
.module-priority select{vertical-align:middle; width:inherit; margin:0;}
.module-pic{width:100%;min-height:135px; overflow:hidden;position:relative;}
.module-pic > img{display:block; width:100%; height:147px; margin:0 auto;}
.module-pic .official{position:absolute; top:5px; right:5px;}
.module-button{padding:9px 0; height:30px; line-height:30px; box-sizing:content-box;}
.module-button .popover{width:auto;left:auto;top:auto;bottom:0;right:0;margin:0;margin-bottom:55px;line-height:20px;}
.module-button .popover-content {padding:5px 10px; overflow:hidden;}
.module-button .popover .arrow{left:85%;}
.module-button .popover select{width:100%;}
.module-detail{position:absolute;bottom:0;filter:Alpha(opacity=70);background:#000;background:rgba(0, 0, 0, 0.7);width:100%;font-family:arial,宋体b8b\4f53,sans-serif;}
.module-detail p{padding:0 9px; margin:0;}
.module-detail h5{color:#FFF;font-weight:normal;padding:0 9px;}
.module-detail h5 small,.module-detail p{color:#CCC;}
p.module-brief{margin-bottom:10px; font-size:12px;}
p.module-description{display:block;padding:3px 10px;}

.require{color:red; margin-right:5px}

.deskmenu .cover{display : none;position: absolute;background : #000000;opacity: 0.5;width: 111px;height: 21px;}
.deskmenu .edit{color : #FFF;position: absolute;display: none;}
.deskmenu .del{color : #FFF;position: absolute;display: none;}
/*卡券*/
.marbot0{margin-bottom:0}
.clear{width:100%;height:0;clear:both;}
.form-area{margin:1px 0;padding:10px 15px;background:#F5F5F5;}
.card-title{background: url("../images/card.png") no-repeat scroll 0 -84px rgba(0, 0, 0, 0);color: #ffffff;font-size: 17px;height: 62px;line-height: 85px;text-align: center;}
.shop-panel{padding:21px 12px 12px;color:#FFF;position: relative}
.logo-area{margin-bottom:7px;}
.logo-area .logo{width:38px;height: 38px;padding-top: 0;margin-right: 7px;border-radius: 22px;border: 1px solid #d3d3d3;}
.logo-area .logo img{width:38px;height: 38px;border-radius: 22px;}
.msg-area{}
.tick-msg{text-align: center;margin-bottom: 6px;color:#fff;}
.tick-msg b{font-weight: normal;font-size:24px;color:#fff}
.tick-time{text-align: center;color:#fff}
.deco{position:absolute;bottom: -1px;left: 0;width: 100%;height: 5px;background: url(../images/card_tpl.png) repeat-x;}
.card-dispose{padding:15px 0;border-bottom: 1px solid #e7e7eb;margin-bottom: 15px;background: #fff;position: relative}
.unset{height:30px;line-height:30px;padding-left:15px;display: none;}
.barcode{width:320px;height:71px;margin:0 auto;background:url("../images/card.png") 27px -156px no-repeat}
.qrcode{width:320px;height:174px;margin:0 auto;background:url("../images/card.png") 70px -237px no-repeat}
.sn-area{text-align: center;font-size:25px;color:#000;}
.code_num{font-size:15px;text-align: center;margin-bottom: 10px;}
.list{border-top:1px solid #e7e7eb;border-bottom:1px solid #e7e7eb;background: #fff;padding:0;}
.list li{padding-left:15px;list-style: none;position: relative}
.li-panel{padding:11px 30px 11px 0;display:block;border-bottom: 1px solid #e7e7eb;}
.ricon{position: absolute;right:20px;top:15px}
.cicon{position: absolute;left:50%;top:25%;display:none;}
.hover{background: #E9E9E9;opacity:0.8}
.arrow_in{position: absolute;width:0;height:0;border-width: 12px;border-style: dashed;border-color: transparent;top:120px;left:-13px;border-left-width: 0;border-right-color: #f4f5f9;border-right-style: solid;}
.code_preview{display: none}

redpajama_set_name: RedPajamaGithub


text:
namespace MFA.Entities.LogicModels
{
    public class EmotionResponse
    {
        public FaceRectangle FaceRectangle { get; set; }
        public EmotionScores Scores { get; set; }
        public string EmotionAnalyzed => Scores.FindHighestEmotionScore();
    }
}


text:
from ._utils import SimpleModel
from ._utils import TestCase
from ..utils import model_to_tuple
from ..utils import tuple_to_model

class model_to_tupleTestCase(TestCase):
    def setUp(self):
        self.model = SimpleModel()
        self.result = model_to_tuple(self.model)

    def test_returns_a_tuple(self):
        self.assertIsA(self.result, tuple)

    def test_tuple_has_a_length_of_two(self):
        self.assertEqual(2, len(self.result))

    def test_first_parameter_is_the_app_label(self):
        self.assertEqual("tests", self.result[0])

    def test_second_parameter_is_the_model_name(self):
        self.assertEqual("simplemodel", self.result[1])

    def test_supports_model_classes_as_well(self):
        result = model_to_tuple(SimpleModel)
        self.assertTrue("tests" in result)
        self.assertTrue("simplemodel" in result)

class tuple_to_modelTestCase(TestCase):
    def test_loads_model_from_tuple(self):
        result = tuple_to_model(("tests", "simplemodel"))
        self.assertEqual(result.__name__, SimpleModel.__name__)


text:
@interface PodsDummy_Pods_kantu : NSObject
@end
@implementation PodsDummy_Pods_kantu
@end


text:
<!doctype html>

  <meta charset="utf-8">
  <title>amp-geo example</title>
  <link rel="canonical" href="https://example.com/components/amp-geo/">
  <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">

  <amp-geo layout="nodisplay">

    </amp-geo>

The game is called

    <button on="tap:AMP.setState({ showLocation: true })">Where am I?</button>

ISOCountry Code:

Matched Country Groups:

You're in the EU.

You're outside the EU.


text:
package org.encog.app.analyst.commands;

import java.io.File;
import java.util.Random;

import org.encog.app.analyst.AnalystError;
import org.encog.app.analyst.EncogAnalyst;
import org.encog.app.analyst.script.DataField;
import org.encog.app.analyst.script.ml.ScriptOpcode;
import org.encog.app.analyst.script.normalize.AnalystField;
import org.encog.app.analyst.script.prop.ScriptProperties;
import org.encog.ml.MLMethod;
import org.encog.ml.bayesian.BayesianNetwork;
import org.encog.ml.data.buffer.EncogEGBFile;
import org.encog.ml.factory.MLMethodFactory;
import org.encog.ml.prg.VariableMapping;
import org.encog.ml.prg.expvalue.ValueType;
import org.encog.ml.prg.extension.EncogOpcodeRegistry;
import org.encog.ml.prg.extension.ProgramExtensionTemplate;
import org.encog.ml.prg.generator.RampedHalfAndHalf;
import org.encog.ml.prg.train.PrgPopulation;
import org.encog.persist.EncogDirectoryPersistence;
import org.encog.util.logging.EncogLogging;

/**
 * The Encog Analyst create command. This command is used to create a Machine
 * Learning method.
 *
 */
public class CmdCreate extends Cmd {

	/**
	 * The name of this command.
	 */
	public static final String COMMAND_NAME = "CREATE";

	/**
	 * Construct the create command.
	 *
	 * @param theAnalyst
	 *            The analyst to use.
	 */
	public CmdCreate(final EncogAnalyst theAnalyst) {
		super(theAnalyst);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public boolean executeCommand(final String args) {
		// get filenames
		final String trainingID = getProp().getPropertyString(
				ScriptProperties.ML_CONFIG_TRAINING_FILE);
		final String resourceID = getProp().getPropertyString(
				ScriptProperties.ML_CONFIG_MACHINE_LEARNING_FILE);

		final File trainingFile = getScript().resolveFilename(trainingID);
		final File resourceFile = getScript().resolveFilename(resourceID);

		final String type = getProp().getPropertyString(
				ScriptProperties.ML_CONFIG_TYPE);
		final String arch = getProp().getPropertyString(
				ScriptProperties.ML_CONFIG_ARCHITECTURE);

		EncogLogging.log(EncogLogging.LEVEL_DEBUG, "Beginning create");
		EncogLogging.log(EncogLogging.LEVEL_DEBUG, "training file:"
				+ trainingID);
		EncogLogging.log(EncogLogging.LEVEL_DEBUG, "resource file:"
				+ resourceID);
		EncogLogging.log(EncogLogging.LEVEL_DEBUG, "type:" + type);
		EncogLogging.log(EncogLogging.LEVEL_DEBUG, "arch:" + arch);

		final EncogEGBFile egb = new EncogEGBFile(trainingFile);
		egb.open();
		final int input = egb.getInputCount();
		final int ideal = egb.getIdealCount();
		egb.close();

		final MLMethodFactory factory = new MLMethodFactory();
		final MLMethod obj = factory.create(type, arch, input, ideal);

		if (obj instanceof BayesianNetwork) {
			final String query = getProp().getPropertyString(
					ScriptProperties.ML_CONFIG_QUERY);
			((BayesianNetwork) obj).defineClassificationStructure(query);
		} else if (obj instanceof PrgPopulation) {
			handlePrgPopulation((PrgPopulation) obj);

		}

		EncogDirectoryPersistence.saveObject(resourceFile, obj);

		return false;
	}

	private void handlePrgPopulation(PrgPopulation pop) {

		// create the variables
		int classType = 0;
		pop.getContext().clearDefinedVariables();
		for(AnalystField field : getScript().getNormalize().getNormalizedFields() ) {
			DataField df = getScript().findDataField(field.getName());
			String varName = field.getName();

			VariableMapping mapping;

			switch( field.getAction() ) {
				case Ignore:
					mapping = null;
					break;
				case PassThrough:
					if( df.isInteger() ) {
						mapping = new VariableMapping(varName, ValueType.intType);
					} else if( df.isReal() ) {
						mapping = new VariableMapping(varName, ValueType.floatingType);
					} else {
						mapping = new VariableMapping(varName, ValueType.stringType);
					}
					break;
				case Equilateral:
				case OneOf:
				case Normalize:
					mapping = new VariableMapping(varName, ValueType.floatingType);
					break;
				case SingleField:
					if( df.isClass() ) {
						mapping = new VariableMapping(varName, ValueType.enumType, classType++, df.getClassMembers().size() );
					} else if( df.isInteger() ) {
						mapping = new VariableMapping(varName, ValueType.intType );
					} else {
						mapping = new VariableMapping(varName, ValueType.floatingType);
					}
					break;
				default:
					throw new AnalystError("Unknown normalization action: " + field.getAction().toString());
			}

			if( field.isOutput() ) {
				pop.getContext().setResult(mapping);
			} else {
				pop.getContext().defineVariable(mapping);
			}
		}

		// populate the opcodes
		if (this.getScript().getOpcodes().size() > 0) {
			for (ScriptOpcode op : this.getScript().getOpcodes()) {
				ProgramExtensionTemplate temp = EncogOpcodeRegistry.INSTANCE
						.findOpcode(op.getName(), op.getArgCount());
				pop.getContext().getFunctions().addExtension(temp);
			}
		}

		// generate initial population
		RampedHalfAndHalf generate = new RampedHalfAndHalf(pop.getContext(), 1, 6);
		generate.generate(new Random(), pop);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public String getName() {
		return CmdCreate.COMMAND_NAME;
	}

}


text:
class AddWinsAndPointsToUsers < ActiveRecord::Migration
  def change
    change_table :users do |t|
      t.integer :wins, default: 0
    end
  end
end


text:
import {
  Cartesian3,
  InterpolationType,
  JulianDate,
  Matrix4,
  ModelAnimationLoop,
  ModelComponents,
  ModelAnimation,
  ModelRuntimeNode,
  Quaternion,
} from "../../../index.js";

describe("Scene/Model/ModelAnimation", function () {
  const AnimatedPropertyType = ModelComponents.AnimatedPropertyType;

  const mockNode = {
    translation: Cartesian3.ZERO,
    rotation: Quaternion.IDENTITY,
    scale: new Cartesian3(1.0, 1.0, 1.0),
    index: 0,
  };

  let runtimeNode;
  let mockSceneGraph;
  let mockModel;

  function createMockChannel(mockNode, mockSampler, path) {
    const mockTarget = {
      node: mockNode,
      path: path,
    };
    const mockChannel = {
      sampler: mockSampler,
      target: mockTarget,
    };
    return mockChannel;
  }

  beforeEach(function () {
    mockSceneGraph = {
      _runtimeNodes: [],
    };

    runtimeNode = new ModelRuntimeNode({
      node: mockNode,
      transform: Matrix4.IDENTITY,
      transformToRoot: Matrix4.IDENTITY,
      sceneGraph: mockSceneGraph,
      children: [],
    });

    mockSceneGraph._runtimeNodes.push(runtimeNode);
    mockModel = {
      clampAnimations: true,
      sceneGraph: mockSceneGraph,
    };
  });

  const mockTranslationSampler = {
    input: [0, 0.5, 1.0],
    interpolation: InterpolationType.LINEAR,
    output: [
      Cartesian3.ZERO,
      new Cartesian3(1.0, 2.0, 3.0),
      new Cartesian3(4.0, 5.0, 6.0),
    ],
  };

  const mockRotationSampler = {
    input: [0.25, 0.75, 1.25],
    interpolation: InterpolationType.STEP,
    output: [
      Quaternion.IDENTITY,
      new Quaternion(0.0, 0.0, 0.707, -0.707),
      Quaternion.IDENTITY,
    ],
  };

  const emptyOptions = {};

  it("initializes", function () {
    const mockAnimation = {
      channels: [
        createMockChannel(
          mockNode,
          mockTranslationSampler,
          AnimatedPropertyType.TRANSLATION
        ),
        createMockChannel(
          mockNode,
          mockRotationSampler,
          AnimatedPropertyType.ROTATION
        ),
      ],
      name: "Sample Animation",
    };

    const runtimeAnimation = new ModelAnimation(
      mockModel,
      mockAnimation,
      emptyOptions
    );

    expect(runtimeAnimation.animation).toBe(mockAnimation);
    expect(runtimeAnimation.name).toEqual("Sample Animation");
    expect(runtimeAnimation.model).toBe(mockModel);

    const channels = runtimeAnimation.runtimeChannels;
    expect(channels.length).toEqual(2);
    expect(channels[0]._path).toEqual(AnimatedPropertyType.TRANSLATION);
    expect(channels[1]._path).toEqual(AnimatedPropertyType.ROTATION);

    expect(runtimeAnimation.localStartTime).toBe(0.0);
    expect(runtimeAnimation.localStopTime).toBe(1.25);

    expect(runtimeAnimation.startTime).toBeUndefined();
    expect(runtimeAnimation.delay).toBe(0.0);
    expect(runtimeAnimation.stopTime).toBeUndefined();
    expect(runtimeAnimation.removeOnStop).toBe(false);
    expect(runtimeAnimation.multiplier).toBe(1.0);
    expect(runtimeAnimation.reverse).toBe(false);
    expect(runtimeAnimation.loop).toBe(ModelAnimationLoop.NONE);
  });

  it("initializes with options", function () {
    const mockAnimation = {
      channels: [
        createMockChannel(
          mockNode,
          mockTranslationSampler,
          AnimatedPropertyType.TRANSLATION
        ),
        createMockChannel(
          mockNode,
          mockRotationSampler,
          AnimatedPropertyType.ROTATION
        ),
      ],
      name: "Sample Animation",
    };

    const options = {
      startTime: JulianDate.fromDate(new Date("January 1, 2014 12:00:00 UTC")),
      delay: 5.0,
      stopTime: JulianDate.fromDate(new Date("January 1, 2014 12:01:30 UTC")),
      multiplier: 0.5,
      reverse: true,
      loop: ModelAnimationLoop.REPEAT,
      removeOnStop: true,
    };

    const runtimeAnimation = new ModelAnimation(
      mockModel,
      mockAnimation,
      options
    );

    expect(runtimeAnimation.animation).toBe(mockAnimation);
    expect(runtimeAnimation.name).toEqual("Sample Animation");
    expect(runtimeAnimation.model).toBe(mockModel);

    const channels = runtimeAnimation.runtimeChannels;
    expect(channels.length).toEqual(2);
    expect(channels[0]._path).toEqual(AnimatedPropertyType.TRANSLATION);
    expect(channels[1]._path).toEqual(AnimatedPropertyType.ROTATION);

    expect(runtimeAnimation.localStartTime).toBe(0.0);
    expect(runtimeAnimation.localStopTime).toBe(1.25);

    expect(runtimeAnimation.startTime).toEqual(options.startTime);
    expect(runtimeAnimation.delay).toBe(5.0);
    expect(runtimeAnimation.stopTime).toEqual(options.stopTime);
    expect(runtimeAnimation.removeOnStop).toBe(true);
    expect(runtimeAnimation.multiplier).toBe(0.5);
    expect(runtimeAnimation.reverse).toBe(true);
    expect(runtimeAnimation.loop).toBe(ModelAnimationLoop.REPEAT);
  });

  it("initializes without invalid channels", function () {
    const mockAnimation = {
      channels: [
        createMockChannel(
          mockNode,
          mockTranslationSampler,
          AnimatedPropertyType.TRANSLATION
        ),
        {
          sampler: mockRotationSampler,
          target: undefined,
        },
      ],
      name: "Sample Animation",
    };

    const runtimeAnimation = new ModelAnimation(
      mockModel,
      mockAnimation,
      emptyOptions
    );

    expect(runtimeAnimation.animation).toBe(mockAnimation);
    expect(runtimeAnimation.name).toEqual("Sample Animation");
    expect(runtimeAnimation.model).toBe(mockModel);

    const channels = runtimeAnimation.runtimeChannels;
    expect(channels.length).toEqual(1);
    expect(channels[0]._path).toEqual(AnimatedPropertyType.TRANSLATION);

    expect(runtimeAnimation.localStartTime).toBe(0.0);
    expect(runtimeAnimation.localStopTime).toBe(1.0);
  });

  it("animates", function () {
    const mockAnimation = {
      channels: [
        createMockChannel(
          mockNode,
          mockTranslationSampler,
          AnimatedPropertyType.TRANSLATION
        ),
        createMockChannel(
          mockNode,
          mockRotationSampler,
          AnimatedPropertyType.ROTATION
        ),
      ],
      name: "Sample Animation",
    };

    const runtimeAnimation = new ModelAnimation(
      mockModel,
      mockAnimation,
      emptyOptions
    );

    expect(runtimeNode.translation).toEqual(Cartesian3.ZERO);
    expect(runtimeNode.rotation).toEqual(Quaternion.IDENTITY);

    runtimeAnimation.animate(0.5);

    expect(runtimeNode.translation).toEqual(new Cartesian3(1.0, 2.0, 3.0));
    expect(runtimeNode.rotation).toEqual(Quaternion.IDENTITY);

    runtimeAnimation.animate(1.0);

    expect(runtimeNode.translation).toEqual(new Cartesian3(4.0, 5.0, 6.0));
    expect(runtimeNode.rotation).toEqual(
      new Quaternion(0.0, 0.0, 0.707, -0.707)
    );
  });
});


text:
import java.awt.Color;
import java.awt.Graphics;
public class Rectangle extends Shape
{
	public Rectangle(String type, int shapeID, Color objectsColor, int radius, int x, int y)
	{
        super(type, shapeID, objectsColor, radius, x, y);
	}

	public void draw(Graphics page)
	{
		page.fillRect ( x-radius/2, y-radius/2, radius, radius);
	}
}