text:
var extract_jwt = require('../lib/extract_jwt'),
    Request = require('./mock_request');

describe('Token extractor', function() {

    describe('fromHeader', function() {

        var extractor = extract_jwt.fromHeader('test_header');

        it('should return null no when token is present', function() {
            var req = new Request();

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return the value from the specified header', function() {
            var req = new Request();
            req.headers['test_header'] = 'abcd123'

            var token = extractor(req)

            expect(token).to.equal('abcd123');
        });
    });

    describe('fromBodyField', function() {

        var extractor = extract_jwt.fromBodyField('test_field');

        it('should return null when no body is present', function() {
            var req = new Request();

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return null when the specified body field is not present', function() {
            var req = new Request();
            req.body = {};

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return the value from the specified body field', function() {
            var req = new Request();
            req.body = {};
            req.body.test_field = 'abcd123';

            var token = extractor(req);

            expect(token).to.equal('abcd123');
        });
    });

    describe('fromUrlQueryParameter', function() {

        var extractor = extract_jwt.fromUrlQueryParameter('test_param');

        it('should return null when the specified paramter is not present', function() {
            var req = new Request();

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return the value from the specified parameter', function() {
            var req = new Request();
            req.url += '?test_param=abcd123';

            var token = extractor(req);

            expect(token).to.equal('abcd123');
        });
    });

    describe('fromAuthHeaderWithScheme', function() {

        var extractor = extract_jwt.fromAuthHeaderWithScheme('TEST_SCHEME');

        it('should return null when no auth header is present', function() {
            var req = new Request();

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return null when the auth header is present but the auth scheme doesnt match', function() {
            var req = new Request()
            req.headers['authorization'] = "NOT_TEST_SCHEME abcd123";

            var token = extractor(req);

            expect(token).to.be.null;
        });

        it('should return the value from the authorization header with specified auth scheme', function() {
            var req = new Request()
            req.headers['authorization'] = "TEST_SCHEME abcd123";

            var token = extractor(req);

            expect(token).to.equal('abcd123');
        });

    });

    describe('fromAuthHeader', function() {

        var extractor = extract_jwt.fromAuthHeader();

        it('should return the value from the authorization header with default JWT auth scheme', function() {
            var req = new Request()
            req.headers['authorization'] = "JWT abcd123";

            var token = extractor(req);

            expect(token).to.equal('abcd123');
        });

    });

    describe('versionOneCompatibility', function () {

        describe('default behavior', function() {

                var extractor = extract_jwt.versionOneCompatibility({});

                it('should return the token in the default "JWT" auth header', function () {
                    var req = new Request();
                    req.headers['authorization'] = "JWT abcd123";

                    var token = extractor(req);

                    expect(token).to.equal('abcd123');
                });

                it('should return the token in the default "auth_token" body field', function () {
                    var req = new Request();
                    req.body = {};
                    req.body['auth_token'] = 'xyzabcd';

                    var token = extractor(req);

                    expect(token).to.equal('xyzabcd');
                });

                it('should return then token in the default "auth_token" query parameter', function () {
                    var req = new Request();
                    req.url += '?auth_token=abcd123';

                    var token = extractor(req);

                    expect(token).to.equal('abcd123');
                });
        });

        describe('user supplied parameters', function() {

            it('should return the token in an auth header with a user specified auth scheme', function() {
                var opts = { authScheme: 'MY_CUSTOM_AUTH_SCHEME' };
                var extractor = extract_jwt.versionOneCompatibility(opts);
                var req = new Request();
                req.headers['authorization'] = 'MY_CUSTOM_AUTH_SCHEME deadbeef';

                var token = extractor(req);

                expect(token).to.equal('deadbeef');
            });

            it('should return the token in a user supplied body field', function () {
                var opts = { tokenBodyField: 'CUSTOM_BODY_FIELD' };
                var extractor = extract_jwt.versionOneCompatibility(opts);
                var req = new Request();
                req.body = {};
                req.body['CUSTOM_BODY_FIELD'] = 'badbeef';

                var token = extractor(req);

                expect(token).to.equal('badbeef');
            });

            it('should return the token in a user specified query parameter', function () {
                var opts = { tokenQueryParameterName: 'CustomQueryParam' };
                var extractor = extract_jwt.versionOneCompatibility(opts);
                var req = new Request();
                req.url += '?CustomQueryParam=deadbeef';

                var token = extractor(req);

                expect(token).to.equal('deadbeef');
            });

        });

    });

});


text:
extern crate x11_clipboard;

use std::time::{ Instant, Duration };
use x11_clipboard::Clipboard;

#[test]
fn it_work() {
    let data = format!("{:?}", Instant::now());
    let clipboard = Clipboard::new().unwrap();

    let atom_clipboard = clipboard.setter.atoms.clipboard;
    let atom_utf8string = clipboard.setter.atoms.utf8_string;
    let atom_property = clipboard.setter.atoms.property;

    clipboard.store(atom_clipboard, atom_utf8string, data.as_bytes()).unwrap();

    let output = clipboard.load(atom_clipboard, atom_utf8string, atom_property, None).unwrap();
    assert_eq!(output, data.as_bytes());

    let data = format!("{:?}", Instant::now());
    clipboard.store(atom_clipboard, atom_utf8string, data.as_bytes()).unwrap();

    let output = clipboard.load(atom_clipboard, atom_utf8string, atom_property, None).unwrap();
    assert_eq!(output, data.as_bytes());

    let output = clipboard.load(atom_clipboard, atom_utf8string, atom_property, None).unwrap();
    assert_eq!(output, data.as_bytes());

    let dur = Duration::from_secs(3);
    let output = clipboard.load(atom_clipboard, atom_utf8string, atom_property, dur).unwrap();
    assert_eq!(output, data.as_bytes());
}

redpajama_set_name: RedPajamaGithub


text:
/**
 * Returns a iterable array of tuples from an input object.
 */
const getMappedArray = (obj: Object) => [...new Map(Object.entries(obj))];
export default getMappedArray;


text:
({
    refresh: function(component, event, helper) {
        helper.refresh(component);
    },

    locationChange: function(component) {
		var scroller = component._scroller;
		if (!$A.util.isUndefined(scroller)) {
			scroller.unbindTransientHandlers();
		}
    },

    scrollTo: function(component, event, helper) {
    	helper.handleScrollTo(component, event);
    },

    scrollBy: function(component, event, helper) {
    	helper.handleScrollBy(component, event);
    },

    handleCanShowMoreChange: function (cmp, evt, hlp) {
		hlp.swapShowMore(cmp);
    }
})// eslint-disable-line semi


text:
require File.expand_path("../spec_helper", __FILE__)

describe "Keen IO API" do
  let(:project_id) { ENV['KEEN_PROJECT_ID'] }
  let(:write_key) { ENV['KEEN_WRITE_KEY'] }

  def wait_for_count(event_collection, count)
    attempts = 0
    while attempts < 30
      break if Keen.count(event_collection) == count
      attempts += 1
      sleep(1)
    end
  end

  describe "publishing" do
    let(:collection) { "User posts.new" }
    let(:event_properties) { { "name" => "Bob" } }
    let(:api_success) { { "created" => true } }

    describe "success" do
      it "should return a created status for a valid post" do
        Keen.publish(collection, event_properties).should == api_success
      end
    end

    describe "failure" do
      it "should raise a not found error if an invalid project id" do
        client = Keen::Client.new(:project_id => "riker", :write_key => "whatever")
        expect {
          client.publish(collection, event_properties)
        }.to raise_error(Keen::NotFoundError)
      end

      it "should succeed if a non-url-safe event collection is specified" do
        Keen.publish("infinite possibilities", event_properties).should == api_success
      end
    end

    describe "async" do
      # no TLS support in EventMachine on jRuby
      unless defined?(JRUBY_VERSION)

        it "should publish the event and trigger callbacks" do
          EM.run {
            Keen.publish_async(collection, event_properties).callback { |response|
              begin
                response.should == api_success
              ensure
                EM.stop
              end
            }.errback { |error|
              EM.stop
              fail error
            }
          }
        end

        it "should publish to non-url-safe collections" do
          EM.run {
            Keen.publish_async("foo bar", event_properties).callback { |response|
              begin
                response.should == api_success
              ensure
                EM.stop
              end
            }
          }
        end
      end
    end

    describe "batch" do
      it "should publish a batch of events" do
        Keen.publish_batch(
          :batch_signups => [
            { :name => "bob" },
            { :name => "ted" }
          ],
          :batch_purchases => [
            { :price => 30 },
            { :price => 40 }
          ]
        ).should == {
          "batch_purchases" => [
            { "success" => true },
            { "success" => true }
          ],
          "batch_signups" => [
            { "success" => true },
            { "success"=>true }
          ]}
      end
    end
  end

  describe "batch_async" do
      # no TLS support in EventMachine on jRuby
      unless defined?(JRUBY_VERSION)
        let(:api_success) { {"batch_purchases"=>[{"success"=>true}, {"success"=>true}], "batch_signups"=>[{"success"=>true}, {"success"=>true}]} }
        it "should publish the event and trigger callbacks" do
          EM.run {
            Keen.publish_batch_async(
              :batch_signups => [
                { :name => "bob" },
                { :name => "ted" }
              ],
              :batch_purchases => [
                { :price => 30 },
                { :price => 40 }
              ]).callback { |response|
              begin
                response.should == api_success
              ensure
                EM.stop
              end
            }.errback { |error|
              EM.stop
              fail error
            }
          }
        end
      end
    end

  describe "queries" do
    let(:read_key) { ENV['KEEN_READ_KEY'] }
    let(:event_collection) { @event_collection }
    let(:returns_event_collection) { @returns_event_collection }

    before(:all) do
      @event_collection = "purchases_" + rand(100000).to_s
      @returns_event_collection = "returns_" + rand(100000).to_s

      Keen.publish(@event_collection, {
        :username => "bob",
        :price => 10
      })
      Keen.publish(@event_collection, {
        :username => "ted",
        :price => 20
      })
      Keen.publish(@returns_event_collection, {
        :username => "bob",
        :price => 30
      })

      # poll the count to know when to continue
      wait_for_count(@event_collection, 2)
      wait_for_count(@returns_event_collection, 1)
    end

    it "should return a valid count_unique" do
      Keen.count_unique(event_collection, :target_property => "price").should == 2
    end

    it "should return a valid count with group_by" do
      response = Keen.average(event_collection, :group_by => "username", :target_property => "price")
      bobs_response = response.select { |result| result["username"] == "bob" }.first
      bobs_response["result"].should == 10
      teds_response = response.select { |result| result["username"] == "ted" }.first
      teds_response["result"].should == 20
    end

    it "should return a valid count with multi-group_by" do
      response = Keen.average(event_collection, :group_by => ["username", "price"], :target_property => "price")
      bobs_response = response.select { |result| result["username"] == "bob" }.first
      bobs_response["result"].should == 10
      bobs_response["price"].should == 10
      teds_response = response.select { |result| result["username"] == "ted" }.first
      teds_response["result"].should == 20
      teds_response["price"].should == 20
    end

    it "should return a valid sum" do
      Keen.sum(event_collection, :target_property => "price").should == 30
    end

    it "should return a valid minimum" do
      Keen.minimum(event_collection, :target_property => "price").should == 10
    end

    it "should return a valid maximum" do
      Keen.maximum(event_collection, :target_property => "price").should == 20
    end

    it "should return a valid average" do
      Keen.average(event_collection, :target_property => "price").should == 15
    end

    it "should return a valid median" do
      Keen.median(event_collection, :target_property => "price").should == 10
    end

    it "should return a valid percentile" do
      Keen.percentile(event_collection, :target_property => "price", :percentile => 50).should == 10
      Keen.percentile(event_collection, :target_property => "price", :percentile => 100).should == 20
    end

    it "should return a valid select_unique" do
      results = Keen.select_unique(event_collection, :target_property => "price")
      results.sort.should == [10, 20].sort
    end

    it "should return a valid extraction" do
      results = Keen.extraction(event_collection)
      results.length.should == 2
      results.all? { |result| result["keen"] }.should be_true
      results.map { |result| result["price"] }.sort.should == [10, 20]
      results.map { |result| result["username"] }.sort.should == ["bob", "ted"]
    end

    it "should return a valid extraction of one property name" do
      results = Keen.extraction(event_collection, :property_names => "price")
      results.length.should == 2
      results.any? { |result| result["keen"] }.should be_false
      results.map { |result| result["price"] }.sort.should == [10, 20]
      results.map { |result| result["username"] }.sort.should == [nil, nil]
    end

    it "should return a valid extraction of more than one property name" do
      results = Keen.extraction(event_collection, :property_names => ["price", "username"])
      results.length.should == 2
      results.any? { |result| result["keen"] }.should be_false
      results.map { |result| result["price"] }.sort.should == [10, 20]
      results.map { |result| result["username"] }.sort.should == ["bob", "ted"]
    end

    it "should return a valid funnel" do
      steps = [{
        :event_collection => event_collection,
        :actor_property => "username"
      }, {
        :event_collection => @returns_event_collection,
        :actor_property => "username"
      }]
      results = Keen.funnel(:steps => steps)
      results.should == [2, 1]
    end

    it "should return all keys of valid funnel if full result option is passed" do
      steps = [{
        :event_collection => event_collection,
        :actor_property => "username"
      }, {
        :event_collection => @returns_event_collection,
        :actor_property => "username"
      }]
      results = Keen.funnel({ :steps => steps }, { :response => :all_keys })
      results["result"].should == [2, 1]
    end

    it "should apply filters" do
      Keen.count(event_collection, :filters => [{
        :property_name => "username",
        :operator => "eq",
        :property_value => "ted"
      }]).should == 1
    end
  end

  describe "deletes" do
    let(:event_collection) { "delete_test_#{rand(10000)}" }

    before do
      Keen.publish(event_collection, :delete => "me")
      Keen.publish(event_collection, :delete => "you")
      wait_for_count(event_collection, 2)
    end

    it "should delete the event" do
      Keen.delete(event_collection, :filters => [
        { :property_name => "delete", :operator => "eq", :property_value => "me" }
      ])
      wait_for_count(event_collection, 1)
      results = Keen.extraction(event_collection)
      results.length.should == 1
      results.first["delete"].should == "you"
    end
  end

   describe "project methods" do
     let(:event_collection) { "test_collection" }

     describe "event_collections" do
       # requires a project with at least 1 collection
       it "should return the project's collections as JSON" do
         first_collection = Keen.event_collections.first
         first_collection["properties"]["keen.timestamp"].should == "datetime"
       end
     end

     describe "event_collection" do
       # requires a project with at least 1 collection
       it "should return the project's named collection as JSON" do
         first_collection = Keen.event_collection(:event_collection)
         first_collection["properties"]["keen.timestamp"].should == "datetime"
       end
     end

     describe "project_info" do
       it "should return the project info as JSON" do
         Keen.project_info["url"].should =~ Regexp.new(project_id)

       end
     end
   end
end


text:
package dao

import (
	"bytes"
	"context"
	"fmt"
	"time"

	"github.com/pkg/errors"
	"github.com/tsuna/gohbase/hrpc"
)

var (
	// _hbaseTable filter table.
	_hbaseTable = "ugc:filtercontent"
	// _hbaseFamilyCt content family.
	_hbaseFamilyCt = []byte("ct")
	// _hbaseColumnCt content column.
	_hbaseColumnCt = []byte("ct")
)

func rowKeyContent(id int64, typ string) string {
	return fmt.Sprintf("%d_%s", id, typ)
}

// SetContent set the content with id and type.
func (d *Dao) SetContent(c context.Context, id int64, typ, content string) (err error) {
	var (
		key         = rowKeyContent(id, typ)
		ctx, cancel = context.WithTimeout(c, time.Duration(d.conf.HBase.WriteTimeout))
	)
	defer cancel()
	valueBytes := []byte(content)
	values := map[string]map[string][]byte{string(_hbaseFamilyCt): {string(_hbaseColumnCt): valueBytes}}
	if _, err = d.hbase.PutStr(ctx, _hbaseTable, key, values); err != nil {
		err = errors.Wrapf(err, "hbase.PutStr(%s,%s)", _hbaseTable, key)
	}
	return
}

// Content return the content by id and type.
func (d *Dao) Content(c context.Context, id int64, typ string) (content string, err error) {
	var (
		result      *hrpc.Result
		key         = rowKeyContent(id, typ)
		ctx, cancel = context.WithTimeout(c, time.Duration(d.conf.HBase.ReadTimeout))
	)
	defer cancel()
	if result, err = d.hbase.GetStr(ctx, _hbaseTable, key); err != nil {
		err = errors.Wrapf(err, "hbase.GetStr(%s,%s)", _hbaseTable, key)
		return
	}
	for _, c := range result.Cells {
		if c != nil && bytes.Equal(c.Family, _hbaseFamilyCt) && bytes.Equal(c.Qualifier, _hbaseColumnCt) {
			content = string(c.Value)
			break
		}
	}
	return
}


text:
<?php
class SlackNotifications
{
	/**
	 * Gets nice HTML text for user containing the link to user page
	 * and also links to user site, groups editing, talk and contribs pages.
	 */
	static function getSlackUserText($user)
	{
		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgSlackNotificationWikiUrlEndingUserPage,
			$wgSlackNotificationWikiUrlEndingBlockUser, $wgSlackNotificationWikiUrlEndingUserRights,
			$wgSlackNotificationWikiUrlEndingUserTalkPage, $wgSlackNotificationWikiUrlEndingUserContributions,
			$wgSlackIncludeUserUrls;

		if ($wgSlackIncludeUserUrls)
		{
			return sprintf(
				"%s (%s | %s | %s | %s)",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingUserPage.$user."|$user>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingBlockUser.$user."|block>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingUserRights.$user."|groups>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingUserTalkPage.$user."|talk>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingUserContributions.$user."|contribs>");
		}
		else
		{
			return "<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingUserPage.$user."|$user>";
		}
	}

	/**
	 * Gets nice HTML text for article containing the link to article page
	 * and also into edit, delete and article history pages.
	 */
	static function getSlackArticleText(WikiPage $article, $diff = false)
	{
		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgSlackNotificationWikiUrlEndingEditArticle,
			$wgSlackNotificationWikiUrlEndingDeleteArticle, $wgSlackNotificationWikiUrlEndingHistory,
			$wgSlackNotificationWikiUrlEndingDiff, $wgSlackIncludePageUrls;

		$prefix = "<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.str_replace(" ", "_", $article->getTitle()->getFullText());
		if ($wgSlackIncludePageUrls)
		{
			$out = sprintf(
				"%s (%s | %s | %s",
				$prefix."|".$article->getTitle()->getFullText().">",
				$prefix."&".$wgSlackNotificationWikiUrlEndingEditArticle."|edit>",
				$prefix."&".$wgSlackNotificationWikiUrlEndingDeleteArticle."|delete>",
				$prefix."&".$wgSlackNotificationWikiUrlEndingHistory."|history>"/*,
					"move",
					"protect",
					"watch"*/);
			if ($diff)
			{
				$out .= " | ".$prefix."&".$wgSlackNotificationWikiUrlEndingDiff.$article->getRevision()->getID()."|diff>)";
			}
			else
			{
				$out .= ")";
			}
			return $out."\\n";
		}
		else
		{
			return $prefix."|".$article->getTitle()->getFullText().">";
		}
	}

	/**
	 * Gets nice HTML text for title object containing the link to article page
	 * and also into edit, delete and article history pages.
	 */
	static function getSlackTitleText(Title $title)
	{
		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgSlackNotificationWikiUrlEndingEditArticle,
			$wgSlackNotificationWikiUrlEndingDeleteArticle, $wgSlackNotificationWikiUrlEndingHistory,
			$wgSlackIncludePageUrls;

		$titleName = $title->getFullText();
		if ($wgSlackIncludePageUrls)
		{
			return sprintf(
				"%s (%s | %s | %s)",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$titleName."|".$titleName.">",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$titleName."&".$wgSlackNotificationWikiUrlEndingEditArticle."|edit>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$titleName."&".$wgSlackNotificationWikiUrlEndingDeleteArticle."|delete>",
				"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$titleName."&".$wgSlackNotificationWikiUrlEndingHistory."|history>"/*,
						"move",
						"protect",
						"watch"*/);
		}
		else
		{
			return "<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$titleName."|".$titleName.">";
		}
	}

	/**
	 * Occurs after the save page request has been processed.
	 * @see https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
	 */
	static function slack_article_saved(WikiPage $article, $user, $content, $summary, $isMinor, $isWatch, $section, $flags, $revision, $status, $baseRevId)
	{
		global $wgSlackNotificationEditedArticle;
		global $wgSlackIgnoreMinorEdits, $wgSlackIncludeDiffSize;
		if (!$wgSlackNotificationEditedArticle) return;

		// Discard notifications from excluded pages
		global $wgSlackExcludeNotificationsFrom;
		if (count($wgSlackExcludeNotificationsFrom) > 0) {
			foreach ($wgSlackExcludeNotificationsFrom as &$currentExclude) {
				if (0 === strpos($article->getTitle(), $currentExclude)) return;
			}
		}

		// Discard notifications from non-included pages
		global $wgSlackIncludeNotificationsFrom;
		if (count($wgSlackIncludeNotificationsFrom) > 0) {
			foreach ($wgSlackIncludeNotificationsFrom as &$currentInclude) {
				if (0 !== strpos($article->getTitle(), $currentInclude)) return;
			}
		}

		// Skip new articles that have view count below 1. Adding new articles is already handled in article_added function and
		// calling it also here would trigger two notifications!
		$isNew = $status->value['new']; // This is 1 if article is new
		if ($isNew == 1) {
			return true;
		}

		// Skip minor edits if user wanted to ignore them
		if ($isMinor && $wgSlackIgnoreMinorEdits) return;

		if ( $article->getRevision()->getPrevious() == NULL )
		{
			return; // Skip edits that are just refreshing the page
		}

		$message = sprintf(
			"%s has %s article %s %s",
			self::getSlackUserText($user),
			$isMinor == true ? "made minor edit to" : "edited",
			self::getSlackArticleText($article, true),
			$summary == "" ? "" : "Summary: $summary");
		if ($wgSlackIncludeDiffSize)
		{
			$message .= sprintf(
				" (%+d bytes)",
				$article->getRevision()->getSize() - $article->getRevision()->getPrevious()->getSize());
		}
		self::push_slack_notify($message, "yellow", $user);
		return true;
	}

	/**
	 * Occurs after a new article has been created.
	 * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleInsertComplete
	 */
	static function slack_article_inserted(WikiPage $article, $user, $text, $summary, $isminor, $iswatch, $section, $flags, $revision)
	{
		global $wgSlackNotificationAddedArticle, $wgSlackIncludeDiffSize;
		if (!$wgSlackNotificationAddedArticle) return;

		// Discard notifications from excluded pages
		global $wgSlackExcludeNotificationsFrom;
		if (count($wgSlackExcludeNotificationsFrom) > 0) {
			foreach ($wgSlackExcludeNotificationsFrom as &$currentExclude) {
				if (0 === strpos($article->getTitle(), $currentExclude)) return;
			}
		}

		// Discard notifications from non-included pages
		global $wgSlackIncludeNotificationsFrom;
		if (count($wgSlackIncludeNotificationsFrom) > 0) {
			foreach ($wgSlackIncludeNotificationsFrom as &$currentInclude) {
				if (0 !== strpos($article->getTitle(), $currentInclude)) return;
			}
		}

		// Do not announce newly added file uploads as articles...
		if ($article->getTitle()->getNsText() == "File") return true;

		$message = sprintf(
			"%s has created article %s %s",
			self::getSlackUserText($user),
			self::getSlackArticleText($article),
			$summary == "" ? "" : "Summary: $summary");
		if ($wgSlackIncludeDiffSize)
		{
			$message .= sprintf(
				" (%d bytes)",
				$article->getRevision()->getSize());
		}
		self::push_slack_notify($message, "green", $user);
		return true;
	}

	/**
	 * Occurs after the delete article request has been processed.
	 * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete
	 */
	static function slack_article_deleted(WikiPage $article, $user, $reason, $id)
	{
		global $wgSlackNotificationRemovedArticle;
		if (!$wgSlackNotificationRemovedArticle) return;

		// Discard notifications from excluded pages
		global $wgSlackExcludeNotificationsFrom;
		if (count($wgSlackExcludeNotificationsFrom) > 0) {
			foreach ($wgSlackExcludeNotificationsFrom as &$currentExclude) {
				if (0 === strpos($article->getTitle(), $currentExclude)) return;
			}
		}
		// Discard notifications from non-included pages
		global $wgSlackIncludeNotificationsFrom;
		if (count($wgSlackIncludeNotificationsFrom) > 0) {
			foreach ($wgSlackIncludeNotificationsFrom as &$currentInclude) {
				if (0 !== strpos($article->getTitle(), $currentInclude)) return;
			}
		}

		$message = sprintf(
			"%s has deleted article %s Reason: %s",
			self::getSlackUserText($user),
			self::getSlackArticleText($article),
			$reason);
		self::push_slack_notify($message, "red", $user);
		return true;
	}

	/**
	 * Occurs after a page has been moved.
	 * @see https://www.mediawiki.org/wiki/Manual:Hooks/TitleMoveComplete
	 */
	static function slack_article_moved($title, $newtitle, $user, $oldid, $newid, $reason = null)
	{
		global $wgSlackNotificationMovedArticle;
		if (!$wgSlackNotificationMovedArticle) return;

		// Discard notifications from excluded pages
		global $wgSlackExcludeNotificationsFrom;
		if (count($wgSlackExcludeNotificationsFrom) > 0) {
			foreach ($wgSlackExcludeNotificationsFrom as &$currentExclude) {
				if (0 === strpos($title, $currentExclude)) return;
				if (0 === strpos($newtitle, $currentExclude)) return;
			}
		}
		// Discard notifications from non-included pages
		global $wgSlackIncludeNotificationsFrom;
		if (count($wgSlackIncludeNotificationsFrom) > 0) {
			foreach ($wgSlackIncludeNotificationsFrom as &$currentInclude) {
				if (0 !== strpos($title, $currentInclude)) return;
				if (0 !== strpos($newtitle, $currentInclude)) return;
			}
		}

		$message = sprintf(
			"%s has moved article %s to %s. Reason: %s",
			self::getSlackUserText($user),
			self::getSlackTitleText($title),
			self::getSlackTitleText($newtitle),
			$reason);
		self::push_slack_notify($message, "green", $user);
		return true;
	}

	/**
	 * Occurs after the protect article request has been processed.
	 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ArticleProtectComplete
	 */
	static function slack_article_protected($article, $user, $protect, $reason, $moveonly = false)
	{
		global $wgSlackNotificationProtectedArticle;
		if (!$wgSlackNotificationProtectedArticle) return;
		$message = sprintf(
			"%s has %s article %s. Reason: %s",
			self::getSlackUserText($user),
			$protect ? "changed protection of" : "removed protection of",
			self::getSlackArticleText($article),
			$reason);
		self::push_slack_notify($message, "yellow", $user);
		return true;
	}

	/**
	 * Called after a user account is created.
	 * @see http://www.mediawiki.org/wiki/Manual:Hooks/AddNewAccount
	 */
	static function slack_new_user_account($user, $byEmail)
	{
		global $wgSlackNotificationNewUser, $wgSlackShowNewUserEmail, $wgSlackShowNewUserFullName, $wgSlackShowNewUserIP;
		if (!$wgSlackNotificationNewUser) return;

		$email = "";
		$realname = "";
		$ipaddress = "";
		try { $email = $user->getEmail(); } catch (Exception $e) {}
		try { $realname = $user->getRealName(); } catch (Exception $e) {}
		try { $ipaddress = $user->getRequest()->getIP(); } catch (Exception $e) {}
		$messageExtra = "";
		if ($wgSlackShowNewUserEmail || $wgSlackShowNewUserFullName || $wgSlackShowNewUserIP) {
			$messageExtra = "(";
			if ($wgSlackShowNewUserEmail) $messageExtra .= $email . ", ";
			if ($wgSlackShowNewUserFullName) $messageExtra .= $realname . ", ";
			if ($wgSlackShowNewUserIP) $messageExtra .= $ipaddress . ", ";
			$messageExtra = substr($messageExtra, 0, -2); // Remove trailing ,
			$messageExtra .= ")";
		}

		$message = sprintf(
			"New user account %s was just created %s",
			self::getSlackUserText($user),
			$messageExtra);
		self::push_slack_notify($message, "green", $user);
		return true;
	}

	/**
	 * Called when a file upload has completed.
	 * @see http://www.mediawiki.org/wiki/Manual:Hooks/UploadComplete
	 */
	static function slack_file_uploaded($image)
	{
		global $wgSlackNotificationFileUpload;
		if (!$wgSlackNotificationFileUpload) return;

		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgUser;
		$message = sprintf(
			"%s has uploaded file <%s|%s> (format: %s, size: %s MB, summary: %s)",
			self::getSlackUserText($wgUser->mName),
			$wgSlackNotificationWikiUrl . $wgSlackNotificationWikiUrlEnding . $image->getLocalFile()->getTitle(),
			$image->getLocalFile()->getTitle(),
			$image->getLocalFile()->getMimeType(),
			round($image->getLocalFile()->size / 1024 / 1024, 3),
			$image->getLocalFile()->getDescription());

		self::push_slack_notify($message, "green", $wgUser);
		return true;
	}

	/**
	 * Occurs after the request to block an IP or user has been processed
	 * @see http://www.mediawiki.org/wiki/Manual:MediaWiki_hooks/BlockIpComplete
	 */
	static function slack_user_blocked(Block $block, $user)
	{
		global $wgSlackNotificationBlockedUser;
		if (!$wgSlackNotificationBlockedUser) return;

		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgSlackNotificationWikiUrlEndingBlockList;
 		if (defined('MW_VERSION') && version_compare(MW_VERSION, '1.35', '>=')) {  //DatabaseBlock::$mReason was made protected in MW 1.35
 			$mReason = $block->getReasonComment()->text;
 		} else {
 			$mReason = $block->mReason;
 		}
		$message = sprintf(
			"%s has blocked %s %s Block expiration: %s. %s",
			self::getSlackUserText($user),
			self::getSlackUserText($block->getTarget()),
			$mReason == "" ? "" : "with reason '".$mReason."'.",
			$block->mExpiry,
			"<".$wgSlackNotificationWikiUrl.$wgSlackNotificationWikiUrlEnding.$wgSlackNotificationWikiUrlEndingBlockList."|List of all blocks>.");
		self::push_slack_notify($message, "red", $user);
		return true;
	}

	/**
	 * Occurs after the user groups (rights) have been changed
	 * @see https://www.mediawiki.org/wiki/Manual:Hooks/UserGroupsChanged
	 */
	static function slack_user_groups_changed(User $user, array $added, array $removed, $performer, $reason, $oldUGMs, $newUGMs)
	{
		global $wgSlackNotificationUserGroupsChanged;
		if (!$wgSlackNotificationUserGroupsChanged) return;

		global $wgSlackNotificationWikiUrl, $wgSlackNotificationWikiUrlEnding, $wgSlackNotificationWikiUrlEndingUserRights;
		$message = sprintf(
            "%s has changed user groups for %s. New groups: %s",
			self::getSlackUserText($performer),
			self::getSlackUserText($user),
			implode(", ", $user->getGroups()));
		self::push_slack_notify($message, "green", $user);
		return true;
	}

	/**
	 * Sends the message into Slack room.
	 * @param message Message to be sent.
	 * @param color Background color for the message. One of "green", "yellow" or "red". (default: yellow)
	 * @see https://api.slack.com/incoming-webhooks
	 */
	static function push_slack_notify($message, $bgColor, $user)
	{
		global $wgSlackIncomingWebhookUrl, $wgSlackFromName, $wgSlackRoomName, $wgSlackSendMethod, $wgSlackExcludedPermission, $wgSitename, $wgSlackEmoji, $wgHTTPProxy;

		if ( $wgSlackExcludedPermission != "" ) {
			if ( $user->isAllowed( $wgSlackExcludedPermission ) )
			{
				return; // Users with the permission suppress notifications
			}
		}

		$slackColor = "warning";
		if ($bgColor == "green") $slackColor = "good";
		else if ($bgColor == "red") $slackColor = "danger";

		$optionalChannel = "";
		if (!empty($wgSlackRoomName)) {
			$optionalChannel = ' "channel": "'.$wgSlackRoomName.'", ';
		}

		// Convert " to ' in the message to be sent as otherwise JSON formatting would break.
		$message = str_replace('"', "'", $message);
		//Ensure a random \ is not read as the beginning of an escape character. Windows users may be authenticated with a username containing domain\user, so to ensure \ is encoded as \\...
		$message = str_replace('\\', "\\\\", $message);

		$slackFromName = $wgSlackFromName;
		if ( $slackFromName == "" )
		{
			$slackFromName = $wgSitename;
		}

		$post = sprintf('payload={"username": "%s",'.$optionalChannel.' "attachments": [ { "text": "%s", "color": "%s" } ]',
		urlencode($slackFromName),
		urlencode($message),
		urlencode($slackColor));
		if ( $wgSlackEmoji != "" )
		{
			$post .= sprintf( ', "icon_emoji": "%s"', $wgSlackEmoji );
		}
		$post .= '}';

		// Use file_get_contents to send the data. Note that you will need to have allow_url_fopen enabled in php.ini for this to work.
		if ($wgSlackSendMethod == "file_get_contents") {
			$extradata = array(
				'http' => array(
				'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
				'method'  => 'POST',
				'content' => $post,
				),
			);
			$context = stream_context_create($extradata);
			$result = file_get_contents($wgSlackIncomingWebhookUrl, false, $context);
		}
		// Call the Slack API through cURL (default way). Note that you will need to have cURL enabled for this to work.
		else {
			$h = curl_init();
			curl_setopt($h, CURLOPT_URL, $wgSlackIncomingWebhookUrl);
			curl_setopt($h, CURLOPT_POST, 1);
			curl_setopt($h, CURLOPT_POSTFIELDS, $post);
			curl_setopt($h, CURLOPT_RETURNTRANSFER, true);
			// Commented out lines below. Using default curl settings for host and peer verification.
			//curl_setopt ($h, CURLOPT_SSL_VERIFYHOST, 0);
			//curl_setopt ($h, CURLOPT_SSL_VERIFYPEER, 0);
			// Set proxy for the request if user had proxy URL set
			if ($wgHTTPProxy) {
				curl_setopt($h, CURLOPT_PROXY, $wgHTTPProxy);
			}
			// ... Aaand execute the curl script!
			$ok = curl_exec($h);
			curl_close($h);
		}
	}
}
?>


text:
package cn.howardliu.gear.commons;

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

/**
 * <br>created at 16-4-27
 *
 * @author liuxh
 * @since 1.0.0
 */
public class Page<T> {
    private long total;
    private long pageCount;
    private long pageSize;
    private long pageNum;
    private List<T> content = new ArrayList<>();

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getPageCount() {
        return pageCount;
    }

    public void setPageCount(long pageCount) {
        this.pageCount = pageCount;
    }

    public long getPageSize() {
        return pageSize;
    }

    public void setPageSize(long pageSize) {
        this.pageSize = pageSize;
    }

    public long getPageNum() {
        return pageNum;
    }

    public void setPageNum(long pageNum) {
        this.pageNum = pageNum;
    }

    public List<T> getContent() {
        return content;
    }

    public void setContent(List<T> content) {
        this.content = content;
    }
}


text:
package com.trible.scontact.controller.impl;

import java.util.List;

import com.trible.scontact.controller.ISearchControl;
import com.trible.scontact.pojo.GroupInfo;

public class SearchRemoteGroupControl implements ISearchControl<GroupInfo> {

	@Override
	public List<GroupInfo> searchByName(String qStr) {
		return null;
	}

}


text:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.7.6.1">
  <compounddef id="linear__to__linear_8hpp" kind="file">
    <compoundname>linear_to_linear.hpp</compoundname>
    <includes refid="point__type_8hpp" local="no">boost/geometry/core/point_type.hpp</includes>
    <includes refid="strategies_2distance_8hpp" local="no">boost/geometry/strategies/distance.hpp</includes>
    <includes refid="point__iterator_8hpp" local="no">boost/geometry/iterators/point_iterator.hpp</includes>
    <includes refid="segment__iterator_8hpp" local="no">boost/geometry/iterators/segment_iterator.hpp</includes>
    <includes refid="num__points_8hpp" local="no">boost/geometry/algorithms/num_points.hpp</includes>
    <includes refid="num__segments_8hpp" local="no">boost/geometry/algorithms/num_segments.hpp</includes>
    <includes local="no">boost/geometry/algorithms/dispatch/distance.hpp</includes>
    <includes refid="range__to__geometry__rtree_8hpp" local="no">boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp</includes>
    <includedby refid="distance_2implementation_8hpp" local="no">/home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/implementation.hpp</includedby>
    <includedby refid="linear__or__areal__to__areal_8hpp" local="no">/home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp</includedby>
    <incdepgraph>
      <node id="16185">
        boost/geometry/iterators/detail/segment_iterator/iterator_type.hpp
      </node>
      <node id="16246">
        boost/geometry/algorithms/detail/distance/iterator_selector.hpp
        <link refid="iterator__selector_8hpp"/>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16173" relation="include">
        </childnode>
        <childnode refid="16183" relation="include">
        </childnode>
      </node>
      <node id="16180">
        boost/geometry/core/interior_type.hpp
        <link refid="interior__type_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16160" relation="include">
        </childnode>
        <childnode refid="16161" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16162" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
      </node>
      <node id="16158">
        boost/type_traits/remove_const.hpp
      </node>
      <node id="16221">
        boost/geometry/geometries/concepts/box_concept.hpp
        <link refid="box__concept_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16193" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
      </node>
      <node id="16228">
        boost/geometry/geometries/concepts/linestring_concept.hpp
        <link refid="linestring__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16217" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
      </node>
      <node id="16209">
        boost/range/empty.hpp
      </node>
      <node id="16202">
        iterator
      </node>
      <node id="16231">
        boost/range/metafunctions.hpp
      </node>
      <node id="16187">
        boost/geometry/algorithms/num_points.hpp
        <link refid="num__points_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16188" relation="include">
        </childnode>
        <childnode refid="16176" relation="include">
        </childnode>
        <childnode refid="16189" relation="include">
        </childnode>
        <childnode refid="16190" relation="include">
        </childnode>
        <childnode refid="16191" relation="include">
        </childnode>
        <childnode refid="16192" relation="include">
        </childnode>
        <childnode refid="16193" relation="include">
        </childnode>
        <childnode refid="16195" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16197" relation="include">
        </childnode>
        <childnode refid="16199" relation="include">
        </childnode>
        <childnode refid="16219" relation="include">
        </childnode>
      </node>
      <node id="16208">
        boost/range/end.hpp
      </node>
      <node id="16242">
        boost/geometry/iterators/has_one_element.hpp
        <link refid="has__one__element_8hpp"/>
      </node>
      <node id="16203">
        boost/concept_check.hpp
      </node>
      <node id="16211">
        boost/range/iterator.hpp
      </node>
      <node id="16238">
        boost/mpl/times.hpp
      </node>
      <node id="16161">
        boost/type_traits/is_const.hpp
      </node>
      <node id="16192">
        boost/geometry/core/closure.hpp
        <link refid="closure_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16188" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16159" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16222">
        boost/geometry/core/access.hpp
        <link refid="access_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16223" relation="include">
        </childnode>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16224" relation="include">
        </childnode>
        <childnode refid="16166" relation="include">
        </childnode>
        <childnode refid="16225" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16215">
        boost/geometry/core/assert.hpp
        <link refid="assert_8hpp"/>
        <childnode refid="16216" relation="include">
        </childnode>
      </node>
      <node id="16154">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp
        <link refid="linear_to_linear.hpp"/>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16167" relation="include">
        </childnode>
        <childnode refid="16173" relation="include">
        </childnode>
        <childnode refid="16183" relation="include">
        </childnode>
        <childnode refid="16187" relation="include">
        </childnode>
        <childnode refid="16237" relation="include">
        </childnode>
        <childnode refid="16239" relation="include">
        </childnode>
        <childnode refid="16240" relation="include">
        </childnode>
      </node>
      <node id="16191">
        boost/variant/variant_fwd.hpp
      </node>
      <node id="16207">
        boost/range/begin.hpp
      </node>
      <node id="16160">
        boost/mpl/if.hpp
      </node>
      <node id="16210">
        boost/range/difference_type.hpp
      </node>
      <node id="16194">
        boost/static_assert.hpp
      </node>
      <node id="16200">
        boost/geometry/util/range.hpp
        <link refid="util_2range_8hpp"/>
        <childnode refid="16201" relation="include">
        </childnode>
        <childnode refid="16202" relation="include">
        </childnode>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16204" relation="include">
        </childnode>
        <childnode refid="16205" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16207" relation="include">
        </childnode>
        <childnode refid="16208" relation="include">
        </childnode>
        <childnode refid="16209" relation="include">
        </childnode>
        <childnode refid="16210" relation="include">
        </childnode>
        <childnode refid="16211" relation="include">
        </childnode>
        <childnode refid="16212" relation="include">
        </childnode>
        <childnode refid="16213" relation="include">
        </childnode>
        <childnode refid="16214" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16175" relation="include">
        </childnode>
        <childnode refid="16215" relation="include">
        </childnode>
        <childnode refid="16217" relation="include">
        </childnode>
      </node>
      <node id="16224">
        boost/type_traits/is_pointer.hpp
      </node>
      <node id="16184">
        boost/geometry/iterators/detail/point_iterator/inner_range_type.hpp
      </node>
      <node id="16174">
        boost/iterator/iterator_adaptor.hpp
      </node>
      <node id="16225">
        boost/geometry/core/coordinate_type.hpp
        <link refid="coordinate__type_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
        <childnode refid="16226" relation="include">
        </childnode>
      </node>
      <node id="16156">
        boost/mpl/assert.hpp
      </node>
      <node id="16199">
        boost/geometry/algorithms/detail/counting.hpp
        <link refid="counting_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16176" relation="include">
        </childnode>
        <childnode refid="16177" relation="include">
        </childnode>
        <childnode refid="16179" relation="include">
        </childnode>
        <childnode refid="16200" relation="include">
        </childnode>
        <childnode refid="16218" relation="include">
        </childnode>
      </node>
      <node id="16230">
        boost/geometry/geometries/concepts/multi_point_concept.hpp
        <link refid="multi__point__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16231" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
      </node>
      <node id="16182">
        boost/geometry/iterators/detail/point_iterator/iterator_type.hpp
      </node>
      <node id="16162">
        boost/type_traits/remove_reference.hpp
      </node>
      <node id="16171">
        boost/geometry/core/coordinate_system.hpp
        <link refid="coordinate__system_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16223">
        boost/core/ignore_unused.hpp
      </node>
      <node id="16226">
        boost/geometry/util/promote_floating_point.hpp
        <link refid="promote__floating__point_8hpp"/>
        <childnode refid="16160" relation="include">
        </childnode>
        <childnode refid="16227" relation="include">
        </childnode>
      </node>
      <node id="16164">
        boost/geometry/core/tags.hpp
        <link refid="core_2tags_8hpp"/>
      </node>
      <node id="16170">
        boost/type_traits/integral_constant.hpp
      </node>
      <node id="16188">
        boost/mpl/size_t.hpp
      </node>
      <node id="16216">
        boost/assert.hpp
      </node>
      <node id="16206">
        boost/range/concepts.hpp
      </node>
      <node id="16213">
        boost/range/reference.hpp
      </node>
      <node id="16178">
        boost/geometry/util/add_const_if_c.hpp
        <link refid="add__const__if__c_8hpp"/>
        <childnode refid="16160" relation="include">
        </childnode>
      </node>
      <node id="16173">
        boost/geometry/iterators/point_iterator.hpp
        <link refid="point__iterator_8hpp"/>
        <childnode refid="16174" relation="include">
        </childnode>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16175" relation="include">
        </childnode>
        <childnode refid="16176" relation="include">
        </childnode>
        <childnode refid="16177" relation="include">
        </childnode>
        <childnode refid="16179" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16181" relation="include">
        </childnode>
        <childnode refid="16182" relation="include">
        </childnode>
      </node>
      <node id="16189">
        boost/variant/apply_visitor.hpp
      </node>
      <node id="16176">
        boost/range.hpp
      </node>
      <node id="16220">
        boost/concept/requires.hpp
      </node>
      <node id="16205">
        boost/core/addressof.hpp
      </node>
      <node id="16218">
        boost/geometry/algorithms/detail/interior_iterator.hpp
        <link refid="interior__iterator_8hpp"/>
        <childnode refid="16211" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16180" relation="include">
        </childnode>
      </node>
      <node id="16232">
        boost/geometry/geometries/concepts/multi_linestring_concept.hpp
        <link refid="multi__linestring__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16231" relation="include">
        </childnode>
        <childnode refid="16228" relation="include">
        </childnode>
      </node>
      <node id="16195">
        boost/geometry/core/tag_cast.hpp
        <link refid="tag__cast_8hpp"/>
        <childnode refid="16160" relation="include">
        </childnode>
        <childnode refid="16196" relation="include">
        </childnode>
      </node>
      <node id="16237">
        boost/geometry/algorithms/num_segments.hpp
        <link refid="num__segments_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16188" relation="include">
        </childnode>
        <childnode refid="16238" relation="include">
        </childnode>
        <childnode refid="16176" relation="include">
        </childnode>
        <childnode refid="16189" relation="include">
        </childnode>
        <childnode refid="16190" relation="include">
        </childnode>
        <childnode refid="16191" relation="include">
        </childnode>
        <childnode refid="16192" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16200" relation="include">
        </childnode>
        <childnode refid="16219" relation="include">
        </childnode>
        <childnode refid="16197" relation="include">
        </childnode>
        <childnode refid="16199" relation="include">
        </childnode>
      </node>
      <node id="16186">
        boost/geometry/iterators/dispatch/segment_iterator.hpp
      </node>
      <node id="16234">
        boost/geometry/geometries/concepts/polygon_concept.hpp
        <link refid="polygon__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16177" relation="include">
        </childnode>
        <childnode refid="16179" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16159" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
        <childnode refid="16235" relation="include">
        </childnode>
      </node>
      <node id="16181">
        boost/geometry/iterators/dispatch/point_iterator.hpp
      </node>
      <node id="16240">
        boost/geometry/algorithms/detail/distance/range_to_geometry_rtree.hpp
        <link refid="range__to__geometry__rtree_8hpp"/>
        <childnode refid="16202" relation="include">
        </childnode>
        <childnode refid="16241" relation="include">
        </childnode>
        <childnode refid="16215" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16242" relation="include">
        </childnode>
        <childnode refid="16167" relation="include">
        </childnode>
        <childnode refid="16239" relation="include">
        </childnode>
        <childnode refid="16243" relation="include">
        </childnode>
        <childnode refid="16244" relation="include">
        </childnode>
        <childnode refid="16246" relation="include">
        </childnode>
      </node>
      <node id="16155">
        boost/geometry/core/point_type.hpp
        <link refid="point__type_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16159" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16175">
        boost/type_traits/is_convertible.hpp
      </node>
      <node id="16241">
        utility
      </node>
      <node id="16183">
        boost/geometry/iterators/segment_iterator.hpp
        <link refid="segment__iterator_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16175" relation="include">
        </childnode>
        <childnode refid="16176" relation="include">
        </childnode>
        <childnode refid="16177" relation="include">
        </childnode>
        <childnode refid="16179" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16184" relation="include">
        </childnode>
        <childnode refid="16185" relation="include">
        </childnode>
        <childnode refid="16186" relation="include">
        </childnode>
      </node>
      <node id="16190">
        boost/variant/static_visitor.hpp
      </node>
      <node id="16233">
        boost/geometry/geometries/concepts/multi_polygon_concept.hpp
        <link refid="multi__polygon__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16231" relation="include">
        </childnode>
        <childnode refid="16234" relation="include">
        </childnode>
      </node>
      <node id="16198">
        boost/mpl/identity.hpp
      </node>
      <node id="16157">
        boost/range/value_type.hpp
      </node>
      <node id="16193">
        boost/geometry/core/coordinate_dimension.hpp
        <link refid="coordinate__dimension_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16194" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16236">
        boost/geometry/geometries/concepts/segment_concept.hpp
        <link refid="segment__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
      </node>
      <node id="16243">
        boost/geometry/algorithms/detail/closest_feature/range_to_range.hpp
      </node>
      <node id="16235">
        boost/geometry/geometries/concepts/ring_concept.hpp
        <link refid="ring__concept_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16206" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16217" relation="include">
        </childnode>
        <childnode refid="16155" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
      </node>
      <node id="16179">
        boost/geometry/core/interior_rings.hpp
        <link refid="interior__rings_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16180" relation="include">
        </childnode>
      </node>
      <node id="16169">
        cstddef
      </node>
      <node id="16159">
        boost/geometry/core/ring_type.hpp
        <link refid="ring__type_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16160" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16161" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16162" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
      </node>
      <node id="16227">
        boost/type_traits/is_integral.hpp
      </node>
      <node id="16177">
        boost/geometry/core/exterior_ring.hpp
        <link refid="exterior__ring_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16161" relation="include">
        </childnode>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16159" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16178" relation="include">
        </childnode>
      </node>
      <node id="16239">
        boost/geometry/algorithms/dispatch/distance.hpp
      </node>
      <node id="16204">
        boost/config.hpp
      </node>
      <node id="16217">
        boost/geometry/core/mutable_range.hpp
        <link refid="mutable__range_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16157" relation="include">
        </childnode>
        <childnode refid="16162" relation="include">
        </childnode>
      </node>
      <node id="16219">
        boost/geometry/geometries/concepts/check.hpp
        <link refid="check_8hpp"/>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16220" relation="include">
        </childnode>
        <childnode refid="16161" relation="include">
        </childnode>
        <childnode refid="16191" relation="include">
        </childnode>
        <childnode refid="16163" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16221" relation="include">
        </childnode>
        <childnode refid="16228" relation="include">
        </childnode>
        <childnode refid="16230" relation="include">
        </childnode>
        <childnode refid="16232" relation="include">
        </childnode>
        <childnode refid="16233" relation="include">
        </childnode>
        <childnode refid="16229" relation="include">
        </childnode>
        <childnode refid="16234" relation="include">
        </childnode>
        <childnode refid="16235" relation="include">
        </childnode>
        <childnode refid="16236" relation="include">
        </childnode>
        <childnode refid="16197" relation="include">
        </childnode>
      </node>
      <node id="16196">
        boost/type_traits/is_base_of.hpp
      </node>
      <node id="16163">
        boost/geometry/core/tag.hpp
        <link refid="tag_8hpp"/>
        <childnode refid="16164" relation="include">
        </childnode>
        <childnode refid="16165" relation="include">
        </childnode>
      </node>
      <node id="16214">
        boost/range/size.hpp
      </node>
      <node id="16168">
        boost/geometry/core/cs.hpp
        <link refid="cs_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16170" relation="include">
        </childnode>
        <childnode refid="16171" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
      </node>
      <node id="16244">
        boost/geometry/algorithms/detail/distance/is_comparable.hpp
        <link refid="is__comparable_8hpp"/>
        <childnode refid="16245" relation="include">
        </childnode>
        <childnode refid="16167" relation="include">
        </childnode>
      </node>
      <node id="16165">
        boost/geometry/util/bare_type.hpp
        <link refid="bare__type_8hpp"/>
        <childnode refid="16158" relation="include">
        </childnode>
        <childnode refid="16166" relation="include">
        </childnode>
        <childnode refid="16162" relation="include">
        </childnode>
      </node>
      <node id="16201">
        algorithm
      </node>
      <node id="16166">
        boost/type_traits/remove_pointer.hpp
      </node>
      <node id="16197">
        boost/geometry/algorithms/not_implemented.hpp
        <link refid="not__implemented_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16198" relation="include">
        </childnode>
        <childnode refid="16164" relation="include">
        </childnode>
      </node>
      <node id="16212">
        boost/range/rbegin.hpp
      </node>
      <node id="16167">
        boost/geometry/strategies/distance.hpp
        <link refid="strategies_2distance_8hpp"/>
        <childnode refid="16156" relation="include">
        </childnode>
        <childnode refid="16168" relation="include">
        </childnode>
        <childnode refid="16172" relation="include">
        </childnode>
      </node>
      <node id="16172">
        boost/geometry/strategies/tags.hpp
        <link refid="strategies_2tags_8hpp"/>
      </node>
      <node id="16229">
        boost/geometry/geometries/concepts/point_concept.hpp
        <link refid="point__concept_8hpp"/>
        <childnode refid="16169" relation="include">
        </childnode>
        <childnode refid="16203" relation="include">
        </childnode>
        <childnode refid="16223" relation="include">
        </childnode>
        <childnode refid="16222" relation="include">
        </childnode>
        <childnode refid="16193" relation="include">
        </childnode>
        <childnode refid="16171" relation="include">
        </childnode>
      </node>
      <node id="16245">
        boost/type_traits/is_same.hpp
      </node>
    </incdepgraph>
    <invincdepgraph>
      <node id="16255">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/buffer/turn_in_piece_visitor.hpp
        <link refid="turn__in__piece__visitor_8hpp"/>
        <childnode refid="16252" relation="include">
        </childnode>
      </node>
      <node id="16248">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/implementation.hpp
        <link refid="distance_2implementation_8hpp"/>
        <childnode refid="16249" relation="include">
        </childnode>
        <childnode refid="16250" relation="include">
        </childnode>
      </node>
      <node id="16247">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp
        <link refid="linear_to_linear.hpp"/>
        <childnode refid="16248" relation="include">
        </childnode>
        <childnode refid="16256" relation="include">
        </childnode>
      </node>
      <node id="16251">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/comparable_distance.hpp
        <link refid="comparable__distance_8hpp"/>
        <childnode refid="16252" relation="include">
        </childnode>
        <childnode refid="16255" relation="include">
        </childnode>
      </node>
      <node id="16256">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/linear_or_areal_to_areal.hpp
        <link refid="linear__or__areal__to__areal_8hpp"/>
        <childnode refid="16248" relation="include">
        </childnode>
      </node>
      <node id="16252">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/buffer/buffered_piece_collection.hpp
        <link refid="buffered__piece__collection_8hpp"/>
        <childnode refid="16253" relation="include">
        </childnode>
      </node>
      <node id="16253">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/buffer/buffer_inserter.hpp
        <link refid="buffer__inserter_8hpp"/>
        <childnode refid="16254" relation="include">
        </childnode>
      </node>
      <node id="16254">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/buffer.hpp
        <link refid="algorithms_2buffer_8hpp"/>
      </node>
      <node id="16249">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/distance.hpp
        <link refid="algorithms_2distance_8hpp"/>
      </node>
      <node id="16250">
        /home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/comparable_distance/implementation.hpp
        <link refid="comparable__distance_2implementation_8hpp"/>
        <childnode refid="16251" relation="include">
        </childnode>
      </node>
    </invincdepgraph>
    <innernamespace refid="namespaceboost">boost</innernamespace>
    <innernamespace refid="namespaceboost_1_1geometry">boost::geometry</innernamespace>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <location file="/home/travis/build/boostorg/boost/boost/geometry/algorithms/detail/distance/linear_to_linear.hpp"/>
  </compounddef>
</doxygen>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Microcera coccophila var. platyspora Sousa da Câmara

### Remarks
null


text:
var acg = acg || {};
acg.ext = acg.ext || {};
//var loc = window.location.href;
//loc = loc.substr(0, loc.lastIndexOf('/'));
//loc = loc.substr(0, loc.lastIndexOf('/'));
//acg.ext.set_res_path(loc + 'acg-res');
acg.ext.set_res_path('acg-res');
acg.ext._233_enable();

var initStage = function () {
    acg.ext.background(0, [255, 255, 0]);
    acg.put(0, acg.img('danmaku-sliding.png', {scale: 2}, ['delay', 20]));
    acg.ext.background_commit();
    acg.commit();
    acg.ext.cp_enable(function (time, type, colour, cmt) {
        acg.ext._233_add(time + 0.5, cmt, acg.colour(colour), type);
        //acg.ext._233_onresume_reg();    // Force refresh
        var lmnt = document.createElement('script');
        lmnt.src = 'http://cg-u4.cn.gp/comment.php?page_id=8888&action=post&time='
            + time.toString() + '&type=' + type.toString()
            + '&colour=%23' + colour.substr(1) + '&text=' + cmt;
        document.body.appendChild(lmnt);
    });
    acg.ext._233_commit();
    cc.director.setDisplayStats(false);
    // Load all comments
    var lmnt = document.createElement('script');
    lmnt.src = 'http://cg-u4.cn.gp/comment.php?page_id=8888&action=retrieve';
    document.head.appendChild(lmnt);
};

acg.bootstrap('game_canvas', 16 / 9, initStage);


text:
using System;

public static partial class Extensions
{
    /// <summary>
    ///     An object extension method that converts the @this to a nullable boolean.
    /// </summary>
    /// <param name="this">The @this to act on.</param>
    /// <returns>@this as a bool?</returns>
    public static bool? ToNullableBoolean(this object @this)
    {
        if (@this == null || @this == DBNull.Value)
        {
            return null;
        }

        return Convert.ToBoolean(@this);
    }
}


text:
Todo List

A simple todo list.

Articles

It finds articles based on a keyword given with filter capability.

Poem

A poem written in two different languages. It shows how i18n could be accomplished.

Speed Test

Speed test against Angular and ReactJS.


text:
#include <QSettings>
#include <QFileInfo>
#include <QFileInfoList>
#include <QDir>
#include <QTreeWidgetItem>
#include <QImageReader>
#include <QLocale>
#include "lthemeengine.h"
#include "cursorthemepage.h"
#include "ui_cursorthemepage.h"

CursorThemePage::CursorThemePage(QWidget *parent) : TabPage(parent), m_ui(new Ui::CursorThemePage){
  m_ui->setupUi(this);
  loadThemes();
  readSettings();
}

CursorThemePage::~CursorThemePage(){
  delete m_ui;
}

void CursorThemePage::writeSettings(){
  QSettings settings(lthemeengine::configFile(), QSettings::IniFormat);
  QTreeWidgetItem *item = m_ui->treeWidget->currentItem();
  if(item){
    settings.setValue("Appearance/cursor_theme", item->data(3, Qt::UserRole));
    lthemeengine::setCursorTheme(item->data(3, Qt::UserRole).toString() );
  }
}

void CursorThemePage::readSettings(){
  QSettings settings(lthemeengine::configFile(), QSettings::IniFormat);
  QString name = settings.value("Appearance/cursor_theme").toString();
  if(name.isEmpty()){ return; }
  for(int i = 0; i < m_ui->treeWidget->topLevelItemCount(); ++i){
    QTreeWidgetItem *item = m_ui->treeWidget->topLevelItem(i);
    if(item->data(3, Qt::UserRole).toString() == name){
      m_ui->treeWidget->setCurrentItem(item);
      break;
      }
    }
}

void CursorThemePage::loadThemes(){
  /*QFileInfoList themeFileList;
  foreach(QString path, lthemeengine::iconPaths()){
    QDir dir(path);
    dir.setFilter(QDir::Dirs | QDir::NoDotDot | QDir::NoDot);
    foreach (QFileInfo info, dir.entryInfoList()){
      QDir themeDir(info.absoluteFilePath());
      themeDir.setFilter(QDir::Files);
      themeFileList << themeDir.entryInfoList(QStringList() << "index.theme");
      }
    }*/
  /*foreach(QFileInfo info, themeFileList){
    loadTheme(info.canonicalFilePath());
    }*/
  QStringList themes = lthemeengine::availableSystemCursors();
  for(int i=0; i<themes.length(); i++){ loadTheme(themes[i]); }
}

void CursorThemePage::loadTheme(const QString &path){
  //QSettings config(path, QSettings::IniFormat);
  //config.setIniCodec("UTF-8");
  //config.beginGroup("Icon Theme");
  //QStringList dirs = config.value("Directories").toStringList();
  //if(dirs.isEmpty() || config.value("Hidden", false).toBool()){ return; }
  QString name, comment;
  name = comment = path.section("/",-1);
  /*QString lang = QLocale::system().name();
  name = config.value(QString("Name[%1]").arg(lang)).toString();
  comment = config.value(QString("Comment[%1]").arg(lang)).toString();
  if(lang.contains("_")){ lang = lang.split("_").first(); }
  if(name.isEmpty()){ name = config.value(QString("Name[%1]").arg(lang)).toString(); }
  if(comment.isEmpty()){ comment = config.value(QString("Comment[%1]").arg(lang)).toString(); }
  if(name.isEmpty()){ name = config.value("Name").toString(); }
  if(comment.isEmpty()){ comment = config.value("Comment").toString(); }
  config.endGroup();*/
  QIcon icon1;// = findIcon(path, 24, "document-save");
  QIcon icon2;//= findIcon(path, 24, "document-print");
  QIcon icon3;// = findIcon(path, 24, "media-playback-stop");
  QTreeWidgetItem *item = new QTreeWidgetItem();
  item->setIcon(0, icon1);
  item->setIcon(1, icon2);
  item->setIcon(2, icon3);
  item->setText(3, name);
  item->setData(3, Qt::UserRole, path.section("/",-1));
  item->setToolTip(3, comment);
  item->setSizeHint(0, QSize(24,24));
  m_ui->treeWidget->addTopLevelItem(item);
  m_ui->treeWidget->resizeColumnToContents(0);
  m_ui->treeWidget->resizeColumnToContents(1);
  m_ui->treeWidget->resizeColumnToContents(2);
  m_ui->treeWidget->resizeColumnToContents(3);
}

QIcon CursorThemePage::findIcon(const QString &themePath, int size, const QString &name){
  QSettings config(themePath, QSettings::IniFormat);
  config.beginGroup("Icon Theme");
  QStringList dirs = config.value("Directories").toStringList();
  QStringList parents = config.value("Inherits").toStringList();
  bool haveInherits = config.contains("Inherits");
  config.endGroup();
  foreach (QString dir, dirs){
    config.beginGroup(dir);
    if(config.value("Size").toInt() == size){
      QDir iconDir = QFileInfo(themePath).path() + "/" + dir;
      iconDir.setFilter(QDir::Files);
      iconDir.setNameFilters(QStringList () << name + ".*");
      if(iconDir.entryInfoList().isEmpty())
        continue;
        return QIcon(iconDir.entryInfoList().first().absoluteFilePath());
      }
      config.endGroup();
    }
  foreach (QString dir, dirs){
  config.beginGroup(dir);
  if(abs(config.value("Size").toInt() - size) < 4){
    QDir iconDir = QFileInfo(themePath).path() + "/" + dir;
    iconDir.setFilter(QDir::Files);
    iconDir.setNameFilters(QStringList () << name + ".*");
    if(iconDir.entryInfoList().isEmpty())
      continue;
      return QIcon(iconDir.entryInfoList().first().absoluteFilePath());
    }
    config.endGroup();
    }
  if (!haveInherits){ return QIcon(); }
  parents.append("hicolor"); //add fallback themes
  parents.append("gnome");
  parents.removeDuplicates();
  foreach (QString parent, parents){
    QString parentThemePath = QDir(QFileInfo(themePath).path() + "/../" + parent).canonicalPath() + "/index.theme";
    if(!QFile::exists(parentThemePath) || parentThemePath == themePath){ continue; }
    QIcon icon = findIcon(parentThemePath, size, name);
    if(!icon.isNull()){ return icon; }
    }
  return QIcon();
}


text:
#include <aws/accessanalyzer/model/ValidatePolicyResult.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/UnreferencedParam.h>

#include <utility>

using namespace Aws::AccessAnalyzer::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
using namespace Aws;

ValidatePolicyResult::ValidatePolicyResult()
{
}

ValidatePolicyResult::ValidatePolicyResult(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  *this = result;
}

ValidatePolicyResult& ValidatePolicyResult::operator =(const Aws::AmazonWebServiceResult<JsonValue>& result)
{
  JsonView jsonValue = result.GetPayload().View();
  if(jsonValue.ValueExists("findings"))
  {
    Aws::Utils::Array<JsonView> findingsJsonList = jsonValue.GetArray("findings");
    for(unsigned findingsIndex = 0; findingsIndex < findingsJsonList.GetLength(); ++findingsIndex)
    {
      m_findings.push_back(findingsJsonList[findingsIndex].AsObject());
    }
  }

  if(jsonValue.ValueExists("nextToken"))
  {
    m_nextToken = jsonValue.GetString("nextToken");

  }

  return *this;
}


text:
{% extends "master/base.html" %}
{% block body_block %}

Register

        {% if registered %}

You are Registered. Continue to Home Page.

        {% else %}

        <form id="user_form" method="post" action="/accounts/register/" enctype="multipart/form-data">

            {% csrf_token %}

            {% for field in user_form.visible_fields %}

            {{ field.errors }}
            {{ field.label }}
            {{ field }}

            {% endfor %}

            <input class="btn btn-primary" type="submit" name="submit" value="Register" />
        </form>
        {% endif %}
{% endblock %}


text:
format pe gui 4.0

include 'win32a.inc'

invoke MessageBoxA,0,message,title,MB_ICONQUESTION+MB_YESNO
invoke ExitProcess,0

message db 'Can you see this message box?',0
title db 'Question',0

data import

library kernel32,'KERNEL32.DLL',user32,'USER32.DLL'

import kernel32,ExitProcess,'ExitProcess'
import user32,MessageBoxA,'MessageBoxA'

end data


text:
<?php
namespace App\Model\Entity;

use Cake\ORM\Entity;

/**
 * User Entity
 *
 * @property string $id
 * @property string $username
 * @property string $email
 * @property string $password
 * @property string $first_name
 * @property string $last_name
 * @property string $token
 * @property \Cake\I18n\Time $token_expires
 * @property string $api_token
 * @property \Cake\I18n\Time $activation_date
 * @property \Cake\I18n\Time $tos_date
 * @property bool $active
 * @property bool $is_superuser
 * @property string $role
 * @property \Cake\I18n\Time $created
 * @property \Cake\I18n\Time $modified
 *
 * @property \CakeDC\Users\Model\Entity\SocialAccount[] $social_accounts
 */
class User extends Entity
{

    /**
     * Fields that can be mass assigned using newEntity() or patchEntity().
     *
     * Note that when '*' is set to true, this allows all unspecified fields to
     * be mass assigned. For security purposes, it is advised to set '*' to false
     * (or remove it), and explicitly make individual fields accessible as needed.
     *
     * @var array
     */
    protected $_accessible = [
        '*' => true,
        'id' => false
    ];

    /**
     * Fields that are excluded from JSON versions of the entity.
     *
     * @var array
     */
    protected $_hidden = [
        'password',
        'token'
    ];
}


text:
import sbt._
import sbt.Keys._

import scala.language.postfixOps
import scala.sys.process._
import E2EConfig._

object Vagrant {

  lazy val vagrantFile              = settingKey[File]("vagrant-file")
  lazy val vagrantContainersLogFile = settingKey[File]("vagrant-containers-log-file")
  lazy val vagrant                  = settingKey[Vagrant]("vagrant")

  lazy val settings = Seq(
    vagrant := new Vagrant(vagrantFile.value),
    testOptions in E2ETest ++= Seq(
      Def.taskDyn {
        if ((definedTests in E2ETest).value.nonEmpty) {
          val vv = vagrant.value
          Def.task { Tests.Setup(() => vv.setup()) }
        } else {
          Def.task { Tests.Setup(() => ()) }
        }
      }.value,
      Def.taskDyn {
        if ((definedTests in E2ETest).value.nonEmpty) {
          val vv           = vagrant.value
          val logFileValue = vagrantContainersLogFile.value
          Def.task {
            Tests.Cleanup(() => {
              vv.collectLogs(logFileValue)
              vv.cleanup()
            })
          }
        } else {
          Def.task { Tests.Cleanup(() => ()) }
        }
      }.value
    )
  )
}

class Vagrant(vagrantFile: File) {

  private var prevStatus: VagrantStatus = Unknown
  private val vagrantDir                = vagrantFile.getParentFile

  def setup(): Unit = {
    prevStatus = status()
    prevStatus match {
      case _ => up()
    }
  }

  def cleanup(): Unit = if (prevStatus != Running) destroy()

  // cli method wrappers
  private def status(): VagrantStatus = {
    val res: String = Process("vagrant" :: "status" :: Nil, vagrantFile.getParentFile) !!

    if (res.contains("running (")) Running
    else if (res.contains("saved (")) Saved
    else if (res.contains("not created (")) NotCreated
    else Unknown
  }

  private def up(): Unit                       = Process("vagrant" :: "up" :: Nil, vagrantDir) !
  private def collectLogs(logFile: File): Unit = Process("vagrant" :: "docker-logs" :: Nil, vagrantDir) #> logFile !
  private def reload(): Unit                   = Process("vagrant" :: "reload" :: Nil, vagrantDir) !
  private def provision(): Unit                = Process("vagrant" :: "provision" :: Nil, vagrantDir) !
  private def suspend(): Unit                  = Process("vagrant" :: "suspend" :: Nil, vagrantDir) !
  private def halt(): Unit                     = Process("vagrant" :: "halt" :: Nil, vagrantDir) !
  private def destroy(): Unit                  = Process("vagrant" :: "destroy" :: "-f" :: Nil, vagrantDir) !

  sealed trait VagrantStatus
  case object Running    extends VagrantStatus
  case object Saved      extends VagrantStatus
  case object NotCreated extends VagrantStatus
  case object Unknown    extends VagrantStatus
}


text:
package com.quangnguyen.rxjavafamily.java.operations;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.quangnguyen.rxjavafamily.R;
import io.reactivex.Observable;
import io.reactivex.ObservableEmitter;
import io.reactivex.ObservableOnSubscribe;
import io.reactivex.Observer;
import io.reactivex.annotations.NonNull;
import io.reactivex.disposables.Disposable;

/**
 * @author Quang Nguyen.
 */

public class CreateFragment extends Fragment {
  private TextView logText;

  public CreateFragment() {
    // Required empty public constructor
  }

  @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
  }

  @Nullable @Override
  public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
      @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_rxjava_create, container, false);
    logText = (TextView) rootView.findViewById(R.id.text_log);
    return rootView;
  }

  @Override public void onResume() {
    super.onResume();
    demoCreate();
  }

  /**
   * Demonstrates "Create" operations.
   * "Create" - create an Observable from scratch by calling observer methods programmatically.
   */
  private void demoCreate() {
    observable.subscribe(observer);
  }

  private Observable<Integer> observable = Observable.create(new ObservableOnSubscribe<Integer>() {
    @Override public void subscribe(@NonNull ObservableEmitter<Integer> emitter) throws Exception {
      emitter.onNext(1);
      emitter.onNext(2);
      emitter.onNext(3);
      emitter.onComplete();
    }
  });

  private Observer<Integer> observer = new Observer<Integer>() {
    @Override public void onSubscribe(Disposable d) {
      logText.append("\n onSubscribe.");
    }

    @Override public void onNext(Integer integer) {
      logText.append("\n onNext: " + integer);
    }

    @Override public void onError(Throwable e) {
      logText.append("\n onError: " + e.getLocalizedMessage());
    }

    @Override public void onComplete() {
      logText.append("\n onComplete.");
    }
  };
}


text:
@interface AppDelegate
    : NSObject <NSApplicationDelegate, DM_SUUpdaterDelegate_DevMateInteraction>

@end


text:
import java.util.*;
import java.util.Collections;

class HelloWorld {
	public static void main (String[] args) {
		 ArrayList<Integer> lista = new ArrayList<>();
		 for (int i = 0; i < 50; i++) {
		 	lista.add(i);
		 }
		 seleciona(lista);
		 for (int i = 0; i < 50; i++) {
		 	System.out.println(lista.get(i));
		 }
	}
	public static void seleciona(ArrayList<Integer> arraylist) {
        Collections.shuffle(arraylist);
    }
}

//http://pt.stackoverflow.com/q/183808/101


text:
define(['app'], function (app) {
  app.controller('helpController', [function HelpControllerFactory() {
    var
      ctrl = this,

      getSolarizedColorSets = function getSolarizedColorSets() {
        var
          i,
          j,
          set,
          sets = [];

        for (i = 0; i < 4; i++) {
          set = [];

          for (j = 0; j < 5; j++) {
            set.push('solarized-' + (i * 5 + j));
          }

          sets.push(set);
        }

        return sets;
      },

      getCustomColorSets = function getCustomColorSets() {
        return [
          ['navy', 'blue', 'aqua', 'teal', 'olive'],
          ['green', 'lime', 'yellow', 'gold', 'orange'],
          ['red', 'maroon', 'fuchsia', 'purple', 'white'],
          ['grey-white', 'grey-light', 'grey', 'grey-dark', 'grey-black']
        ];
      },

      init = function init() {
        ctrl.customColorSets    = getCustomColorSets();
        ctrl.solarizedColorSets = getSolarizedColorSets();
      };

    init();
  }]);
});


text:
let $obj: JQuery = $('meh');

let selection: RangyInputs.Selection = $obj.getSelection();
let start: number = selection.start;
let end: number = selection.end;
let len: number = selection.length;
let text: string = selection.text;
$obj = $obj.setSelection(selection.start)
	.setSelection(selection.start, selection.end)
	.collapseSelection()
	.collapseSelection(true)
	.deleteText(0, 3)
	.deleteText(0, 3, true)
	.deleteSelectedText();
text = $obj.extractSelectedText();
$obj.insertText(selection.text, 4)
	.insertText(text, 4, 'collapseToStart')
	.replaceSelectedText(text)
	.replaceSelectedText(text, 'select')
	.surroundSelectedText('before', 'after')
	.surroundSelectedText('before', 'after', 'collapseToEnd');


text:
.noborder{border:none!important;}
.noshadow{box-shadow: none!important;}
.white-border{border-color: white!important;}
.text-left{text-align: left;}
.violet{color: #842C90!important;}


text:
package net.benchmark.akka.http.world
import akka.http.scaladsl.server.Directives.{complete, path}
import akka.http.scaladsl.server.Route
import de.heikoseeberger.akkahttpcirce.ErrorAccumulatingCirceSupport._

object JsonRoute {

  private val msg = "Hello, World!"

  def route: Route = {
    path("json") {
      complete(Hello(msg))
    }
  }

}


text:
package net.minidev.ovh.api.dedicatedcloud.backup;

/**
 * All the offer type of the backup
 */
public enum OvhOfferTypeEnum {
	advanced("advanced"),
	backup("backup"),
	classic("classic"),
	legacy("legacy");

	final String value;

	OvhOfferTypeEnum(String s) {
		this.value = s;
	}

	public String toString() {
		return this.value;
	}
}