text:
package com.personal.djb.catmovie.activity;

import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.Window;
import android.widget.FrameLayout;
import android.widget.RadioGroup;

import com.baidu.location.BDLocation;
import com.baidu.location.BDLocationListener;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.baidu.location.Poi;
import com.igexin.sdk.PushManager;
import com.personal.djb.catmovie.R;
import com.personal.djb.catmovie.base.BasePager;
import com.personal.djb.catmovie.pagers.CinemaRadioButtonPager;
import com.personal.djb.catmovie.pagers.FindRadioButtonPager;
import com.personal.djb.catmovie.pagers.MovieRadioButtonPager;
import com.personal.djb.catmovie.pagers.SettingRadioButtonPager;
import com.personal.djb.catmovie.utils.CacheUtils;

import java.util.ArrayList;
import java.util.List;

public class MainActivity extends FragmentActivity {
    public LocationClient mLocationClient = null;
    public BDLocationListener myListener = new MyLocationListener();

    public static final int LOGIN_STATE_SUCCESS = 999;
    public static final int LOGIN_STATE_ERROR = 888;

    private FrameLayout mFrameContent;
    private RadioGroup mRadioGroup;

//    private RadioButton mRBMovie;
//    private RadioButton mRBCinema;
//    private RadioButton mRBFind;
//    private RadioButton mRBSetting;

    /**
     * 基础页面集合
     */
    private List<BasePager> datas;

    /**
     * 记录RadioButton点击的位置
     */
    private int position;
    private String currentCity = "";
    private boolean isFirshShow = true;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        requestWindowFeature(Window.FEATURE_NO_TITLE);

        PushManager.getInstance().initialize(this.getApplicationContext());

        //  自己log出来CID比较靠谱
//        String clientid = PushManager.getInstance().getClientid(this);
//        Log.e("TAG555", clientid);
        mLocationClient = new LocationClient(getApplicationContext());     //声明LocationClient类
        mLocationClient.registerLocationListener(myListener);    //注册监听函数

        initLocation();
        mLocationClient.start();

        initView();
        initData();
        setListener();
    }

    private void initData() {
        initFragment();

        currentCity = CacheUtils.getString(this, "currcity");
        if(!TextUtils.isEmpty(currentCity)) {
            ((CinemaRadioButtonPager)datas.get(1)).setCityName(currentCity);
            ((MovieRadioButtonPager)datas.get(0)).setCityName(currentCity);
        }
    }

    private void initFragment() {
        datas = new ArrayList<>();
        datas.add(new MovieRadioButtonPager(this));
        datas.add(new CinemaRadioButtonPager(this));
        datas.add(new FindRadioButtonPager(this));
        datas.add(new SettingRadioButtonPager(this));
    }

    private void setListener() {

        mRadioGroup.setOnCheckedChangeListener(new MyOncheckedChangeListener());
        mRadioGroup.check(R.id.rb_main_movie);
        setPager(0);
    }

    private void initView() {
        setContentView(R.layout.activity_main);

        mRadioGroup = (RadioGroup) findViewById(R.id.rg_main);
        mFrameContent = (FrameLayout) findViewById(R.id.fl_main);

//        mRBMovie = (RadioButton) findViewById(R.id.rb_main_movie);
//        mRBCinema = (RadioButton) findViewById(R.id.rb_main_cinema);
//        mRBFind = (RadioButton) findViewById(R.id.rb_main_find);
//        mRBSetting = (RadioButton) findViewById(R.id.rb_main_setting);

    }

    /**
     * RadioGroup的点击改变监听,切换页面
     */
    private class MyOncheckedChangeListener implements RadioGroup.OnCheckedChangeListener {
        @Override
        public void onCheckedChanged(RadioGroup group, int checkedId) {
            switch (checkedId) {
                case R.id.rb_main_movie :
                    position = 0;
                    break;
                case R.id.rb_main_cinema:
                    position = 1;
                    break;
                case R.id.rb_main_find:
                    position = 2;
                    break;
                case R.id.rb_main_setting:
                    position = 3;
                    break;
            }

            setPager(position);
        }
    }

    /**
     * 设置fragment以前先判断是否初始化数据过
     * @param position
     */
    private void setPager(int position) {
        BasePager mbp = datas.get(position);
        if (!mbp.isInitData){
            mbp.initData();
        }
        mFrameContent.removeAllViews();
        mFrameContent.addView(mbp.rootView);
    }

    private void initLocation(){
        LocationClientOption option = new LocationClientOption();
        option.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy
        );//可选,默认高精度,设置定位模式,高精度,低功耗,仅设备
        option.setCoorType("bd09ll");//可选,默认gcj02,设置返回的定位结果坐标系
        int span=1000;
//        option.setScanSpan(0);//可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的
        option.setIsNeedAddress(true);//可选,设置是否需要地址信息,默认不需要
        option.setOpenGps(true);//可选,默认false,设置是否使用gps
        option.setLocationNotify(true);//可选,默认false,设置是否当gps有效时按照1S1次频率输出GPS结果
        option.setIsNeedLocationDescribe(true);//可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于"在北京天安门附近"
        option.setIsNeedLocationPoiList(true);//可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到
        option.setIgnoreKillProcess(false);//可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死
        option.SetIgnoreCacheException(false);//可选,默认false,设置是否收集CRASH信息,默认收集
        option.setEnableSimulateGps(false);//可选,默认false,设置是否需要过滤gps仿真结果,默认需要
        mLocationClient.setLocOption(option);
    }

    public class MyLocationListener implements BDLocationListener {

        @Override
        public void onReceiveLocation(BDLocation location) {

            Log.e("info", "city = " + location.getCity());
            String posCity = location.getCity().substring(0,
                    location.getCity().length() - 1);

            if(!currentCity.equals(posCity) && isFirshShow) {
                isFirshShow = false;
                showChoiceCityDialog(posCity);
            }

            //Receive Location
            StringBuffer sb = new StringBuffer(256);
            sb.append("time : ");
            sb.append(location.getTime());
            sb.append("\nerror code : ");
            sb.append(location.getLocType());
            sb.append("\nlatitude : ");
            sb.append(location.getLatitude());
            sb.append("\nlontitude : ");
            sb.append(location.getLongitude());
            sb.append("\nradius : ");
            sb.append(location.getRadius());
            if (location.getLocType() == BDLocation.TypeGpsLocation) {// GPS定位结果
                sb.append("\nspeed : ");
                sb.append(location.getSpeed());// 单位:公里每小时
                sb.append("\nsatellite : ");
                sb.append(location.getSatelliteNumber());
                sb.append("\nheight : ");
                sb.append(location.getAltitude());// 单位:米
                sb.append("\ndirection : ");
                sb.append(location.getDirection());// 单位度
                sb.append("\naddr : ");
                sb.append(location.getAddrStr());
                sb.append("\ndescribe : ");
                sb.append("gps定位成功");

            } else if (location.getLocType() == BDLocation.TypeNetWorkLocation) {// 网络定位结果
                sb.append("\naddr : ");
                sb.append(location.getAddrStr());
                //运营商信息
                sb.append("\noperationers : ");
                sb.append(location.getOperators());
                sb.append("\ndescribe : ");
                sb.append("网络定位成功");
            } else if (location.getLocType() == BDLocation.TypeOffLineLocation) {// 离线定位结果
                sb.append("\ndescribe : ");
                sb.append("离线定位成功,离线定位结果也是有效的");
            } else if (location.getLocType() == BDLocation.TypeServerError) {
                sb.append("\ndescribe : ");
                sb.append("服务端网络定位失败,可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com,会有人追查原因");
            } else if (location.getLocType() == BDLocation.TypeNetWorkException) {
                sb.append("\ndescribe : ");
                sb.append("网络不同导致定位失败,请检查网络是否通畅");
            } else if (location.getLocType() == BDLocation.TypeCriteriaException) {
                sb.append("\ndescribe : ");
                sb.append("无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机");
            }
            sb.append("\nlocationdescribe : ");
            sb.append(location.getLocationDescribe());// 位置语义化信息
            List<Poi> list = location.getPoiList();// POI数据
            if (list != null) {
                sb.append("\npoilist size = : ");
                sb.append(list.size());
                for (Poi p : list) {
                    sb.append("\npoi= : ");
                    sb.append(p.getId() + " " + p.getName() + " " + p.getRank());
                }
            }
            Log.e("dujian", sb.toString());

        }
    }

    //  弹出城市定位提示
    private void showChoiceCityDialog(final String posCity) {

        new AlertDialog.Builder(this).setTitle("切换当前城市")
                .setMessage("检测到当前定位城市为"+posCity+",是否切换")
                .setPositiveButton("切换", new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        currentCity = posCity;
                        CacheUtils.putString(MainActivity.this,"currcity",currentCity);
                        ((CinemaRadioButtonPager)datas.get(1)).setCityName(currentCity);
                        ((MovieRadioButtonPager)datas.get(0)).setCityName(currentCity);
                    }
                })
                .setNegativeButton("取消",null)
                .show();

    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

//        if (onAtivityResult != null && data != null) {
//            currentCity = data.getStringExtra("cityname");
//            ((CinemaRadioButtonPager)datas.get(1)).setCityName(currentCity);
//            ((MovieRadioButtonPager)datas.get(0)).setCityName(currentCity);
//            onAtivityResult.onResult(requestCode,resultCode,data);
//        }
        if ((requestCode == 100 && data != null)|| (requestCode == 101 && data != null)) {
            currentCity = data.getStringExtra("cityname");
            ((CinemaRadioButtonPager)datas.get(1)).setCityName(currentCity);
            ((MovieRadioButtonPager)datas.get(0)).setCityName(currentCity);
        }

        if (requestCode == 300 && resultCode == LOGIN_STATE_SUCCESS) {
            datas.get(3).initData();
        }

        if (requestCode == 300 && resultCode == LOGIN_STATE_ERROR) {
            datas.get(3).initData();
            datas.get(1).initData();
        }
    }

    public interface OnAtivityResult{
        void onResult(int requestCode, int resultCode, Intent data);
    }

    private OnAtivityResult onAtivityResult;

    public void setOnAtivityResult(OnAtivityResult onAtivityResult) {
        this.onAtivityResult = onAtivityResult;
    }

    @Override
    protected void onPause() {
        super.onPause();
        CacheUtils.putString(this, "currcity", currentCity);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        CacheUtils.putString(this,"currcity",currentCity);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {

        if(myOnKeyDown != null) {
            if(!myOnKeyDown.onKeyDown(keyCode,event)) {
                return false;
            }
        }
        return super.onKeyDown(keyCode, event);
    }

    public interface MyOnKeyDown {
        boolean onKeyDown(int keyCode, KeyEvent event);
    }

    private MyOnKeyDown myOnKeyDown;

    public void setMyOnKeyDown(MyOnKeyDown myOnKeyDown) {
        this.myOnKeyDown = myOnKeyDown;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>
<script src="../../resources/ahem.js"></script>
<script>
onload = function() {
  if (!window.testRunner)
    return;

  testRunner.dumpDragImage();
  iframe.contentWindow.getSelection().selectAllChildren(iframe.contentDocument.body);
  var x = iframe.offsetLeft + iframe.offsetWidth / 2;
  var y = iframe.offsetTop + iframe.offsetHeight / 2;
  eventSender.dragMode = true;
  eventSender.mouseMoveTo(x, y);
  eventSender.mouseDown();
  eventSender.leapForward(200);
  eventSender.mouseMoveTo(x + 50, y + 50);
  eventSender.mouseUp();
}
</script>
<iframe id="iframe" style="position: absolute; top: 200px; left: 300px; width: 300px; height: 200px; border: none"
    srcdoc="
      <!DOCTYPE html>
      <style>
        body {
          color: green;
          font: 25px/1 Ahem;
        }
      </style>
      To run this test manually, select some text and drag it around. The dragged text should be clipped in the same way as the original text.">
</iframe>


text:
int CBLAS_CallFromC=0;
int RowMajorStrg=0;
#endif


text:
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;

namespace Rk.Net.Utility.Security
{
    /// <summary>
    ///
    /// </summary>
    public sealed class AESCryptographyHelper
    {
        #region Fields
        private string _salt;
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="AESCryptographyHelper"/> class.
        /// </summary>
        /// <param name="salt">The salt.</param>
        /// <exception cref="System.ArgumentNullException">salt</exception>
        /// <exception cref="System.ArgumentException">Invalid salt value.</exception>
        public AESCryptographyHelper(string salt = "PulseNetSecurityEncryption")
        {
            if (salt == null) throw new ArgumentNullException("salt");
            if (string.IsNullOrWhiteSpace(salt)) throw new ArgumentException("Invalid salt value.");
            _salt = salt;
        }
        #endregion

        #region Methods
        /// <summary>
        /// Encrypts the input based on provided salt.
        /// </summary>
        /// <param name="input">The input.</param>
        /// <returns></returns>
        public string Encrypt(string strInput)
        {
            string empty = string.Empty;
            if (strInput != string.Empty && strInput != null)
            {
                AesCryptoServiceProvider aesCryptoServiceProvider = new AesCryptoServiceProvider();
                string str = "PulseNetSecurityEncryption";
                byte[] bytes = Encoding.Unicode.GetBytes(strInput);
                byte[] numArray = Encoding.ASCII.GetBytes(str.Length.ToString());
                PasswordDeriveBytes passwordDeriveByte = new PasswordDeriveBytes(str, numArray);
                ICryptoTransform cryptoTransform = aesCryptoServiceProvider.CreateEncryptor(passwordDeriveByte.GetBytes(16), passwordDeriveByte.GetBytes(16));
                MemoryStream memoryStream = new MemoryStream();
                CryptoStream cryptoStream = new CryptoStream(memoryStream, cryptoTransform, CryptoStreamMode.Write);
                cryptoStream.Write(bytes, 0, (int)bytes.Length);
                cryptoStream.FlushFinalBlock();
                byte[] array = memoryStream.ToArray();
                memoryStream.Close();
                cryptoStream.Close();
                empty = Convert.ToBase64String(array);
            }
            return empty;
        }

        //public string Encrypt(string input)
        //{
        //    if (string.IsNullOrEmpty(input))
        //        return string.Empty;

        //    byte[] inputBytes = System.Text.Encoding.Unicode.GetBytes(input);
        //    byte[] saltBytes = System.Text.Encoding.ASCII.GetBytes(_salt.Length.ToString());

        //    PasswordDeriveBytes secretKey = new PasswordDeriveBytes(_salt, saltBytes);

        //    string output = string.Empty;
        //    using (MemoryStream memoryStream = new MemoryStream())
        //    {
        //        //AesCryptoServiceProvider is FIPS 140 compliant. FIPS 140 compliance is required for EPCS
        //        using (AesCryptoServiceProvider alg = new AesCryptoServiceProvider())
        //        {
        //            ICryptoTransform encryptor = alg.CreateEncryptor(secretKey.GetBytes(16), secretKey.GetBytes(16));

        //            using(CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write))
        //            {
        //                cryptoStream.Write(inputBytes, 0, inputBytes.Length);
        //                cryptoStream.FlushFinalBlock();
        //                byte[] cipherBytes = memoryStream.ToArray();
        //                output = Convert.ToBase64String(cipherBytes);
        //            }
        //        }
        //    }

        //    return output;
        //}

        public string Decrypt(string strInput)
        {
            string empty = string.Empty;
            if (strInput != string.Empty && strInput != null)
            {
                AesCryptoServiceProvider aesCryptoServiceProvider = new AesCryptoServiceProvider();
                string str = "PulseNetSecurityEncryption";
                byte[] numArray = Convert.FromBase64String(strInput);
                byte[] bytes = Encoding.ASCII.GetBytes(str.Length.ToString());
                PasswordDeriveBytes passwordDeriveByte = new PasswordDeriveBytes(str, bytes);
                ICryptoTransform cryptoTransform = aesCryptoServiceProvider.CreateDecryptor(passwordDeriveByte.GetBytes(16), passwordDeriveByte.GetBytes(16));
                MemoryStream memoryStream = new MemoryStream(numArray);
                CryptoStream cryptoStream = new CryptoStream(memoryStream, cryptoTransform, CryptoStreamMode.Read);
                byte[] numArray1 = new byte[(int)numArray.Length];
                int num = cryptoStream.Read(numArray1, 0, (int)numArray1.Length);
                memoryStream.Close();
                cryptoStream.Close();
                empty = Encoding.Unicode.GetString(numArray1, 0, num);
            }
            return empty;
        }

        ///// <summary>
        ///// Decrypts the input based on provided salt.
        ///// </summary>
        ///// <param name="input">The input.</param>
        ///// <returns></returns>
        //public string Decrypt(string input)
        //{
        //    if (string.IsNullOrEmpty(input))
        //        return string.Empty;

        //    byte[] inputBytes = Convert.FromBase64String(input);
        //    byte[] saltBytes = System.Text.Encoding.ASCII.GetBytes(_salt.Length.ToString());

        //    PasswordDeriveBytes secretKey = new PasswordDeriveBytes(_salt, saltBytes);

        //    string output = string.Empty;
        //    using (MemoryStream memoryStream = new MemoryStream(inputBytes))
        //    {
        //        //AesCryptoServiceProvider is FIPS 140 compliant. FIPS 140 compliance is required for EPCS
        //        using (AesCryptoServiceProvider alg = new AesCryptoServiceProvider())
        //        {
        //            ICryptoTransform decryptor = alg.CreateDecryptor(secretKey.GetBytes(16), secretKey.GetBytes(16));

        //            using (CryptoStream cryptoStream = new CryptoStream(memoryStream, decryptor, CryptoStreamMode.Read))
        //            {
        //                byte[] plainText = new byte[inputBytes.Length];
        //                int decryptedCount = cryptoStream.Read(plainText, 0, plainText.Length);
        //                output = Encoding.Unicode.GetString(plainText, 0, decryptedCount);
        //            }
        //        }
        //    }

        //    return output;
        //}
        #endregion
    }
}


text:
package com.refuctor.example;

public interface Getter {
    public String getStr();
}


text:
namespace leap {
  class IArchive;
  class IArchiveRegistry;
  class OArchive;
  class OArchiveRegistry;

  template<typename T>
  struct serial_traits;

  /// <summary>
  /// Holds true if the specified type is irresponsible during deserialization
  /// </summary>
  /// <remarks>
  /// So-called "irresponsible types" are types which do not properly clean up their own memory.
  /// The pointer type itself is the fundamental irresponsible type.  Irresponsibility is a
  /// transitive property, thus classes containing a pointer type or other irresponsible classes
  /// are themselves irresponsible.
  ///
  /// Irresponsibility is inferred by looking for an IArchiveRegistry as the needed input argument
  /// to the serial_traits::deserialize routine.  It is via this interface that allocation takes
  /// place, thus its existence indicates an intention to perform such an allocation.
  /// </remarks>
  template<typename T>
  struct serializer_is_irresponsible
  {
    template<typename U>
    static std::false_type select(
      decltype(
        serial_traits<U>::deserialize(
          *static_cast<IArchive*>(nullptr),
          *static_cast<U*>(nullptr),
          0
        )
      )*
    );

    template<typename>
    static std::true_type select(...);

    static const bool value = decltype(select<T>(nullptr))::value;
  };

  /// <summary>
  /// Interface used for general purpose field serialization
  /// </summary>
  struct field_serializer {
    /// <returns>
    /// True if this serializer or any child serializer requires memory management
    /// </returns>
    virtual bool allocates(void) const = 0;

    /// <returns>
    /// The field type, used for serial operations
    /// </returns>
    virtual serial_atom type(void) const = 0;

    /// <returns>
    /// The exact number of bytes that will be required in the serialize operation
    /// </returns>
    virtual uint64_t size(const OArchiveRegistry& ar, const void* pObj) const = 0;

    /// <summary>
    /// Serializes the object into the specified buffer
    /// </summary>
    virtual void serialize(OArchiveRegistry& ar, const void* pObj) const = 0;

    /// <summary>
    /// Deserializes the object from the specified archive
    /// </summary>
    /// <param name="ar">The input archive</param>
    /// <param name="pObj">A pointer to the memory receiving the deserialized object</param>
    /// <param name="ncb">The maximum number of bytes to be read</param>
    /// <remarks>
    /// The "ncb" field is only valid if the type of this object is serial_type::string.
    /// </remarks>
    virtual void deserialize(IArchiveRegistry& ar, void* pObj, uint64_t ncb) const = 0;

    /// <returns>
    /// True if the field being serialized has an optional notion
    /// </returns>
    /// <remarks>
    /// "Optional" means that the field can be externally described as being initialized or
    /// absent.  Shared pointers, unique pointers, dumb pointers, and leap::optional fields
    /// are all considered "optional" fields.  Embedded types are considered mandatory.
    /// </remarks>
    virtual bool is_optional(void) const = 0;
  };

  /// <summary>
  /// Describes a serializer concept for an embedded object
  /// </summary>
  struct field_serializer_object :
    field_serializer
  {
    virtual const descriptor& object(void) const = 0;
  };

  /// <summary>
  /// Describes a serializer concept for an array
  /// </summary>
  struct field_serializer_array :
    field_serializer
  {
    virtual const field_serializer& element(void) const = 0;
  };

  /// <summary>
  /// Describes a serializer concept for a map
  /// </summary>
  struct field_serializer_map:
    field_serializer
  {
    virtual const field_serializer& key(void) const = 0;
    virtual const field_serializer& mapped(void) const = 0;
  };
}


text:
package org.apache.tinkerpop.gremlin.tinkergraph.structure;

import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
import org.junit.runner.RunWith;

/**
 * Executes the Standard Gremlin Structure Test Suite using TinkerGraph.
 *
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
@RunWith(StructureStandardSuite.class)
@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
public class TinkerGraphStructureStandardTest {

}


text:
package nl.knaw.dans.common.lang.mail;

import java.util.HashMap;
import java.util.Map;

import nl.knaw.dans.common.lang.ResourceLocator;
import nl.knaw.dans.common.lang.ResourceNotFoundException;
import nl.knaw.dans.common.lang.mail.Mailer.MailerException;
import nl.knaw.dans.common.lang.test.Tester;

import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;

public class ApplicationMailerOnlineTest
{

    private static final String GUINEA_PIG = Tester.getString("mail.guineapig");
    private static Mailer mailer;

    @BeforeClass
    public static void beforeClass() throws MailerException
    {
        MailerConfiguration configuration = new ApplicationMailerConfiguration();
        configuration.setSmtpHost(Tester.getString("mail.smtp.host"));
        configuration.setSenderName("Guinea Pig");
        configuration.setFromAddress(GUINEA_PIG);

        Map<String, String> imageMap = new HashMap<String, String>();
        imageMap.put("easy-logo", "test-files/mail/easy_logo.gif");
        configuration.setImageMap(imageMap);

        mailer = new ApplicationMailer(configuration);
    }

    @Ignore
    @Test
    public void sendSimpelMail() throws MailerException
    {
        mailer.sendSimpleMail("simple mail", "text content", GUINEA_PIG);
    }

    @Ignore
    @Test
    public void sendSimpleAttachments() throws MailerException, ResourceNotFoundException
    {
        String location = "test-files/mail/easy_logo.gif";
        Attachement att = new Attachement("bla.xls", ResourceLocator.getFile(location));
        Attachement[] attachments = {att};
        mailer.sendSimpleMail("simple attachments", "textContent", attachments, GUINEA_PIG);
    }

    @Ignore
    @Test
    public void sendHtml() throws MailerException
    {
        String htmlContent = "
Hello

text content";
        mailer.sendMail("html", "text content", htmlContent, GUINEA_PIG);
    }

    @Ignore
    @Test
    public void sendMail() throws ResourceNotFoundException, MailerException
    {
        String htmlContent = "
Hello dudes

How are you today?";

        String location = "test-files/mail/easy_logo.gif";
        Attachement att = new Attachement("bla.xls", ResourceLocator.getFile(location));
        Attachement[] attachments = {att};

        mailer.sendMail("mail", "Hello etc", htmlContent, attachments, GUINEA_PIG);
    }

}


text:
package com.nikita.recipiesapp.reducers;

import android.support.annotation.NonNull;

import com.nikita.recipiesapp.actions.AddLoadedRecipes;
import com.nikita.recipiesapp.common.AppState;
import com.nikita.recipiesapp.common.redux.Action;
import com.nikita.recipiesapp.common.redux.Reducer;

public final class AddLoadedRecipesReducer implements Reducer<AppState> {
  @NonNull
  @Override
  public AppState reduce(@NonNull AppState previousState, @NonNull Action action) {
    if (action instanceof AddLoadedRecipes) {
      return previousState
        .withLoading(false)
        .withRecipes(((AddLoadedRecipes) action).recipes)
        .withError("");
    }
    return previousState;
  }
}


text:
import {Component} from 'angular2/core';
import {RouteConfig, ROUTER_DIRECTIVES, ROUTER_PROVIDERS} from 'angular2/router';
import {PenComponent} from './products/app.component.pen';
import {BookComponent} from './products/app.component.book';

@Component({
    selector: 'my-app',
    template: `

                Pen

                Book

        <router-outlet></router-outlet>
    `,
    directives: [ROUTER_DIRECTIVES],
    providers:[ROUTER_PROVIDERS]

})

@RouteConfig([
    {path: '/penn/...', name: 'Penn', component: PenComponent},
    {path: '/book/:id', name: 'Book', component: BookComponent}

])

export class AppComponent {

}


text:
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

It currently support most of the Core Services (Keystone, Glance, Nova, Swift, Cinder). Neutron to come.

+ ![Progress](http://progressed.io/bar/90)   [Identity / Authentication - Keystone](/src/Auth)
+ ![Progress](http://progressed.io/bar/60)   [Images - Glance](/src/Image)
+ ![Progress](http://progressed.io/bar/90)   [Block Storage - Cinder](/src/BlockStorage)
+ ![Progress](http://progressed.io/bar/60)   [Object Storage - Swift](/src/ObjectStorage)
+ ![Progress](http://progressed.io/bar/30)   [Compute - Nova](/src/Compute)
+ ![Progress](http://progressed.io/bar/0)   [Network - Neutron](/src/Network)

You can see the support details by clicking the service name.

How to test/develop
-------------------
> **Note:** If you have a Dreamhost or Internap public cloud API access, you can test the framework integration, see this [guide](/src/Auth/Provider).

The easiest way to try the framework is to start a fresh devstack instance in a virtual machine locally (or a container if you're feeling brave).
* Boot up your VM machine with a Linux OS and sufficient RAM (we recommand more than 3 Go)
* Clone the devstack github repo :
```bash
git clone https://github.com/openstack-dev/devstack
```
* Create/edit your local.conf to activate all the services you want to test (here is an example we use for a Ubuntu16.04 vm and 2 network interface, enp0s5 and enp0s6)
```text
[[local|localrc]]
ADMIN_PASSWORD=password
RABBIT_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=tokentoken
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SWIFT_PASSWORD=password
SWIFT_HASH=66a3d1b21c1f479c8b4e70ab5c2000f5
FLOATING_RANGE=192.168.15.0/27
FLAT_INTERFACE=enp0s6
HOST_IP=10.211.55.20
Q_FLOATING_ALLOCATION_POOL=start=192.168.15.10,end=192.168.15.20
PUBLIC_NETWORK_GATEWAY=192.168.15.1

#IP_VERSION=4+6

disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service neutron
enable_service n-novnc
enable_service s-proxy
enable_service s-object
enable_service s-container
enable_service s-account
enable_service c-bak
enable_service heat
enable_service h-api
enable_service h-api-cfn
enable_service h-api-cw
enable_service h-eng

#OFFLINE=True
VERBOSE=True
LOG_COLOR=True
LOGFILE=/opt/stack/logs/stack.sh.log
SCREEN_LOGDIR=/opt/stack/logs
PIP_UPGRADE=True
RECLONE=yes
```
* Launch your stack
```bash
cd ~/devstack
./stack.sh
```
* Once it's done, you can launch XCode and open the IOpenStack.xcodeproj project
* Make sure you have copied and rename the configuration file 'DefaultSettingsTests.plist' to 'SettingsTests.plist' in the /test directory
* Inside the 'SettingsTests.pList', edit all the DEVSTACK_*_ROOT value with the IP/URL of your devstack instance service
* Launch the test suite

How to use
----------
COMMING SOON
```objective-c

```

Contributing
============

Feel free to raise issues and send some pull request, we'll be happy to look at them!


text:
package il.co.topq.difido;

import org.junit.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.Test;

public class TestsWithFailedTeardown extends AbstractTestCase {

	@AfterMethod
	public void teardown() throws Exception {
		report.log("In the teardown phase. About to throw exception");
		throw new Exception("Throwing exception deliberately");
	}

	@Test
	public void testThatSucceeded() {
		report.log("In test");
	}

	@Test
	public void testThatFails() {
		Assert.assertNotNull("Throwing assert error deliberately", null);
	}

}


text:
import { FORECAST_UPDATE_DATA, FORECAST_UPDATE_DAYS } from "../actions";

const initalState = {
  data: {},
  refrence: [],
  days: [],
};

const forecast = (state = initalState, action) => {
  switch (action.type) {
    case FORECAST_UPDATE_DAYS:
      const days = action.payload;
      days.shift();
      return {
        ...state,
        days,
      };
    case FORECAST_UPDATE_DATA:
      const { entities, result } = action.payload;
      const listOfForecast = entities.list;
      return {
        ...state,
        data: listOfForecast,
        refrence: result,
      };
    default:
      return state;
  }
};

export default forecast;


text:
CustomTagController.super = "delta.com.objectBase.ObjectBase";

function CustomTagController(params){
	Super(this, params);

}

CustomTagController.properties = {

};


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Puccinia atlantica Maire

### Remarks
null


text:
<?php
namespace Chestnut\Database\Nut;

use Chestnut\Support\Parameter;

/**
 * @author Liyang Zhang <zhangliyang@zhangliyang.name>
 */
class Collection extends Parameter {

	public function first() {
		return reset($this->attributes);
	}

	public function sum($key) {
		$result = 0;

		$this->walk(function ($item) use (&$result, $key) {
			$result += $item->{$key};
		});

		return $result;
	}

	public function compare($array) {
		$compare = [];

		if (!$array instanceof static ) {
			$array = (array) $array;
		}

		foreach ($this->keys() as $key) {
			if ($this[$key] == $array[$key]) {
				continue;
			}

			$compare[$key] = $this[$key];
		}

		return count($compare) ? new static($compare) : [];
	}

	public function join($symbol, $key = null) {
		$result = '';

		$this->walk(function ($item) use (&$result, $symbol, $key) {
			$result .= $item->{$key} . $symbol;
		});

		return $result;
	}

	public function walk($callback) {
		array_walk($this->attributes, $callback);
	}

	public function toArray() {
		return array_map(function ($value) {
			if (is_object($value) && method_exists($value, 'toArray')) {
				return $value->toArray();
			}

			return $value;
		}, $this->attributes);
	}

	public function toJson() {
		return json_encode($this->toArray());
	}

	public function getHiddenIterator($hidden) {
		return $this->filter($hidden)->getIterator();
	}
}


text:
<!DOCTYPE html>

        <meta charset="utf-8" />
        <meta name="description" content="Site Oficial My Mini Sweets">
        <meta name="author" content="Lucas Albuquerque & Mayara Nascimento">

        <?php $this->load->view('templates/importscss') ?>

        <title>Home</title>

<a href="<?php echo base_url('Welcome'); ?>"><img src="<?php echo base_url('assets/developer/imgs/logos/logo1.png'); ?>" alt="" />

<a href="<?php echo base_url('Welcome'); ?>">Início

<a href="<?php echo base_url('Geral/foodtruck'); ?>">Foodtruck

<a href="<?php echo base_url('Geral/produtos'); ?>">Produtos

<a href="<?php echo base_url('Geral/encomendas'); ?>" id="visited">Encomendas

<a href="<?php echo base_url('Geral/contato'); ?>">Contato

My Mini Sweets Encomendas

Vem fazer a festa com a gente!

    <?php $this->load->view('templates/redessociais') ?>

    <?php $this->load->view('templates/rodape') ?>

    <?php $this->load->view('templates/importsjs') ?>


text:
from django.urls import re_path

from .views import FeedbackFormView, RecordJsonFeedback

urlpatterns = [
    re_path(
        r"^submit_initial/", RecordJsonFeedback.as_view(), name="json_feedback_view"
    ),
    re_path(r"^$", FeedbackFormView.as_view(), name="feedback_form_view"),
]


text:
"""
A library and command-line utility for turning an XPJSON PlanSchema document
into an HTML-format command dictionary.

This tool focuses on the @commandSpecs part of the PlanSchema (and indirectly
on the @paramSpecs used by the commands). It doesn't output anything about
plan params, station params, segment params, etc. It might make sense to
extend the coverage at some point.

This tool does *not* output a simplified intermediate format such as
Markdown, Trac wiki, etc. on the way to HTML. That's because it uses
some fairly fancy HTML features such as nested tables that didn't seem
to lend themselves to that. However, it's fairly configurable, for
example, in terms of overriding templates.
"""

import json
import logging
import copy
import os
import re

from xgds_planner2 import xpjson

LTE_SYMBOL = '≤'
GTE_SYMBOL = '≥'

PARAMS_TABLE_COLUMNS = (
    'parameter',
    'type',
    'unit',
    'default',
    'constraints',
    'notes',
    'other',
)

DOC_TEMPLATE_HTML = '''<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

%(title)s

%(commands)s

'''

STYLE_SHEET = '''
body {
  font-family: Sans-Serif;
}

h1.title {
  font-size: 1.5em;
  padding: 5px;
}

h2.title {
  font-size: 1.2em;
  padding: 5px;
}

div.command_index {
  padding-bottom: 20px;
}

div.commandSpec {
  border-top-style: solid;
  border-top-width: 3px;
  margin-bottom: 40px;
}

div.commandSpecId {
  font-size: 1.5em;
  background-color: #ddd;
  padding: 5px;
  font-weight: bold;
}

div.commandSpecNotes {
  padding-left: 5px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.commandSpec table {
  border-collapse: collapse;
}

.commandSpec th {
  background-color: #ddd;
}

.commandSpec th, td {
  border: 1px solid black;
  text-align: left;
  vertical-align: top;
  padding: 5px;
}

.commandSpec td.param_choices_value {
  font-family: 'Courier', monospace;
}

td.inner_table {
  padding: 0px;
}

'''

COMMAND_SPEC_TEMPLATE_HTML = '''

%(id)s

%(notes)s

    %(paramsTable)s

'''

DEFAULT_DICTIONARY_SETTINGS = {
    'title': 'Command Dictionary',
    'styleSheet': STYLE_SHEET,
    'docTemplateHtml': DOC_TEMPLATE_HTML,
    'commandSpecTemplateHtml': COMMAND_SPEC_TEMPLATE_HTML,
    'includeIndex': True,
    # 'includeCommandSpecNameField': True,
    # 'includeCommandSpecNotesField': True,
    'includeCommandSpecNameField': False,
    'includeCommandSpecNotesField': False,
}

def appendField(d, entry, text):
    """
    Append @text to entry @entry in dict @d. If the entry
    is not defined, create it.
    """
    if entry not in d:
        d[entry] = text
    else:
        d[entry] += '; ' + text

def htmlRepr(val):
    """
    Print HTML text for a Python object. Right now, the main value add
    is to print a string as a quoted string.

    This would probably be more robust using Python HTML libraries for
    escaping, but I'm too lazy to look it up right now.
    """
    if isinstance(val, (str, unicode)):
        return '"%s"' % val
    else:
        return str(val)

def getParamChoicesTableHtml(choices):
    """
    Convert the @choices dict object, which comes from the choices field
    of an XPJSON ParamSpec, into a two-column HTML table.
    """
    rlist = []

    def p(x):
        rlist.append(x)
        rlist.append('\n')

    p('
')
    p('
')
    for header in ('name', 'value'):
        p('    %s	' % (header, header.capitalize()))
    p('
')
    for value, name in choices:
        p('
')
        p('    %s	' % name)
        p('    %s	' % htmlRepr(value))
        p('
')
    p('
')

    return ''.join(rlist)

def prettify(s):
    s = re.sub('([a-z])([A-Z])', lambda m: m.group(1) + ' ' + m.group(2), s)
    s = s[0].capitalize() + s[1:]
    return s

def prettifySuperscript(s):
    if isinstance(s, basestring):
        return re.sub(r'\^(\-?\d+)', lambda m: ('%s' % m.group(1)), s)
    else:
        return s

def getParamInfo(p):
    """
    Convert an XPJSON ParamSpec into an intermediate representation prior
    to outputting it as a row in an HTML parameter table.

    The representation is a Python dict whose entries correspond to
    columns of the table.
    """

    result = {}

    result['type'] = p.valueType
    result['notes'] = p.notes
    result['unit'] = prettifySuperscript(p.unit)

    if p.name is not None:
        result['parameter'] = p.name
    else:
        result['parameter'] = prettify(p.id)

    if p.choices is not None:
        # logging.debug('%s', json.dumps(p.choices, sort_keys=True, indent=4))
        appendField(result, 'constraints', getParamChoicesTableHtml(p.choices))

    if p.editable is False:
        appendField(result, 'other', 'uneditable')

    if p.maxLength is not None:
        appendField(result, 'constraints', 'length < %s' % params.maxLength)

    if p.minimum is not None and p.maximum is not None:
        if p.strictMinimum:
            minSymbol = '<'
        else:
            minSymbol = LTE_SYMBOL
        if p.strictMaximum:
            maxSymbol = '<'
        else:
            maxSymbol = LTE_SYMBOL
        constraint = ('%s %s val %s %s'
                      % (p.minimum, minSymbol,
                         maxSymbol, p.maximum))
        appendField(result, 'constraints', constraint)
    elif p.minimum is not None:
        if p.strictMinimum:
            symbol = '>'
        else:
            symbol = GTE_SYMBOL
        constraint = ('val %s %s'
                      % (symbol, p.minimum))
        appendField(result, 'constraints', constraint)
    elif p.maximum is not None:
        if p.strictMaximum:
            symbol = '<'
        else:
            symbol = LTE_SYMBOL
        constraint = ('val %s %s'
                      % (symbol, p.maximum))
        appendField(result, 'constraints', constraint)

    if p.default is not None:
        result['default'] = '' + htmlRepr(p.default) + ''

    if p.default is None and p.required is True:
        result['default'] = 'required'
    if p.visible is False:
        appendField(result, 'other', 'hidden')

    # logging.debug('%s', json.dumps(result, sort_keys=True, indent=4))

    return result

def getInfoTableHtml(columns, rows, tableClass):
    """
    Convert @rows, which is the output of getParamInfo(), into an HTML table.

    @columns is a list of columns to use in the table.

    @tableClass is the HTML class to put on the HTML table element, available for CSS styling.
    """

    nonEmptyColumns = [c
                       for c in columns
                       if not all([(row.get(c) is None or row[c] == '')
                                   for row in rows])]

    rlist = []
    def p(x):
        rlist.append(x)
        rlist.append('\n')

    p('
' % tableClass)
    p('
')
    for c in nonEmptyColumns:
        p('    %s	' % (tableClass, c, c.capitalize()))
    p('
')

    for row in rows:
        p('
')
        for c in nonEmptyColumns:
            val = row.get(c)
            if val is None:
                val = ''
            classTag = '%s_%s' % (tableClass, c)
            if '<table' in val:
                classTag += ' inner_table'
            p('    %s	' % (classTag, val))
        p('
')
    p('
')

    return ''.join(rlist)

def getCommandSpecInfo(settings, commandSpec):
    """
    Convert an XPJSON command spec into an intermediate representation,
    prior to outputting the HTML-formatted entry for the command in the
    command dictionary.

    The intermediate representation is a dict with fields corresponding to the
    different sections of the command entry in the dictionary.
    """
    paramIds = set([p.id for p in commandSpec.params])
    params = [getParamInfo(p) for p in commandSpec.params]

    if settings['includeCommandSpecNameField'] and 'name' not in paramIds:
        nameParam = {
            'parameter': 'Name',
            'type': 'string',
            'default': '(auto-generated)',
            'notes': 'Optionally, specify a meaningful name for an instance of the command, to appear in summary views of the plan',
        }
        params = [nameParam] + params

    if settings['includeCommandSpecNotesField'] and 'notes' not in paramIds:
        notesParam = {
            'parameter': 'Notes',
            'type': 'string',
            'default': '',
            'notes': 'A place to put arbitrary notes, for example, clarifying the intent of the command',
        }
        params.append(notesParam)

    return {
        'id': commandSpec.id,
        'notes': commandSpec.notes or '',
        'params': params
    }

def getCommandSpecHtml(commandSpecTemplateHtml, commandInfo):
    """
    Convert @commandInfo, which is the output of getCommandSpecInfo(), into
    the HTML-formatted entry for the command in the command dictionary.

    Uses @commandSpecTemplateHtml as the boilerplate string template.
    """
    paramsTable = getInfoTableHtml(PARAMS_TABLE_COLUMNS, commandInfo['params'], 'params')
    return commandSpecTemplateHtml % {
        'id': commandInfo['id'],
        'notes': commandInfo['notes'],
        'paramsTable': paramsTable
    }

def writeCommandDictionary(inSchemaPath, outHtmlPath, **kwargs):
    """
    The master function that reads in an XPJSON PlanSchema document and outputs
    a command dictionary.
    """
    settings = copy.deepcopy(DEFAULT_DICTIONARY_SETTINGS)
    settings.update(kwargs)
    xpjson.CHECK_UNKNOWN_FIELDS = False  # suppress some warnings
    schema = xpjson.loadDocument(inSchemaPath)
    hlist = []

    def p(x):
        hlist.append(x)
        hlist.append('\n')

    commandSpecs = sorted(schema.commandSpecs, key=lambda spec: spec.id)

    if settings['includeIndex']:
        p('
')
        p('
Index
')
        p('
')
        for c in commandSpecs:
            p('
%s
' % (c.id, c.id))
        p('
')
        p('
')

    for c in commandSpecs:
        # logging.debug('%s', json.dumps(getCommandSpecInfo(settings, c), sort_keys=True, indent=4))
        commandInfo = getCommandSpecInfo(settings, c)
        chtml = getCommandSpecHtml(settings['commandSpecTemplateHtml'], commandInfo)
        p(chtml)

    outHtmlText = settings['docTemplateHtml'] % {
        'title': settings['title'],
        'style': settings['styleSheet'],
        'commands': ''.join(hlist)
    }
    with open(outHtmlPath, 'w') as outHtmlStream:
        outHtmlStream.write(outHtmlText)
    logging.info('wrote output to %s', outHtmlPath)

def main():
    import optparse
    parser = optparse.OptionParser(__doc__+'\n\n')
    opts, args = parser.parse_args()
    if len(args) == 2:
        inSchemaPath, outHtmlPath = args
    elif len(args) == 1:
        inSchemaPath = args[0]
        outHtmlPath = os.path.splitext(inSchemaPath)[0] + '.html'
        outHtmlPath = outHtmlPath.replace('PlanSchema', 'CommandDictionary')
    else:
        parser.error('expected exactly 1 or 2 args')
    logging.basicConfig(level=logging.DEBUG, format='%(message)s')
    writeCommandDictionary(inSchemaPath, outHtmlPath)
    # writeCommandDictionary('/vagrant/xgds_basalt/apps/xgds_planner2/xpjsonSpec/examplePlanSchema.json', 'exampleCommandDictionary.html')

if __name__ == '__main__':
    main()


text:
@interface ExampleShareFile : UIViewController <UITableViewDataSource, UITableViewDelegate>

@end


text:
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { NotificationsRoutingModule } from './notifications-routing.module';
import { NotificationsComponent } from './notifications.component';

@NgModule({
    imports: [
        CommonModule,
        NotificationsRoutingModule,
    ],
    declarations: [
        NotificationsComponent
    ]
})
export class NotificationsModule { }


text:
from setuptools import setup

setup(
    name='drone-pypi-testbuild',
    version='0.1.0',
    description='Testing drone-pypi publishes, no other purpose.',
    url='https://github.com/xoxys/drone-pypi',
    packages=['testdata/drone_pypi_test'],
    maintainer='Robert Kaussow',
    maintainer_email="xoxys@rknet.org",
)


text:
cask 'openra' do
  version '20180307'
  sha256 'a8cf3a77ff1cccfaa66d973f4abbfa1c30106f39da97ce4d0fd0e823cee86b52'

  # github.com/OpenRA/OpenRA was verified as official when first introduced to the cask
  url "https://github.com/OpenRA/OpenRA/releases/download/release-#{version}/OpenRA-release-#{version}.dmg"
  appcast 'https://github.com/OpenRA/OpenRA/releases.atom'
  name 'OpenRA'
  homepage 'http://www.openra.net/'

  depends_on cask: 'mono-mdk'

  app 'OpenRA - Dune 2000.app'
  app 'OpenRA - Red Alert.app'
  app 'OpenRA - Tiberian Dawn.app'
end


text:
<title>GrADS Command: set zlog</title>

set zlog

set zlog on|off

Sets log scaling of the Z dimension on or
off. Sticks until reset.

Usage Notes

Examples


text:
using System.Linq;
using System.Reflection;
using CSharpDiscriminatedUnion.Generator.Tests.UnionTypes;
using NUnit.Framework;

namespace CSharpDiscriminatedUnion.Generator.Tests.Struct
{
    public class StructSingleCaseWithMultipleParametersTests
    {
        [Test]
        public void HasCaseMethod()
        {
            var caseMethods = typeof(StructBook).GetMethods(BindingFlags.Public | BindingFlags.Static)
                                                     .Where(m => m.Name == "NewBook")
                                                     .ToArray();
            //assert
            Assert.That(caseMethods, Has.Exactly(1).Items);
            var singleMethod = caseMethods[0];
            Assert.That(singleMethod, Has.Property(nameof(singleMethod.ReturnType)).EqualTo(typeof(StructBook)));
            Assert.That(singleMethod.GetParameters().Select(p => p.ParameterType), Is.EquivalentTo(new[] { typeof(string), typeof(int), typeof(string) }));
            Assert.That(singleMethod.GetParameters().Select(p => p.Name), Is.EquivalentTo(new[] { "author", "pageCount", "title" }));
        }
    }
}


text:
using JenkinsTransport.Interface;
using System;
using System.ComponentModel;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace JenkinsTransport
{
    public partial class ConfigurationForm : Form, IForm
    {
        private static Regex _serverRegex = new Regex("^http(s)?://\\w+", RegexOptions.IgnoreCase);
        private static bool IsValidServer(string server)
        {
            return _serverRegex.IsMatch(server);
        }

        private void ServerTextBox_Validating(object sender, CancelEventArgs e)
        {
            if (!IsValidServer(GetServer()))
            {
                e.Cancel = true;
                errorProvider1.SetError(ServerTextBox, "Please provide a valid server URL");
            }
        }

        private void ServerTextBox_Validated(object sender, EventArgs e)
        {
            errorProvider1.SetError(ServerTextBox, String.Empty);
        }

        public ConfigurationForm()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Gets the server name from the form
        /// </summary>
        public string GetServer()
        {
            return ServerTextBox.Text;
        }

        /// <summary>
        /// Gets the username from the form
        /// </summary>
        /// <returns></returns>
        public string GetUsername()
        {
            return UsernameTextBox.Text;
        }

        /// <summary>
        /// Gets the password from the form
        /// </summary>
        /// <returns></returns>
        public string GetPassword()
        {
            return PasswordTextBox.Text;
        }

    }
}


text:
//
//  TJPGiftChanneView.h
//  TestAnimation
//
//  Created by Walkman on 2017/3/1.
//  Copyright © 2017年 AaronTang. All rights reserved.
//  连击动画视图

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, TJPGiftComboViewState) {
    TJPGiftComboViewStateUnknown = 0,
    TJPGiftComboViewStateIdle,                                      //闲置
    TJPGiftComboViewStateAnimating,                                 //正在执行动画
    TJPGiftComboViewStateWaiting,                                   //等待动画结束
    TJPGiftComboViewStateEnding                                     //结束
};

@class TJPGiftModel;
@interface TJPGiftComboView : UIView

@property (nonatomic, assign) TJPGiftComboViewState state;          //状态

@property (nonatomic, strong) TJPGiftModel *giftModel;              //礼物模型

@property (nonatomic, assign) NSInteger cacheNum;                   //缓存数量(用来检查是否连续送)

@property (nonatomic, copy) void(^animationFinishedCompletion)(TJPGiftComboView *comboView);                                                     //动画完成回调

/** 加载xib*/
+ (TJPGiftComboView *)loadGiftComboView;

/** 添加缓存*/
- (void)addOnceAnimationToCache;

@end


text:
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Microsoft.AspNet.SignalR.Owin</name>
    </assembly>
    <members>
        <member name="M:Microsoft.AspNet.SignalR.TaskAsyncHelper.Interleave``1(System.Func{``0,System.Func{System.Threading.Tasks.Task},System.Threading.Tasks.Task},System.Func{System.Threading.Tasks.Task},``0,System.Threading.Tasks.TaskCompletionSource{System.Object})">
            <summary>
            Passes a task returning function into another task returning function so that
            it can decide when it starts and returns a task that completes when all are finished
            </summary>
        </member>
        <member name="T:Microsoft.AspNet.SignalR.Owin.Infrastructure.Headers">
            <summary>
            Helper methods for creating and consuming CallParameters.Headers and ResultParameters.Headers.
            </summary>
        </member>
        <member name="T:Microsoft.AspNet.SignalR.Infrastructure.UrlDecoder">
            <summary>
            Helpers for decoding URI query components.
            </summary>
        </member>
        <member name="T:Microsoft.AspNet.SignalR.Owin.Resources">
            <summary>
              A strongly-typed resource class, for looking up localized strings, etc.
            </summary>
        </member>
        <member name="P:Microsoft.AspNet.SignalR.Owin.Resources.ResourceManager">
            <summary>
              Returns the cached ResourceManager instance used by this class.
            </summary>
        </member>
        <member name="P:Microsoft.AspNet.SignalR.Owin.Resources.Culture">
            <summary>
              Overrides the current thread's CurrentUICulture property for all
              resource lookups using this strongly typed resource class.
            </summary>
        </member>
        <member name="P:Microsoft.AspNet.SignalR.Owin.Resources.Error_NoDepenendeyResolver">
            <summary>
              Looks up a localized string similar to A dependency resolver must be specified..
            </summary>
        </member>
        <member name="P:Microsoft.AspNet.SignalR.Owin.Resources.Error_NotWebSocketRequest">
            <summary>
              Looks up a localized string similar to Not a valid web socket request..
            </summary>
        </member>
        <member name="T:Microsoft.AspNet.SignalR.Owin.WebSocketConstants">
            <summary>
            Standard keys and values for use within the OWIN interfaces
            </summary>
        </member>
    </members>
</doc>


text:
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import json
from networkx import MultiDiGraph, Graph, cycle_basis
from pygraphviz import AGraph

def im_json_to_graph(im_json):
    """Return networkx graph from Kappy's influence map JSON.

    Parameters
    ----------
    im_json : dict
        A JSON dict which contains an influence map generated by Kappy.

    Returns
    -------
    graph : networkx.MultiDiGraph
        A graph representing the influence map.
    """
    # This is for kappy compatibility: as of 4.1.2, im_json is a string,
    # whereas before it was a json object
    if isinstance(im_json, str):
        im_json = json.loads(im_json)
    imap_data = im_json['influence map']['map']

    # Initialize the graph
    graph = MultiDiGraph()

    id_node_dict = {}
    # Add each node to the graph
    for node_dict in imap_data['nodes']:
        # There is always just one entry here with the node type e.g. "rule"
        # as key, and all the node data as the value
        node_type, node = list(node_dict.items())[0]
        # Add the node to the graph with its label and type
        attrs = {'fillcolor': '#b7d2ff' if node_type == 'rule' else '#cdffc9',
                 'shape': 'box' if node_type == 'rule' else 'oval',
                 'style': 'filled'}
        graph.add_node(node['label'], node_type=node_type, **attrs)
        # Save the key of the node to refer to it later
        new_key = '%s%s' % (node_type, node['id'])
        id_node_dict[new_key] = node['label']

    def add_edges(link_list, edge_sign):
        attrs = {'sign': edge_sign,
                 'color': 'green' if edge_sign == 1 else 'red',
                 'arrowhead': 'normal' if edge_sign == 1 else 'tee'}
        for link_dict in link_list:
            source = link_dict['source']
            for target_dict in link_dict['target map']:
                target = target_dict['target']
                src_id = '%s%s' % list(source.items())[0]
                tgt_id = '%s%s' % list(target.items())[0]
                graph.add_edge(id_node_dict[src_id], id_node_dict[tgt_id],
                               **attrs)

    # Add all the edges from the positive and negative influences
    add_edges(imap_data['wake-up map'], 1)
    add_edges(imap_data['inhibition map'], -1)

    return graph

def cm_json_to_networkx(cm_json):
    """Return a networkx graph from Kappy's contact map JSON.

    The networkx Graph's structure is as follows. Each monomer is represented
    as a node of type "agent", and each site is represented as a separate
    node of type "site". Edges that have type "link" connect site nodes
    whereas edges with type "part" connect monomers with their sites.

    Parameters
    ----------
    cm_json : dict
        A JSON dict which contains a contact map generated by Kappy.

    Returns
    -------
    graph : networkx.Graph
        An undirected graph representing the contact map.
    """
    cmap_data = get_cmap_data_from_json(cm_json)
    graph = Graph()
    nodes = []
    edges = []
    for node_idx, node in enumerate(cmap_data):
        nodes.append((node_idx, {'label': node['node_type'], 'type': 'agent'}))
        for site_idx, site in enumerate(node['node_sites']):
            # We map the unique ID of the site to its name
            site_key = (node_idx, site_idx)
            nodes.append((site_key, {'label': site['site_name'],
                                     'type': 'site'}))
            # Each port link is an edge from the current site to the
            # specified site
            if not site['site_type'] or not site['site_type'][0] == 'port':
                continue
            # As of kappy 4.1.2, the format of port links have changed
            # Old format: [[1, 0]], New format: [[[0, 1], 0]]
            for port_link in site['site_type'][1]['port_links']:
                port_link = tuple([link[1] if isinstance(link, list) else link
                                   for link in port_link])
                if isinstance(port_link, list):
                    port_link = port_link[1]
                edges.append((site_key, tuple(port_link), {'type': 'link'}))
            edges.append((node_idx, site_key, {'type': 'part'}))
    graph.add_nodes_from(nodes)
    graph.add_edges_from(edges)
    return graph

def get_cm_cycles(cm_graph):
    """Return cycles from a model's Kappa contact map graph representation.

    Parameters
    ----------
    cm_graph : networkx.Graph
        A networkx graph produced by cm_json_to_networkx.

    Returns
    -------
    list
        A list of base cycles found in the contact map graph. Each cycle
        is represented as a list of strings of the form Monomer(site).
    """
    cycles = cycle_basis(cm_graph)
    processed_cycles = []
    for cycle in cycles:
        processed_cycle = []
        edges = list(zip(cycle, cycle[1:] + [cycle[0]]))
        # Filter out cycles where the same site on an agent is used
        # since that represents competitive binding
        edge_types = [cm_graph.edges[e]['type'] for e in edges]
        edge_type_pairs = list(zip(edge_types,
                                   edge_types[1:] + [edge_types[0]]))
        if any([etp == ('link', 'link') for etp in edge_type_pairs]):
            continue
        # Now just keep link edges
        link_edges = [e for e in edges if cm_graph.edges[e]['type'] == 'link']
        for n1, n2 in link_edges:
            if n1 == n2:
                break
            edge = cm_graph.edges[(n1, n2)]
            if edge['type'] == 'link':
                agent1 = cm_graph.nodes[n1[0]]['label']
                agent2 = cm_graph.nodes[n2[0]]['label']
                label1 = '%s(%s)' % (agent1, cm_graph.nodes[n1]['label'])
                label2 = '%s(%s)' % (agent2, cm_graph.nodes[n2]['label'])
                processed_cycle += [label1, label2]
        else:
            processed_cycles.append(processed_cycle)
    return processed_cycles

def cm_json_to_graph(cm_json):
    """Return pygraphviz Agraph from Kappy's contact map JSON.

    Parameters
    ----------
    cm_json : dict
        A JSON dict which contains a contact map generated by Kappy.

    Returns
    -------
    graph : pygraphviz.Agraph
        A graph representing the contact map.
    """
    cmap_data = get_cmap_data_from_json(cm_json)

    # Initialize the graph
    graph = AGraph()

    # In this loop we add sites as nodes and clusters around sites to the
    # graph. We also collect edges to be added between sites later.
    edges = []
    for node_idx, node in enumerate(cmap_data):
        sites_in_node = []
        for site_idx, site in enumerate(node['node_sites']):
            # We map the unique ID of the site to its name
            site_key = (node_idx, site_idx)
            sites_in_node.append(site_key)
            graph.add_node(site_key, label=site['site_name'], style='filled',
                           shape='ellipse')
            # Each port link is an edge from the current site to the
            # specified site
            if not site['site_type'] or not site['site_type'][0] == 'port':
                continue
            # As of kappy 4.1.2, the format of port links have changed
            # Old format: [[1, 0]], New format: [[[0, 1], 0]]
            for port_link in site['site_type'][1]['port_links']:
                port_link = tuple([link[1] if isinstance(link, list) else link
                                   for link in port_link])
                if isinstance(port_link, list):
                    port_link = port_link[1]
                edge = (site_key, tuple(port_link))
                edges.append(edge)
        graph.add_subgraph(sites_in_node,
                           name='cluster_%s' % node['node_type'],
                           label=node['node_type'])

    # Finally we add the edges between the sites
    for source, target in edges:
        graph.add_edge(source, target)

    return graph

def get_cmap_data_from_json(cm_json):
    # This is for kappy compatibility: as of 4.1.2, im_json is a string,
    # whereas before it was a json object
    if isinstance(cm_json, str):
        cm_json = json.loads(cm_json)
    cmap_data = cm_json['contact map']['map']
    # As of 4.1.2 there is also an additional level of nesting in a one-element
    # list that we can unpack here
    if len(cmap_data) == 1 and isinstance(cmap_data[0], list):
        cmap_data = cmap_data[0]
    return cmap_data


text:
require 'spec_helper'

RSpec.describe CachedRecord::Mapper do
  class TestModel
    attr_accessor :prop

    def initialize(attributes = {})
      from_hash(attributes)
    end

    def to_hash
      {
        prop: @prop,
      }
    end

    def from_hash(attributes)
      @prop = attributes[:prop]
    end
  end

  class TestChildModel < TestModel; end

  class TestRecord
    def prop
      'foo'
    end
  end

  class TestMapper < CachedRecord::Mapper
    model TestModel
    model TestChildModel, type: :test_child

    version 1

    map TestRecord, mapper: :map_test_record, type: :test_child

    map :test_record_2, mapper: :map_test_record_2, type: :test_child

    def map_test_record(model, object)
      model.prop = object.prop
    end

    def map_test_record_2(model, object)
      model.prop = object.prop + "2"
    end
  end

  subject { TestMapper.new }

  let(:data_object) { TestRecord.new }

  describe "#normalize_data" do
    it "should return a hash value" do
      expect(subject.normalize_data(data_object)).to eq(prop: 'foo')
    end
  end

  describe "#map_data_object" do
    context "when passing raw data :raw_default as the name" do
      it "should return a model of the default type" do
        mapped_model = subject.map_data_object({prop: "default"}, name: :raw_default)

        model = mapped_model.model
        expect(model.prop).to eq("default")
        expect(model).to be_a(TestModel)
        expect(model).to_not be_a(TestChildModel)
      end
    end

    context "when passing raw data :raw_test_child as the name" do
      it "should return a mapped model of the default type" do
        mapped_model = subject.map_data_object({prop: "child"}, name: :raw_test_child)
        model = mapped_model.model
        expect(model.prop).to eq("child")
        expect(model).to be_a(TestChildModel)
      end
    end

    context "when the data_object's class isn't registered" do
      it "raises an exception"
    end
  end

  describe "#serialize_data" do
    context "when getting mapping context based on data_object class" do
      it "should return a hash with meta data along with serialized data" do
        serialized = subject.serialize_data(data_object)
        expect(serialized).to include(
          type: :test_child,
          version: 1,
          data: {prop: 'foo'}
        )
      end
    end

    context "when getting mapping context based on mapping name" do
      it "should return a hash with meta data along with serialized data" do
        serialized = subject.serialize_data(data_object, name: :test_record_2)
        expect(serialized).to include(
          type: :test_child,
          version: 1,
          data: {prop: 'foo2'}
        )
      end
    end

    context "when passing an invalid name" do
      it "should raise a MappingError" do
        expect { subject.serialize_data(data_object, name: :test_record_unknown) }.to raise_error(CachedRecord::MappingError)
     end
    end
  end
end


text:
What's new in h5py 2.5
======================

Experimental support for Single Writer Multiple Reader (SWMR)
-------------------------------------------------------------

This release introduces experimental support for the highly-anticipated
"Single Writer Multiple Reader" (SWMR) feature in the upcoming HDF5 1.10
release.  SWMR allows sharing of a single HDF5 file between multiple processes
without the complexity of MPI or multiprocessing-based solutions.

This is an experimental feature that should NOT be used in production code.
We are interested in getting feedback from the broader community with respect
to performance and the API design.

For more details, check out the h5py user guide:
https://docs.h5py.org/en/latest/swmr.html

SWMR support was contributed by Ulrik Pedersen (:pr:`551`).

Other changes
-------------

* Use system Cython as a fallback if `cythonize()` fails (:pr:`541` by Ulrik Pedersen).
* Use pkg-config for building/linking against hdf5 (:pr:`505` by James Tocknell).
* Disable building Cython on Travis (:pr:`513` by Andrew Collette).
* Improvements to release tarball (:pr:`555`, :pr:`560` by Ghislain Antony
  Vaillant).
* h5py now has one codebase for both Python 2 and 3; 2to3 removed from setup.py
  (:pr:`508` by James Tocknell).
* Add python 3.4 to tox (:pr:`507` by James Tocknell).
* Warn when importing from inside install dir (:pr:`558` by Andrew Collette).
* Tweak installation docs with reference to Anaconda and other Python package
  managers (:pr:`546` by Andrew Collette).
* Fix incompatible function pointer types (:pr:`526`, :pr:`524` by Peter H. Li).
* Add explicit `vlen is not None` check to work around
  https://github.com/numpy/numpy/issues/2190 (`#538` by Will Parkin).
* Group and AttributeManager classes now inherit from the appropriate ABCs
  (:pr:`527` by James Tocknell).
* Don't strip metadata from special dtypes on read (:pr:`512` by Antony Lee).
* Add 'x' mode as an alias for 'w-' (:pr:`510` by Antony Lee).
* Support dynamical loading of LZF filter plugin (:pr:`506` by Peter Colberg).
* Fix accessing attributes with array type (:pr:`501` by Andrew Collette).
* Don't leak types in enum converter (:pr:`503` by Andrew Collette).
* Cython warning cleanups related to "const"

Acknowledgements
----------------

This release incorporates changes from, among others:

* Ulrik Pedersen
* James Tocknell
* Will Parkin
* Antony Lee
* Peter H. Li
* Peter Colberg
* Ghislain Antony Vaillant


text:
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const utils = require('./utils');

const defaultConfig = require('./webpack.common');
const { publicAssets } = require('./environment');

const hot = `webpack-hot-middleware/client?path=${publicAssets}/__webpack_hmr`;

const devConfig = Object.assign({}, defaultConfig);

// enable hot server
const app = utils.isHot() ? [hot, 'react-hot-loader/patch', ...devConfig.entry.app] : [...devConfig.entry.app];

devConfig.entry.app = app;
// enable Hot module replacement
if (utils.isHot()) {
  devConfig.plugins.push(new webpack.HotModuleReplacementPlugin());
}

// extract all styles in one chunk
devConfig.plugins.push(new ExtractTextPlugin({ filename: '[name].css', allChunks: true }));

module.exports = devConfig;


text:
namespace {

class TestSyncedTabDelegate : public TabContentsSyncedTabDelegate {
 public:
  explicit TestSyncedTabDelegate(content::WebContents* web_contents) {
    SetWebContents(web_contents);
  }

  ~TestSyncedTabDelegate() override = default;

  SessionID GetWindowId() const override { return SessionID::InvalidValue(); }
  SessionID GetSessionId() const override { return SessionID::InvalidValue(); }
  bool IsPlaceholderTab() const override { return false; }
  bool IsInitialBlankNavigation() const override {
    // Returns false so the ShouldSyncReturnsFalse* tests would not return early
    // because this function returns true.
    return false;
  }
};

class TabContentsSyncedTabDelegateTest
    : public ChromeRenderViewHostTestHarness {
 public:
  TabContentsSyncedTabDelegateTest() {
    ON_CALL(mock_sync_sessions_client_, GetSyncedWindowDelegatesGetter())
        .WillByDefault(testing::Return(&window_getter_));
  }
  ~TabContentsSyncedTabDelegateTest() override = default;

 protected:
  sync_sessions::TestSyncedWindowDelegatesGetter window_getter_;
  testing::NiceMock<sync_sessions::MockSyncSessionsClient>
      mock_sync_sessions_client_;
};

TEST_F(TabContentsSyncedTabDelegateTest, InvalidEntryIndexReturnsDefault) {
  std::unique_ptr<content::WebContents> web_contents(CreateTestWebContents());
  TestSyncedTabDelegate delegate(web_contents.get());
  NavigateAndCommit(GURL("about:blank"));

  sessions::SerializedNavigationEntry serialized_entry;

  // -1 and 2 are invalid indices because there's only one navigation
  // recorded(the initial one to "about:blank")
  delegate.GetSerializedNavigationAtIndex(-1, &serialized_entry);
  EXPECT_EQ(serialized_entry.virtual_url(), GURL());

  delegate.GetSerializedNavigationAtIndex(2, &serialized_entry);
  EXPECT_EQ(serialized_entry.virtual_url(), GURL());
}

// Test that ShouldSync will return false if the WebContents has not navigated
// anywhere yet. The WebContents will be on the initial NavigationEntry and
// have nothing to sync, because the function will return "false" early (rather
// than iterate through the entries list).
TEST_F(TabContentsSyncedTabDelegateTest,
       ShouldSyncReturnsFalseOnWebContentsOnInitialNavigationEntry) {
  std::unique_ptr<content::WebContents> web_contents(CreateTestWebContents());
  TestSyncedTabDelegate delegate(web_contents.get());
  window_getter_.AddWindow(sync_pb::SyncEnums_BrowserType_TYPE_TABBED,
                           delegate.GetWindowId());

  // The WebContents has not navigated, so it's on the initial NavigationEntry.
  ASSERT_TRUE(
      web_contents->GetController().GetLastCommittedEntry()->IsInitialEntry());

  // TestSyncedTabDelegate intentionally returns false for
  // IsInitialBlankNavigation() even though no navigation has committed
  // to ensure ShouldSync() won't return early because of it (which is possible
  // in case the tab was restored before and hasn't navigated anywhere).
  ASSERT_FALSE(delegate.IsInitialBlankNavigation());

  // ShouldSync should return false because there it's on the initial
  // NavigationEntry.
  EXPECT_FALSE(delegate.ShouldSync(&mock_sync_sessions_client_));
}

}  // namespace


text:
import puka
import sys

client = puka.Client("amqp://localhost/")
promise = client.connect()
client.wait(promise)

promise = client.exchange_declare(exchange='direct_logs', type='direct')
client.wait(promise)

promise = client.queue_declare(exclusive=True)
queue_name = client.wait(promise)['queue']

severities = sys.argv[1:]
if not severities:
    print >> sys.stderr, "Usage: %s [info] [warning] [error]" % (sys.argv[0],)
    sys.exit(1)

for severity in severities:
    promise = client.queue_bind(exchange='direct_logs', queue=queue_name,
                                routing_key=severity)
    client.wait(promise)

print ' [*] Waiting for logs. To exit press CTRL+C'

consume_promise = client.basic_consume(queue=queue_name, no_ack=True)
while True:
    msg_result = client.wait(consume_promise)
    print " [x] %r:%r" % (msg_result['routing_key'], msg_result['body'])


text:
import { ApiAdapter } from './ApiAdapter';

export default class ApiAdapterFactory {
    static produce() {
        return new ApiAdapter();
    }
}


text:
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Diagnostics.Contracts;
using System;

// Disable the "this variable is not used" warning as every field would imply it.
#pragma warning disable 0414
// Disable the "this variable is never assigned to".
#pragma warning disable 0067
// Disable the "this event is never assigned to".
#pragma warning disable 0649
// Disable the "this variable is never used".
#pragma warning disable 0169
// Disable the "new keyword not required" warning.
#pragma warning disable 0109
// Disable the "extern without DllImport" warning.
#pragma warning disable 0626
// Disable the "could hide other member" warning, can happen on certain properties.
#pragma warning disable 0108

namespace System.ComponentModel.Design
{
  public partial interface ITypeResolutionService
  {
    #region Methods and constructors
    System.Reflection.Assembly GetAssembly(System.Reflection.AssemblyName name, bool throwOnError);

    System.Reflection.Assembly GetAssembly(System.Reflection.AssemblyName name);

    string GetPathOfAssembly(System.Reflection.AssemblyName name);

    Type GetType(string name, bool throwOnError);

    Type GetType(string name, bool throwOnError, bool ignoreCase);

    Type GetType(string name);

    void ReferenceAssembly(System.Reflection.AssemblyName name);
    #endregion
  }
}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
All Classes (${plugin.name} JavaDoc)
</TITLE>

<META NAME="date" CONTENT="2012-11-29">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

All Classes

CebuanoGazetteer

CebuanoGazetteerTokeniser

CebuanoIE

CebuanoTokeniser

CebuanoTransducer

CebuanoTransducerPost


text:
package resourcemanager

//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.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

// ControlPolicyAttachment is a nested struct in resourcemanager response
type ControlPolicyAttachment struct {
	Description string `json:"Description" xml:"Description"`
	EffectScope string `json:"EffectScope" xml:"EffectScope"`
	PolicyName  string `json:"PolicyName" xml:"PolicyName"`
	PolicyId    string `json:"PolicyId" xml:"PolicyId"`
	AttachDate  string `json:"AttachDate" xml:"AttachDate"`
	PolicyType  string `json:"PolicyType" xml:"PolicyType"`
}


text:
package org.codegist.crest.annotate;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 *
Optional method argument level annotation, sets the injector to use. If not specified, defaults to the parameter config default value.
 *
Can be set at method level to default all method argument values if not specified at argument level.
 *
Can be set at interface level to default all method argument values if not specified at method level.
 *
Additionally, this annotation (with other parameter-specific annotation) can be used for any user class used as a method argument of a rest-binded interface, eg :
 *
 *

 * @EndPoint("http://my-server")
 * interface FooInterface {
 *    MyModel getModel(long id, MyBean arg);
 * }
 * @Injector(MyBeanInjector)
 * class MyBean {}
 *

 *
 *
For any call to FooInterface.getModel(long,MyBean), MyBean will get injected using MyBeanInjector class
 * @see org.codegist.crest.config.ParamConfig#DEFAULT_INJECTOR
 * @see org.codegist.crest.config.ParamConfig#getInjector()
 * @author Laurent Gilles (laurent.gilles@codegist.org)
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.METHOD,ElementType.PARAMETER})
public @interface Injector {
    Class<? extends org.codegist.crest.injector.Injector> value();
}


text:
layout: patternlibrary
---

# (Node-)**Patternlibrary**

[![npm version](https://badge.fury.io/js/node-patternlibrary.svg)](https://badge.fury.io/js/node-patternlibrary)

[![dependencies status](https://david-dm.org/bb-drummer/node-patternlibrary.svg)](https://david-dm.org/bb-drummer/node-patternlibrary)

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/bb-drummer/node-patternlibrary/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/bb-drummer/node-patternlibrary/?branch=master)
[![Build Status](https://scrutinizer-ci.com/g/bb-drummer/node-patternlibrary/badges/build.png?b=master)](https://scrutinizer-ci.com/g/bb-drummer/node-patternlibrary/build-status/master)

[![Build Status](https://travis-ci.org/bb-drummer/node-patternlibrary.svg?branch=master)](https://travis-ci.org/bb-drummer/node-patternlibrary)

---

## About

**Patternlibrary** (@ npm: _node-patternlibrary_) is a pattern/component documentation and static site generator for use with Node-JS.

It generates a series of documentation pages for each of the HTML **patterns**, or _partials_, or _components_, structured in an **atomic design pattern**.
Documentation details are assembled from the specific pattern-files's source codes and supplied meta-data.
Of course, like any other (Handlebars) partial, those patterns can also include other patterns, external (Handlebars) helpers or data as JSON or YAML, by themselfs.

These pages are combined under a GUI to view in your browser. It provides an overview dashboard, lists to browse patterns and categories and (kind of) interactive pattern documentation.

The template engine used is [*Handlebars*](http://handlebarsjs.com) and rendering _markdown_ is accomplished with [*MarkdownIt*](https://github.com/markdown-it/markdown-it). Parsing the style and script source files is utilizing ([*SassDoc*](http://sassdoc.com/)) and ([*JSDoc*](http://usejsdoc.org)).

## Live-Demo

A live demonstration of a **Patternlibrary** GUI build can be found at [demo.patternlibrary.net](https://demo.patternlibrary.net)

## Documentation

For detailed explanations of each of the parts that made up **Patternlibrary**, please see the following pages:

- [Installation and (basic) usage](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/usage_docs.md)

- [Options](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/options_docs.md)

- [Generating pattern documentation](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/patternspecs_docs.md)

  To generate the pattern-specific documentation pages, some requirements must be satisfied for each pattern:

  - the [Pattern specifications](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/patternspecs_docs.md)

  and...

  - a [`readme.md` file](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/patternspecs_docs.md)

  Optionally, you can also apply...

  - [SASS reference documentation](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/sassdoc_docs.md),

  - [JavaScript reference documentation](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/jsdoc_docs.md),

  - a [`changelog.md` file](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/changelog_docs.md) and

  - [Test files and testing](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/testing_docs.md)

- [GUI usage](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/gui_docs.md)

- [API documentation and advanced usage](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/api_docs.md)

- [Gulp/Grunt middleware usage](https://gitlab.bjoernbartels.earth/js/patternlibrary/tree/master/docs/middleware_docs.md)

## Example project

[An example front-end/theme project](https://gitlab.bjoernbartels.earth//themes/node-patternlibrary-demo) can be found in our [GitLab](https://gitlab.bjoernbartels.earth//themes/node-patternlibrary-demo).

---

### Work-In-Progress disclaimer

This project is now going from some kind of *Proof Of Concept* to real-life implementation.
Most of its behavour and features are fixed for now.

When using this software, absolutely no warranties of any sort are granted. Please see the license file for more information.

---

Copyright (c) 2017, [bjoernbartels.earth]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Please, see the license file for more information.


text:
<BroadcastMonitor>
  <updated>2015-08-10T13:27:47</updated>
  <stationName>Radio 6</stationName>
  <Current>
    <startTime>2015-08-10T13:27:47</startTime>
    <itemId>1000080614:1245306</itemId>
    <titleId>216139161</titleId>
    <itemCode>10719</itemCode>
    <itemReference></itemReference>
    <titleName>Heroine</titleName>
    <artistName>Wildcookie</artistName>
    <albumName></albumName>
    <CategoryCode>814</CategoryCode>
    <CategoryName>MUZIEK</CategoryName>
    <itemDuration>227</itemDuration>
    <MultiMedia1></MultiMedia1>
    <MultiMedia2></MultiMedia2>
    <MultiMedia3></MultiMedia3>
    <MultiMedia4></MultiMedia4>
  </Current>
  <Next>
    <startTime>2015-08-10T13:31:35</startTime>
    <itemId>1000080614:1243983</itemId>
    <titleId>216046884</titleId>
    <itemCode>MS989</itemCode>
    <itemReference></itemReference>
    <titleName>Fever</titleName>
    <artistName>Peggy Lee</artistName>
    <albumName></albumName>
    <CategoryCode>737</CategoryCode>
    <CategoryName>JAZZ</CategoryName>
    <itemDuration>197</itemDuration>
    <MultiMedia1></MultiMedia1>
    <MultiMedia2></MultiMedia2>
    <MultiMedia3></MultiMedia3>
    <MultiMedia4></MultiMedia4>
  </Next>
</BroadcastMonitor>


text:
package be.ana.nmct.multimania.data;

import android.content.AsyncTaskLoader;
import android.content.Context;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;

import be.ana.nmct.multimania.utils.Utility;

/**
 * Created by Axel on 22/10/2014.
 */

/**
 * Abstract class to create models from JSON files
 * @param <T> The model to create from a JSON file
 */
public class GsonLoader<T> extends AsyncTaskLoader<List<T>> {

    private static final String BASE_URL = be.ana.nmct.multimania.BuildConfig.API_URL;

    private final TypeToken mToken;
    private String mApiPath;

    private Object lock = new Object();

    public GsonLoader(Context context, String apiPath, TypeToken token) {
        super(context);
        this.mApiPath = apiPath;
        this.mToken = token;
    }

    /**
     * Loads the parseJson() method in a background thread
     * @return A list of the requested model
     */
    @Override
    public List<T> loadInBackground() {
        return parseJson();
    }

    /**
     * Forces loading just in case it won't start automagically
     */
    @Override
    protected void onStartLoading() {
        forceLoad();
    }

    /**
     * Parses the JSON file from an online source
     * @return A List of the requested model
     */
    public List<T> parseJson() {
        synchronized (lock) {
            List<T> result = new ArrayList<T>();

            InputStream source = null;
            try {
                source = new URL(BASE_URL + mApiPath).openStream();
                Gson gson = new GsonBuilder()
                        .setDateFormat(Utility.getDateFormat())
                        .create();

                Reader reader = new InputStreamReader(source);

                result = gson.fromJson(reader, mToken.getType());  //collectionType);
                reader.close();
                source.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return result;
        }
    }

}


text:
layout: post
title: Special recruitment Drive in Saha Institute  last date  17th May-2016
date: 2016-03-30 05:02
comments: true
tags:  Assistant Clerk Engineer ITI-Apprentice Kolkata Scientific Special Drive Technician
archive: false
---
Applications are invited from eligible Indian Nationals for filling up the following posts of various Divisions/Sections of this Institute on direct recruitment basis.:

- Scientific Assistant -'B' : 03 posts, Pay Scale : Rs. 9300-34800  + Grade Pay Rs. 4200
- Technician -'B' : 01 post, Pay Scale : Rs. 5200-20200  + Grade Pay Rs. 2000
- Engineer 'D' : 02 posts, Pay Scale : Rs. 15600-39100  + Grade Pay Rs. 6600
- Technician -'C' : 01 post, Pay Scale : Rs. 5200-20200  + Grade Pay Rs. 2400
- Scientific Officer 'D' : 01 post, Pay Scale : Rs. 15600-39100  + Grade Pay Rs. 6600
- LDC : 01 post, Pay Scale : Rs. 5200-20200  + Grade Pay Rs. 1900

**How to Apply** : Applications in prescribed format  along with the attested copies of relevant certificates/ testimonials should reach the Registrar at the Registrar, Saha Institute of Nuclear Physics,  Sector-1, Block – AF, Bidhannagar, Kolkata – 700064   on or before 17/05/2016 duly superscribed as "Application for the post of  ........... " mentioning the category viz. General/ OBC/ SC/ ST/ PWD.

Please view <http://www.saha.ac.in/web/job-opportunities> for details and application format.


text:
module TokyoMetro::Refinement::Api::StationTimetable::Info::Fundamental
end