text:
package ch.cern.cvmfs.fragments;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Spinner;

import ch.cern.cvmfs.R;
import ch.cern.cvmfs.model.RepositoryDescription;
import ch.cern.cvmfs.model.RepositoryManager;

public class RepositorySelectionFragment extends CVMFSFragment {

    private View mView;
    private Spinner repositorySpinner;
    private RepositoryDescription[] repositoryDescriptions;
    private RepositoryDescription selectedRepository;
    private Button enterButton;
    private RepositorySelectionListener mCallback;
    private int chosenPosition;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        return mView = inflater.inflate(R.layout.fragment_repository_selection, container, false);
    }

    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        chosenPosition = retrieveChosenPosition();
        super.onViewCreated(view, savedInstanceState);
    }

    @Override
    public void onDestroy() {
        storeSelectedPosition();
        super.onDestroy();
    }

    private void storeSelectedPosition() {
        getActivity().getPreferences(Context.MODE_PRIVATE)
                .edit().putInt("position", chosenPosition).commit();
    }

    private int retrieveChosenPosition() {
        return getActivity().getPreferences(Context.MODE_PRIVATE).getInt("position", 0);
    }

    @Override
    public void onAttach(Activity activity) {
        try {
            mCallback = (RepositorySelectionListener) getParentFragment();
        } catch (ClassCastException e) {
            throw new RuntimeException(getParentFragment() + " must implement " +
                    RepositorySelectionListener.class.getName());
        }
        super.onAttach(activity);
    }

    @Override
    protected void onPrepareInterface() {
        repositoryDescriptions = RepositoryManager.getRepositoryList(getActivity());
        repositorySpinner = (Spinner) mView.findViewById(R.id.repo_selection_fqrn_spinner);
        enterButton = (Button) mView.findViewById(R.id.repo_selection_enter_button);

        ArrayAdapter<RepositoryDescription> arrayAdapter =
                new ArrayAdapter<>(getActivity(), R.layout.spinner_textview);
        arrayAdapter.addAll(repositoryDescriptions);
        arrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        repositorySpinner.setAdapter(arrayAdapter);
        repositorySpinner.setSelection(chosenPosition);
        repositorySpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
            @Override
            public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
                selectedRepository = repositoryDescriptions[position];
                enterButton.setEnabled(true);
                chosenPosition = position;
            }

            @Override
            public void onNothingSelected(AdapterView<?> parent) {
                selectedRepository = null;
                enterButton.setEnabled(false);
            }
        });
        enterButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                mCallback.repositoryChosen(selectedRepository);
            }
        });
    }

    public interface RepositorySelectionListener {
        void repositoryChosen(RepositoryDescription chosen);
    }
}


text:
import { injectReducer } from 'store/reducers'
import DetailedCardLayout from './containers/DetailedCardLayoutContainer'
import { LoadRoute, TransactionHistoryRoute } from './routes'

export const DetailedCardRoute = (store) => {
  return {
    path        : '/banking/cards/prepaidcards/card',
    component   : DetailedCardLayout,
    indexRoute  : TransactionHistoryRoute(store),
    childRoutes : [
      LoadRoute(store)
    ]
  }
}

export default DetailedCardRoute

redpajama_set_name: RedPajamaGithub


text:
import { Component, ViewEncapsulation } from '@angular/core';
import { PrismDirective } from './../prism/prism.component';

@Component({
  moduleId: module.id,
  selector: 'layout-demo',
  templateUrl: 'layout.component.html',
  directives: [
    PrismDirective
  ],
  styles: [
    `
    .demo-container {
        width: 100%;
        position: relative;
        height: 300px;
    }
    .demo-layout-transparent {
        background: url('assets/oslo.jpg') center / cover;
        color: white;
    }
    .page-content {
        height: 600px;
    }
    `
  ],
  encapsulation: ViewEncapsulation.None
})
export class LayoutDemo {

  public activeIndex = 0;

  public tabChanged({index}) {
    this.activeIndex = index;
  }
}

@Component({
  moduleId: module.id,
  selector: 'layout-demo-0',
  template: '',
})
export class Layout0Demo {}

@Component({
  moduleId: module.id,
  selector: 'layout-demo-1',
  template: '
Link 1 content
',
})
export class Layout1Demo {}

@Component({
  moduleId: module.id,
  selector: 'layout-demo-2',
  template: '
Link 2 content
',
})
export class Layout2Demo {}

@Component({
  moduleId: module.id,
  selector: 'layout-demo-3',
  template: '
Link 3 content
',
})
export class Layout3Demo {}


text:
body {
    background: url(../images/bg.png) repeat;
    font-family: 'Open Sans', sans-serif;
}

.main-signin {
    box-shadow: 0px 10px 20px #000;
    width: 455px;
    height: 360px;
    margin: 120px auto;
}
.main-signin .main-signin__head {
    background: #242328;
    border-bottom: 1px solid #2d2f32;
    border-radius: 10px 10px 0 0;
    box-shadow: 0px 1px 0px #000;
    padding: 12px 0;
}
.main-signin .main-signin__head p {
    color: #586069;
    text-align: center;
}
.main-signin .main-signin__middle {
    background: #1f1e23;
    border-bottom: 1px solid #2d2f32;
    border-top: 1px solid #2d2f32;
    box-shadow: 0px 1px 0px #000;
}
.main-signin .main-signin__middle .middle__form {
    margin: 40px 0 20px 0;
}
.main-signin .main-signin__middle .middle__form ::-webkit-input-placeholder {
    color: #25262a;
}
.main-signin .main-signin__middle .middle__form :-moz-placeholder {
    color: #25262a;
}
.main-signin .main-signin__middle .middle__form ::-moz-placeholder {
    color: #25262a;
}
.main-signin .main-signin__middle .middle__form :-ms-input-placeholder {
    color: #25262a;
}
.main-signin .main-signin__middle .middle__form input[type="text"],
.main-signin .main-signin__middle .middle__form input[type="email"],
.main-signin .main-signin__middle .middle__form input[type="password"],
.main-signin .main-signin__middle .middle__form input[type="submit"] {
    background: #daf4fe;
    border: none;
    color: #25262a;
    display: block;
    margin: 0 20px;
    outline: none;
    padding: 15px 0;
    width: 90%;
}

.main-signin .main-signin__middle .middle__form input[type="text"],
.main-signin .main-signin__middle .middle__form input[type="password"] {
    border-radius: 5px 5px 0 0;
    padding:15px 20px;
    width:81%;
}

.main-signin .main-signin__middle .middle__form input[type="email"] {
    border-top: 1px solid #acabab;
    padding:15px 20px;
    width:81%;
}
.main-signin .main-signin__middle input[type="email"] {
    border-radius: 5px;
}

.main-signin .main-signin__middle .middle__form input[type="password"] {
    border-top: 1px solid #acabab;
    border-radius: 0 0 5px 5px;
}
.main-signin .main-signin__middle .middle__form input[type="submit"] {
    background: #00aeef;
    border-radius: 5px;
    border-bottom: 1px solid #000;
    border-top: 1px solid #80d6f7;
    color: #fff;
    font-size: 18px;
    margin-top: 15px;
    cursor:pointer;
    text-transform: uppercase;
}
.main-signin .main-signin__middle .middle__form input[type="submit"]:active {
    background: #80d6f7;
}
.main-signin .main-signin__foot {
    background: #242328;
    border-top: 1px solid #2d2f32;
    border-radius: 0 0 10px 10px;
    float: left;
    padding: 12px 0;
    width: 100%;
}
.main-signin .main-signin__foot .foot__left {
    float: left;
    padding: 0 0 0 6%;
    width: 30%;
}
.main-signin .main-signin__foot .foot__left p {
    color: #586069;
    margin: 0;
    padding: 16px 0 0 0;
    text-transform: uppercase;
}
.main-signin .main-signin__foot .foot__right {
    float: left;
    width: 64%;
}
.main-signin .main-signin__foot .foot__right .twit,
.main-signin .main-signin__foot .foot__right .face {
    float: left;
}
.main-signin .main-signin__foot .foot__right .twit a,
.main-signin .main-signin__foot .foot__right .face a {
    -webkit-transition: 0.4s;
    -moz-transition: 0.4s;
    -o-transition: 0.4s;
    transition: 0.4s;
    display: block;
    margin: -12px 0;
    text-indent: -999em;
    width: 85px;
    height: 77px;
}
.main-signin .main-signin__foot .foot__right .twit a:hover,
.main-signin .main-signin__foot .foot__right .face a:hover {
    background-color: #2d2f32;
}
.main-signin .main-signin__foot .foot__right .twit a {
    background: url(../images/twitter.png) no-repeat center;
}
.main-signin .main-signin__foot .foot__right .face a {
    background: url(../images/facebook.png) no-repeat center;
    border-radius: 0 0 10px 0;
}

[class^="icon"], [class*=" icon"] {
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    text-decoration: inherit;
    -webkit-font-smoothing: antialiased;
}

.iconLogin:before {
    content: "\f090";
}

.iconRegister:before {
    content: "\f067";
}

.iconForgot:before {
    content: "\f128";
}

/** {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}*/

.patternwall {
    position: absolute;
    top: 20px;
    right: 20px;
}

body {
    /*font: 12px/22px "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, sans-serif;*/
    background: url(../images/005.png) left top;
}

.clear {
    clear: both;
}

.box {
    width: 300px;
    margin: 120px auto;
    position: relative;
    z-index: 1;
}

.tabs {
    /* position: absolute; */
    /* z-index: 2; */
    /* top: 0; */
    /* left: -34px; */
}
.tabs a {
    position: relative;
    height: 55px;
    width: 77px;
    display: -webkit-inline-box;
    margin-bottom: 10px;
    padding-top: 10px;
    cursor: pointer;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    transition: all 0.2s linear;
    -webkit-box-shadow: 0 0 2px #1a1a1a;
    -moz-box-shadow: 0 0 2px #1a1a1a;
    box-shadow: 0 0 2px #1a1a1a;
    border-radius: 5px;
}
.tabs a.active, .tabs a:hover {
    padding-top: 5px;
}
.tabs a:before {
    font-size: 45px;
    color: white;
    padding-left: 20px;
}

.blueBox {
    color: white;
    border: solid 1px #0083ff;
    background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0083ff), color-stop(100%, #0073e0));
    background: -webkit-linear-gradient(#0083ff, #0073e0);
    background: -moz-linear-gradient(#0083ff, #0073e0);
    background: -o-linear-gradient(#0083ff, #0073e0);
    background: linear-gradient(#0083ff, #0073e0);
    cursor:pointer;
}

.greenBox {
    color: white;
    border: solid 1px #57c100;
    background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #58c400), color-stop(100%, #4aa500));
    background: -webkit-linear-gradient(#58c400, #4aa500);
    background: -moz-linear-gradient(#58c400, #4aa500);
    background: -o-linear-gradient(#58c400, #4aa500);
    background: linear-gradient(#58c400, #4aa500);
    cursor:pointer;
}

.redBox {
    color: white;
    border: solid 1px #e50000;
    background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #e50000), color-stop(100%, #c90000));
    background: -webkit-linear-gradient(#e50000, #c90000);
    background: -moz-linear-gradient(#e50000, #c90000);
    background: -o-linear-gradient(#e50000, #c90000);
    background: linear-gradient(#e50000, #c90000);
    cursor:pointer;
}

.redBox:hover, .greenBox:hover, .blueBox:hover {opacity:0.9;}

.containerWrapper {
    position: relative;
    z-index: 3;
    overflow: hidden;
    height: 230px;
    -webkit-box-shadow: 0 0 5px black;
    -moz-box-shadow: 0 0 5px black;
    box-shadow: 0 0 5px black;
}

.tabContainer {
    /* height: 230px; */
    display: none;
    /* border: solid 1px white; */
    /* padding: 20px; */
    /* background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #dddddd)); */
    /* background-image: -webkit-linear-gradient(#ffffff, #dddddd); */
    background-image: -moz-linear-gradient(#ffffff, #dddddd);
    background-image: -o-linear-gradient(#ffffff, #dddddd);
    /* background-image: linear-gradient(#ffffff, #dddddd); */
    -webkit-transition: all 0.4s linear;
    -moz-transition: all 0.4s linear;
    -o-transition: all 0.4s linear;
    transition: all 0.4s linear;
}
.tabContainer.active {
    display: block;
}

.loginTitle {
    color: #4d4d4d;
    margin: 0 0 20px 0;
    padding: 0 0 15px 0;
    border-bottom: solid 1px #e6e6e6;
    text-shadow: 1px 1px 0 white;
}

.placeholder {
    height: 32px;
    margin-bottom: 20px;
}

.inputWrapper {
    height: 32px;
    margin-bottom: 20px;
    width: 100%;
    position: relative;
}
.inputWrapper:before {
    content: '';
    display: block;
    height: 5px;
    width: 100%;
    position: absolute;
    bottom: 0;
    border-left: solid 1px #cccccc;
    border-right: solid 1px #cccccc;
    border-bottom: solid 1px #cccccc;
}

form h2 {font-family:Tahoma;}

input[type=text], input[type=email], input[type=password] {
    width: 100%;
    color: #4d4d4d;
    position: relative;
    height: 32px;
    line-height: 32px;
    border: none;
    background: none;
    padding: 0 10px;
    font-size: 16px;
    -webkit-transition: all 0.2s linear;
    -moz-transition: all 0.2s linear;
    -o-transition: all 0.2s linear;
    transition: all 0.2s linear;
}
input[type=text]:focus, input[type=email]:focus, input[type=password]:focus {
    outline: none;
    border: none;
    border: 1px solid #cccccc;
}

button {
    float: right;
    color: white;
    height: 32px;
}


text:
function sparseKernDisplay(kern, varargin)

% SPARSEKERNDISPLAY Display parameters of the SPARSE kernel.
% FORMAT
% DESC displays the parameters of the sparse output block
% kernel and the kernel type to the console.
% ARG kern : the kernel to display.
%
% FORMAT does the same as above, but indents the display according
% to the amount specified.
% ARG kern : the kernel to display.
% ARG spacing : how many spaces to indent the display of the kernel by.
%
% SEEALSO : sparseKernParamInit, modelDisplay, kernDisplay
%
% COPYRIGHT : Neil D. Lawrence, 2006, 2008

% KERN

if nargin > 1
  spacing = repmat(32, 1, varargin{1});
  varargin{1} = varargin{1}+2;
else
  spacing = [];
  varargin{1} = 2;
end
spacing = char(spacing);
fprintf(spacing);
fprintf('Sparse kernel:\n')
for i = 1:length(kern.comp)
  fprintf(spacing);
  fprintf('Block %d\n', i)
  kernDisplay(kern.comp{i}, varargin{:});
end


text:
package com.twolinessoftware.smarterlist.service;

public class VersionWrapper {

    private int version;

    public VersionWrapper(int version) {
        this.version = version;
    }

    public int getVersion() {
        return version;
    }
}


text:
package com.os.controller.pay;

import com.os.comment.utils.alipay.CheckURL;
import com.os.comment.utils.alipay.Payment;
import com.os.comment.utils.alipay.SignatureHelper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * Created by Administrator on 2016/1/24 0024.
 */
@Controller
public class PayController {

    private static final String requestId = "1000000000000000000000000000"; // 订单支付订单号
    private static final String out_trade_no = "PAY0000";// 商户网站订单(也就是外部订单号,是通过客户网站传给支付宝,不可以重复)
    private static final String partner = "2088911375400259"; // 支付宝合作伙伴id  // partner和key提取方法:登陆签约支付宝账户--->点击"商家服务"就可以看到
    private static final String key = "ba1p6fl62sx4tujvgm391pfxtmh66unc"; // 支付宝安全校验码(账户内提取)
    private static final String seller_email = "511988575@qq.com"; // 卖家支付宝帐户
    //私钥
    private static final String privateKey = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBALyIhuOXfmLD46xn38DR2snr6iAfIIJkEN1pqa+U+ZqzA743p5Cdh8WRU2/LFU3E8SZ4zJ5BMM+ab6uMju4QPr/cbFdCSsT1ps9tY/zKy4Yx8/qUtxQr837qL3+n91U0xCouHV/5+QoPMkjz8ZEiunSupHQcixy6lOqjDf+7YczPAgMBAAECgYEAgq9QcSpt3SBUDQnju9C7jAQPwjxRWJDsb83yZVcqveUgzxXc/Q11M6nM4E0xczr0veo2S+x8XSt8BLnlyXdRRpJMJqE2CbTcmPgc7bLR+rBDj549tb+yyombP7g3/2Xd2pJcOx4cOIt+JDyWe+kt3blm8hmhX9w4yNKYw56KSqECQQD3s5APYGK82bS4XhSEmQIh5wVrbyOvsM8flFw81kXz0r6rL39fkVCuxbIgve5csvSKKYy2m4lBY0q5PE3nTwilAkEAwtmArrU3FZQzOlfm4MlUjkp+5nBg2FxTcCNkaFuw+d0bn9VvNTi7vr5qRK5eoi3IGRfQ1MvXBTGBjcwRxHyRYwJBAOPb03bBpLKy1jMPoHJFypdjTDIDH+HblP0o3hy8w8bCo9EXtWU1aPINPIowDdhKave5tw64T2/OJgv2NHfG1V0CQFWccTDSCFjf275HvvaHHzLBwo4HVFXcAwEjW8uKdfDi2G9avNj6i2sciN6SapwBV4jG8Qd+ZIQwo0alIi1duhcCQG01FKM7d2T1GUuUIOGfmXTxi7dXPGwFGrBqstoJ07NSoezGyXw8xz/bQPtsndtUDNKLyP31buTFIV+r1zpaXeg=";

    /**
     * 跳转支付宝支付
     *
     * @param request
     * @return
     */
    @RequestMapping("/front/pay/toAlipay")
    public String toAlipay(HttpServletRequest request) {
        try {
            return getAlipayUrl();
        } catch (Exception e) {
            System.out.println(e);
        }
        return null;
    }

    private String getAlipayUrl() throws Exception {
        String paygateway = "https://mapi.alipay.com/gateway.do?"; // 支付接口(不可以修改)
        String service = "create_direct_pay_by_user";// 快速付款交易服务(不可以修改)
        String sign_type = "MD5";// 文件加密机制(不可以修改)
        String input_charset = "utf-8"; // (不可以修改)
        String body = "100-" + requestId + "-" + out_trade_no;// 商品描述,推荐格式:商品名称(订单编号:订单编号)
        String total_fee = "100";// 订单总价,差价尚须银行支付的金额
        // total_fee = String.valueOf(total_fee); // 订单总价
        String payment_type = "1";// 支付宝类型.1代表商品购买(目前填写1即可,不可以修改)

        // subject 商品名称
        String subject = "orderno:" + requestId;
        // 扩展信息,存用户id和requestId.重要,必须存
        String extra_common_param = "100," + requestId;

        String show_url = "http://t.268xue.com/"; // 商品地址,
        // 根据集成的网站而定
        // 回调的地址
        String path = "http://t.268xue.com";
        String notify_url = path + "/order/alipaynotify/1"; // 通知接收URL(本地测试时,服务器返回无法测试)
        String return_url = path + "/order/alipaynotify/2"; // 支付完成后跳转返回的网址URL
        // 注意以上两个地址 要用 http://格式的完整路径
            /* 以下两个参数paymethod和defaultbank可以选择不使用,如果不使用需要注销,并在Payment类的方法中也要注销 */
        String defaultbank = null;// request.getParameter("defaultbank");
        String paymethod = "directPay";
//            if (StringUtils.isNotEmpty(defaultbank)) {
//                paymethod = "bankPay";
//            } else {
        defaultbank = null;
        paymethod = "directPay";

        String submiturl = Payment.CreateUrl(paygateway, service, sign_type, out_trade_no, input_charset, partner, key, show_url, body, total_fee, payment_type, seller_email, subject, notify_url, return_url, paymethod, defaultbank, extra_common_param);
        return "redirect:" + submiturl;
    }

    /**
     * 支付宝回调信息
     *
     * @param request
     * @param response
     * @param rtype
     * @param redirectAttributes
     * @return
     */
    @SuppressWarnings("unchecked")
    @RequestMapping("/order/alipaynotify/{rtype}")
    public String alipayrtn(HttpServletRequest request, HttpServletResponse response, @PathVariable Long rtype, RedirectAttributes redirectAttributes) {
        try {
            Map<String, Object> params = new HashMap<String, Object>();
            // 获得POST 过来参数设置到新的params中
            Map<String, Object> requestParams = request.getParameterMap();
            for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext(); ) {
                String name = iter.next();
                String[] values = (String[]) requestParams.get(name);
                String valueStr = "";
                for (int i = 0; i < values.length; i++) {
                    valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
                }
                /*
                 * 乱码解决,这段代码在出现乱码时使用,但是不一定能解决所有的问题,所以建议写过滤器实现编码控制。
				 * 如果mysign和sign不相等也可以使用这段代码转化
				 */
                valueStr = new String(valueStr.getBytes("ISO-8859-1"), "UTF-8"); // 乱码解决
                params.put(name, valueStr);
            }

            String alipayNotifyURL = "http://notify.alipay.com/trade/notify_query.do?" + "partner=" + partner + "&notify_id=" + request.getParameter("notify_id");
            String responseTxt = CheckURL.check(alipayNotifyURL);
            // 验证加密签名
            String mysign = SignatureHelper.sign(params, privateKey);
            // 最好是在异步做日志动作,可以记录mysign、sign、resposenTXT和其他值,方便以后查询错误。
            if (mysign.equals(request.getParameter("sign")) && responseTxt.equals("true")) {
                /* 可以在不同状态下获取订单信息,操作商户数据库使数据同步 */
                // 订单编号,系统内的requestId
                String out_trade_no = request.getParameter("out_trade_no");

                String trade_no = request.getParameter("trade_no"); // 支付宝交易号
                // 总价
                String total_fee = request.getParameter("total_fee");
                // 订单名称
                // String get_subject = new
                // String(request.getParameter("subject").getBytes("ISO-8859-1"),
                // "UTF-8");
                // 订单说明
                String get_body = new String(request.getParameter("body"));
                get_body = new String(request.getParameter("body").getBytes("ISO-8859-1"), "UTF-8");
                String extra_common_param = request.getParameter("extra_common_param");// 扩展信息存用户的id
                // 注意一定要返回给支付宝一个成功的信息(不包含HTML脚本语言)
                if (request.getParameter("trade_status").equals("WAIT_BUYER_PAY")) {
                    // 等待买家付款
                    this.sendMessage(request, response, "fail");
                } else if (request.getParameter("trade_status").equals("TRADE_FINISHED") || request.getParameter("trade_status").equals("TRADE_SUCCESS")) {
                    // 校验好状态,在这里可以写入订单的数据处理,

                    Map<String, String> sourceMap = new HashMap<String, String>();
                    sourceMap.put("total_fee", total_fee);
                    sourceMap.put("out_trade_no", out_trade_no);
                    sourceMap.put("userId", extra_common_param.split(",")[0]);
                    sourceMap.put("requestId", extra_common_param.split(",")[1]);
//                    sourceMap.put("payType", PayType.ALIPAY.toString());
//                    Trxorder trxorder = trxorderService.getTrxorderByRequestId(extra_common_param.split(",")[1]);
//                    if (trxorder.getTrxStatus().equals(TrxOrderStatus.SUCCESS.toString())) {
//                        if (rtype == 1) {
//                            return null;
//                        } else {
//                            redirectAttributes.addAttribute(OrderConstans.RESMSG, "支付成功");
//                            return "redirect:/front/success";
//                        }
//                    }
                    // 必须校验支付的金额
//                    Map<String, String> res = trxHessianService.noTrxTrxOrderComplete(sourceMap);
//                    if (ObjectUtils.isNotNull(res)) {
//
//                        redirectAttributes.addAttribute(OrderConstans.RESMSG, res.get(OrderConstans.RESMSG));
//
//                        // 根据返回的结果,订单支付成功或者充值成功时,代表成功
//                        if (StringUtils.isNotEmpty(res.get(OrderConstans.BANKCODE)) && res.get(OrderConstans.BANKCODE).equalsIgnoreCase(OrderConstans.SUCCESS)) {
//                            sendMessage(request, response, "success");// 注意一定要返回给支付宝一个成功的信息(不包含HTML脚本语言)
//                        } else {
//                            sendMessage(request, response, "fail");// 失败
//                        }
//                    } else {
//                        sendMessage(request, response, "fail");// 失败
//                    }

                }
            } else {
                redirectAttributes.addAttribute("", "请求异常");
                sendMessage(request, response, "fail");
            }
        } catch (Exception e) {
            try {
                this.sendMessage(request, response, "fail");
                return "error";
            } catch (IOException e1) {

            }
        }
        // 同步时跳转到成功页面
        if (rtype.longValue() == 2) {

            return "redirect:/front/success";
        }
        return null;
    }

    public void sendMessage(HttpServletRequest request, HttpServletResponse response, String content)
            throws IOException {
        try {
            response.setCharacterEncoding("UTF-8");
            response.getWriter().write(content);
        } catch (Exception e) {
            System.out.println(e);
        }
    }
}


text:
package org.immopoly.appengine.actions;

import java.util.Map;

import javax.jdo.PersistenceManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.immopoly.appengine.DBManager;
import org.immopoly.appengine.PMF;
import org.immopoly.appengine.User;
import org.immopoly.common.ImmopolyException;

public class ActionPublicUserInfo extends AbstractAction {

	public ActionPublicUserInfo(Map<String, Action> actions) {
		super(actions);
	}

	@Override
	public String getURI() {
		return "user/profile";
	}

	@Override
	public void execute(HttpServletRequest req, HttpServletResponse resp) throws ImmopolyException {
		PersistenceManager pm = PMF.get().getPersistenceManager();
		try {
			LOG.info("Profile "+req.getRequestURI());
			String username = req.getRequestURI().substring(14);
			//TODO schtief enhance framework for responsetyp enums
			//check for .json
			RESPONSETYPE mode = RESPONSETYPE.HTML;
			if(username.endsWith(".json")){
				username = username.replace(".json","");
				mode= RESPONSETYPE.JSON;
			}
			LOG.info("username "+username);
			if (null == username || username.length() == 0)
				throw new ImmopolyException(ImmopolyException.MISSING_PARAMETER_USERNAME,"missing username");

			User user = DBManager.getUserByUsername(pm, username);
			if (null == user) {
				throw new ImmopolyException(ImmopolyException.USERNAME_NOT_FOUND,"username not found ");
			} else {
				LOG.info("Profile " + user.getUserName());
				if(mode==RESPONSETYPE.JSON){
					resp.getOutputStream().write(user.toPublicJSON(true, true, false).toString().getBytes("UTF-8"));
				}else if(mode==RESPONSETYPE.HTML){
					String template = getTemplate("Profile.html");
					template = template.replace("_USERNAME_", username);
					resp.setContentType("text/html");
					resp.getWriter().write(template);
				}
			}
		} catch (ImmopolyException e) {
			throw e;
		} catch (Exception e) {
			throw new ImmopolyException(ImmopolyException.USER_INFO_FAILED,"could not login user", e);
		} finally {
			pm.close();
		}
	}
}


text:
require 'spec_helper'
require File.join(File.dirname(__FILE__), '../../../lib/gadgeto/video_url')

YOUTUBE_LINKS = [ 'http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0',
                  'http://www.youtube.com/embed/0zM3nApSvMg?rel=0',
                  'http://www.youtube.com/watch?v=0zM3nApSvMg&feature=feedrec_grec_index',
                  'http://www.youtube.com/watch?v=0zM3nApSvMg',
                  'http://youtu.be/0zM3nApSvMg',
                  'http://www.youtube.com/watch?v=0zM3nApSvMg#t=0m10s' ]

VIMEO_LINKS = [ 'http://vimeo.com/channels/hd#11384488',
                'http://vimeo.com/groups/brooklynbands/videos/11384488',
                'http://vimeo.com/staffpicks#11384488',
                'http://vimeo.com/11384488' ]

describe Gadgeto::VideoUrl do

  describe 'instance methods' do
    let(:youtube_video_url){ Gadgeto::VideoUrl.new('http://www.youtube.com/embed/0zM3nApSvMg?rel=0') }
    let(:vimeo_video_url){ Gadgeto::VideoUrl.new('http://vimeo.com/11384488') }

    describe '#id' do
      it 'should return the youtube video-id for a youtube video url' do
        expect(youtube_video_url.id).to eq('0zM3nApSvMg')
      end

      it 'should return the vimeo video-id for a vimeo video url' do
        expect(vimeo_video_url.id).to eq('11384488')
      end
    end

    describe '#service' do
      it 'should return "youtube" for a youtube video url' do
        expect(youtube_video_url.service).to eq(:youtube)
      end

      it 'should return "vimeo" for a vimeo video url' do
        expect(vimeo_video_url.service).to eq(:vimeo)
      end
    end

    describe '#embedded' do
      it 'should return the url for embedded video for youtube with autplay true default' do
        expect(youtube_video_url.embedded).to eq('http://www.youtube.com/embed/0zM3nApSvMg?wmode=transparent&autoplay=1')
      end

      it 'should return the url for embedded video for youtube with autoplay false if set' do
        expect(youtube_video_url.embedded(:autoplay => false)).to eq('http://www.youtube.com/embed/0zM3nApSvMg?wmode=transparent&autoplay=0')
      end

      it 'should return the url for embedded video for vimeo with autoplay true default' do
        expect(vimeo_video_url.embedded).to eq('http://player.vimeo.com/video/11384488?title=0&byline=0&portrait=0&autoplay=1')
      end

      it 'should return the url for embedded video for vimeo with autoplay false if set' do
        expect(vimeo_video_url.embedded(:autoplay => false)).to eq('http://player.vimeo.com/video/11384488?title=0&byline=0&portrait=0&autoplay=0')
      end
    end

    describe '#valid?' do
      it 'should return true for a valid youtube url' do
        YOUTUBE_LINKS.each do |youtube_url|
          expect(Gadgeto::VideoUrl.new(youtube_url)).to be_valid
        end
      end

      it 'should return true for a valid vimeo url' do
        VIMEO_LINKS.each do |vimeo_url|
          expect(Gadgeto::VideoUrl.new(vimeo_url)).to be_valid
        end
      end

      it 'should return false for a unsupported url' do
        expect(Gadgeto::VideoUrl.new('http://www.imnotthaaatvalid.de/7777as882128as')).not_to be_valid
      end
    end
  end

  describe 'class methods' do

    describe '#valid?' do
      it 'should return true for a valid youtube url' do
        YOUTUBE_LINKS.each do |youtube_url|
          expect(Gadgeto::VideoUrl.valid?(youtube_url)).to be_truthy
        end
      end

      it 'should return true for a valid vimeo url' do
        VIMEO_LINKS.each do |vimeo_url|
          expect(Gadgeto::VideoUrl.valid?(vimeo_url)).to be_truthy
        end
      end

      it 'should return false for a unsupported url' do
        expect(Gadgeto::VideoUrl.valid?('http://www.imnotthaaatvalid.de/7777as882128as')).to be_falsey
      end
    end

    describe '#supported_services' do
      it 'should return the supported service types' do
        expect(Gadgeto::VideoUrl.supported_services).to eq([:youtube, :vimeo])
      end
    end
  end
end


text:
class Admin::Archived::NotesController < Admin::AdminController
  before_action :fetch_petition
  before_action :fetch_note

  rescue_from ActiveRecord::RecordNotUnique do
    @note = @petition.note(true) and update
  end

  def show
    render 'admin/archived/petitions/show'
  end

  def update
    if @note.update(note_params)
      redirect_to admin_archived_petition_url(@petition)
    else
      render 'admin/archived/petitions/show'
    end
  end

  private

  def fetch_note
    @note = @petition.note || @petition.build_note
  end

  def fetch_petition
    @petition = ::Archived::Petition.find(params[:petition_id])
  end

  def note_params
    params.require(:archived_note).permit(:details)
  end
end


text:
"""Open Vswitch Mac address module."""
import logging

from compass.hdsdiscovery import base
from compass.hdsdiscovery import utils

CLASS_NAME = "Mac"

class Mac(base.BasePlugin):
    """Open Vswitch MAC address module."""
    def __init__(self, host, credential):
        self.host = host
        self.credential = credential

    def process_data(self, oper="SCAN", **kwargs):
        """Dynamically call the function according 'oper'

        :param oper: operation of data processing
        """
        func_name = oper.lower()
        return getattr(self, func_name)(**kwargs)

    def scan(self, **kwargs):
        """Implemnets the scan method in BasePlugin class.

           .. note::
              In this module, mac addesses were retrieved by ssh.
        """
        try:
            user = self.credential['username']
            pwd = self.credential['password']
        except KeyError:
            logging.error("Cannot find username and password in credential")
            return None

        cmd = ("BRIDGES=$(ovs-vsctl show |grep Bridge |cut -f 2 -d '\"');"
               "for br in $BRIDGES; do"
               "PORTS=$(ovs-ofctl show $br |grep addr |cut -f 1 -d ':' "
               "|egrep -v 'eth|wlan|LOCAL'|awk -F '(' '{print $1}');"
               "for port in $PORTS; do"
               "RESULT=$(ovs-appctl fdb/show $br |"
               "awk '$1 == '$port' {print $1"  "$2"  "$3}');"
               "echo '$RESULT'"
               "done;"
               "done;")
        output = None
        try:
            output = utils.ssh_remote_execute(self.host, user, pwd, cmd)
        except Exception as error:
            logging.exception(error)
            return None

        logging.debug("[scan][output] output is %s", output)
        if not output:
            return None

        fields_arr = ['port', 'vlan', 'mac']

        result = []
        for line in output:
            if not line or line == '\n':
                continue

            values_arr = line.split()
            temp = {}
            for field, value in zip(fields_arr, values_arr):
                temp[field] = value

            result.append(temp.copy())

        return result


text:
using System;

namespace WorkflowCore.Exceptions
{
    public class WorkflowDefinitionLoadException : Exception
    {
        public WorkflowDefinitionLoadException(string message)
            : base (message)
        {
        }
    }
}


text:
package app.miner.module.step.processors;

import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import app.miner.module.step.AbstractStepProcessor;

import java.util.Map;
import java.util.function.Consumer;

/**
 * Created by Issen on 15.11.2015.
 */
public class ElementIterator extends AbstractStepProcessor {

    public static class ConfigurationParameters {
        public static String SELECTOR = "SELECTOR";
        public static String ACTION = "ITERATOR_ACTION";
    }

    public static class Actions {
        public static final Consumer<Element> ECHO_ACTION = element -> {
            java.lang.String value = element.text();
            System.out.println(value);
        };
    }

    private String selector;
    private Consumer<Element> action;

    @Override
    public void initialize(Map<String, Object> config) {
        selector = (String) config.get(ConfigurationParameters.SELECTOR);
        action = Actions.ECHO_ACTION; // TODO HARDCODE!
        //String acitonName = (String) config.get(ConfigurationParameters.ACTION);
    }

    @Override
    public Map<String, Object> processStep(Map<String, Object> data) {
        Document doc = (Document) data.get(GetPage.DataParameters.PAGE_CONTENT);
        doc.select(selector).forEach(action);
        return data;
    }

}


text:
@interface TKDFileUtilities : NSObject

+(BOOL) fileExists:(NSString *)filePath;
+(BOOL) directoryExists:(NSString *)path;

+(NSDirectoryEnumerator *) lookIn:(NSString *)path;

+(void) removeFileIfNonExistant:(NSString *)filePath;

+(void) createDirectoryAtPathIfNonExistant:(NSString *)path;
+(void) unzipFileAtPath:(NSString *)path inDirectoryPath:(NSString *)directory;

+(NSArray *) directories:(NSString *) path;

@end


text:
using FluentMigrator.Builders.Delete.DefaultConstraint;
using FluentMigrator.Expressions;
using NUnit.Framework;

using Shouldly;

namespace FluentMigrator.Tests.Unit.Builders.Delete
{
    [TestFixture]
    public class DeleteDefaultConstraintExpressionBuilderTests
    {
        [SetUp]
        public void Setup()
        {
            _expression = new DeleteDefaultConstraintExpression();
            _builder = new DeleteDefaultConstraintExpressionBuilder(_expression);
        }

        private DeleteDefaultConstraintExpressionBuilder _builder;
        private DeleteDefaultConstraintExpression _expression;

        [Test]
        public void OnColumnShouldSetColumnNameOnExpression()
        {
            _builder.OnColumn("column");
            _expression.ColumnName.ShouldBe("column");
        }

        [Test]
        public void OnSchemaShouldSetSchemaNameOnExpression()
        {
            _builder.InSchema("Shema");
            _expression.SchemaName.ShouldBe("Shema");
        }

        [Test]
        public void OnTableShouldSetTableNameOnExpression()
        {
            _builder.OnTable("ThaTable");
            _expression.TableName.ShouldBe("ThaTable");
        }
    }
}


text:
namespace
{

//crap::logger< crap::log_time_time, crap::log_channel_core, crap::log_type_info, crap::log_target_cout, 512 >* logme;

TEST( AnnounceTestLogger )
{
    CRAP_DEBUG_LOG( LOG_CHANNEL_CORE| LOG_TARGET_COUT| LOG_TYPE_DEBUG, "Starting tests for \"logger.h\"" );
}

TEST(InstanceLogger)
{
    //logme = new crap::logger< crap::log_time_time, crap::log_channel_core, crap::log_type_info, crap::log_target_cout, 512 >();
}

TEST(DirectLogging)
{
    //logme->log("This is some logging fun");
}

TEST(LoggingGeneral)
{
    //crap::log( LOG_CHANNEL_CORE | LOG_TYPE_INFO | LOG_TARGET_COUT, "This is line number %i, oh yeah!", __LINE__ );
    //crap::log( LOG_CHANNEL_CORE | LOG_TYPE_ERROR | LOG_TARGET_COUT, "This is line number %i, oh yeah!", __LINE__ );
}

TEST(DestroyLogger)
{
    //delete logme;
}

TEST(LoggingNotWorkingl)
{
    //crap::log( LOG_CHANNEL_CORE | LOG_TYPE_INFO | LOG_TARGET_COUT, "This is line number %i, oh yeah!", __LINE__ );
    //crap::log( LOG_CHANNEL_CORE | LOG_TYPE_ERROR | LOG_TARGET_COUT, "This is line number %i, oh yeah!", __LINE__ );
}

}


text:
Notice
================
This project is inactive. I've decided to keep it on GitHub to demonstrate what sort of programming skills I had during my first and second years at university.

JCalculator
================
JCalculator is a desktop calculator program written in Java.

Please note this project is in a pre-alpha development stage. I am still learning how to best use Java practices to improve this program, so it is by no means guaranteed to be bug-free.

Licence
================
JCalculator is distributed under the permissive MIT licence. Please see LICENCE.txt for more details.

Acknowledgements
================
I would like to thank Eric Laroche (laroche@lrdev.com) for his Java implementation of an unlimited-size rational number (BigRational.java), which I use in this program.


text:
let AliOSS = require('../db_services/ali_oss_controller');
const multer  = require('multer')
const upload = multer({ dest: './tmp/' })
const fs = require('fs');

module.exports = function (app) {

    app.get('/api/alioss/get/*', function(req, res) {
        AliOSS.getAliFile(req, res)
    })

    // 通过文件上传图片
    app.get('/api/alioss/upload/img/file', function(req, res) {
        AliOSS.uploadImageFileByPath(req, res)
    })

    // 通过url上传图片
    app.get('/api/alioss/upload/img/url', function(req, res) {
        AliOSS.uploadImageFileByUrl(req, res)
    })

    app.post('/api/alioss/upload/file', upload.single('file'), function(req, res) {// 文件路径
        let filePath = './' + req.file.path;
        // console.log(req.file)
        // 文件类型
        let temp = req.file.originalname.split('.');
        let fileType = temp[temp.length - 1];
        let lastName = '.' + fileType;
        // 构建文件名
        let fileName = Date.now() + lastName;
        let now = new Date();
        let year = now.getFullYear();
        let month = now.getMonth() + 1;
        let day = now.getDate();
        let key = 'file/' + year + '/' + month + '/' + day + '/' + fileName;

        fs.rename(filePath, fileName, (err) => {
          if (err) {
            res.jsonp({
              code: -1,
              message: 'upload faild, 文件写入失败'
            })
          }else{
              let localFile = './' + fileName;
              AliOSS.uploadFileToAliOSS(req, res, key, localFile, fs);
          }
        })

    })
}


text:
SEQUENCE = [
    'bugzilla_url_charfield',
    'repository_raw_file_url',
    'repository_visible',
    'repository_path_length_255',
    'localsite',
    'repository_access_control',
    'group_site',
    'repository_hosting_accounts',
    'repository_extra_data_null',
    'unique_together_baseline',
    'repository_archive',
    'repository_hooks_uuid',
    'repository_raw_password',
    'repository_name_length_255',
    'repository_scmtool_id',
]


text:
const TestHelper = require('../support/TestHelper');

module.exports.config = {
  tests: './*_test.js',
  timeout: 10000,
  output: './output',
  helpers: {
    Testcafe: {
      url: TestHelper.siteUrl(),
      show: true,
    },
  },
  include: {},
  bootstrap: false,
  mocha: {},
  name: 'acceptance',
  gherkin: {
    features: './gherkin/*.feature',
    steps: ['./gherkin/steps.js'],
  },
};


text:
package edu.cmu.cs.nbeckman.arkan8id.gameobjects;

import edu.cmu.cs.nbeckman.arkan8id.gameobjects.Collision.CollisionType;
import net.rim.device.api.system.Bitmap;

public class Ball implements HasBoundingBox {

	private static final Bitmap BALL_IMAGE = Bitmap.getBitmapResource("BlueBall.png");

	/*
	 * Store initial values...
	 */
	private final int initialPoxX;
	private final int initialPoxY;
	private final int initialVelX;
	private final int initialVelY;

	/*
	 * Current position
	 */
	private int posX;
	private long posY;

	/*
	 * Current velocity
	 */
	private int velX;
	private int velY;

	private long ballsLost;

	public Ball(int posX, int posY, int velX, int velY) {
		super();
		this.posX = posX;
		this.posY = posY;
		this.velX = velX;
		this.velY = velY;

		this.initialPoxX = posX;
		this.initialPoxY = posY;
		this.initialVelX = velX;
		this.initialVelY = velY;

		this.ballsLost = 0;
	}

	public int getHeight() {
		return BALL_IMAGE.getHeight();
	}

	public int getWidth() {
		return BALL_IMAGE.getWidth();
	}

	public int getX() {
		return posX;
	}

	public long getY() {
		return posY;
	}

	/**
	 * Move one step...
	 */
	public void step() {
		this.posX += velX;
		this.posY += velY;
	}

	/**
	 * Reset ball to initial position and velocity.
	 */
	public void reset() {
		this.posX = initialPoxX;
		this.posY = initialPoxY;
		this.velX = initialVelX;
		this.velY = initialVelY;

		this.ballsLost ++;
	}

	public int getVelX() {
		return velX;
	}

	public void setVelX(int velX) {
		this.velX = velX;
	}

	public int getVelY() {
		return velY;
	}

	public void setVelY(int velY) {
		this.velY = velY;
	}

	public Bitmap getImage() {
		return BALL_IMAGE;
	}

	public void respondToCollision(CollisionType collision) {
		if( collision == Collision.CollisionType.ANGLE_COLLISION ) {
			setVelX(-getVelX());
			setVelY(-getVelY());
		}
		else if( collision == Collision.CollisionType.HORIZONTAL_COLLISION ) {
			setVelY(-getVelY());
		}
		else if( collision == Collision.CollisionType.VERTICAL_COLLISION ) {
			setVelX(-getVelX());
		} else if( collision == Collision.CollisionType.GLANCING_BLOW ||
				   collision == Collision.CollisionType.NO_COLLISION) {
			// keep same velocity
		}
	}

	public long ballsLost() {
		return this.ballsLost;
	}
}


text:
Chapter 1: Introduction to Bayesian Methods
===========

### [Read it online here](http://nbviewer.ipython.org/urls/raw.github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/master/Chapter1_Introduction/Chapter1.ipynb)


text:
// Copyright (C) 2009 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.gerrit.server.config;

import com.google.gerrit.lifecycle.LifecycleListener;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.server.AnonymousUser;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.GerritPersonIdentProvider;
import com.google.gerrit.server.IdentifiedUser;
import com.google.gerrit.server.cache.CachePool;
import com.google.gerrit.server.git.GitRepositoryManager;
import com.google.gerrit.server.git.LocalDiskRepositoryManager;
import com.google.gerrit.server.git.TransferConfig;
import com.google.gerrit.server.git.WorkQueue;
import com.google.gerrit.server.util.IdGenerator;
import com.google.inject.Inject;
import org.apache.velocity.app.Velocity;
import org.apache.velocity.runtime.RuntimeConstants;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.lib.PersonIdent;

import java.util.Properties;

import static com.google.inject.Scopes.SINGLETON;

/** Starts global state with standard dependencies. */
public class GerritGlobalModule extends FactoryModule {

  public static class VelocityLifecycle implements LifecycleListener {
    private final SitePaths site;

    @Inject
    VelocityLifecycle(final SitePaths site) {
      this.site = site;
    }

    @Override
    public void start() {
      String rl = "resource.loader";
      String pkg = "org.apache.velocity.runtime.resource.loader";
      Properties p = new Properties();

      p.setProperty(rl, "file, class");
      p.setProperty("file." + rl + ".class", pkg + ".FileResourceLoader");
      p.setProperty("file." + rl + ".path", site.mail_dir.getAbsolutePath());
      p.setProperty("class." + rl + ".class", pkg + ".ClasspathResourceLoader");
      p.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS,
              "org.apache.velocity.runtime.log.SimpleLog4JLogSystem" );
      p.setProperty("runtime.log.logsystem.log4j.category", "velocity");

      try {
        Velocity.init(p);
      } catch(Exception e) {
        throw new RuntimeException(e);
      }
    }

    @Override
    public void stop() {
    }
  }

  @Inject
  GerritGlobalModule(@GerritServerConfig final Config config) {
  }

  @Override
  protected void configure() {

    bind(AnonymousUser.class);

    bind(PersonIdent.class).annotatedWith(GerritPersonIdent.class).toProvider(
        GerritPersonIdentProvider.class);

    bind(IdGenerator.class);
    bind(CachePool.class);
    // install(ProjectCacheImpl.module());

    bind(GitRepositoryManager.class).to(LocalDiskRepositoryManager.class);
    bind(WorkQueue.class);
    bind(TransferConfig.class);

    bind(IdentifiedUser.GenericFactory.class).in(SINGLETON);

    install(new LifecycleModule() {
      @Override
      protected void configure() {
        listener().to(LocalDiskRepositoryManager.Lifecycle.class);
        listener().to(CachePool.Lifecycle.class);
        listener().to(WorkQueue.Lifecycle.class);
        listener().to(VelocityLifecycle.class);
      }
    });
  }
}


text:
'use strict';

// Avoid `console` errors in browsers that lack a console.
(function() {
    var method;
    var noop = function () {};
    var methods = [
        'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error',
        'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log',
        'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd',
        'timeStamp', 'trace', 'warn'
    ];
    var length = methods.length;
    var console = (window.console = window.console || {});

    while (length--) {
        method = methods[length];

        // Only stub undefined methods.
        if (!console[method]) {
            console[method] = noop;
        }
    }
}());
'use strict';

$(function () {
  // Grab the template script
  var theTemplateScript = $('#example-template').html();

  // Compile the template
  var theTemplate = Handlebars.compile(theTemplateScript);

  // This is the default context, which is passed to the template
  var context = {
    people: [
      { firstName: 'Homer', lastName: 'Simpson' },
      { firstName: 'Peter', lastName: 'Griffin' },
      { firstName: 'Eric', lastName: 'Cartman' },
      { firstName: 'Kenny', lastName: 'McCormick' },
      { firstName: 'Bart', lastName: 'Simpson' }
    ]
  };

  // Pass our data to the template
  var theCompiledHtml = theTemplate(context);

  // Add the compiled html to the page
  $(document.body).append(theCompiledHtml);
});


text:
import linkr  # flake8: noqa: F401

import time

import mock

from models import Link
from test.backend.test_case import LinkrTestCase

with mock.patch.object(time, 'time', return_value=5):
    link = Link(
        alias='alias',
        outgoing_url='outgoing url',
    )
    link.link_id = 1

class TestLink(LinkrTestCase):
    _multiprocess_can_split_ = True

    def test_init(self):
        self.assertEqual(link.submit_time, 5)
        self.assertEqual(link.alias, 'alias')
        self.assertEqual(link.outgoing_url, 'outgoing url')
        self.assertEqual(link.password_hash, None)
        self.assertEqual(link.user_id, None)
        self.assertFalse(link.require_recaptcha)

    def test_validate_password(self):
        self.assertTrue(link.validate_password('password'))
        self.assertTrue(link.validate_password('anything'))
        self.assertTrue(link.validate_password(None))

    def test_update_password(self):
        self.assertTrue(link.validate_password('password'))
        link.update_password('new password')
        self.assertFalse(link.validate_password('password'))
        self.assertTrue(link.validate_password('new password'))
        link.update_password(None)

    def test_as_dict(self):
        link_dict = link.as_dict()
        del link_dict['full_alias']  # Value is dependent on config

        self.assertEqual(link_dict, {
            'link_id': 1,
            'user_id': None,
            'submit_time': 5,
            'alias': 'alias',
            'outgoing_url': 'outgoing url',
            'is_password_protected': False,
            'require_recaptcha': False,
        })

    def test_is_password_protected(self):
        self.assertFalse(link.is_password_protected())


text:
package com.akiban.sql.parser;

import com.akiban.sql.StandardException;

import java.util.Properties;

/**
 * The CurrentOf operator is used by positioned DELETE
 * and UPDATE to get the current row and location
 * for the target cursor.    The bind() operations for
 * positioned DELETE and UPDATE add a column to
 * the select list under the statement for the row location
 * accessible from this node.
 *
 * This node is placed in the from clause of the select
 * generated for the delete or update operation. It acts
 * much like a FromBaseTable, using the information about
 * the target table of the cursor to provide information.
 *
 */
public class CurrentOfNode extends FromTable
{
    private String cursorName;

    //
    // initializer
    //
    public void init(Object correlationName, Object cursor, Object tableProperties) {
        super.init(correlationName, tableProperties);
        cursorName = (String)cursor;
    }

    /**
     * Fill this node with a deep copy of the given node.
     */
    public void copyFrom(QueryTreeNode node) throws StandardException {
        super.copyFrom(node);

        CurrentOfNode other = (CurrentOfNode)node;
        this.cursorName = other.cursorName;
    }

    /**
     * Prints the sub-nodes of this object.  See QueryTreeNode.java for
     * how tree printing is supposed to work.
     *
     * @param depth The depth of this node in the tree
     */
    public void printSubNodes(int depth) {
        super.printSubNodes(depth);

        printLabel(depth, "cursor: ");
    }

    /**
     * Convert this object to a String.  See comments in QueryTreeNode.java
     * for how this should be done for tree printing.
     *
     * @return This object as a String
     */
    public String toString() {
        return "preparedStatement: " +
            cursorName + "\n" +
            super.toString();
    }

    public String getCursorName() {
        return cursorName;
    }

}


text:
{% extends "admin.html" %}

{% block style %}
    <link rel="stylesheet" href="/streets/inc/leaflet.css" />
    <link rel="stylesheet" href="/streets/inc/streets.css" />
{% endblock %}

{% block script %}

{% endblock %}

{%  block subnavigation %}
    {{  subnavigation(current_mod.getAdminSubNavigation()) }}
{%  endblock %}

{% block content %}

{{ _('settings.map.listtitle') }}

{{ _('settings.map.info') }}

    <form method="post" name="maplist">

{{ _('settings.map.name') }}

{{ _('settings.map.path') }}

            <button class="add" type="submit" name="action" value="createmap" title="{{ _('settings.map.addtitle') }}"></button>

            {%- if maps|count==0 %}

{{ _('settings.maps.nodata') }}

            {%- endif %}
            {%- for map in maps %}

{{ loop.index }}.

                        {{ map.name }}
                        {%- if map.default==1 %}{{ _('settings.map.defaultmap') }}{%- endif %}

{{ map.path }}

                <input type="hidden" name="mapids" value="{{ map.id }}"/>
                <button type="submit" name="action" value="deletemap_{{ map.id }}" title="{{ _('settings.map.deletetitle') }}" onclick="return questionDel()"></button>
                <button type="submit" name="action" value="detailmap_{{ map.id }}" title="{{ _('settings.map.detailtitle') }}"></button>

            {%- endfor %}

            <button type="submit" name="action" value="ordersetting" id="orderchange" style="display:none;">{{ _('settings.map.ordersave') }}</button>
             {{ _('settings.map.itemscount', count=maps|length) }}

        <input type="hidden" name="form_id" value="admin.settings.department.overview"/>
    </form>
{% endblock %}

{% block script_end %}
    {{ super() }}
    {%- if maps|count > 0 %}
    var maptype = "{{ maps[0].name }}";
    {%- else %}
    var maptype = "";
    {%- endif %}

    function questionDel(){
        return confirm('{{ _('settings.map.delquestion') }}');
    }

    $(document).ready( function() {
        $( "#sortable" ).sortable({update: function(event, ui){$('#orderchange').show()}});
    });

{% endblock %}


text:
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Root>
  <TestCase name="testDDLTableScan">
    <Resource name="sql">
      <![CDATA[SELECT * FROM src WHERE a > 1]]>
    </Resource>
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(ts=[$0], a=[$1], b=[$2])
+- LogicalFilter(condition=[>($1, 1)])
   +- LogicalTableScan(table=[[default_catalog, default_database, src]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
Calc(select=[ts, a, b], where=[>(a, 1)])
+- TableSourceScan(table=[[default_catalog, default_database, src]], fields=[ts, a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testDDLWithComputedColumn">
    <Resource name="sql">
      <![CDATA[SELECT * FROM computed_column_t]]>
    </Resource>
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(a=[$0], b=[$1], c=[+($0, 1)], d=[TO_TIMESTAMP($1)], e=[my_udf($0)])
+- LogicalTableScan(table=[[default_catalog, default_database, computed_column_t]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
Calc(select=[a, b, +(a, 1) AS c, TO_TIMESTAMP(b) AS d, my_udf(a) AS e])
+- TableSourceScan(table=[[default_catalog, default_database, computed_column_t]], fields=[a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testDDLWithWatermarkComputedColumn">
    <Resource name="sql">
      <![CDATA[SELECT * FROM c_watermark_t]]>
    </Resource>
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(a=[$0], b=[$1], c=[+($0, 1)], d=[TO_TIMESTAMP($1)], e=[my_udf($0)])
+- LogicalTableScan(table=[[default_catalog, default_database, c_watermark_t]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
Calc(select=[a, b, +(a, 1) AS c, TO_TIMESTAMP(b) AS d, my_udf(a) AS e])
+- TableSourceScan(table=[[default_catalog, default_database, c_watermark_t]], fields=[a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testLegacyTableSourceScan">
    <Resource name="sql">
      <![CDATA[SELECT * FROM MyTable]]>
    </Resource>
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(a=[$0], b=[$1], c=[$2])
+- LogicalTableScan(table=[[default_catalog, default_database, MyTable, source: [TestTableSource(a, b, c)]]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
LegacyTableSourceScan(table=[[default_catalog, default_database, MyTable, source: [TestTableSource(a, b, c)]]], fields=[a, b, c])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testTableApiScanWithComputedColumn">
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(a=[$0], b=[$1], c=[+($0, 1)], d=[TO_TIMESTAMP($1)], e=[my_udf($0)])
+- LogicalTableScan(table=[[default_catalog, default_database, computed_column_t]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
Calc(select=[a, b, +(a, 1) AS c, TO_TIMESTAMP(b) AS d, my_udf(a) AS e])
+- TableSourceScan(table=[[default_catalog, default_database, computed_column_t]], fields=[a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testTableApiScanWithDDL">
    <Resource name="planBefore">
      <![CDATA[
LogicalTableScan(table=[[default_catalog, default_database, t1]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
TableSourceScan(table=[[default_catalog, default_database, t1]], fields=[a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testTableApiScanWithWatermark">
    <Resource name="planBefore">
      <![CDATA[
LogicalProject(a=[$0], b=[$1], c=[+($0, 1)], d=[TO_TIMESTAMP($1)], e=[my_udf($0)])
+- LogicalTableScan(table=[[default_catalog, default_database, c_watermark_t]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
Calc(select=[a, b, +(a, 1) AS c, TO_TIMESTAMP(b) AS d, my_udf(a) AS e])
+- TableSourceScan(table=[[default_catalog, default_database, c_watermark_t]], fields=[a, b])
]]>
    </Resource>
  </TestCase>
  <TestCase name="testTableApiScanWithTemporaryTable">
    <Resource name="planBefore">
      <![CDATA[
LogicalTableScan(table=[[default_catalog, default_database, t1, source: [CsvTableSource(read fields: word)]]])
]]>
    </Resource>
    <Resource name="planAfter">
      <![CDATA[
LegacyTableSourceScan(table=[[default_catalog, default_database, t1, source: [CsvTableSource(read fields: word)]]], fields=[word])
]]>
    </Resource>
  </TestCase>
</Root>


text:
from swgpy.object import *

def create(kernel):
	result = Tangible()

	result.template = "object/tangible/loot/loot_schematic/shared_shisa_schematic.iff"
	result.attribute_template_id = -1
	result.stfName("craft_item_ingredients_n","shisa")

	#### BEGIN MODIFICATIONS ####
	####  END MODIFICATIONS  ####

	return result


text:
{% extends "dash_base.html" %}

{% block desc %}Home: Search{% endblock %}
{% block title %}Home: Search{% endblock %}
{% block header %}Search{% endblock %}

{% block search %}{{ query_string|default:"" }}{% endblock %}

{% block sidebar %}

Portals

{% endblock %}

{% block content %}

    <form id="content-search" action="{% url 'search:serp' %}" method="get">

                <input name="q" type="text" class="form-control" value="{{ query_string|default:"" }}" placeholder="Search for...">

                    <button class="btn btn-default" type="submit">

                        Search
                    </button>
                    <button class="btn btn-default" type="button" data-toggle="collapse" data-target="#advanced-search" aria-expanded="false" aria-controls="advanced-search">

                    </button>

Portals

            {% for name, count, selected in search_facets.portals %}
                {% include "facet_list.html" with facet_name="portals" facet_value=name facet_selected=selected facet_count=count %}
            {% endfor %}

Clients

            {% for name, count, selected in search_facets.clients %}
                {% include "facet_list.html" with facet_name="clients" facet_value=name facet_selected=selected facet_count=count %}
            {% endfor %}

Categories

            {% for name, count, selected in search_facets.categories %}
                {% include "facet_list.html" with facet_name="categories" facet_value=name facet_selected=selected facet_count=count %}
            {% endfor %}

    </form>

    {% if search_results %}

Results [{{ page_obj.start_index }}–{{ page_obj.end_index }} of {{ page_obj.paginator.count }}]

        {% for serp in search_results %}
            {% url 'projects:detail' serp.pa_code serp.pca_code serp.cpa_id serp.meta.id as detail_url %}

{{ serp.cpa_title }}

                Path:
                {{ serp.pa_code }}/{{ serp.pca_code }}
                Author:
                {{ serp.pwa_created_by }} @ {{ serp.pwa_created_at }}

{#
#}
{#
{{ serp.pwa_note }}
#}
{#
#}
        {% endfor %}

        {% include "button_pager.html" with page_obj=page_obj %}

    {% else %}

No search results found.

    {% endif %}
{% endblock %}


text:
package joe.hackerrank.util;

import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

import java.util.Random;

import org.junit.Test;

public class NextEqualSetBitsTest {
	@Test
	public void testPowersOfTwo() throws Exception {
		long i = 2;
		while (i > 0) {
			assertThat(Bits.nextEqualSetBits(i >> 1), is(i));
			i = i << 1;
		}
	}
	@Test
	public void testCustom() throws Exception {
		checkNext(3, 5);
		checkNext(5, 6);
		checkNext(6, 9);
		checkNext(9, 10);
		checkNext(10, 12);
	}
	static void checkNext(long n, long expected) {
		checkWithBinaryExplanation(n, expected, Bits.nextEqualSetBits(n));
	}
	static void checkWithBinaryExplanation(long n, long expected, long actual) {
		assertThat(Long.toBinaryString(n) + " => expected[" + Long.toBinaryString(expected) + "] actual[" + Long.toBinaryString(actual)
				+ "]", actual, is(expected));
	}

	private final Random random = new Random(123456);
	@Test
	public void testRandom() throws Exception {
		for (long i = 0; i < 100000; i++) {
			long j = random.nextLong();
			long k = Bits.nextEqualSetBits(j);
			assertThat("Wrong number of bits. j=[" + j + "] k=[" + k + "]", Long.bitCount(j), is(Long.bitCount(k)));
		}
	}

	@Test
	public void testFirstBits() throws Exception {
		checkWithBinaryExplanation(2, 3, Choose.firstBits(2));
		checkWithBinaryExplanation(3, 7, Choose.firstBits(3));
	}
}


text:
#include "tensorflow/tools/tfprof/internal/tfprof_show.h"

#include <memory>
#include <set>

#include "tensorflow/core/lib/strings/stringprintf.h"
#include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/regexp.h"

namespace tensorflow {
namespace tfprof {

const TFGraphNodeProto& TFShow::Show(const Options& opts) {
  if (opts.output_type == kOutput[0]) {
    Timeline timeline(opts.step, opts.output_options.at(kTimelineOpts[0]));
    return ShowInternal(opts, &timeline)->proto();
  } else if (opts.output_type == kOutput[2]) {
    const ShowNode* root = ShowInternal(opts, nullptr);
    Status s =
        WriteStringToFile(Env::Default(), opts.output_options.at(kFileOpts[0]),
                          root->formatted_str);
    if (!s.ok()) {
      fprintf(stderr, "%s\n", s.ToString().c_str());
    }
    return root->proto();
  } else {
    const ShowNode* root = ShowInternal(opts, nullptr);
    printf("%s", root->formatted_str.c_str());
    fflush(stdout);
    return root->proto();
  }
}

bool TFShow::LookUpCheckPoint(const string& name,
                              std::unique_ptr<TFProfTensor>* tensor) {
  if (name == kTFProfRoot || !ckpt_reader_ || !tensor) {
    return false;
  }
  std::unique_ptr<Tensor> out_tensor;
  TF_Status* status = TF_NewStatus();
  ckpt_reader_->GetTensor(name, &out_tensor, status);
  if (TF_GetCode(status) != TF_OK) {
    fprintf(stderr, "%s\n", TF_Message(status));
    TF_DeleteStatus(status);
    return false;
  }
  tensor->reset(new TFProfTensor(std::move(out_tensor)));
  TF_DeleteStatus(status);
  return true;
}

bool TFShow::ShouldShow(ShowNode* node, const Options& opts, int depth) {
  // Always show kTFProfRoot.
  if (node->name() == kTFProfRoot) return true;

  if (node->proto().requested_bytes() < opts.min_bytes ||
      node->proto().exec_micros() < opts.min_micros ||
      node->proto().parameters() < opts.min_params ||
      node->proto().float_ops() < opts.min_float_ops ||
      depth > opts.max_depth || !ShouldShowIfExtra(node, opts, depth)) {
    return false;
  }

  bool show = false;
  if (opts.show_name_regexes.size() == 1 && opts.show_name_regexes[0] == ".*") {
    show = true;
  } else {
    for (const string& regex : opts.show_name_regexes) {
      if (RE2::FullMatch(node->name(), regex)) {
        show = true;
        break;
      }
    }
  }
  // Don't show if show_name_regexes don't cover it.
  if (!show) return false;
  // Don't show if hide_name_regexes cover it.
  for (const string& regex : opts.hide_name_regexes) {
    if (RE2::FullMatch(node->name(), regex)) return false;
  }
  return true;
}

bool TFShow::ShouldTrim(ShowNode* node, const std::vector<string>& regexes) {
  for (const string& regex : regexes) {
    if (RE2::FullMatch(node->name(), regex)) {
      return true;
    }
  }
  return false;
}

bool TFShow::ReAccount(ShowNode* node, const Options& opts) {
  node->ReInit(opts.step);
  if (opts.account_type_regexes.size() == 1 &&
      opts.account_type_regexes[0] == ".*") {
    return true;
  }
  for (const string& regex : opts.account_type_regexes) {
    for (const string& type : node->node->op_types()) {
      if (RE2::FullMatch(type, regex)) {
        return true;
      }
    }
  }
  return false;
}

string TFShow::FormatNode(ShowNode* node, const Options& opts) {
  std::vector<string> info;
  if (opts.select.find(kShown[2]) != opts.select.end()) {
    const string shape = FormatShapes(node->node->shape());
    if (!shape.empty()) {
      info.push_back(shape);
    }
    string params = FormatNumber(node->proto().total_parameters()) + " params";
    if (node->account) {
      params = FormatNumber(node->proto().parameters()) + "/" + params;
    } else {
      params = "--/" + params;
    }
    info.push_back(params);
  }
  if (opts.select.find(kShown[3]) != opts.select.end()) {
    string fops = FormatNumber(node->proto().total_float_ops()) + " flops";
    if (node->account) {
      fops = FormatNumber(node->proto().float_ops()) + "/" + fops;
    } else {
      fops = "--/" + fops;
    }
    info.push_back(fops);
  }
  if (opts.select.find(kShown[0]) != opts.select.end()) {
    string memory = FormatMemory(node->proto().total_requested_bytes());
    if (node->account) {
      memory = FormatMemory(node->proto().requested_bytes()) + "/" + memory;

    } else {
      memory = "--/" + memory;
    }
    info.push_back(memory);
  }
  if (opts.select.find(kShown[1]) != opts.select.end()) {
    string time = FormatTime(node->proto().total_exec_micros());
    if (node->account) {
      time = FormatTime(node->proto().exec_micros()) + "/" + time;
    } else {
      time = "--/" + time;
    }
    info.push_back(time);
  }
  if (opts.select.find(kShown[5]) != opts.select.end()) {
    if (node->proto().devices_size() > 0) {
      info.push_back(str_util::Join(node->proto().devices(), "|"));
    }
  }
  if (opts.select.find(kShown[6]) != opts.select.end()) {
    std::set<string> op_types = node->node->op_types();
    info.push_back(str_util::Join(op_types, "|"));
  }

  return strings::Printf("%s (%s)", node->name().c_str(),
                         str_util::Join(info, ", ").c_str());
}

string TFShow::FormatLegend(const Options& opts) {
  std::vector<string> legends;
  if (opts.select.find(kShown[2]) != opts.select.end()) {
    legends.push_back("# parameters");
  }
  if (opts.select.find(kShown[3]) != opts.select.end()) {
    legends.push_back("# float_ops");
  }
  if (opts.select.find(kShown[0]) != opts.select.end()) {
    legends.push_back("output bytes");
  }
  if (opts.select.find(kShown[1]) != opts.select.end()) {
    legends.push_back("execution time");
  }
  if (opts.select.find(kShown[5]) != opts.select.end()) {
    legends.push_back("assigned devices");
  }
  if (opts.select.find(kShown[6]) != opts.select.end()) {
    legends.push_back("op types");
  }
  return strings::Printf("node name | %s\n",
                         str_util::Join(legends, " | ").c_str());
}

}  // namespace tfprof
}  // namespace tensorflow


text:
package diplom;

import java.io.IOException;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.conf.*;
import org.apache.hadoop.io.*;
import org.apache.hadoop.io.compress.GzipCodec;
import org.apache.hadoop.mapreduce.*;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;

public class GeoLiteLocation {
	public static class Map extends Mapper<LongWritable, Text, Text, Text> {
	    public void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
	        String line = value.toString();
	        String[] fields = line.split(",");
	        String result = "";
	        for (String field : fields) {
	        	result += field.replace("\"", "") + ",";
	        }
	        result = result.substring(0, result.length()-1);

	        context.write(new Text(result), null);
	    }
	 }

	 public static void main(String[] args) throws Exception {
	    Configuration conf = new Configuration();

	    Job job = new Job(conf, "geolitelocation");

	    job.setJarByClass(GeoLiteLocation.class);
	    job.setOutputKeyClass(Text.class);
	    job.setOutputValueClass(Text.class);

	    job.setMapperClass(Map.class);
	    job.setReducerClass(Reducer.class);

	    job.setInputFormatClass(TextInputFormat.class);
	    job.setOutputFormatClass(TextOutputFormat.class);
	    TextOutputFormat.setCompressOutput(job, true);
	    TextOutputFormat.setOutputCompressorClass(job, GzipCodec.class);

	    FileInputFormat.addInputPath(job, new Path(args[0]));
	    FileOutputFormat.setOutputPath(job, new Path(args[1]));

	    job.waitForCompletion(true);
	 }
}


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.Communication.Models
{
    public partial class ErrorAdditionalInfo
    {
        internal static ErrorAdditionalInfo DeserializeErrorAdditionalInfo(JsonElement element)
        {
            Optional<string> type = default;
            Optional<object> info = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("info"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    info = property.Value.GetObject();
                    continue;
                }
            }
            return new ErrorAdditionalInfo(type.Value, info.Value);
        }
    }
}


text:
<?php

/* PesFrontBundle:Courrier:show.html.twig */
class __TwigTemplate_594da440ac712d8f18cc860288e61e4fa0fde2b43dccca77c4abbbd1fb4d2cba extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("PesFrontBundle::layout.html.twig");

        $this->blocks = array(
            'section' => array($this, 'block_section'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "PesFrontBundle::layout.html.twig";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_section($context, array $blocks = array())
    {
        // line 4
        echo "

Courrier

Nom : ";
        // line 7
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "nom"), "html", null, true);
        echo "

Email : ";
        // line 8
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "email"), "html", null, true);
        echo "

Sujet : ";
        // line 9
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "sujet"), "html", null, true);
        echo "

Message :

";
        // line 11
        echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "corps"), "html", null, true);
        echo "

Le ";
        // line 12
        echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "date"), "Y-m-d H:i:s"), "html", null, true);
        echo "

                    env->getExtension('routing')->getPath("pes_courrier_list");
        echo "\">
                        Back to the list

                    env, $this->env->getExtension('routing')->getPath("pes_courrier_edit", array("id" => $this->getAttribute((isset($context["entity"]) ? $context["entity"] : $this->getContext($context, "entity")), "id"))), "html", null, true);
        echo "\">
                        Edit

";
        // line 25
        echo         $this->env->getExtension('form')->renderer->renderBlock((isset($context["delete_form"]) ? $context["delete_form"] : $this->getContext($context, "delete_form")), 'form');
        echo "

";
    }

    public function getTemplateName()
    {
        return "PesFrontBundle:Courrier:show.html.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  75 => 25,  68 => 21,  60 => 16,  53 => 12,  49 => 11,  44 => 9,  40 => 8,  36 => 7,  31 => 4,  28 => 3,);
    }
}


text:
namespace impeller {

constexpr BlobShaderType ToShaderType(fb::Stage stage) {
  switch (stage) {
    case fb::Stage::kVertex:
      return BlobShaderType::kVertex;
    case fb::Stage::kFragment:
      return BlobShaderType::kFragment;
    case fb::Stage::kCompute:
      return BlobShaderType::kCompute;
  }
  FML_UNREACHABLE();
}

BlobLibrary::BlobLibrary(std::shared_ptr<fml::Mapping> payload)
    : payload_(std::move(payload)) {
  if (!payload_ || payload_->GetMapping() == nullptr) {
    VALIDATION_LOG << "Blob mapping was absent.";
    return;
  }

  if (!fb::BlobLibraryBufferHasIdentifier(payload_->GetMapping())) {
    VALIDATION_LOG << "Invalid blob magic.";
    return;
  }

  auto blob_library = fb::GetBlobLibrary(payload_->GetMapping());
  if (!blob_library) {
    return;
  }

  if (auto items = blob_library->items()) {
    for (auto i = items->begin(), end = items->end(); i != end; i++) {
      BlobKey key;
      key.name = i->name()->str();
      key.type = ToShaderType(i->stage());
      blobs_[key] = std::make_shared<fml::NonOwnedMapping>(
          i->mapping()->Data(), i->mapping()->size(),
          [payload = payload_](auto, auto) {
            // The pointers are into the base payload. Instead of copying the
            // data, just hold onto the payload.
          });
    }
  }

  is_valid_ = true;
}

BlobLibrary::BlobLibrary(BlobLibrary&&) = default;

BlobLibrary::~BlobLibrary() = default;

bool BlobLibrary::IsValid() const {
  return is_valid_;
}

size_t BlobLibrary::GetShaderCount() const {
  return blobs_.size();
}

std::shared_ptr<fml::Mapping> BlobLibrary::GetMapping(BlobShaderType type,
                                                      std::string name) const {
  BlobKey key;
  key.type = type;
  key.name = std::move(name);
  auto found = blobs_.find(key);
  return found == blobs_.end() ? nullptr : found->second;
}

size_t BlobLibrary::IterateAllBlobs(
    const std::function<bool(BlobShaderType type,
                             const std::string& name,
                             const std::shared_ptr<fml::Mapping>& mapping)>&
        callback) const {
  if (!IsValid() || !callback) {
    return 0u;
  }
  size_t count = 0u;
  for (const auto& blob : blobs_) {
    count++;
    if (!callback(blob.first.type, blob.first.name, blob.second)) {
      break;
    }
  }
  return count;
}

}  // namespace impeller


text:
package com.yumcouver.spoonie.conf;

public interface WorkerInfo {

    public int getWorkerThreadCount();
}


text:
/* Base CSS | haovei@qq.com */
* { padding: 0; margin: 0; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
ul { list-style: none; }
em, i { font-style: normal; }
.clearfix:after { clear: both; display: table; content: "" }
.undis { display: none }
/* */
/*html, body { height: 100%; }*/
body { font: 14px/1.5 "Microsoft Yahei"; color: #FFF; background: #47146D url(../img/top.jpg) no-repeat 50% 0; background-size: 100%; padding-top: 53%; box-sizing: border-box;
    -webkit-user-select: none; -moz-user-select: none; user-select: none; }
a { text-decoration: none; color: #5F5F5F; outline: none; }
/**/
.mg10 { margin: 10px 0; }
.mgb10 { margin-bottom: 10px !important; }
.mgb20 { margin-bottom: 20px !important; }
.font22 { font-size: 22px; }
.color-red { color: #E00062; }
.color-gray { color: #787878; }
.color-blue { color: #2A9DFC; }
.color-black { color: #000; }
.color-orange { color: #FF5A1E; }
.fl { float: left; }
.fr { float: right; }
/**/
.icon { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; margin-right: 5px; }
/**/
.ipt { font-size: 14px; background: #E6E6E6; border: none; line-height: 20px; width: 100%; box-sizing: border-box; padding: 10px 15px; border-radius: 20px; }
.btn { display: inline-block; border: none; border-bottom: 1px solid #D90044; background: #FF004B; background: -webkit-gradient(linear, 0 0, 0 100%, from(#FF009F), to(#FF004B)); font-size: 16px; color: #FFF; width: 140px; height: 40px; line-height: 40px; border-radius: 20px; outline: none; }
.btn-2 { background: #F50087; width: 100%; }
/**/
.page-wrap { max-width: 500px; margin: 0 auto; }
/**/
.dialog-mask { position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); z-index: 9; }
.dialog-box { position: fixed; margin: -165px 0 0 -135px; top: 40%; left: 50%; box-sizing: border-box; width: 270px; background: #FFF; border-radius: 10px; font-size: 16px; color: #3C3C3C; text-align: center; z-index: 10; }
.dialog-box .content { padding: 190px 15px 10px 15px; height: 130px; background: url(../img/winning.jpg) 50% 10px no-repeat; background-size: 253px; }
/**/
.scratcher-wrap { margin: 10px; background: url(../img/tips-bg.jpg) no-repeat 50% 50%; background-size: 100%; border-radius: 8px; }
.scratcher-wrap canvas { background: transparent no-repeat 50% 50%; background-size: 150px; width: 100%; display: block; }
.scratcher-wrap .prize-1 { background-image: url(../img/prize-1.png); }
.scratcher-wrap .prize-2 { background-image: url(../img/prize-2.png); }
.scratcher-wrap .prize-3 { background-image: url(../img/prize-3.png); }
.scratcher-wrap .prize-4 { background-image: url(../img/prize-4.png); }
.scratcher-wrap .prize-no { background-image: url(../img/prize-no.png); }
.gua-wrap { margin: 10px; background: #66348B; border-radius: 7px; text-align: center; position: relative; padding-top: 38.6%; }
.gua-wrap .wrap { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: -webkit-box; -webkit-box-orient: horizontal; -webkit-box-pack: center; -webkit-box-align: center; /*display: box;*/ box-orient: horizontal; box-pack: center; box-align: center; }
.gua-wrap .tips { font-size: 18px; margin-bottom: 5%; }
.gua-wrap .tips-2 { font-size: 14px; margin-bottom: 2%; }
.gua-wrap .tips-3, .gua-wrap .tips-4 { background: url(../img/txt-bg.png) no-repeat; background-size: 100%; font-size: 16px; width: 262px; height: 45px; line-height: 42px; color: #FF0073; }
.gua-wrap .tips-4 { color: #1E1E1E; }
.gua-wrap-2 { background: url(../img/tips-bg.jpg) no-repeat 50% 50%; background-size: 100%; padding-top: 38%; }
/**/
.main-wrap { margin: 10px 10px 30px 10px; background: #66348B; border-radius: 5px 5px 0 0; position: relative; }
.main-wrap:after { content: ""; background: url(../img/border.png) 50% 100% repeat-x; background-size: 12px; height: 6px; position: absolute; left: 0; right: 0; bottom: -6px; }
.main-wrap .dt, .main-wrap .dd { margin: 0 10px; }
.main-wrap .dt { font-size: 16px; border-top: 1px solid #9471AE; }
.main-wrap .dt em { margin-top: -1px; background: #FF0073; display: inline-block; border-radius: 0 0 20px 20px; width: 100px; height: 30px; line-height: 30px; text-align: center; }
.main-wrap .dt:first-child { border-top: none; }
.main-wrap .dt:first-child em { margin-top: 0; }
.main-wrap .dd { padding: 8px 2px; }
/**/
.list-1 { font-size: 16px; }
.list-1 li { margin: 5px 0; }
.list-1 img { width: 44px; height: 44px; border-radius: 4px; vertical-align: middle; }
.list-1 em { display: inline-block; margin: 0 10px; font-weight: 700; }
.list-2 { }
.list-2 li { margin: 5px 0; font-size: 0; }
.list-2 li span { display: inline-block; font-size: 14px; }
.list-2 li .col-1 { width: 46%; }
.list-2 li .col-2 { width: 27%; font-style: italic; }
.list-2 li .col-3 { width: 27%; text-align: right; }
/**/
#list-2 { position: relative; overflow: hidden; height: 110px; }


text:
<?php

namespace Kunstmaan\MediaBundle\Helper;

use Kunstmaan\MediaBundle\Entity\EditableMediaWrapper;
use Kunstmaan\UtilitiesBundle\Helper\Slugifier;
use Liip\ImagineBundle\Exception\Imagine\Filter\NonExistingFilterException;
use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration;
use Liip\ImagineBundle\Service\FilterService;

/**
 * @experimental This feature is experimental and is a subject to change, be advised when using this feature and classes.
 */
final class ManipulateImageService
{
    /** @var Slugifier */
    private $slugifier;

    /** @var FilterService */
    private $filterService;

    /** @var FilterConfiguration */
    private $filterConfiguration;

    public function __construct(Slugifier $slugifier, FilterService $filterService, FilterConfiguration $filterConfiguration)
    {
        $this->slugifier = $slugifier;
        $this->filterService = $filterService;
        $this->filterConfiguration = $filterConfiguration;
    }

    public function getFocusPointClass(EditableMediaWrapper $editableMediaWrapper, string $view = ''): string
    {
        if (null === $editableMediaWrapper->getRunTimeConfig()) {
            return '';
        }

        $runTimeConfig = json_decode($editableMediaWrapper->getRunTimeConfig(), true);

        if (!is_array($runTimeConfig) || empty($view) || !isset($runTimeConfig[$view]['class'])) {
            return '';
        }

        return $runTimeConfig[$view]['class'];
    }

    public function cropImage(EditableMediaWrapper $editableMediaWrapper, string $view = '', string $filter = 'optim'): string
    {
        $media = $editableMediaWrapper->getMedia();
        if (null === $media) {
            return '';
        }
        if (strpos($media->getContentType(), 'svg') !== false) {
            return $media->getUrl();
        }

        $path = $media->getUrl();
        $path = str_replace('://', '---', $path);

        $runTimeConfigForView = [];
        if ($editableMediaWrapper->getRunTimeConfig() !== null) {
            $runTimeConfig = json_decode($editableMediaWrapper->getRunTimeConfig(), true);

            if (
                is_array($runTimeConfig)
                && !empty($view)
                && isset($runTimeConfig[$view]['start'], $runTimeConfig[$view]['size'])
            ) {
                $runTimeConfigForView = [
                    'crop' => [
                        'start' => $runTimeConfig[$view]['start'],
                        'size' => $runTimeConfig[$view]['size'],
                    ],
                ];
            }
        }

        try {
            $filterConfig = $this->filterConfiguration->get($filter);
        } catch (NonExistingFilterException $exception) {
            $filterConfig = $this->filterConfiguration->get('optim');
        }

        $oemConfig = null;
        if (isset($filterConfig['filters'])) {
            $oemConfig = $filterConfig;
            unset($filterConfig['filters']['crop']);
            $runTimeConfigForView = array_merge_recursive($runTimeConfigForView, $filterConfig['filters']);
            unset($filterConfig['filters']);
            $this->filterConfiguration->set($filter, $filterConfig);
        }

        try {
            $response = $this->filterService->getUrlOfFilteredImageWithRuntimeFilters($path, $filter, $runTimeConfigForView);
        } catch (\Exception $exception) {
            $runTimeConfigForView = [];

            $response = $this->filterService->getUrlOfFilteredImageWithRuntimeFilters($path, 'optim', $runTimeConfigForView);
        }

        if ($oemConfig !== null) {
            $this->filterConfiguration->set($filter, $oemConfig);
        }

        return $response;
    }
}


text:
#include <string>

#include "H5Include.h"
#include "H5Exception.h"
#include "H5IdComponent.h"
#include "H5PropList.h"
#include "H5Object.h"
#include "H5OcreatProp.h"
#include "H5DcreatProp.h"
#include "H5CommonFG.h"
#include "H5DataType.h"
#include "H5AtomType.h"

#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif

#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function:	AtomType default constructor [protected]
// Purpose	Default constructor: creates a stub atomic datatype.
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType() {}

//--------------------------------------------------------------------------
// Function:	AtomType overloaded constructor [protected]
// Purpose	Creates an AtomType object using an existing id.
// Parameter	existing_id - IN: Id of an existing datatype
// Exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const hid_t existing_id ) : DataType( existing_id ) {}

//--------------------------------------------------------------------------
// Function:	AtomType copy constructor
///\brief	Copy constructor: makes a copy of the original AtomType object.
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType( const AtomType& original ) : DataType( original ) {}
#endif // DOXYGEN_SHOULD_SKIP_THIS

//--------------------------------------------------------------------------
// Function:	AtomType::setSize
///\brief	Sets the total size for an atomic datatype.
///\param	size - IN: Size to set
///\exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setSize( size_t size ) const
{
   // Call C routine H5Tset_size to set the total size
   herr_t ret_value = H5Tset_size( id, size );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("setSize"), "H5Tset_size failed");
   }
}

//--------------------------------------------------------------------------
// Function:	AtomType::getOrder
///\brief	Returns the byte order of an atomic datatype.
///\return	Byte order, which can be:
///		\li \c H5T_ORDER_LE
///		\li \c H5T_ORDER_BE
///		\li \c H5T_ORDER_VAX
///\exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder() const
{
   // Call C routine to get the byte ordering
   H5T_order_t type_order = H5Tget_order( id );

   // return a byte order constant if successful
   if( type_order == H5T_ORDER_ERROR )
   {
      throw DataTypeIException(inMemFunc("getOrder"),
		"H5Tget_order returns H5T_ORDER_ERROR");
   }
   return( type_order );
}

//--------------------------------------------------------------------------
// Function:	AtomType::getOrder
///\brief	This is an overloaded member function, provided for convenience.
///		It takes a reference to a \c H5std_string for the buffer that
///		provide the text description of the returned byte order.
///		The text description can be either of the following:
///		"Little endian byte ordering (0)";
///		"Big endian byte ordering (1)";
///		"VAX mixed byte ordering (2)";
///\param	order_string - OUT: Text description of the returned byte order
///\return	Byte order, which can be:
///		\li \c H5T_ORDER_LE
///		\li \c H5T_ORDER_BE
///		\li \c H5T_ORDER_VAX
///\exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t AtomType::getOrder( H5std_string& order_string ) const
{
   // Call the overloaded to get the type order without text
   H5T_order_t type_order = getOrder();

   // Then provide the text and return the type order
   if( type_order == H5T_ORDER_LE )
      order_string = "Little endian byte ordering (0)";
   else if( type_order == H5T_ORDER_BE )
      order_string = "Big endian byte ordering (1)";
   else if( type_order == H5T_ORDER_VAX )
      order_string = "VAX mixed byte ordering (2)";
   return( type_order );
}

//--------------------------------------------------------------------------
// Function:	AtomType::setOrder
///\brief	Sets the byte ordering of an atomic datatype.
///\param	order - IN: Byte ordering constant, which can be:
///		\li \c H5T_ORDER_LE
///		\li \c H5T_ORDER_BE
///		\li \c H5T_ORDER_VAX
///\exception	H5::DataTypeIException
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOrder( H5T_order_t order ) const
{
   // Call C routine to set the byte ordering
   herr_t ret_value = H5Tset_order( id, order );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("setOrder"), "H5Tset_order failed");
   }
}

//--------------------------------------------------------------------------
// Function:	AtomType::getPrecision
///\brief	Returns the precision of an atomic datatype.
///\return	Number of significant bits
///\exception	H5::DataTypeIException
///\par Description
///		The precision is the number of significant bits which,
///		unless padding is present, is 8 times larger than the
///		value returned by \c DataType::getSize().
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t AtomType::getPrecision() const
{
   size_t num_signi_bits = H5Tget_precision( id );  // C routine

   // returns number of significant bits if successful
   if( num_signi_bits == 0 )
   {
      throw DataTypeIException(inMemFunc("getPrecision"),
		"H5Tget_precision returns invalid number of significant bits");
   }
   return( num_signi_bits );
}

//--------------------------------------------------------------------------
// Function:	AtomType::setPrecision
///\brief	Sets the precision of an atomic datatype.
///\param	precision - IN: Number of bits of precision
///\exception	H5::DataTypeIException
///\par Description
///		For information, please see C layer Reference Manuat at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetPrecision
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPrecision( size_t precision ) const
{
   // Call C routine to set the datatype precision
   herr_t ret_value = H5Tset_precision( id, precision );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("setPrecision"), "H5Tset_precision failed");
   }
}

//--------------------------------------------------------------------------
// Function:	AtomType::getOffset
///\brief	Retrieves the bit offset of the first significant bit.
///\return	Offset value
///\exception	H5::DataTypeIException
///\par Description
///		For information, please see C layer Reference Manuat at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetOffset
// Programmer	Binh-Minh Ribler - 2000
// Modification
//		12/05/00: due to C API change
//			- return type changed from size_t to int
//			- offset = -1 when failure occurs vs. 0
//--------------------------------------------------------------------------
int AtomType::getOffset() const
{
   int offset = H5Tget_offset( id );  // C routine

   // returns a non-negative offset value if successful
   if( offset == -1 )
   {
      throw DataTypeIException(inMemFunc("getOffset"),
		"H5Tget_offset returns a negative offset value");
   }
   return( offset );
}

//--------------------------------------------------------------------------
// Function:	AtomType::setOffset
///\brief	Sets the bit offset of the first significant bit.
///\param	offset - IN: Offset of first significant bit
///\exception	H5::DataTypeIException
///\par Description
///		For information, please see C layer Reference Manuat at:
/// http://www.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetOffset
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setOffset( size_t offset ) const
{
   // Call C routine to set the bit offset
   herr_t ret_value = H5Tset_offset( id, offset );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("setOffset"), "H5Tset_offset failed");
   }
}

//--------------------------------------------------------------------------
// Function:	AtomType::getPad
///\brief	Retrieves the padding type of the least and most-significant
///		bit padding.
///\param	lsb - OUT: Least-significant bit padding type
///\param	msb - OUT: Most-significant bit padding type
///\exception	H5::DataTypeIException
///\par Description
///		Possible values for \a lsb and \a msb include:
///		\li \c H5T_PAD_ZERO (0) - Set background to zeros.
///		\li \c H5T_PAD_ONE (1) - Set background to ones.
///		\li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::getPad( H5T_pad_t& lsb, H5T_pad_t& msb ) const
{
   // Call C routine to get the padding type
   herr_t ret_value = H5Tget_pad( id, &lsb, &msb );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("getPad"), "H5Tget_pad failed");
   }
}

//--------------------------------------------------------------------------
// Function:	AtomType::setPad
///\brief	Sets the least and most-significant bits padding types.
///\param	lsb - IN: Least-significant bit padding type
///\param	msb - IN: Most-significant bit padding type
///\exception	H5::DataTypeIException
///\par Description
///		Valid values for \a lsb and \a msb include:
///		\li \c H5T_PAD_ZERO (0) - Set background to zeros.
///		\li \c H5T_PAD_ONE (1) - Set background to ones.
///		\li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void AtomType::setPad( H5T_pad_t lsb, H5T_pad_t msb ) const
{
   // Call C routine to set the padding type
   herr_t ret_value = H5Tset_pad( id, lsb, msb );
   if( ret_value < 0 )
   {
      throw DataTypeIException(inMemFunc("setPad"), "H5Tset_pad failed");
   }
}

#ifndef DOXYGEN_SHOULD_SKIP_THIS
//--------------------------------------------------------------------------
// Function:	AtomType destructor
///\brief	Noop destructor.
// Programmer	Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType() {}
#endif // DOXYGEN_SHOULD_SKIP_THIS

#ifndef H5_NO_NAMESPACE
} // end namespace
#endif


text:
PROMPT Parse package level annotations

--Arrange
declare
  l_source clob;
  l_parsing_result ut_annotations.typ_annotated_package;
  l_expected ut_annotations.typ_annotated_package;
  l_ann_param ut_annotations.typ_annotation_param;

begin
  l_source := 'PACKAGE test_tt AS
  -- %suite(Name of suite)
  -- %suitepackage(all.globaltests)

  --%test
  procedure foo;
END;';

--Act
  l_parsing_result := ut_annotations.parse_package_annotations(l_source);

--Assert
  l_ann_param := null;
  l_ann_param.val := 'Name of suite';
  l_expected.package_annotations('suite')(1) := l_ann_param;

  l_ann_param := null;
  l_ann_param.val := 'all.globaltests';
  l_expected.package_annotations('suitepackage')(1) := l_ann_param;

  l_expected.procedure_annotations('foo')('test') := cast( null as ut_annotations.tt_annotation_params);

  check_annotation_parsing(l_expected, l_parsing_result);

  if ut_assert_processor.get_aggregate_asserts_result = ut_utils.tr_success then
    :test_result := ut_utils.tr_success;
  end if;

end;
/