text:
/*
 * 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 org.jctools.queues.atomic;

import java.util.AbstractQueue;
import java.util.Iterator;
import java.util.concurrent.atomic.AtomicReference;

import org.jctools.queues.MessagePassingQueue;

abstract class BaseLinkedAtomicQueue<E> extends AbstractQueue<E> {
    private final AtomicReference<LinkedQueueAtomicNode<E>> producerNode;
    private final AtomicReference<LinkedQueueAtomicNode<E>> consumerNode;
    public BaseLinkedAtomicQueue() {
        producerNode = new AtomicReference<LinkedQueueAtomicNode<E>>();
        consumerNode = new AtomicReference<LinkedQueueAtomicNode<E>>();
    }
    protected final LinkedQueueAtomicNode<E> lvProducerNode() {
        return producerNode.get();
    }
    protected final LinkedQueueAtomicNode<E> lpProducerNode() {
        return producerNode.get();
    }
    protected final void spProducerNode(LinkedQueueAtomicNode<E> node) {
        producerNode.lazySet(node);
    }
    protected final LinkedQueueAtomicNode<E> xchgProducerNode(LinkedQueueAtomicNode<E> node) {
        return producerNode.getAndSet(node);
    }
    protected final LinkedQueueAtomicNode<E> lvConsumerNode() {
        return consumerNode.get();
    }

    protected final LinkedQueueAtomicNode<E> lpConsumerNode() {
        return consumerNode.get();
    }
    protected final void spConsumerNode(LinkedQueueAtomicNode<E> node) {
        consumerNode.lazySet(node);
    }
    @Override
    public final Iterator<E> iterator() {
        throw new UnsupportedOperationException();
    }

    @Override
    public String toString() {
        return this.getClass().getName();
    }

    public final int size() {
        // Read consumer first, this is important because if the producer is node is 'older' than the consumer
        // the consumer may overtake it (consume past it). This will lead to an infinite loop below.
        LinkedQueueAtomicNode<E> chaserNode = lvConsumerNode();
        LinkedQueueAtomicNode<E> producerNode = lvProducerNode();
        int size = 0;
        // must chase the nodes all the way to the producer node, but there's no need to count beyond expected head.
        while (chaserNode != producerNode && // don't go passed producer node
               chaserNode != null && // stop at last node
               size < Integer.MAX_VALUE) // stop at max int
        {
            LinkedQueueAtomicNode<E> next;
            next = chaserNode.lvNext();
            // check if this node has been consumed, if so return what we have
            if (next == chaserNode) {
                return size;
            }
            chaserNode = next;
            size++;
        }
        return size;
    }
    /**
     * {@inheritDoc}

     *

     * IMPLEMENTATION NOTES:

     * Queue is empty when producerNode is the same as consumerNode. An alternative implementation would be to observe
     * the producerNode.value is null, which also means an empty queue because only the consumerNode.value is allowed to
     * be null.
     *
     * @see MessagePassingQueue#isEmpty()
     */
    @Override
    public final boolean isEmpty() {
        return lvConsumerNode() == lvProducerNode();
    }

    protected E getSingleConsumerNodeValue(LinkedQueueAtomicNode<E> currConsumerNode, LinkedQueueAtomicNode<E> nextNode) {
        // we have to null out the value because we are going to hang on to the node
        final E nextValue = nextNode.getAndNullValue();
        // fix up the next ref to prevent promoted nodes from keep new ones alive
        currConsumerNode.soNext(currConsumerNode);
        spConsumerNode(nextNode);
        return nextValue;
    }
}


text:
package org.kneelawk.simplecursemodpackdownloader.curse

import java.util.Date
import java.util.TimeZone
import java.util.concurrent.ExecutionException

import org.apache.commons.lang3.time.FastDateFormat
import org.json4s.DefaultFormats
import org.json4s.JValue
import org.json4s.JsonDSL.pair2Assoc
import org.json4s.JsonDSL.string2jvalue
import org.json4s.jackson.JsonMethods.compact
import org.json4s.jackson.JsonMethods.render
import org.json4s.jvalue2extractable
import org.json4s.jvalue2monadic

import dispatch.Defaults.executor
import dispatch.Future
import dispatch.Http
import dispatch.Req
import dispatch.StatusCode
import dispatch.as
import dispatch.implyRequestHandlerTuple
import dispatch.url

case class UserData(username: String, userId: Int, email: String, authToken: String)

case class ModAttachment(description: String, isDefault: Boolean, url: String)
case class ModAuthor(name: String, url: String)
case class ModCategory(id: Int, name: String, url: String)
case class ModCategorySection(gameId: Int, id: Int, name: String, packageType: String, path: String)
case class ModGameVersionLatestFile(fileType: String, gameVersion: String, fileId: Int, fileName: String)
case class ModFileDependency(addonId: Int, depType: String)
case class ModFileModule(fingerprint: Long, foldername: String)
case class ModFile(dependencies: List[ModFileDependency], downloadUrl: String, fileDate: Date,
  fileName: String, diskFileName: String, fileStatus: String, gameVersions: List[String], fileId: Int,
  isAvailable: Boolean, modules: List[ModFileModule], fingerprint: Long, releaseType: String)
case class ModData(attachments: List[ModAttachment], authors: List[ModAuthor], categories: List[ModCategory],
  categorySection: ModCategorySection, defaultFileId: Int, gameId: Int,
  gameVersionLatestFiles: List[ModGameVersionLatestFile], id: Int, latestFiles: List[ModFile], name: String,
  packageType: String, primaryCategoryId: Int, summary: String, websiteUrl: String)

object UserData {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): UserData = {
    val username = (x \ "username").extract[String]
    val userId = (x \ "user_id").extract[Int]
    val email = (x \ "email_address").extract[String]
    val token = (x \ "token").extract[String]
    val authToken = "Token " + userId + ":" + token
    return new UserData(username, userId, email, authToken)
  }
}

object ModAttachment {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModAttachment = {
    val description = (x \ "description").extract[String]
    val isDefault = (x \ "is_default").extract[Boolean]
    val url = (x \ "url").extract[String]
    return new ModAttachment(description, isDefault, url)
  }
}

object ModAuthor {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModAuthor = {
    val name = (x \ "name").extract[String]
    val url = (x \ "url").extract[String]
    return new ModAuthor(name, url)
  }
}

object ModCategory {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModCategory = {
    val id = (x \ "id").extract[Int]
    val name = (x \ "name").extract[String]
    val url = (x \ "url").extract[String]
    return new ModCategory(id, name, url)
  }
}

object ModCategorySection {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModCategorySection = {
    val gameId = (x \ "game_id").extract[Int]
    val id = (x \ "id").extract[Int]
    val name = (x \ "name").extract[String]
    val packageType = (x \ "package_type").extract[String]
    val path = (x \ "path").extract[String]
    return new ModCategorySection(gameId, id, name, packageType, path)
  }
}

object ModGameVersionLatestFile {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModGameVersionLatestFile = {
    val fileType = (x \ "file_type").extract[String]
    val gameVersion = (x \ "game_version").extract[String]
    val fileId = (x \ "project_file_id").extract[Int]
    val fileName = (x \ "project_file_name").extract[String]
    return new ModGameVersionLatestFile(fileType, gameVersion, fileId, fileName)
  }
}

object ModFileDependency {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModFileDependency = {
    val addonId = (x \ "add_on_id").extract[Int]
    val depType = (x \ "type").extract[String]
    return new ModFileDependency(addonId, depType)
  }
}

object ModFileModule {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModFileModule = {
    val fingerprint = (x \ "fingerprint").extract[Long]
    val foldername = (x \ "foldername").extract[String]
    return new ModFileModule(fingerprint, foldername)
  }
}

object ModFile {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModFile = {
    val dependencies = for (dep <- (x \ "dependencies").children) yield ModFileDependency(dep)
    val downloadUrl = (x \ "download_url").extract[String]
    val fileDate = CurseUtils.curseDateFormat.parse((x \ "file_date").extract[String])
    val fileName = (x \ "file_name").extract[String]
    val diskFileName = (x \ "file_name_on_disk").extract[String]
    val fileStatus = (x \ "file_status").extract[String]
    val gameVersions = for (version <- (x \ "game_version").children) yield version.extract[String]
    val fileId = (x \ "id").extract[Int]
    val isAvailable = (x \ "is_available").extract[Boolean]
    val modules = for (module <- (x \ "modules").children) yield ModFileModule(module)
    val fingerprint = (x \ "package_fingerprint").extract[Long]
    val releaseType = (x \ "release_type").extract[String]
    return new ModFile(dependencies, downloadUrl, fileDate, fileName, diskFileName, fileStatus,
      gameVersions, fileId, isAvailable, modules, fingerprint, releaseType)
  }
}

object ModData {
  private implicit val formats = DefaultFormats
  def apply(x: JValue): ModData = {
    val attachments = for (attach <- (x \ "attachments").children) yield ModAttachment(attach)
    val authors = for (author <- (x \ "authors").children) yield ModAuthor(author)
    val categories = for (category <- (x \ "categories").children) yield ModCategory(category)
    val categorySection = ModCategorySection(x \ "category_section")
    val defaultFileId = (x \ "default_file_id").extract[Int]
    val gameId = (x \ "game_id").extract[Int]
    val gameVersionLatestFiles =
      for (file <- (x \ "game_version_latest_files").children) yield ModGameVersionLatestFile(file)
    val id = (x \ "id").extract[Int]
    val latestFiles = for (file <- (x \ "latest_files").children) yield ModFile(file)
    val name = (x \ "name").extract[String]
    val packageType = (x \ "package_type").extract[String]
    val primaryCategoryId = (x \ "primary_category_id").extract[Int]
    val summary = (x \ "summary").extract[String]
    val websiteUrl = (x \ "web_site_url").extract[String]
    return ModData(attachments, authors, categories, categorySection, defaultFileId, gameId,
      gameVersionLatestFiles, id, latestFiles, name, packageType, primaryCategoryId, summary, websiteUrl)
  }
}

case class NoFileForMinecraftVersionException(minecraftVersion: String)
  extends Exception("No mod file for minecraft " + minecraftVersion)

object CurseUtils {
  private implicit val formats = DefaultFormats

  val curseDateFormat = FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss", TimeZone.getTimeZone("UTC"))

  val baseReq = url("http://curse-rest-proxy.azurewebsites.net/api")

  def authReq(username: String, password: String): Req = {
    var req = (baseReq / "authenticate").POST
      .addHeader("Content-Type", "application/json")
    req <<= compact(render(("username" -> username) ~ ("password" -> password)))
    return req
  }

  def addonReq(authToken: String, id: Int): Req = (baseReq / "addon" / id).addHeader("Authorization", authToken)

  def addonFilesReq(authToken: String, id: Int): Req = (baseReq / "addon" / id / "files")
    .addHeader("Authorization", authToken)

  def addonFileReq(authToken: String, id: Int, fileId: Int): Req = (baseReq / "addon" / id / "file" / fileId)
    .addHeader("Authorization", authToken)

  def auth(client: Http, username: String, password: String): Future[UserData] = {
    return client(authReq(username, password) OK as.json4s.Json).map(x => UserData(x \ "session"))
  }

  def getAddon(client: Http, authToken: String, id: Int): Future[ModData] = {
    return client(addonReq(authToken, id) OK as.json4s.Json).map(x => ModData(x))
  }

  def getAddonFiles(client: Http, authToken: String, id: Int): Future[List[ModFile]] = {
    return client(addonFilesReq(authToken, id) OK as.json4s.Json).map(x => {
      for (file <- (x \ "files").children) yield ModFile(file)
    })
  }

  def getAddonFile(client: Http, authToken: String, id: Int, fileId: Int): Future[ModFile] = {
    return client(addonFileReq(authToken, id, fileId) OK as.json4s.Json).map(x => ModFile(x))
  }

  def getLatestAddonFile(client: Http, authToken: String, id: Int, minecraftVersion: String): Future[ModFile] = {
    return getAddonFiles(client, authToken, id)
      .map(l => {
        val corver = l.filter(_.gameVersions.contains(minecraftVersion))
        if (corver.isEmpty)
          throw new NoFileForMinecraftVersionException(minecraftVersion)
        corver.reduceLeft((a, b) => if (a.fileDate.compareTo(b.fileDate) >= 0) a else b)
      })
  }

  def getExistingAddonFile(client: Http, authToken: String, id: Int, fileId: Int, minecraftVersion: String): Future[ModFile] = {
    getAddonFile(client, authToken, id, fileId).recoverWith {
      case t: ExecutionException if t.getCause.isInstanceOf[StatusCode]
        && t.getCause.asInstanceOf[StatusCode].code == 404 => {
        getLatestAddonFile(client, authToken, id, minecraftVersion)
      }
      case t: StatusCode if t.code == 404 => {
        getLatestAddonFile(client, authToken, id, minecraftVersion)
        // Should we find a way to get this event to the final listener?
      }
    }
  }
}

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

		<link rel="stylesheet" type="text/css" href="css/boom-lightbox/boom-lightbox.1.0.0.min.css" />

boom-lighbox: A pure javascript responsive lightbox

License

Developed by Jason Jakob, Boom Interactive Inc., boominteractiveinc@gmail.com

boom-lightbox is licensed under The MIT License.

 - 100% Free. boom-lightbox is free to use in both commercial and non-commercial work.

 - Attribution is required.This means you must leave my name, my homepage link, and the license info intact. None of these items have to be user-facing and can remain within the code.

Introduction

light weight (14k minified), fast and easy to implement, content can be youtube, audio, etc.

Install

include the following in the head section

<head>
    <link rel="stylesheet" type="text/css" href="css/boom-lightbox/boom-lightbox.1.0.0.min.css" />
    <script type="text/javascript" src="js/boom-lightbox/boom-lightbox.1.0.0.min.js"></script>
</head>

Usage

Use the css class boom-lightbox on the container div that contains content

<body>
    <a href="#" onclick="boomLightBoxShow('divStatic');">Open Video in Static Lightbox</a>
    <div id="divStatic" class="boom-lightbox" style="display: none;">
    	<iframe id="ytplayer" width="720" height="405" src="https://www.youtube.com/embed/M7lc1UVf-VE" frameborder="0" allowfullscreen></iframe>
    </div>

    <a href="#" onclick="boomLightBoxShow('divResponsive');">Open Content in Responsive Lightbox</a>
    <div id="divResponsive" class="boom-lightbox" style="display: none;">
        <p>This is responsive content</p>
    </div>

    <!-- place the initialization at the end of the code -->
    <script type="text/javascript">
    	 (function() { //document ready, init one or more lightbox divs
            boomLightBoxInit([{
                selector: 'divStatic',
                configs: { width: '721px', height: '406px' }
            },{
                selector: 'divResponsive',
                configs: { width: '60%', height: '60%' }
            }]);
        })();
    </script>
</body>

Exmples

click the links to see different ways of using lightbox

		Open Video in Static Lightbox

		Open Content in Responsive Lightbox

Responsive popup content

Browser Support

All known browsers


text:
<link href="http://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

CatPhotoApp

            <button class="btn btn-block btn-primary"> Like</button>

            <button class="btn btn-block btn-info"> Info</button>

            <button class="btn btn-block btn-danger"> Delete</button>

Things cats love:

cat nip

laser pointers

lasagna

Top 3 things cats hate:

flea treatment

thunder

other cats

    <form action="/submit-cat-photo">

                <input type="radio" name="indoor-outdoor"> Indoor

                <input type="radio" name="indoor-outdoor"> Outdoor

                <input type="checkbox" name="personality"> Loving

                <input type="checkbox" name="personality"> Lazy

                <input type="checkbox" name="personality"> Crazy

<input type="text" class="form-control" placeholder="cat photo URL" required>

<button type="submit" class="btn btn-primary"> Submit</button>

    </form>


text:
var _         = require('underscore');
var __hasProp = {}.hasOwnProperty;
var colorize  = function (args, color) {
  var messages = ['\x1b[1m', '\x1b[' + color + 'm'];

  for (var i = 0; i < args.length; i++) {
    try {
      messages.push(_.isObject(args[i]) ? args[i].toString() : args[i]);
    } catch (e) {
      messages.push(JSON.stringify(args[i], null, 2));
    }
  }
  messages.push('\x1b[39m', '\x1b[22m\x1b[0m');
  return messages;
};

Function.prototype.define = function (name, getSet) {
  return Object.defineProperty(this.prototype, name, getSet);
};

var Fiber  = require('fibers');
var Future = require('fibers/future');
var events  = require('events');
events.EventEmitter.prototype._maxListeners = 100;

module.exports = {
  _: _,
  NTRUDef: process.env.NODE_TLS_REJECT_UNAUTHORIZED,
  bound: function (cb) {
    Fiber(function () {
      cb();
    }).run();
  },
  __success: function () {
    process.stdout.write(colorize(arguments, '32').join('') + '\r\n');
  },
  __error: function () {
    process.stdout.write(colorize(arguments, '31').join('') + '\r\n');
  },
  events: events,
  URL: require('url'),
  needle: require('needle'),
  Future: Future,
  Fiber: Fiber,
  __wait: function (cb) {
    var fut = new Future();
    cb(fut);
    return fut.wait();
  },
  __extends: function (child, parent) {
    for (var key in parent) {
      if (__hasProp.call(parent, key)) {
        child[key] = parent[key];
      }
    }

    function ctor () {
      this.constructor = child;
    }

    ctor.prototype = parent.prototype;
    child.prototype = new ctor();
    child.__super__ = parent.prototype;
    return child;
  }
};


text:
'use strict';

var eventDefinitionReference = require('./EventDefinitionReference'),
    elementReferenceProperty = require('./ElementReferenceProperty');

module.exports = function(group, element, bpmnFactory, signalEventDefinition) {

  group.entries = group.entries.concat(eventDefinitionReference(element, signalEventDefinition, bpmnFactory, {
    label: 'Signal',
    elementName: 'signal',
    elementType: 'bpmn:Signal',
    referenceProperty: 'signalRef',
    newElementIdPrefix: 'Signal_'
  }));

  group.entries = group.entries.concat(elementReferenceProperty(element, signalEventDefinition, bpmnFactory, {
    id: 'signal-element-name',
    label: 'Signal Name',
    referenceProperty: 'signalRef',
    modelProperty: 'name',
    shouldValidate: true
  }));

};


text:
<?xml version="1.0" encoding="utf-8"?>

<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:drawable="@drawable/tb_suspension_person_press" android:state_pressed="true"/>
    <item android:drawable="@drawable/tb_suspension_person_normal"/>
</selector>


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using System.Xml;

namespace OfficeOpenXml.Drawing.Chart
{
    /// <summary>
    /// A serie for a surface chart
    /// </summary>
    public sealed class ExcelSurfaceChartSerie : ExcelChartSerie
    {
        /// <summary>
        /// Default constructor
        /// </summary>
        /// <param name="chartSeries">Parent collection</param>
        /// <param name="ns">Namespacemanager</param>
        /// <param name="node">Topnode</param>
        /// <param name="isPivot">Is pivotchart</param>
        internal ExcelSurfaceChartSerie(ExcelChartSeries chartSeries, XmlNamespaceManager ns, XmlNode node, bool isPivot) :
            base(chartSeries, ns, node, isPivot)
        {
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;

namespace _20150531_04_Olympics_Are_Coming
{
    public class OlympicsAreComing
    {
        public static void Main()
        {
            List<Country> countries = new List<Country>();

            string input = Console.ReadLine();
            while (!input.Equals("report"))
            {
                input = new Regex(@"\s{2,}").Replace(input, " ");
                string[] inputEll = input
                    .Split('|')
                    .Select(x => x.Trim())
                    .ToArray();

                if (countries.Any(x => x.Name.Equals(inputEll[1])))
                {
                    int index = countries.FindIndex(x => x.Name.Equals(inputEll[1]));
                    countries[index].TotalAthletesWins.Add(inputEll[0]);
                }
                else
                {
                    countries.Add(new Country
                    {
                        Name = inputEll[1],
                        TotalAthletesWins = new List<string>(),
                    });

                    countries.Last().TotalAthletesWins.Add(inputEll[0]);
                }

                input = Console.ReadLine();
            }

            foreach (var country in countries.OrderByDescending(x => x.TotalAthletesWins.Count))
            {
                Console.WriteLine($"{country.Name} ({country.UniqueAthletes} participants): {country.TotalAthletesWins.Count} wins");
            }
        }
    }
}


text:
import styled from "styled-components";

import { spacingScale } from "style/styleFunctions";

const Line = styled.div`
  display: flex;
  min-height: ${spacingScale(4)};
  flex-direction: row;
  width: 100%;
  padding: 0 ${spacingScale(2)};
`;

const LineLeft = styled.div`
  flex: 1 1 auto;
  display: flex;
  padding-left: ${spacingScale(4)};
  align-items: center;
`;

const LineRight = styled.div`
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
`;

export { Line, LineLeft, LineRight };


text:
package net.oschina.app.fragment;

import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.widget.AdapterView;

import net.oschina.app.adapter.SearchAdapter;
import net.oschina.app.api.remote.OSChinaApi;
import net.oschina.app.base.BaseListFragment;
import net.oschina.app.bean.SearchList;
import net.oschina.app.bean.SearchResult;
import net.oschina.app.ui.empty.EmptyLayout;
import net.oschina.app.util.UIHelper;
import net.oschina.app.util.XmlUtils;

import java.io.InputStream;
import java.io.Serializable;

public class SearchFragment extends BaseListFragment<SearchResult> {

    public static final String TAG = SearchFragment.class.getSimpleName();
    private static final String CACHE_KEY_PREFIX = "search_list_";
    public static final String BUNDLE_KEY_SEARCH_CATALOG = "BUNDLE_KEY_SEARCH_CATALOG";

    private String mSearchCatalog;
    private String mSearch;
    private boolean mRequestDataIfCreated = false;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle args = getArguments();
        if (args != null) {
            mSearchCatalog = args.getString(BUNDLE_KEY_SEARCH_CATALOG);
        }
        int mode = WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN
                | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN;
        getActivity().getWindow().setSoftInputMode(mode);
    }

    public void search(String search) {
        mSearch = search;
        if (mErrorLayout != null) {
            mErrorLayout.setErrorType(EmptyLayout.NETWORK_LOADING);
            mState = STATE_REFRESH;
            requestData(true);
        } else {
            mRequestDataIfCreated = true;
        }
    }

    @Override
    protected boolean requestDataIfViewCreated() {
        return mRequestDataIfCreated;
    }

    @Override
    protected SearchAdapter getListAdapter() {
        return new SearchAdapter();
    }

    @Override
    protected String getCacheKeyPrefix() {
        return CACHE_KEY_PREFIX + mSearchCatalog + mSearch;
    }

    @Override
    protected SearchList parseList(InputStream is) throws Exception {
        SearchList list = XmlUtils.toBean(SearchList.class, is);
        return list;
    }

    @Override
    protected SearchList readList(Serializable seri) {
        return ((SearchList) seri);
    }

    @Override
    protected void sendRequestData() {
        OSChinaApi.getSearchList(mSearchCatalog, mSearch, mCurrentPage, mHandler);
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position,
                            long id) {
        SearchResult res = mAdapter.getItem(position);
        if (res != null) {
            if (res.getType().equalsIgnoreCase(SearchList.CATALOG_SOFTWARE)) {
                UIHelper.showSoftwareDetailById(getActivity(), res.getId());
            } else {
                UIHelper.showUrlRedirect(getActivity(), res.getUrl());
            }
        }
    }
}


text:
package com.intel.analytics.bigdl.nn.mkldnn

import com.intel.analytics.bigdl.mkl._
import com.intel.analytics.bigdl.nn.abstractnn.{Activity, Initializable}
import com.intel.analytics.bigdl.nn.mkldnn.Phase.{InferencePhase, TrainingPhase}
import com.intel.analytics.bigdl.nn.{MklInt8Convertible, Ones, VariableFormat, Zeros}
import com.intel.analytics.bigdl.tensor._

import scala.collection.mutable.ArrayBuffer

class SpatialBatchNormalization(
  val nOutput: Int,
  val eps: Double = 1e-5,
  val momentum: Double = 0.1,
  private val initWeight: Tensor[Float] = null,
  private val initBias: Tensor[Float] = null,
  private val initGradWeight: Tensor[Float] = null,
  private val initGradBias: Tensor[Float] = null
) extends MklDnnLayer with Initializable with MklInt8Convertible {

  @transient private var forwardDesc: Long = 0L
  private var _relu: Boolean = false

  def setReLU(value: Boolean): this.type = {
    _relu = value
    this
  }
  def relu: Boolean = _relu

  // reminder: runningMean/runningVariance in blas batch_norm is
  // same to scaled runningMean/runningVariance in dnn.
  private[bigdl] var needScale = false

  class SwitchablePrimitives() {
    private var _forwardDesc: Long = 0
    private var _updateOutputMemoryPrimitives : Array[Long] = _
    private var _updateOutputPrimitives: Array[Long] = _
    private var _fwdPrimDesc: Long = 0
    private var _inputFormat: NativeData = _
    private var _outputFormat: NativeData = _

    def switchInOutFormats(): Unit = {
      if (_inputFormat == null) {
        _inputFormat = MemoryData.operationWant(fwdPrimDesc, Query.SrcPd)
      }
      if (_outputFormat == null) {
        _outputFormat = MemoryData.operationWant(fwdPrimDesc, Query.DstPd)
      }
      _inputFormats(0) = _inputFormat
      _outputFormats(0) = _outputFormat
    }

    def fwdPrimDesc: Long = {
      if (_fwdPrimDesc == 0) {
        _fwdPrimDesc = if (relu) {
          val postOps = MklDnnMemory.CreatePostOps()
          MklDnn.PostOpsAppendEltwise(postOps, 1.0f, AlgKind.EltwiseRelu, 0.0f, 0.0f)
          val attr = MklDnnMemory.CreateAttr()
          MklDnn.AttrSetPostOps(attr, postOps)
          MklDnnMemory.PrimitiveDescCreateV2(_forwardDesc, attr, runtime.engine, 0)
        } else {
          MklDnnMemory.PrimitiveDescCreate(_forwardDesc, runtime.engine, 0)
        }
      }
      _fwdPrimDesc
    }

    def forwardDesc(gen: () => Long): Long = {
      if (_forwardDesc == 0) {
        _forwardDesc = gen()
      }
      _forwardDesc
    }

    def switchUpdateOutputMemoryPrimitives(gen: () => (Array[Long], Array[Long])): Unit = {
      if (_updateOutputMemoryPrimitives == null) {
        val generated = gen()
        _updateOutputMemoryPrimitives = generated._1
        _updateOutputPrimitives = generated._2
      }
      updateOutputMemoryPrimitives = _updateOutputMemoryPrimitives
      updateOutputPrimitives = _updateOutputPrimitives
    }
  }

  @transient private lazy val trainingPrimitives = new SwitchablePrimitives
  @transient private lazy val inferencePrimitives = new SwitchablePrimitives

  @transient private var updateOutputTensors: Array[Tensor[Float]] = _
  @transient private var updateOutputMemoryPrimitives: Array[Long] = _
  @transient private var updateGradInputTensors: Array[Tensor[Float]] = _
  @transient private var updateGradInputMemoryPrimitives: Array[Long] = _
  @transient private var modelPhase: Phase = null

  private val mean: DnnTensor[Float] = DnnTensor[Float](nOutput)
  private val variance: DnnTensor[Float] = DnnTensor[Float](nOutput)

  private[mkldnn] val runningMean = new TensorMMap(Array(nOutput))
  private[mkldnn] val runningVariance = new TensorMMap(Array(nOutput))
  // TODO we should make it private. Currently, ResNet50 will use it out of this scope.
  val weightAndBias = new TensorMMap(Array(nOutput * 2))
  val gradWeightAndBias = new TensorMMap(Array(nOutput * 2))

  // TODO the two should be learnable parameters
  var scaleFactor: Float = 1.0f
  var biasFactor: Float = 1.0f

  private val runningMeanScaled = Tensor[Float].resizeAs(runningMean.dense)
  private val runningVarianceScaled = Tensor[Float].resizeAs(runningVariance.dense)

  // the blank shoud be here, otherwise the runningVarianceScaled will be a method
  {
    val wInit = Ones // RandomUniform(0, 1)
    val bInit = Zeros
    setInitMethod(wInit, bInit)
  }

  override def reset(): Unit = {
    val init = Tensor[Float]().resize(Array(2, nOutput))
    val weight = init.select(1, 1)
    val bias = init.select(1, 2)

    if (initWeight != null) {
      require(initWeight.size(1) == nOutput)
      weight.copy(initWeight)
    } else {
      weightInitMethod.init(weight, VariableFormat.ONE_D)
    }

    if (initBias != null) {
      require(initBias.size(1) == nOutput)
      bias.copy(initBias)
    } else {
      biasInitMethod.init(bias, VariableFormat.ONE_D)
    }

    weightAndBias.dense.copy(init.view(2 * nOutput))

    val zeros = Tensor[Float](Array(nOutput)).fill(0)
    mean.copy(zeros)
    variance.copy(zeros)

    runningMean.copy(zeros)
    runningVariance.copy(zeros)
  }

  private object Index extends Serializable {
    val input = 0
    val weight = 1
    val output = 2
    val mean = 3
    val variance = 4
  }

  private def initPhase(phase: Phase): Unit = {
    if (phase != null) modelPhase = phase
    (isTraining(), modelPhase) match {
      case (true, InferencePhase) =>
        train = false
      case (false, TrainingPhase) =>
        train = true
      case (true, null) =>
        modelPhase = TrainingPhase
      case (false, null) =>
        modelPhase = InferencePhase
      case _ =>
    }
  }

  override private[mkldnn] def initFwdPrimitives(inputs: Array[MemoryData], phase: Phase) = {
    val m = inputs(0).shape.product / this.nOutput
    biasFactor = if (m > 1) { m.toFloat / (m - 1) } else { 1 }

    val List(mean, variance, runningMean, runningVariance): List[NativeData] =
      (0 until 4).map { _ =>
        NativeData(Array(nOutput), Memory.Format.x)
      }.toList
    // weight and bias should be combined
    val weightAndBias: NativeData = NativeData(Array(nOutput * 2), Memory.Format.x)

    // the bn only accept F32 as input, like lrn
    val src = NativeData(inputs.head.shape, inputs.head.layout, DataType.F32)

    // init once
    if (_inputFormats == null) {
      _inputFormats = new Array[MemoryData](1)
      require(_outputFormats == null)
      _outputFormats = new Array[MemoryData](1)
    }

    // init phase status
    initPhase(phase)

    modelPhase match {
      case TrainingPhase =>
        forwardDesc = trainingPrimitives.forwardDesc(() => MklDnnMemory.BatchNormForwardDescInit(
          PropKind.Forward,
          src.getMemoryDescription(), eps.toFloat, MklDnn.BatchNormFlag.mkldnn_use_scaleshift))
        val fwdPrimDesc = trainingPrimitives.fwdPrimDesc
        trainingPrimitives.switchInOutFormats()
        trainingPrimitives.switchUpdateOutputMemoryPrimitives(() => {
          val srcs = Array(inputFormats()(0), weightAndBias).map(_.getPrimitive(runtime))
          val dsts = Array(outputFormats()(0), mean, variance).map(_.getPrimitive(runtime))
          val indexes = Array.fill(srcs.length)(0)
          val primitive = MklDnnMemory.PrimitiveCreate2(fwdPrimDesc, srcs, indexes,
            srcs.length, dsts, dsts.length)
          val _updateOutputMemoryPrimitives = srcs ++ dsts
          val _updateOutputPrimitives = Array(primitive)
          (_updateOutputMemoryPrimitives, _updateOutputPrimitives)
        })
      case InferencePhase =>
        // we always use the weight and bias / scale and offset. So the flags should be combined
        // with use_scaleshift and use_global_stats.
        forwardDesc = inferencePrimitives.forwardDesc(() =>
          MklDnnMemory.BatchNormForwardDescInit(PropKind.ForwardInference,
            src.getMemoryDescription(), eps.toFloat, MklDnn.BatchNormFlag.mkldnn_use_global_stats
              | MklDnn.BatchNormFlag.mkldnn_use_scaleshift))
        val fwdPrimDesc = inferencePrimitives.fwdPrimDesc
        inferencePrimitives.switchInOutFormats()
        inferencePrimitives.switchUpdateOutputMemoryPrimitives(() => {
          val srcs = Array(inputFormats()(0), mean, variance, weightAndBias).map(_.getPrimitive
          (runtime))
          val dsts = Array(outputFormats()(0).getPrimitive(runtime))
          val indexes = Array.fill(srcs.length)(0)
          val primitive = MklDnnMemory.PrimitiveCreate2(fwdPrimDesc, srcs, indexes,
            srcs.length, dsts, dsts.length)
          val _updateOutputMemoryPrimitives = srcs ++ dsts
          val _updateOutputPrimitives = Array(primitive)
          (_updateOutputMemoryPrimitives, _updateOutputPrimitives)
        })
      case _ => throw new UnsupportedOperationException
    }

    // init once
    // if the output is not null, it means we have initialized the primitives before.
    // so we do not need create weightAndBias native space again.
    if (output == null || output.isInstanceOf[DnnTensor[_]] &&
      output.toTensor[Float].size().deep != outputFormats()(0).shape.deep) {
      output = initTensor(outputFormats()(0))
    }

    if (updateOutputTensors != null) {
      updateOutputTensors = null
    }

    // init once
    if (this.weightAndBias.native == null) {
      if (modelPhase == InferencePhase) {
        this.runningMean.setMemoryData(
          HeapData(this.runningMean.size(), Memory.Format.x), runningMean, runtime)
        this.runningVariance.setMemoryData(
          HeapData(this.runningVariance.size(), Memory.Format.x), runningVariance, runtime)
        // for inference, we must copy the heap memory to native first.
        this.runningMean.sync()
        this.runningVariance.sync()
      } else {
        this.runningMean.setMemoryData(runningMean,
          HeapData(this.runningMean.size(), Memory.Format.x), runtime)
        this.runningVariance.setMemoryData(runningVariance,
          HeapData(this.runningVariance.size(), Memory.Format.x), runtime)
      }
      // for runningMean and runningVariance, we should copy them to native at first
      this.weightAndBias.setMemoryData(HeapData(this.weightAndBias.size(), Memory.Format.x),
        weightAndBias, runtime)
    }
    this.weightAndBias.sync()

    (inputFormats(), outputFormats())
  }

  override def updateOutput(input: Activity): Activity = {
    if (updateOutputTensors == null) {
      if (this.isTraining()) {
        val buffer = new ArrayBuffer[Tensor[Float]]()
        buffer.append(input.asInstanceOf[Tensor[Float]])
        buffer.append(weightAndBias.native)
        buffer.append(output.asInstanceOf[Tensor[Float]])
        buffer.append(mean)
        buffer.append(variance)
        updateOutputTensors = buffer.toArray
      } else {
        val buffer = new ArrayBuffer[Tensor[Float]]()
        buffer.append(input.asInstanceOf[Tensor[Float]])
        buffer.append(mean)
        buffer.append(variance)
        buffer.append(weightAndBias.native)
        buffer.append(output.asInstanceOf[Tensor[Float]])
        updateOutputTensors = buffer.toArray
      }
    }

    if (this.isTraining()) {
      weightAndBias.sync()
    } else {
      // we should re-computing the running mean and running variance.
      // FIXME should do it at `initFwdPrimitives`
      mean.scale(runningMean.native, 1 / scaleFactor)
      variance.scale(runningVariance.native, 1 / scaleFactor)
    }

    updateWithNewTensor(updateOutputTensors, 0, input)

    MklDnnOps.streamSubmit(runtime.stream, 1, updateOutputPrimitives, updateOutputPrimitives.length,
      updateOutputMemoryPrimitives, updateOutputTensors)

    if (this.isTraining()) {
      // update running(Mean, Var) and scaleFactor
      scaleFactor = scaleFactor * momentum.toFloat + 1

      mean.axpby(1, momentum.toFloat, runningMean.native)
      variance.axpby(biasFactor, momentum.toFloat, runningVariance.native)

      runningMean.sync()
      runningVariance.sync()
    }

    output
  }

  override private[mkldnn] def initBwdPrimitives(grad: Array[MemoryData], phase: Phase) = {
    _gradOutputFormats = Array(NativeData(outputFormats()(0).shape, outputFormats()(0).layout))

    // init phase status
    initPhase(phase)
    // [PERF] the format of gradInput should be the same as input
    val backwardDesc = modelPhase match {
      case TrainingPhase =>
        MklDnnMemory.BatchNormBackwardDescInit(PropKind.Backward,
          inputFormats()(0).getMemoryDescription(),
          inputFormats()(0).getMemoryDescription(), eps.toFloat,
          MklDnn.BatchNormFlag.mkldnn_use_scaleshift)
      case _ => throw new UnsupportedOperationException
    }

    val gradWeightAndBias: NativeData = NativeData(Array(nOutput * 2), Memory.Format.x)
    val gradWeightPrimitive = gradWeightAndBias.getPrimitive(runtime)

    val primDesc = MklDnnMemory.PrimitiveDescCreate(backwardDesc, runtime.engine, 0)

    _gradInputFormats = Array(MemoryData.operationWant(primDesc, Query.DiffSrcPd))

    // maybe will throw null exception
    val srcs = Array(updateOutputMemoryPrimitives(Index.input),
      updateOutputMemoryPrimitives(Index.mean),
      updateOutputMemoryPrimitives(Index.variance),
      grad(0).getPrimitive(runtime),
      updateOutputMemoryPrimitives(Index.weight))
    val indexes = Array.fill(srcs.length)(0)
    val dsts = Array(gradInputFormats()(0), gradWeightAndBias).map(_.getPrimitive(runtime))

    val primitive = MklDnnMemory.PrimitiveCreate2(primDesc, srcs, indexes, srcs.length,
      dsts, dsts.length)

    updateGradInputMemoryPrimitives = srcs ++ dsts
    updateGradInputPrimitives = Array(primitive)
    gradInput = initTensor(gradInputFormats()(0))

    this.gradWeightAndBias.setMemoryData(gradWeightAndBias,
      HeapData(this.gradWeightAndBias.size(), Memory.Format.x), runtime)
    this.gradWeightAndBias.zero()

    (_gradOutputFormats, gradInputFormats())
  }

  override def updateGradInput(input: Activity, gradOutput: Activity): Activity = {
    if (updateGradInputTensors == null) {
      val buffer = new ArrayBuffer[Tensor[Float]]()
      buffer.append(input.asInstanceOf[Tensor[Float]])
      buffer.append(mean)
      buffer.append(variance)
      buffer.append(gradOutput.asInstanceOf[Tensor[Float]])
      buffer.append(weightAndBias.native)
      buffer.append(gradInput.asInstanceOf[Tensor[Float]])
      buffer.append(gradWeightAndBias.native)
      updateGradInputTensors = buffer.toArray
    }

    updateWithNewTensor(updateGradInputTensors, 0, input)
    updateWithNewTensor(updateGradInputTensors, 3, gradOutput)

    MklDnnOps.streamSubmit(runtime.stream, 1, updateGradInputPrimitives,
      updateGradInputPrimitives.length, updateGradInputMemoryPrimitives, updateGradInputTensors)

    gradWeightAndBias.sync()

    gradInput
  }

  override def accGradParameters(input: Activity, gradOutput: Activity): Unit = {
    // do nothing
  }

  override def zeroGradParameters(): Unit = {
  }

  override def parameters(): (Array[Tensor[Float]], Array[Tensor[Float]]) = {
    (Array(weightAndBias.dense), Array(gradWeightAndBias.dense))
  }

  override def paramsMMap(): (Array[TensorMMap], Array[TensorMMap]) = {
    (Array(weightAndBias), Array(gradWeightAndBias))
  }

  override def getExtraParameter(): Array[Tensor[Float]] = {
    if (needScale) {
      runningMeanScaled.copy(runningMean.dense).div(scaleFactor)
      runningVarianceScaled.copy(runningVariance.dense).div(scaleFactor)
      Array(runningMeanScaled, runningVarianceScaled)
    } else {
      Array(runningMean.dense, runningVariance.dense)
    }
  }

  override def toString(): String = {
    s"nn.mkl.SpatialBatchNormalization($nOutput, $eps, $momentum)"
  }

  override def evaluate(): this.type = {
    if (modelPhase == TrainingPhase) {
      initFwdPrimitives(inputFormats(), InferencePhase)
    }
    this
  }

  override def training(): this.type = {
    if (modelPhase == InferencePhase) {
      initFwdPrimitives(inputFormats(), TrainingPhase)
    }
    this
  }
}

object SpatialBatchNormalization {
  def apply(
    nOutput: Int,
    eps: Double = 1e-5,
    momentum: Double = 0.1,
    affine: Boolean = true,
    initWeight: Tensor[Float] = null,
    initBias: Tensor[Float] = null,
    initGradWeight: Tensor[Float] = null,
    initGradBias: Tensor[Float] = null): SpatialBatchNormalization = {
    new SpatialBatchNormalization(nOutput, eps, momentum, initWeight, initBias, initGradWeight,
      initGradBias)
  }
}


text:
// Copyright 2019-present the Material Components for iOS authors. All Rights Reserved.
//
// 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.

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "MDCTextControl.h"

#import "MDCTextControlAssistiveLabelViewLayout.h"

API_DEPRECATED_BEGIN(
    "🕘 Schedule time to migrate. "
    "Use branded UITextField or UITextView instead: go/material-ios-text-fields/gm2-migration. "
    "This is go/material-ios-migrations#not-scriptable 🕘",
    ios(12, 12))

/**
 This view acts as a subview of MDCTextControls and a superview of their leading and assistive
 labels.
 */
@interface MDCTextControlAssistiveLabelView : UIView

@property(nonatomic, strong, readonly, nonnull) UILabel *leadingAssistiveLabel;
@property(nonatomic, strong, readonly, nonnull) UILabel *trailingAssistiveLabel;
@property(nonatomic, strong, nonnull) MDCTextControlAssistiveLabelViewLayout *layout;

@end

API_DEPRECATED_END


text:
//
//
/// \file
/// \brief blomberg API wrapper code
/// \ingroup python
///
///	Set	BB_USING_DLL to compile with bloomberg dll
/// Set USE_BOOST_THREAD to compile with boost thread
///
/// BB_PLATFORM_WINDOWS_NT ?
///
///

#ifndef   __BLOOMBERG_QM_HPP__
#define   __BLOOMBERG_QM_HPP__

//#include <qmlib/corelib/templates/timeserie.hpp>
#include <map>
#include <list>
#include <jflib/templates/buffer.hpp>
#include <bbapi.h>

typedef double	qm_real;
typedef long 	qm_long;

#ifdef	USE_BOOST_THREAD
#include <boost/thread/mutex.hpp>
#include <qmlib/corelib/tools/thread.hpp>
#endif	//	USE_BOOST_THREAD

namespace bloomberg {

void blb_wrap();

#define BLP_PORT         8194
#define REQUEST_TIMEOUT  300
#define BLB_BUF_SIZE     2048
#define BLB_ID_SIZE      4

class livedata;
class blbcon;
typedef boost::shared_ptr<livedata> LIVEDATA;
typedef boost::shared_ptr<blbcon>   BLBCON;

class livedata  {
public:
	livedata(qm_real la=0.,
			 qm_real bi=0.,
			 qm_real as=0.,
			 qm_real op=0.,
			 qm_real vo=0.):m_last(la),m_bid(bi),m_ask(as),m_open(op),m_volume(vo){}

	qm_real get_last()   const {return m_last;}
	qm_real get_mid()    const;
	qm_real get_bid()    const {return m_bid;}
	qm_real get_ask()    const {return m_ask;}
	qm_real get_open()   const {return m_open;}
	qm_real get_volume() const {return m_volume;}

	void set_last(qm_real v)   {m_last = v;}
	void set_bid(qm_real v)    {m_bid = v;}
	void set_ask(qm_real v)    {m_ask = v;}
	void set_open(qm_real v)   {m_open = v;}
	void set_volume(qm_real v) {m_volume = v;}
protected:
	qm_real m_last, m_bid, m_ask, m_open, m_volume;
};

/** \brief Blooomberg Feed
*   \ingroup python_bloomberg
*
*	The feed is an observable object so that observers can be updated when
*   updated are received
*/
class blbFeedBase  {
public:
	typedef jflib::qm_buffer<long>	fieldlisttype;

	const std::string&	ticker()     const {return m_ticker;}
	long				reqid()      const {return m_req_id;}
	long				req_mon_id() const {return m_req_mon_id;}
    long				tick_id()    const {return m_tick_id;}

	long				m_req_mon_id;
    long				m_tick_id;

	fieldlisttype	    fields;

	blbFeedBase(const std::string& ticker, qm_long req_id):
		m_req_mon_id(0),m_tick_id(0),m_ticker(ticker),m_req_id(req_id){}

protected:
	void initdata(){}
	std::string		 m_ticker;
	long			 m_req_id;
	fieldlisttype	 m_fields;
};

template<class F, class D>
class blbFeed : public blbFeedBase  {
public:
	typedef F		local_type;
	typedef D		data_type;

	blbFeed(const std::string& ticker, qm_long req_id):blbFeedBase(ticker,req_id){initdata();}

	data_type			get_data()	 const {return m_data;}
	void				set_data(data_type d) {m_data = d;}
	int					get_datatype() {return 0;}

	local_type			get_localtype() const {return m_lt;}
	void				set_localtype(local_type v) {m_lt = v;}
protected:
	void initdata(){}
	local_type		 m_lt;
	data_type		 m_data;
};

/** \brief Bloomberg data return type
 * \ingroup bloomberg
 *
 * Holder class for data streaming from bloomberg api
 */
template<class T>
class blbret  {
public:
	blbret(T d):m_data(d){}
	T	get_data() const {return m_data;}
protected:
	T m_data;
};

class blbcon {
public:
	blbcon():m_connection(0),m_id(4),m_stop(0){}
	~blbcon(){disconnect();}
	int				connect(unsigned port);
	int				disconnect();
	bb_connect_t*   connection() const {return m_connection;}
	int				get_stop() const {return m_stop;}
	void			set_stop(int v) {m_stop = v;}
	SOCKET			bb_sock;
protected:
	bb_connect_t*				m_connection;
	jflib::qm_buffer<int4>		m_id;
	int							m_stop;
	void     SecurityConnection();
};

/** \brief Bloomberg API wrapper class
 * \ingroup python_bloomberg
 */
template<class F, class LR, class HR, class L>
class blb : boost::noncopyable {
public:
	typedef F										BLBFEEDRD;
	typedef blbret<BLBFEEDRD>						blbfeedr;
	typedef boost::shared_ptr<blbfeedr>				BLBFEEDR;

	typedef LR										livedata_type;
	typedef HR										histdata_type;

	typedef blb<F,LR,HR,L>							blb_type;
	typedef boost::shared_ptr<blb_type>				BLB;

	typedef blbFeed<L,livedata_type>				blb_live_feed_type;
	typedef blbFeed<L,histdata_type>				blb_hist_feed_type;

	typedef boost::shared_ptr<blb_live_feed_type>	BLBLIVEFEED;
	typedef boost::shared_ptr<blb_hist_feed_type>	BLBHISTFEED;

	typedef std::map<qm_long,BLBLIVEFEED>			id_container;
	typedef std::map<qm_long,BLBHISTFEED>			id_hist_container;
	typedef std::list<BLBLIVEFEED>					live_list;
	typedef	boost::shared_ptr<live_list>			LIVE_LIST;

	typedef jflib::void_buffer						buffertype;
	typedef jflib::qm_buffer<long>					fieldlisttype;

	typedef bb_msg_headerx_t						bb_header_type;
	typedef bb_decode_headerx_t						bb_decoder_header_type;
	typedef bb_msg_monid_t							bb_monid_type;
	typedef bb_msg_tickx_t							bb_tick_type;
	typedef bb_msg_mhistory_t						bb_history_type;

    ~blb(){}
	static BLB create(BLBCON c) {return BLB(new blb(c));}

	BLBLIVEFEED     get_live_feed(const std::string& ticker);
	BLBHISTFEED     get_hist_feed(const std::string& ticker, long startDate, long endDate, const fieldlisttype& fields);
	BLBHISTFEED     get_data_feed(const std::string& ticker, const fieldlisttype& fields);
	void			clear();

#ifdef	BB_USING_DLL
	template<class D, class L>
	static L		 fields();
#endif	//	BB_USING_DLL

	BLBCON   get_connection() const {return m_connection;}
	//void	 set_connection(BLBCON con) {m_connection = con;}

	BLBFEEDR  responce();
private:
	blb(BLBCON);
	buffertype								 m_buffer;
	jflib::qm_buffer<int4>					 m_secTypeList;
	jflib::qm_buffer<char>					 m_secName;
	id_container					         m_request_monitor_id;
    id_container					         m_live_tick_id;
	id_hist_container						 m_hist_ids;
	BLBCON									 m_connection;
	fd_set									 read_set, exec_set;
	BLBFEEDR								 m_none;

	static bool								 m_loaded_fields;

	BLBFEEDR	  Decode();
    BLBLIVEFEED   DecodeHeader(bb_header_type* h);
	BLBLIVEFEED   startTickMonitor(BLBLIVEFEED rat, bb_decoder_header_type* p);
	void	      HandleMonitor(bb_monid_type* m);

    LIVE_LIST     UpDateLiveData(bb_tick_type* t);

    BLBHISTFEED   DecodeHistory(bb_history_type* t);
	BLBHISTFEED	  fillData(BLBHISTFEED qp, bb_history_type* t);
	BLBHISTFEED   DecodeStaticData(bb_msg_fieldsx_t *t);
    //
    double   BB_PTOS(double x){return x == BB_VAL_MISSING ? 0 : x;}

//#	ifdef	USE_BOOST_THREAD
//    QM_SMART_PTR(boost::thread)  m_thread;
//    static void do_thread(void* param);
//	boost::mutex m_mutex;
//#	else
//    static unsigned __stdcall do_thread(void* param);
//#	endif	//	USE_BOOST_THREAD
};

#include<blb_impl.hpp>
#include<con_impl.hpp>
#include<blbloop.hpp>

}

#endif  //  __BLOOMBERG_QM_HPP__


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HRMBot.Dialogs
{
    public class StaticMessage
    {
        public static string AboutDemo {get; set;}
        static StaticMessage()
        {
            AboutDemo = "Please visit: https://www.youtube.com/watch?v=2_QpOVp5rpo to know more about HR bot and to see a demo.";
        }
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<billStatus>
  <bill>
    <actions>
      <actionByCounts>
        <houseOfRepresentatives>21</houseOfRepresentatives>
        <senate>1</senate>
      </actionByCounts>
      <item>
        <actionDate>2017-06-08</actionDate>
        <committee>
          <name>Homeland Security and Governmental Affairs Committee</name>
          <systemCode>ssga00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>Senate</name>
          0
        </sourceSystem>
        <text>Received in the Senate and Read twice and referred to the Committee on Homeland Security and Governmental Affairs.</text>
        <type>IntroReferral</type>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>Motion to reconsider laid on the table Agreed to without objection.</text>
        <actionTime>17:06:54</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H38310</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H4676-4677</name>
            <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4676-4677</url>
          </link>
          <link>
            <name>Roll no. 294</name>
            <url>http://clerk.house.gov/evs/2017/roll294.xml</url>
          </link>
        </links>
        <text>On passage Passed by recorded vote: 282 - 137 (Roll no. 294). (text: CR H4676-4677)</text>
        <actionTime>17:06:51</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H37100</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>Roll no. 294</name>
            <url>http://clerk.house.gov/evs/2017/roll294.xml</url>
          </link>
        </links>
        <text>Passed/agreed to in House: On passage Passed by recorded vote: 282 - 137 (Roll no. 294).</text>
        <actionTime>17:06:51</actionTime>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>8000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H4687-4688</name>
            <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4687-4688</url>
          </link>
        </links>
        <text>Considered as unfinished business. (consideration: CR H4687-4688)</text>
        <actionTime>16:46:33</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H30000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>POSTPONED PROCEEDINGS - At the conclusion of the debate on the Lujan Grisham amendment, the Chair put the question on agreeing to the amendment and by voice vote announced that the ayes had prevailed. Mr. McCaul requested the Yeas and Nays and pursuant to the order of the House of June 7, 2017 the Chair postponed further proceedings on the adoption of the Lujan Grisham amendment until a time to be announced.</text>
        <actionTime>15:56:14</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links />
        <text>The previous question was ordered pursuant to the rule.</text>
        <actionTime>15:55:45</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H35000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H.Res. 374</name>
            <url>https://www.congress.gov/bill/115th-congress/house-resolution/374</url>
          </link>
        </links>
        <text>DEBATE - Pursuant to the provisions of H.Res. 374, the House proceeded with 10 minutes of debate on the Lujan Grisham (NM) amendment.</text>
        <actionTime>15:45:42</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H.R. 2213</name>
            <url>https://www.congress.gov/bill/115th-congress/house-bill/2213</url>
          </link>
        </links>
        <text>ORDER OF PROCEDURE - Mr. McCaul asked unanimous consent that the question of adopting the amendment to H.R. 2213 may be subject to postponement as though under clause 8 of rule 20. Agreed to without objection.</text>
        <actionTime>15:07:02</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H.R. 2213</name>
            <url>https://www.congress.gov/bill/115th-congress/house-bill/2213</url>
          </link>
        </links>
        <text>DEBATE - The House proceeded with one hour of debate on H.R. 2213.</text>
        <actionTime>15:06:38</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H.R. 2213</name>
            <url>https://www.congress.gov/bill/115th-congress/house-bill/2213</url>
          </link>
        </links>
        <text>Rule provides for consideration of H.R. 2213 with 1 hour of general debate. Previous question shall be considered as ordered without intervening motions except motion to recommit with or without instructions. Measure will be considered read. A specified amendment is in order.</text>
        <actionTime>15:05:37</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H8D000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H. Res. 374</name>
            <url>https://www.congress.gov/bill/115th-congress/house-resolution/374</url>
          </link>
          <link>
            <name>H4676-4684</name>
            <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4676-4684</url>
          </link>
        </links>
        <text>Considered under the provisions of rule H. Res. 374. (consideration: CR H4676-4684)</text>
        <actionTime>15:05:32</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H30000</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H. Res. 374</name>
            <url>https://www.congress.gov/bill/115th-congress/house-resolution/374</url>
          </link>
        </links>
        <text>Rule H. Res. 374 passed House.</text>
        <actionTime>14:27:56</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H1L220</actionCode>
        <actionDate>2017-06-07</actionDate>
      </item>
      <item>
        <type>Floor</type>
        <links>
          <link>
            <name>H. Res. 374</name>
            <url>https://www.congress.gov/bill/115th-congress/house-resolution/374</url>
          </link>
          <link>
            <name>H.R. 2213</name>
            <url>https://www.congress.gov/bill/115th-congress/house-bill/2213</url>
          </link>
        </links>
        <text>Rules Committee Resolution H. Res. 374 Reported to House. Rule provides for consideration of H.R. 2213 with 1 hour of general debate. Previous question shall be considered as ordered without intervening motions except motion to recommit with or without instructions. Measure will be considered read. A specified amendment is in order.</text>
        <actionTime>19:21:40</actionTime>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H1L210</actionCode>
        <actionDate>2017-06-06</actionDate>
      </item>
      <item>
        <type>Calendars</type>
        <links />
        <text>Placed on the Union Calendar, Calendar No. 74.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee />
        <actionCode>H12410</actionCode>
        <actionDate>2017-05-16</actionDate>
      </item>
      <item>
        <type>Committee</type>
        <links>
          <link>
            <name>H. Rept. 115-121</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/house-report/121</url>
          </link>
        </links>
        <text>Reported (Amended) by the Committee on Homeland Security. H. Rept. 115-121.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee>
          <name>Homeland Security Committee</name>
          <systemCode>hshm00</systemCode>
        </committee>
        <actionCode>H12200</actionCode>
        <actionDate>2017-05-16</actionDate>
      </item>
      <item>
        <type>Committee</type>
        <links>
          <link>
            <name>H. Rept. 115-121</name>
            <url>https://www.congress.gov/congressional-report/115th-congress/house-report/121</url>
          </link>
        </links>
        <text>Reported (Amended) by the Committee on Homeland Security. H. Rept. 115-121.</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee>
          <name>Homeland Security Committee</name>
          <systemCode>hshm00</systemCode>
        </committee>
        <actionCode>5000</actionCode>
        <actionDate>2017-05-16</actionDate>
      </item>
      <item>
        <actionDate>2017-05-03</actionDate>
        <committee>
          <name>Homeland Security Committee</name>
          <systemCode>hshm00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Ordered to be Reported (Amended) by Voice Vote.</text>
        <type>Committee</type>
      </item>
      <item>
        <actionDate>2017-05-03</actionDate>
        <committee>
          <name>Homeland Security Committee</name>
          <systemCode>hshm00</systemCode>
        </committee>
        <links />
        <sourceSystem>
          <name>House committee actions</name>
          1
        </sourceSystem>
        <text>Committee Consideration and Mark-up Session Held.</text>
        <type>Committee</type>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Referred to the House Committee on Homeland Security.</text>
        <sourceSystem>
          <name>House floor actions</name>
          2
        </sourceSystem>
        <committee>
          <name>Homeland Security Committee</name>
          <systemCode>hshm00</systemCode>
        </committee>
        <actionCode>H11100</actionCode>
        <actionDate>2017-04-27</actionDate>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Introduced in House</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>Intro-H</actionCode>
        <actionDate>2017-04-27</actionDate>
      </item>
      <item>
        <type>IntroReferral</type>
        <links />
        <text>Introduced in House</text>
        <sourceSystem>
          <name>Library of Congress</name>
          9
        </sourceSystem>
        <committee />
        <actionCode>1000</actionCode>
        <actionDate>2017-04-27</actionDate>
      </item>
      <actionTypeCounts>
        <referredToCommittee>1</referredToCommittee>
        <motionForPreviousQuestion>1</motionForPreviousQuestion>
        <committeeReportOfABill>1</committeeReportOfABill>
        <billReferrals>1</billReferrals>
        <motionToReconsiderResults>1</motionToReconsiderResults>
        <reportedToHouse>1</reportedToHouse>
        <passedAgreedToInHouse>1</passedAgreedToInHouse>
        <generalDebate>5</generalDebate>
        <ruleForConsiderationOfBillReportedToHouse>1</ruleForConsiderationOfBillReportedToHouse>
        <passageOfAMeasure>1</passageOfAMeasure>
        <introducedInHouse>1</introducedInHouse>
        <introducedInTheHouse>1</introducedInTheHouse>
        <placeholderTextForH>1</placeholderTextForH>
        <unionCalendarAssignment>1</unionCalendarAssignment>
        <considerationByHouse>2</considerationByHouse>
        <actionStageOverride>1</actionStageOverride>
        <placeholderTextForHL>1</placeholderTextForHL>
      </actionTypeCounts>
    </actions>
    <relatedBills>
      <item>
        <number>374</number>
        <latestTitle>Providing for consideration of the bill (H.R. 2213) to amend the Anti-Border Corruption Act of 2010 to authorize certain polygraph waiver authority, and for other purposes.</latestTitle>
        <congress>115</congress>
        <relationshipDetails>
          <item>
            <type>Procedurally-related</type>
            <identifiedBy>House</identifiedBy>
          </item>
        </relationshipDetails>
        <latestAction>
          <actionDate>2017-06-07</actionDate>
          <actionTime>14:27:58</actionTime>
          <text>Motion to reconsider laid on the table Agreed to without objection.</text>
        </latestAction>
        <type>HRES</type>
      </item>
      <item>
        <number>595</number>
        <latestTitle>Anti-Border Corruption Reauthorization Act of 2017</latestTitle>
        <congress>115</congress>
        <relationshipDetails>
          <item>
            <type>Related bill</type>
            <identifiedBy>CRS</identifiedBy>
          </item>
          <item>
            <type>Related bill</type>
            <identifiedBy>House</identifiedBy>
          </item>
        </relationshipDetails>
        <latestAction>
          <actionDate>2017-07-24</actionDate>
          <text>Placed on Senate Legislative Calendar under General Orders. Calendar No. 179.</text>
        </latestAction>
        <type>S</type>
      </item>
    </relatedBills>
    <sponsors>
      <item>
        <fullName>Rep. McSally, Martha [R-AZ-2]</fullName>
        <state>AZ</state>
        <firstName>Martha</firstName>
        <middleName />
        <party>R</party>
        <district>2</district>
        <byRequestType />
        <identifiers>
          <bioguideId>M001197</bioguideId>
          <lisID>2225</lisID>
          <gpoId />
        </identifiers>
        <bioguideId>M001197</bioguideId>
        <lastName>McSally</lastName>
      </item>
    </sponsors>
    <summaries>
      <billSummaries />
    </summaries>
    <version>1.0.0</version>
    <originChamber>House</originChamber>
    <notes />
    <laws />
    <createDate>2017-04-28T03:11:53Z</createDate>
    <cboCostEstimates>
      <item>
        <url>https://www.cbo.gov/publication/52725</url>
        <title>H.R. 2213, Anti-Border Corruption Reauthorization Act of 2017</title>
        <pubDate>2017-05-15T15:00:01Z</pubDate>
      </item>
    </cboCostEstimates>
    <policyArea>
      <name>Government Operations and Politics</name>
    </policyArea>
    <constitutionalAuthorityStatementText><![CDATA[
From the Congressional Record Online through the Government Publishing Office [www.gpo.gov]By Ms. McSALLY:H.R. 2213.Congress has the power to enact this legislation pursuantto the following:Article 1, Section 8, Clause 1: The Congress shall havePower To lay and collect Taxes, Duties, Imposts and Excises,to pay the Debts and provide for the common Defence andgeneral Welfare of the United States; but all Duties, Impostsand Excises shall be uniform throughout the United States.Article 1, Section 8, Clause 18: To make all Laws whichshall be necessary and proper for carrying into Execution theforegoing Powers vested by this Constitution in theGovernment of the United States or in any Department orOfficer thereof.[Page H2942]
]]></constitutionalAuthorityStatementText>
    <cosponsors>
      <item>
        <lastName>McCaul</lastName>
        <fullName>Rep. McCaul, Michael T. [R-TX-10]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>R</party>
        <firstName>Michael</firstName>
        <bioguideId>M001157</bioguideId>
        <district>10</district>
        <middleName>T.</middleName>
        <identifiers>
          <gpoId>8166</gpoId>
          <lisID>1804</lisID>
          <bioguideId>M001157</bioguideId>
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Hurd</lastName>
        <fullName>Rep. Hurd, Will [R-TX-23]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>R</party>
        <firstName>Will</firstName>
        <bioguideId>H001073</bioguideId>
        <district>23</district>
        <middleName />
        <identifiers>
          <bioguideId>H001073</bioguideId>
          <lisID>2269</lisID>
          <gpoId />
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Carter</lastName>
        <fullName>Rep. Carter, John R. [R-TX-31]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>R</party>
        <firstName>John</firstName>
        <bioguideId>C001051</bioguideId>
        <district>31</district>
        <middleName>R.</middleName>
        <identifiers>
          <bioguideId>C001051</bioguideId>
          <lisID>1752</lisID>
          <gpoId>8187</gpoId>
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Cuellar</lastName>
        <fullName>Rep. Cuellar, Henry [D-TX-28]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>D</party>
        <firstName>Henry</firstName>
        <bioguideId>C001063</bioguideId>
        <district>28</district>
        <middleName />
        <identifiers>
          <bioguideId>C001063</bioguideId>
          <gpoId>8184</gpoId>
          <lisID>1807</lisID>
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Roe</lastName>
        <fullName>Rep. Roe, David P. [R-TN-1]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>R</party>
        <firstName>David</firstName>
        <bioguideId>R000582</bioguideId>
        <district>1</district>
        <middleName>P.</middleName>
        <identifiers>
          <gpoId>8148</gpoId>
          <bioguideId>R000582</bioguideId>
          <lisID>1954</lisID>
        </identifiers>
        <state>TN</state>
      </item>
      <item>
        <lastName>Vela</lastName>
        <fullName>Rep. Vela, Filemon [D-TX-34]</fullName>
        <isOriginalCosponsor>True</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-04-27</sponsorshipDate>
        <party>D</party>
        <firstName>Filemon</firstName>
        <bioguideId>V000132</bioguideId>
        <district>34</district>
        <middleName />
        <identifiers>
          <bioguideId>V000132</bioguideId>
          <gpoId />
          <lisID>2167</lisID>
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Messer</lastName>
        <fullName>Rep. Messer, Luke [R-IN-6]</fullName>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-05-15</sponsorshipDate>
        <party>R</party>
        <firstName>Luke</firstName>
        <bioguideId>M001189</bioguideId>
        <district>6</district>
        <middleName />
        <identifiers>
          <lisID>2130</lisID>
          <bioguideId>M001189</bioguideId>
          <gpoId />
        </identifiers>
        <state>IN</state>
      </item>
      <item>
        <lastName>Gonzalez</lastName>
        <fullName>Rep. Gonzalez, Vicente [D-TX-15]</fullName>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-05-16</sponsorshipDate>
        <party>D</party>
        <firstName>Vicente</firstName>
        <bioguideId>G000581</bioguideId>
        <district>15</district>
        <middleName />
        <identifiers>
          <bioguideId>G000581</bioguideId>
          <gpoId />
          <lisID>2349</lisID>
        </identifiers>
        <state>TX</state>
      </item>
      <item>
        <lastName>Arrington</lastName>
        <fullName>Rep. Arrington, Jodey C. [R-TX-19]</fullName>
        <isOriginalCosponsor>False</isOriginalCosponsor>
        <sponsorshipWithdrawnDate />
        <sponsorshipDate>2017-05-16</sponsorshipDate>
        <party>R</party>
        <firstName>Jodey</firstName>
        <bioguideId>A000375</bioguideId>
        <district>19</district>
        <middleName>C.</middleName>
        <identifiers>
          <bioguideId>A000375</bioguideId>
          <lisID>2350</lisID>
          <gpoId />
        </identifiers>
        <state>TX</state>
      </item>
    </cosponsors>
    <titles>
      <item>
        <titleType>Short Titles as Passed House</titleType>
        <parentTitleType>Short Titles House of Representatives</parentTitleType>
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>Short Titles as Introduced</titleType>
        <parentTitleType />
        <chamberName />
        <chamberCode />
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>Official Title as Introduced</titleType>
        <parentTitleType />
        <chamberName />
        <chamberCode />
        <title>To amend the Anti-Border Corruption Act of 2010 to authorize certain polygraph waiver authority, and for other purposes.</title>
      </item>
      <item>
        <titleType>Display Title</titleType>
        <parentTitleType />
        <chamberName />
        <chamberCode />
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>(Extracted from GPO) Short Titles as Passed House</titleType>
        <parentTitleType />
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>(Extracted from GPO) Short Titles as Reported to House</titleType>
        <parentTitleType />
        <chamberName>House</chamberName>
        <chamberCode>H</chamberCode>
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
      <item>
        <titleType>(Extracted from GPO) Short Titles as Introduced</titleType>
        <parentTitleType />
        <chamberName />
        <chamberCode />
        <title>Anti-Border Corruption Reauthorization Act of 2017</title>
      </item>
    </titles>
    <updateDate>2017-09-11T03:03:00Z</updateDate>
    <subjects>
      <billSubjects>
        <policyArea>
          <name>Government Operations and Politics</name>
        </policyArea>
        <legislativeSubjects>
          <item>
            <name>Border security and unlawful immigration</name>
          </item>
          <item>
            <name>Congressional oversight</name>
          </item>
          <item>
            <name>Criminal investigation, prosecution, interrogation</name>
          </item>
          <item>
            <name>Department of Homeland Security</name>
          </item>
          <item>
            <name>Employee hiring</name>
          </item>
          <item>
            <name>Government employee pay, benefits, personnel management</name>
          </item>
          <item>
            <name>Law enforcement officers</name>
          </item>
          <item>
            <name>Military personnel and dependents</name>
          </item>
          <item>
            <name>National Guard and reserves</name>
          </item>
          <item>
            <name>Veterans' education, employment, rehabilitation</name>
          </item>
        </legislativeSubjects>
      </billSubjects>
    </subjects>
    <recordedVotes>
      <recordedVote>
        <sessionNumber>1</sessionNumber>
        <rollNumber>294</rollNumber>
        <chamber>House</chamber>
        <fullActionName>Passage of a Measure</fullActionName>
        <date>2017-06-07T21:06:51Z</date>
        <url>http://clerk.house.gov/evs/2017/roll294.xml</url>
        <congress>115</congress>
      </recordedVote>
    </recordedVotes>
    <billNumber>2213</billNumber>
    <committeeReports>
      <committeeReport>
        <citation>H. Rept. 115-121</citation>
      </committeeReport>
    </committeeReports>
    <amendments>
      <amendment>
        <congress>115</congress>
        <createDate>2017-06-08T07:16:20Z</createDate>
        <notes />
        <titles />
        <type>HAMDT</type>
        <cosponsors>
          <totalCount>0</totalCount>
          <currentCount>0</currentCount>
        </cosponsors>
        <congress>115</congress>
        <updateDate>2017-09-11T03:03:00Z</updateDate>
        <description>Amendment sought to prohibit the bill from going into effect until 1) the CBP completes its evaluation and pilot program of the Test for Espionage, Sabotage, and Corruption (TES-C) which is then certified by the DHS Inspector General and reported to Congress and 2) the DHS Inspector General completes a risk assessment of the population that could receive waivers and certifies to Congress that providing waivers to these individuals would not endanger national security, undermine workforce integrity, or increase corruption in the agency.</description>
        <sponsors>
          <item>
            <party>D</party>
            <bioguideId>L000580</bioguideId>
            <middleName />
            <state>NM</state>
            <identifiers>
              <gpoId />
              <lisID>2146</lisID>
              <bioguideId>L000580</bioguideId>
            </identifiers>
            <district>1</district>
            <firstName>Michelle</firstName>
            <fullName>Rep. Lujan Grisham, Michelle [D-NM-1]</fullName>
            <lastName>Lujan Grisham</lastName>
          </item>
        </sponsors>
        <number>127</number>
        <amendedBill>
          <title>Anti-Border Corruption Reauthorization Act of 2017</title>
          <type>HR</type>
          <originChamber>House</originChamber>
          <congress>115</congress>
          <originChamberCode>H</originChamberCode>
          <number>2213</number>
        </amendedBill>
        <amendments>
          <count>0</count>
        </amendments>
        <links />
        <purpose>An amendment numbered 1 printed in House Report 115-162 to prohibit the bill from going into effect until 1) the CBP completes its evaluation and pilot program of the Test for Espionage, Sabotage, and Corruption (TES-C) which is then certified by the DHS Inspector General and reported to Congress and 2) the DHS Inspector General completes a risk assessment of the population that could receive waivers and certifies to Congress that providing waivers to these individuals would not endanger national security, undermine workforce integrity, or increase corruption in the agency.</purpose>
        <submittedDate>2017-06-07T04:00:00Z</submittedDate>
        <version>1.0.0</version>
        <actions>
          <count>8</count>
          <actionTypeCounts>
            <amendmentFailedByHouse>1</amendmentFailedByHouse>
            <agreeingToTheAmendmentResults>1</agreeingToTheAmendmentResults>
            <houseAmendmentNotAgreedTo>1</houseAmendmentNotAgreedTo>
            <rollCallVotesOnAmendmentsInHouse>1</rollCallVotesOnAmendmentsInHouse>
            <amendmentOffered>1</amendmentOffered>
            <houseAmendmentOfferedReportedBy>1</houseAmendmentOfferedReportedBy>
            <houseAmendmentOffered>1</houseAmendmentOffered>
          </actionTypeCounts>
          <actions>
            <item>
              <sourceSystem>
                2
                <name>House floor actions</name>
              </sourceSystem>
              <actionTime>16:53:22</actionTime>
              <type>Floor</type>
              <committee />
              <text>On agreeing to the Lujan Grisham, M. amendment (A002) Failed by the Yeas and Nays: 179 - 238 (Roll no. 293).</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>H34111</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>http://clerk.house.gov/evs/2017/roll293.xml</url>
                  <name>Roll no. 293</name>
                </link>
              </links>
            </item>
            <item>
              <sourceSystem>
                2
                <name>House floor actions</name>
              </sourceSystem>
              <actionTime>15:45:38</actionTime>
              <type>Floor</type>
              <committee />
              <text>Amendment (A002) offered by Ms. Lujan Grisham, M.. (consideration: CR H4683-4684; text: CR H4683)</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>H3A100</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4683</url>
                  <name>H4683</name>
                </link>
                <link>
                  <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4683-4684</url>
                  <name>H4683-4684</name>
                </link>
              </links>
            </item>
            <item>
              <actionDate>2017-06-07</actionDate>
              <committee />
              <links />
              <text />
            </item>
            <item>
              <sourceSystem>
                9
                <name>Library of Congress</name>
              </sourceSystem>
              <actionTime>16:53:22</actionTime>
              <type>NotUsed</type>
              <committee />
              <text>Amendment failed by House: On agreeing to the Lujan Grisham, M. amendment (A002) Failed by the Yeas and Nays: 179 - 238 (Roll no. 293).</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>80000</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>http://clerk.house.gov/evs/2017/roll293.xml</url>
                  <name>Roll no. 293</name>
                </link>
              </links>
            </item>
            <item>
              <sourceSystem>
                9
                <name>Library of Congress</name>
              </sourceSystem>
              <actionTime>16:53:22</actionTime>
              <type>Floor</type>
              <committee />
              <text>Roll call votes on amendments in House</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>75000</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>http://clerk.house.gov/evs/2017/roll293.xml</url>
                  <name>Roll no. 293</name>
                </link>
              </links>
            </item>
            <item>
              <sourceSystem>
                9
                <name>Library of Congress</name>
              </sourceSystem>
              <actionTime>16:53:22</actionTime>
              <type>Floor</type>
              <committee />
              <text>House amendment not agreed to: On agreeing to the Lujan Grisham, M. amendment (A002) Failed by the Yeas and Nays: 179 - 238 (Roll no. 293).</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>73000</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>http://clerk.house.gov/evs/2017/roll293.xml</url>
                  <name>Roll no. 293</name>
                </link>
              </links>
            </item>
            <item>
              <sourceSystem>
                9
                <name>Library of Congress</name>
              </sourceSystem>
              <actionTime>15:45:38</actionTime>
              <type>NotUsed</type>
              <committee />
              <text>House amendment offered/reported by : Amendment (A002) offered by Ms. Lujan Grisham, M..</text>
              <actionDate>2017-06-07</actionDate>
              <actionCode>71500</actionCode>
              <links>
                <link>
                  <url>https://www.congress.gov/amendment/115th-congress/house-amendment/127</url>
                  <name>H.Amdt.127</name>
                </link>
                <link>
                  <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4683</url>
                  <name>H4683</name>
                </link>
                <link>
                  <url>https://www.congress.gov/congressional-record/volume-163/house-section/page/H4683-4684</url>
                  <name>H4683-4684</name>
                </link>
              </links>
            </item>
            <item>
              <sourceSystem>
                9
                <name>Library of Congress</name>
              </sourceSystem>
              <actionDate>2017-06-07</actionDate>
              <type>Floor</type>
              <text>House amendment offered</text>
              <committee />
              <actionCode>71000</actionCode>
              <links />
            </item>
          </actions>
          <actionByCounts>
            <houseOfRepresentatives>7</houseOfRepresentatives>
          </actionByCounts>
        </actions>
        <chamber>House of Representatives</chamber>
        <proposedDate />
        <amendedAmendment />
        <type>HAMDT</type>
        <description>Amendment sought to prohibit the bill from going into effect until 1) the CBP completes its evaluation and pilot program of the Test for Espionage, Sabotage, and Corruption (TES-C) which is then certified by the DHS Inspector General and reported to Congress and 2) the DHS Inspector General completes a risk assessment of the population that could receive waivers and certifies to Congress that providing waivers to these individuals would not endanger national security, undermine workforce integrity, or increase corruption in the agency.</description>
        <number>127</number>
        <purpose>An amendment numbered 1 printed in House Report 115-162 to prohibit the bill from going into effect until 1) the CBP completes its evaluation and pilot program of the Test for Espionage, Sabotage, and Corruption (TES-C) which is then certified by the DHS Inspector General and reported to Congress and 2) the DHS Inspector General completes a risk assessment of the population that could receive waivers and certifies to Congress that providing waivers to these individuals would not endanger national security, undermine workforce integrity, or increase corruption in the agency.</purpose>
        <latestAction>
          <actionDate>2017-06-07</actionDate>
          <actionTime>16:53:22</actionTime>
          <text>On agreeing to the Lujan Grisham, M. amendment (A002) Failed by the Yeas and Nays: 179 - 238 (Roll no. 293).</text>
        </latestAction>
      </amendment>
      <amendment>
        <congress>115</congress>
        <createDate>2017-06-08T07:16:19Z</createDate>
        <notes />
        <titles />
        <type>HAMDT</type>
        <cosponsors>
          <totalCount>0</totalCount>
          <currentCount>0</currentCount>
        </cosponsors>
        <congress>115</congress>
        <updateDate>2017-09-11T03:03:00Z</updateDate>
        <description />
        <sponsors>
          <item>
            <name>Rules Committee</name>
          </item>
        </sponsors>
        <number>126</number>
        <amendedBill>
          <title>Anti-Border Corruption Reauthorization Act of 2017</title>
          <type>HR</type>
          <originChamber>House</originChamber>
          <congress>115</congress>
          <originChamberCode>H</originChamberCode>
          <number>2213</number>
        </amendedBill>
        <amendments>
          <count>0</count>
        </amendments>
        <links />
        <purpose>Pursuant to the provisions of H.Res. 374, an amendment in the nature of a substitute recommended by the Committee on Homeland Security is considered adopted.</purpose>
        <submittedDate>2017-06-07T04:00:00Z</submittedDate>
        <version>1.0.0</version>
        <actions>
          <count>2</count>
          <actions>
            <item>
              <actionDate>2017-06-07</actionDate>
              <committee />
              <links />
              <text />
            </item>
            <item>
              <links />
              <text>House amendment offered</text>
              <sourceSystem>
                <name>Library of Congress</name>
                9
              </sourceSystem>
              <committee />
              <actionDate>2017-06-07</actionDate>
              <type>Floor</type>
              <actionCode>71000</actionCode>
            </item>
          </actions>
          <actionTypeCounts>
            <houseAmendmentOffered>1</houseAmendmentOffered>
          </actionTypeCounts>
          <actionByCounts>
            <houseOfRepresentatives>1</houseOfRepresentatives>
          </actionByCounts>
        </actions>
        <chamber>House of Representatives</chamber>
        <proposedDate />
        <amendedAmendment />
        <type>HAMDT</type>
        <description />
        <number>126</number>
        <purpose>Pursuant to the provisions of H.Res. 374, an amendment in the nature of a substitute recommended by the Committee on Homeland Security is considered adopted.</purpose>
        <latestAction />
      </amendment>
    </amendments>
    <title>Anti-Border Corruption Reauthorization Act of 2017</title>
    <introducedDate>2017-04-27</introducedDate>
    <billType>HR</billType>
    <committees>
      <billCommittees>
        <item>
          <systemCode>ssga00</systemCode>
          <type>Standing</type>
          <activities>
            <item>
              <date>2017-06-08T14:45:29Z</date>
              <name>Referred to</name>
            </item>
          </activities>
          <name>Homeland Security and Governmental Affairs Committee</name>
          <subcommittees />
          <chamber>Senate</chamber>
        </item>
        <item>
          <systemCode>hshm00</systemCode>
          <type>Standing</type>
          <activities>
            <item>
              <date>2017-05-16T15:00:58Z</date>
              <name>Reported by</name>
            </item>
            <item>
              <date>2017-05-03T14:29:24Z</date>
              <name>Markup by</name>
            </item>
            <item>
              <date>2017-04-27T14:04:45Z</date>
              <name>Referred to</name>
            </item>
          </activities>
          <name>Homeland Security Committee</name>
          <subcommittees />
          <chamber>House</chamber>
        </item>
      </billCommittees>
    </committees>
    <calendarNumbers>
      <item>
        <calendar>U00074</calendar>
        <number />
      </item>
    </calendarNumbers>
    <congress>115</congress>
    <latestAction>
      <text>Received in the Senate and Read twice and referred to the Committee on Homeland Security and Governmental Affairs.</text>
      <actionDate>2017-06-08</actionDate>
      <links />
    </latestAction>
  </bill>
  <dublinCore xmlns:dc="http://purl.org/dc/elements/1.1/">
    <dc:format>text/xml</dc:format>
    <dc:language>EN</dc:language>
    <dc:rights>Pursuant to Title 17 Section 105 of the United States Code, this file is not subject to copyright protection and is in the public domain.</dc:rights>
    <dc:contributor>Congressional Research Service, Library of Congress</dc:contributor>
    <dc:description>This file contains bill summaries and statuses for federal legislation. A bill summary describes the most significant provisions of a piece of legislation and details the effects the legislative text may have on current law and federal programs. Bill summaries are authored by the Congressional Research Service (CRS) of the Library of Congress. As stated in Public Law 91-510 (2 USC 166 (d)(6)), one of the duties of CRS is "to prepare summaries and digests of bills and resolutions of a public general nature introduced in the Senate or House of Representatives". For more information, refer to the User Guide that accompanies this file.</dc:description>
  </dublinCore>
</billStatus>


text:
/**
 * Main Controller
 */
angular.module('controllers').controller('main', ['$scope', '$http',
	function ($scope, $http) {
		'use strict';

		/**
		 * 初始化变量
		 */
		$scope.website = {
			hostname: window.location.hostname,
			origin: window.location.origin
		};
		$scope.systemInfo = {};
		$scope.officialSystemInfo = {};
		$scope.nodeInfo = {};
		$scope.databaseInfo = {};
		$scope.contentsTotal = '';
		$scope.mediaTotal = '';
		$scope.adminsTotal = '';
		$scope.readingList = {};
		$scope.versionIsLatest = true;
    $scope.sponsor = 99;

		$http.get('/api/dashboard')
			.then(function (res) {
				var data = res.data;

				$scope.systemInfo = data.systemInfo;
				$scope.nodeInfo = data.nodeInfo;
				$scope.databaseInfo = data.databaseInfo;
				$scope.contentsTotal = data.contentsTotal;
				$scope.mediaTotal = data.mediaTotal;
				$scope.adminsTotal = data.adminsTotal;
				$scope.readingList = data.readingList;
			}, function () {
				$scope.$emit('notification', {
					type: 'danger',
					message: '读取控制面板数据失败'
				});
			});

		/**
		 * NoderCMS 官方信息
		 */
		$http.get('http://console.nodercms.com/openApi/info')
			.then(function (res) {
				var data = res.data;

				$scope.officialSystemInfo = data;
			}, function () {
				$scope.$emit('notification', {
					type: 'danger',
					message: '官方信息读取失败'
				});
			});

		/**
		 * 比较是否最新版本
		 */
		$scope.compareVersion = function (version, officialVersion) {
			return officialVersion && version !== officialVersion ? true : false;
		};

		/**
		 * 统计
		 */
		$http.put('/api/statistics', {
			hostname: $scope.website.hostname
		});
	}
]);


text:
package org.apache.phoenix.coprocessor;

import co.cask.tephra.hbase11.coprocessor.TransactionProcessor;

public class PhoenixTransactionalProcessor extends DelegateRegionObserver {

    public PhoenixTransactionalProcessor() {
        super(new TransactionProcessor());
    }

}


text:
import Connect from './Connect.jsx'
export default Connect


text:
set -e

echo "update yafra-nodejs git repository"
cd /work/repos/yafra-nodejs
git pull

echo "update restserver node modules"
cd restserver
npm update

echo "done - running with yafra javascript / typescript example"


text:
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path

from explorer.urls import urlpatterns

admin.autodiscover()

urlpatterns += [
    path('admin/', admin.site.urls),
]

urlpatterns += staticfiles_urlpatterns()


text:
#ifndef EXCEPTION_H
#define EXCEPTION_H

/*******************************
 * DO NOT EDIT THIS FILE
 *******************************/

class ArrayBoundsException {
	// empty class
};

class underflow {
	// empty class
};

class overflow {
	// empty class
};

class division_by_zero {
	// emtpy class
};

class illegal_argument {
	// emtpy class
};

class out_of_bounds {
	// emtpy class
};

#endif


text:
<script language="javascript">
    $(document).ready(function () {
        // hide toolbar on scrolldown, show - on scroll up
        var oToolbar = $('#bx-toolbar');
        if(oToolbar && oToolbar.length > 0)
            new Headroom(oToolbar.get(0), {
                tolerance: {
                    down: 10,
                    up: 20
                },
                offset: 200,
                classes: {
                    initial: "bx-toolbar-anim",
                    pinned: "bx-toolbar-reset",
                    unpinned: "bx-toolbar-up"
                },
                onUnpin: function() {
                    bx_menu_slide_close_all_opened();
                }
            }).init();
    });
</script>