text:
<?php

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

$this->title = Yii::t('user','reset password');
$this->params['breadcrumbs'][] = ['label' => Yii::t('site','login'), 'url' => ['login']];
$this->params['breadcrumbs'][] = $this->title;

?>

<?= Yii::t('user','You can change your password below.') ?>

            <?php $form = ActiveForm::begin(
                [
                    'id' => 'reset-password-form',
                    'fieldConfig' => [
                        'template' => "{label}\n{input}\n{hint}\n{error}",
                    ],
                ]);
            ?>

                <?= $form->field($model, 'password')->passwordInput(['placeholder' => Yii::t('user', 'password')])->label(false) ?>
                <?= $form->field($model, 'passCompare')->passwordInput(['placeholder' => Yii::t('user', 'retype password')])->label(false) ?>

                    <?= Html::submitButton(' ' .Yii::t('general','save'), ['class' => 'btn btn-primary btn-block']) ?>

            <?php ActiveForm::end(); ?>


text:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Buttons_Window : MonoBehaviour {

}

redpajama_set_name: RedPajamaGithub


text:
p {
	width: 385px;
}

label {
	display: block;
	width: 125px;
	float: left;
	text-align: right;
}

.dataFields {
	background-color: #DDDDDD;
	border: thin solid gray;
	width: 385px;
}

#mainContent {
	background-color: #EEEEEE;
	border: thin solid gray;
	width: 385px;
}

#details, #mainContent {
	float: left;
}

#div01, #debugInfo {
	background-color: #BBDDBB;
	border: thin solid gray;
	width: 350px;

}


text:
function flashClose() {
  document.querySelectorAll(".flash .close").forEach(function(e) {
    e.addEventListener("click", function(){
      this.parentElement.classList.remove("active");
    })
  })
}


text:
package com.netflix.spinnaker.front50.model.application;

import com.netflix.spectator.api.Registry;
import com.netflix.spinnaker.front50.exception.NotFoundException;
import com.netflix.spinnaker.front50.model.ObjectKeyLoader;
import com.netflix.spinnaker.front50.model.ObjectType;
import com.netflix.spinnaker.front50.model.StorageService;
import com.netflix.spinnaker.front50.model.StorageServiceSupport;
import java.util.Collection;
import java.util.Map;
import rx.Scheduler;

public class DefaultApplicationDAO extends StorageServiceSupport<Application>
    implements ApplicationDAO {
  public DefaultApplicationDAO(
      StorageService service,
      Scheduler scheduler,
      ObjectKeyLoader objectKeyLoader,
      long refreshIntervalMs,
      boolean shouldWarmCache,
      Registry registry) {
    super(
        ObjectType.APPLICATION,
        service,
        scheduler,
        objectKeyLoader,
        refreshIntervalMs,
        shouldWarmCache,
        registry);
  }

  @Override
  public Application findByName(String name) throws NotFoundException {
    return findById(name);
  }

  @Override
  public Application create(String id, Application application) {
    if (application.getCreateTs() == null) {
      application.setCreateTs(String.valueOf(System.currentTimeMillis()));
    } else {
      application.setUpdateTs(String.valueOf(System.currentTimeMillis()));
    }

    update(id, application);
    return findById(id);
  }

  @Override
  public void update(String id, Application application) {
    application.setName(id);
    super.update(id, application);
  }

  @Override
  public Collection<Application> search(Map<String, String> attributes) {
    return Searcher.search(all(), attributes);
  }
}


text:
/**
 * External dependencies
 */
import { fireEvent, waitFor, screen } from '@testing-library/react';
import { renderWithTheme } from '@googleforcreators/test-utils';

/**
 * Internal dependencies
 */
import StoryContext from '../../../../../app/story/context';
import SlugPanel, { MIN_MAX } from '../slug';

function arrange(storyConfig = {}) {
  const updateStory = jest.fn();

  const storyContextValue = {
    state: {
      story: {
        slug: 'foo',
        link: 'https://example.com',
        permalinkConfig: {
          prefix: 'https://example.com/',
          suffix: '',
        },
        ...storyConfig,
      },
    },
    actions: { updateStory },
  };
  renderWithTheme(
    <StoryContext.Provider value={storyContextValue}>
      <SlugPanel />
    </StoryContext.Provider>
  );
  return {
    updateStory,
  };
}

describe('SlugPanel', () => {
  beforeAll(() => {
    localStorage.setItem(
      'web_stories_ui_panel_settings:permalink',
      JSON.stringify({ isCollapsed: false })
    );
  });

  afterAll(() => {
    localStorage.clear();
  });

  it('should render Slug Panel', () => {
    arrange();
    const element = screen.getByRole('button', { name: 'Permalink' });
    expect(element).toBeInTheDocument();
  });

  it('should display permalink', () => {
    arrange();
    const url = screen.getByRole('link', { name: 'https://example.com/foo' });
    expect(url).toBeInTheDocument();
  });

  it('should not display the input when using non-pretty permalinks', () => {
    arrange({ permalinkConfig: null });
    expect(() => screen.getByRole('textbox', { name: 'URL slug' })).toThrow(
      'Unable to find an accessible element with the role "textbox" and name "URL slug"'
    );
  });

  it('should not allow trailing spaces while typing and onblur', async () => {
    const { updateStory } = arrange();
    const input = screen.getByRole('textbox', { name: 'URL slug' });

    fireEvent.change(input, {
      target: { value: 'name with spaces ' },
    });

    expect(input).toHaveValue('name-with-spaces-');

    fireEvent.blur(input, {
      target: { value: 'different name with spaces ' },
    });

    await waitFor(() =>
      expect(updateStory).toHaveBeenCalledWith({
        properties: {
          slug: 'different-name-with-spaces',
        },
      })
    );
  });

  it('should respect the link limit', async () => {
    const { updateStory } = arrange();
    const input = screen.getByRole('textbox', { name: 'URL slug' });
    expect(input).toBeInTheDocument();

    const bigSlug = ''.padStart(MIN_MAX.PERMALINK.MAX + 10, '1');

    fireEvent.blur(input, {
      target: { value: bigSlug },
    });

    await waitFor(() =>
      expect(updateStory).toHaveBeenCalledWith({
        properties: {
          // It will return only 200 even receiving 201+
          slug: bigSlug.slice(0, MIN_MAX.PERMALINK.MAX),
        },
      })
    );

    fireEvent.blur(input, {
      target: { value: '1234' },
    });

    await waitFor(() =>
      expect(updateStory).toHaveBeenCalledWith({
        properties: {
          slug: '1234',
        },
      })
    );
  });
});


text:
/* microflo_component yaml
name: BoolToInt
description: "Convert boolean input to integer. true->1, false->0"
inports:
  in:
    type: bool
    description: ""
outports:
  out:
    type: integer
    description: ""
microflo_component */
// Functor for PureFunctionComponent1
struct BoolToIntF {
    Packet operator() (Packet in) { return Packet((long)(in.asBool() ? 1 : 0)); }
};

class BoolToInt : public SingleOutputComponent {
public:
    virtual void process(Packet in, MicroFlo::PortId port) {
        if (in.isBool()) {
            send(BoolToIntF()(in));
        }
    }
};


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="it_IT">
<context>
    <name>Peperoni</name>
    <message>
        <location filename="win32/peperoni.cpp" line="129"/>
        <source>This plugin provides DMX output support for Peperoni DMX devices.</source>
        <translation>Questa plugin permette la trasmissione di segnale DMX su interfacce Peperoni.</translation>
    </message>
    <message>
        <location filename="win32/peperoni.cpp" line="143"/>
        <source>The shared library usbdmx.dll could not be found or is too old to be used with QLC.</source>
        <translation>La libreria dinamica usbdmx.dll non è stata trovata o è troppo vecchia per essere usata da QLC+.</translation>
    </message>
    <message>
        <location filename="win32/peperoni.cpp" line="225"/>
        <location filename="unix/peperoni.cpp" line="211"/>
        <source>Do you wish to re-scan your hardware?</source>
        <translation>Vuoi rifare la scansione delle tue interfacce?</translation>
    </message>
    <message>
        <location filename="unix/peperoni.cpp" line="100"/>
        <source>This plugin provides DMX input and output support for Peperoni DMX devices.</source>
        <translation>Questa plugin permette la ricezione e la trasmissione di segnale DMX su interfacce Peperoni Lighting.</translation>
    </message>
</context>
<context>
    <name>PeperoniDevice</name>
    <message>
        <location filename="win32/peperonidevice.cpp" line="70"/>
        <location filename="unix/peperonidevice.cpp" line="158"/>
        <source>Device is working correctly.</source>
        <translation>L'interfaccia funziona correttamente.</translation>
    </message>
    <message>
        <location filename="win32/peperonidevice.cpp" line="72"/>
        <source>Device might not work correctly.</source>
        <translation>Il dispositivo potrebbe non funzionare correttamente.</translation>
    </message>
    <message>
        <location filename="win32/peperonidevice.cpp" line="94"/>
        <source>Nothing</source>
        <translation>Nessuno</translation>
    </message>
    <message>
        <location filename="win32/peperonidevice.cpp" line="111"/>
        <location filename="unix/peperonidevice.cpp" line="135"/>
        <source>Unknown</source>
        <translation>Sconosciuto</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="145"/>
        <source>Universe</source>
        <translation>Universo</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="160"/>
        <source>Firmware version: %1</source>
        <translation>Versione Firmware: %1</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="166"/>
        <source>Unknown device</source>
        <translation>Dispositivo sconosciuto</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="169"/>
        <source>Cannot connect to USB device.</source>
        <translation>Non posso connettere l'interfaccia USB.</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="181"/>
        <source>Input line</source>
        <translation>Linea di ingresso</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="183"/>
        <location filename="unix/peperonidevice.cpp" line="200"/>
        <source>Open</source>
        <translation>Aperta</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="185"/>
        <location filename="unix/peperonidevice.cpp" line="202"/>
        <source>Close</source>
        <translation>Chiusa</translation>
    </message>
    <message>
        <location filename="unix/peperonidevice.cpp" line="198"/>
        <source>Output line</source>
        <translation>Linea di uscita</translation>
    </message>
</context>
</TS>


text:
using Dealership.Common;
using Dealership.Common.Enums;
using Dealership.Contracts;
using System.Collections.Generic;
using System.Text;

namespace Dealership.Models
{
    public abstract class Vehicle : IVehicle, ICommentable
    {
        private const string MakeProperty = "Make";
        private const string ModelProperty = "Model";
        private const string PriceProperty = "Price";
        private const string WheelsProperty = "Wheels";
        private const string CommentsHeader = "    --COMMENTS--";
        private const string NoCommentsHeader = "    --NO COMMENTS--";

        private readonly string make;
        private readonly string model;
        private readonly decimal price;
        private readonly int wheels;

        public Vehicle(string make, string model, decimal price, VehicleType type)
        {
            this.make = make;
            this.model = model;
            this.price = price;
            this.Type = type;
            this.wheels = (int)type;
            this.Comments = new List<IComment>();

            this.ValidateFields();
        }

        public VehicleType Type { get; protected set; }

        public int Wheels
        {
            get
            {
                return this.wheels;
            }
        }

        public string Make
        {
            get
            {
                return this.make;
            }
        }

        public string Model
        {
            get
            {
                return this.model;
            }
        }

        public IList<IComment> Comments { get; private set; }

        public decimal Price
        {
            get
            {
                return this.price;
            }
        }

        public override string ToString()
        {
            var builder = new StringBuilder();

            builder.AppendLine(string.Format("{0}:", this.GetType().Name));
            builder.AppendLine(string.Format("  {0}: {1}", MakeProperty, this.Make));
            builder.AppendLine(string.Format("  {0}: {1}", ModelProperty, this.Model));
            builder.AppendLine(string.Format("  {0}: {1}", WheelsProperty, this.Wheels));
            builder.AppendLine(string.Format("  {0}: ${1}", PriceProperty, this.Price));
            builder.AppendLine(this.PrintAdditionalInfo());
            builder.AppendLine(this.PrintComments());
            return builder.ToString().TrimEnd();
        }

        protected abstract string PrintAdditionalInfo();

        private string PrintComments()
        {
            var builder = new StringBuilder();

            if (this.Comments.Count <= 0)
            {
                builder.AppendLine(string.Format("{0}", NoCommentsHeader));
            }
            else
            {
                builder.AppendLine(string.Format("{0}", CommentsHeader));

                foreach (var comment in this.Comments)
                {
                    builder.AppendLine(comment.ToString());
                }

                builder.AppendLine(string.Format("{0}", CommentsHeader));
            }

            return builder.ToString().TrimEnd();
        }

        private void ValidateFields()
        {
            Validator.ValidateIntRange(this.wheels, Constants.MinWheels, Constants.MaxWheels, string.Format(Constants.NumberMustBeBetweenMinAndMax, WheelsProperty, Constants.MinWheels, Constants.MaxWheels));

            Validator.ValidateNull(this.make, string.Format(Constants.PropertyCannotBeNull, MakeProperty));
            Validator.ValidateIntRange(this.make.Length, Constants.MinMakeLength, Constants.MaxMakeLength, string.Format(Constants.StringMustBeBetweenMinAndMax, MakeProperty, Constants.MinMakeLength, Constants.MaxMakeLength));

            Validator.ValidateNull(this.model, string.Format(Constants.PropertyCannotBeNull, ModelProperty));
            Validator.ValidateIntRange(this.model.Length, Constants.MinModelLength, Constants.MaxModelLength, string.Format(Constants.StringMustBeBetweenMinAndMax, ModelProperty, Constants.MinModelLength, Constants.MaxModelLength));

            Validator.ValidateDecimalRange(this.price, Constants.MinPrice, Constants.MaxPrice, string.Format(Constants.NumberMustBeBetweenMinAndMax, PriceProperty, Constants.MinPrice, Constants.MaxPrice));
        }
    }
}


text:
<%= header %>
<%= boomerangScript %>
<script src="../../vendor/jquery/dist/jquery.min.js"></script>
<script src="../../vendor/ember/ember.debug.js"></script>
<script src="../../vendor/handlebars/handlebars.min.js"></script>
<script src="../../vendor/ember/ember-template-compiler.js"></script>
<script src="support/app.js"></script>

<script type="text/x-handlebars">
	<div class="container">
		{{outlet}}
	</div>
</script>

<script src="/test-templates/spa/12-autoxhr-trigger-additional-after-delay.js" type="text/javascript"></script>
<script src="12-autoxhr-trigger-additional-after-delay.js" type="text/javascript"></script>

<script>
window.imgs = [-1];
/*eslint-disable no-unused-vars*/
BOOMR_test.init({
	testAfterOnBeacon: BOOMR.plugins.AutoXHR ? 2 : 1,
	afterFirstBeacon: function() {
		if (!BOOMR.plugins.AutoXHR) {
			return;
		}

		//
		// Send a XHRs, and insert an image after it comes back
		//
		setTimeout(function(){
			var xhr = new XMLHttpRequest();
			xhr.open("GET", "/delay?delay=2000&file=/pages/08-ember/support/widgets.json&id=1&rnd=" + Math.random(), true);
			xhr.onreadystatechange = function() {
				if (xhr.readyState === 4) {
					// fire another XHR after ~0ms, which should still get tracked by the MO
					setTimeout(function() {
						var img = document.createElement("img");
						img.src = "/delay?delay=2000&file=/pages/08-ember/support/img.jpg&rnd=" + Math.random();
						document.body.appendChild(img);
					}, 0);
				}
			};
			xhr.send(null);
		}, 0);
	},
	Ember: {
		enabled: true
	},
	instrument_xhr: true,
	autorun: false
});
</script>
<%= footer %>


text:
#pragma once

#include "CoreMinimal.h"
#include "WebApiResponseBody.h"
#include "WebApiResponseBodyBinary.generated.h"

UCLASS(BlueprintType, Blueprintable)
class WEBAPI_API UWebApiResponseBodyBinary : public UWebApiResponseBody
{
	GENERATED_UCLASS_BODY()

public:
	/** レスポンスバイナリ */
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Online|WebApi")
	TArray<uint8> ResponseContent;
};


text:
package com.libertyleo.criminalintent;

import java.util.Date;
import java.util.UUID;

/**
 * Created by Leo_Lei on 8/17/17.
 */

public class Crime {
    private UUID mId;
    private String mTitle;
    private Date mDate;
    private boolean mSolved;

    public Crime() {
        mId = UUID.randomUUID();
        mDate = new Date();
    }

    public UUID getId() {
        return mId;
    }

    public String getTitle() {
        return mTitle;
    }

    public void setTitle(String title) {
        mTitle = title;
    }

    public Date getDate() {
        return mDate;
    }

    public void setDate(Date date) {
        mDate = date;
    }

    public boolean isSolved() {
        return mSolved;
    }

    public void setSolved(boolean solved) {
        mSolved = solved;
    }
}


text:
@interface SESparkDaemon : NSObject

// shared instance
+ (nonnull SESparkDaemon *)sparkDaemon;

// Check if the user choosed to enable the SparkDaemon (which should install the Login Item)
@property (nonatomic, getter=isEnabled) BOOL enabled;

// Is the daemon running. If it is enabled, it should be running, unless something is wrong.
@property (nonatomic, getter=isRunning) BOOL runnning;

// Is the daemon active. See the SparkBuiltInAction for details.
@property (nonatomic, getter=isActive) BOOL active;

@end


text:
package org.dmfs.oauth2.client.pkce;

import net.iharder.Base64;
import org.dmfs.httpessentials.types.CharToken;
import org.dmfs.httpessentials.types.Token;
import org.dmfs.jems.messagedigest.elementary.Sha256;
import org.dmfs.jems.single.elementary.Digest;

import java.io.IOException;

/**
 * A {@link PkceCodeChallenge} that uses SHA-256 to protect the verifier.
 *
 * @author Marten Gajda
 */
public final class S256CodeChallenge implements PkceCodeChallenge
{
    private final CharSequence mCodeVerifier;

    public S256CodeChallenge(CharSequence codeVerifier)
    {
        mCodeVerifier = codeVerifier;
    }

    @Override
    public Token method()
    {
        return new CharToken("S256");
    }

    @Override
    public CharSequence challenge()
    {
        try
        {
            String result = Base64.encodeBytes(new Digest(new Sha256(), mCodeVerifier).value(), Base64.URL_SAFE);
            // Note, the code challenge parameter doesn't support equals chars, so we have to remove any padding
            if (result.endsWith("=="))
            {
                return result.substring(0, result.length() - 2);
            }
            if (result.endsWith("="))
            {
                return result.substring(0, result.length() - 1);
            }
            return result;
        }
        catch (IOException e)
        {
            throw new RuntimeException("IOException while operating on strings");
        }
    }
}


text:
{% extends "offer/offer_base.html" %}

{% load i18n %}
{% load uni_form_tags %}
{% load offer_tags %}
{% block head_title %}{% trans "Shoppley" %}{% endblock %}

{% block body %}

{{ biz_name }} {% trans " summary for past 7 days" %}

18{% trans " redeemed " %}
					44{% trans " sent " %}
					16{% trans " forwarded " %}
					60{% trans " customers reached " %}
					30{% trans " unique" %}

                                {% if all_offers %}
                                        {% for offer in all_offers %}
                                                {% merchant_offer_tag offer %}

                                        {% endfor %}
                                {% endif %}

{% trans "Current offers" %}

				{% if current_offers %}
					{% for offer in current_offers %}
						{% merchant_offer_side_tag offer %}
					{% endfor %}
				{% endif %}

{% trans "Scheduled offers" %}

                                {% if scheduled_offers %}
                                        {% for offer in scheduled_offers %}
                                                {% merchant_offer_side_tag offer %}
                                        {% endfor %}
                                {% endif %}

{% endblock %}
{% block extra_scripts %}

{% endblock %}


text:
package com.sarah.domain;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by vagrant on 5/4/17.
 */
@Table(name = "orders")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@Data
@Entity
public class Order {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int orderId;

    private String restaurantname = " ";
    private double amount = 0;
    private String note = " ";
    private Date orderCreatedDate = new Date();
    private Date estimatedDeliveryTime;
    private boolean isCompleted = false;
    private int paymentId;
    private Date payTimeStamp;

    @Embedded
    private User user;

    public Order() {
        this.user = null;
    }

    public Order(User user) {
        this.user = user;
    }

    @JsonCreator
    public Order(@JsonProperty("note") String note,
                 @JsonProperty("restaurantname") String restaurantname,
                 @JsonProperty("user") User user) {
        this.note = note;
        this.user = user;
        this.restaurantname = restaurantname;
    }

}


text:
var wxcontent = jQuery('#content');
var wxgrafs = wxcontent.text().split('\n\n');
var wxmarkup = '[cq comment="ASIDE PLACED BELOW"]\n [dfm_iframe src=\'http://extras.denverpost.com/weather/widget-iframe.html\' width=\'300px\' height=\'590px\'] [cq comment="ASIDE PLACED ABOVE"]\n';
wxgrafs.splice(3, 0, wxmarkup);
wxgrafs.push('Click here for more Denver7 weather coverage.');
jQuery('#content').text(wxgrafs.join('\n\n'));


text:
class Player : public GameObject {
public:
	Player(unsigned int texture, int charIndex, const Uint8 left, const Uint8 right, const Uint8 jump, const Uint8 shoot);
	void Update(float elapsed);
	void Render();
	void shootBullet(unsigned int levelTexture);
	void resetBullet(int index);

	const Uint8 *keys = SDL_GetKeyboardState(NULL);
	GLuint chracterTexture;
	int charIndex;
	Controller controlls;
	Bullet bullets[MAX_BULLETS];

	int bulletIndex;
	int life;
	int power;
	float shootTimer;
};
#endif


text:
"""Integration tests for Memset"""
from unittest import TestCase

import pytest

from lexicon.tests.providers.integration_tests import IntegrationTestsV2

# Hook into testing framework by inheriting unittest.TestCase and reuse
# the tests which *each and every* implementation of the interface must
# pass, by inheritance from integration_tests.IntegrationTests
class MemsetProviderTests(TestCase, IntegrationTestsV2):
    """TestCase for Memset"""

    provider_name = "memset"
    domain = "testzone.com"

    def _filter_headers(self):
        return ["Authorization"]

    # TODO: enable the skipped tests
    @pytest.mark.skip(reason="new test, missing recording")
    def test_provider_when_calling_update_record_should_modify_record_name_specified(
        self,
    ):
        return


text:
#ifndef LD_H
#define LD_H

#ifdef HAVE_LOCALE_H
#endif
#ifndef SEEK_CUR
#define SEEK_CUR 1
#endif
#ifndef SEEK_END
#define SEEK_END 2
#endif

#ifdef HAVE_LOCALE_H
# ifndef ENABLE_NLS
   /* The Solaris version of locale.h always includes libintl.h.  If we have
      been configured with --disable-nls then ENABLE_NLS will not be defined
      and the dummy definitions of bindtextdomain (et al) below will conflict
      with the defintions in libintl.h.  So we define these values to prevent
      the bogus inclusion of libintl.h.  */
#  define _LIBINTL_H
#  define _LIBGETTEXT_H
# endif
# include <locale.h>
#endif

#ifdef ENABLE_NLS
# include <libintl.h>
# define _(String) gettext (String)
# ifdef gettext_noop
#  define N_(String) gettext_noop (String)
# else
#  define N_(String) (String)
# endif
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define textdomain(Domainname) while (0) /* nothing */
# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
# define _(String) (String)
# define N_(String) (String)
#endif

/* Look in this environment name for the linker to pretend to be */
#define EMULATION_ENVIRON "LDEMULATION"
/* If in there look for the strings: */

/* Look in this variable for a target format */
#define TARGET_ENVIRON "GNUTARGET"

/* Input sections which are put in a section of this name are actually
   discarded.  */
#define DISCARD_SECTION_NAME "/DISCARD/"

/* A file name list */
typedef struct name_list {
  const char *name;
  struct name_list *next;
}
name_list;

typedef enum {sort_none, sort_ascending, sort_descending} sort_order;

/* A wildcard specification.  */

typedef enum {
  none, by_name, by_alignment, by_name_alignment, by_alignment_name,
  by_none, by_init_priority
} sort_type;

extern sort_type sort_section;

struct wildcard_spec {
  const char *name;
  struct name_list *exclude_name_list;
  sort_type sorted;
  struct flag_info *section_flag_list;
};

struct wildcard_list {
  struct wildcard_list *next;
  struct wildcard_spec spec;
};

struct map_symbol_def {
  struct bfd_link_hash_entry *entry;
  struct map_symbol_def *next;
};

/* The initial part of fat_user_section_struct has to be idential with
   lean_user_section_struct.  */
typedef struct fat_user_section_struct {
  /* For input sections, when writing a map file: head / tail of a linked
     list of hash table entries for symbols defined in this section.  */
  struct map_symbol_def *map_symbol_def_head;
  struct map_symbol_def **map_symbol_def_tail;
  unsigned long map_symbol_def_count;
} fat_section_userdata_type;

#define get_userdata(x) ((x)->userdata)

#define BYTE_SIZE	(1)
#define SHORT_SIZE	(2)
#define LONG_SIZE	(4)
#define QUAD_SIZE	(8)

enum endian_enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE };

enum symbolic_enum
  {
    symbolic_unset = 0,
    symbolic,
    symbolic_functions,
  };

enum dynamic_list_enum
  {
    dynamic_list_unset = 0,
    dynamic_list_data,
    dynamic_list
  };

typedef struct {
  /* 1 => assign space to common symbols even if `relocatable_output'.  */
  bfd_boolean force_common_definition;

  /* 1 => do not assign addresses to common symbols.  */
  bfd_boolean inhibit_common_definition;

  /* Enable or disable target specific optimizations.

     Not all targets have optimizations to enable.

     Normally these optimizations are disabled by default but some targets
     prefer to enable them by default.  So this field is a tri-state variable.
     The values are:

     zero: Enable the optimizations (either from --relax being specified on
       the command line or the backend's before_allocation emulation function.

     positive: The user has requested that these optimizations be disabled.
       (Via the --no-relax command line option).

     negative: The optimizations are disabled.  (Set when initializing the
       args_type structure in ldmain.c:main.  */
  signed int disable_target_specific_optimizations;
#define RELAXATION_DISABLED_BY_DEFAULT (command_line.disable_target_specific_optimizations < 0)
#define RELAXATION_DISABLED_BY_USER    (command_line.disable_target_specific_optimizations > 0)
#define RELAXATION_ENABLED (command_line.disable_target_specific_optimizations == 0)
#define DISABLE_RELAXATION do { command_line.disable_target_specific_optimizations = 1; } while (0)
#define ENABLE_RELAXATION  do { command_line.disable_target_specific_optimizations = 0; } while (0)

  /* If TRUE, build MIPS embedded PIC relocation tables in the output
     file.  */
  bfd_boolean embedded_relocs;

  /* If TRUE, force generation of a file with a .exe file.  */
  bfd_boolean force_exe_suffix;

  /* If TRUE, generate a cross reference report.  */
  bfd_boolean cref;

  /* If TRUE (which is the default), warn about mismatched input
     files.  */
  bfd_boolean warn_mismatch;

  /* Warn on attempting to open an incompatible library during a library
     search.  */
  bfd_boolean warn_search_mismatch;

  /* If non-zero check section addresses, once computed,
     for overlaps.  Relocatable links only check when this is > 0.  */
  signed char check_section_addresses;

  /* If TRUE allow the linking of input files in an unknown architecture
     assuming that the user knows what they are doing.  This was the old
     behaviour of the linker.  The new default behaviour is to reject such
     input files.  */
  bfd_boolean accept_unknown_input_arch;

  /* If TRUE we'll just print the default output on stdout.  */
  bfd_boolean print_output_format;

  /* Big or little endian as set on command line.  */
  enum endian_enum endian;

  /* -Bsymbolic and -Bsymbolic-functions, as set on command line.  */
  enum symbolic_enum symbolic;

  /* --dynamic-list, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo
     and --dynamic-list FILE, as set on command line.  */
  enum dynamic_list_enum dynamic_list;

  /* Name of runtime interpreter to invoke.  */
  char *interpreter;

  /* Name to give runtime libary from the -soname argument.  */
  char *soname;

  /* Runtime library search path from the -rpath argument.  */
  char *rpath;

  /* Link time runtime library search path from the -rpath-link
     argument.  */
  char *rpath_link;

  /* Name of shared object whose symbol table should be filtered with
     this shared object.  From the --filter option.  */
  char *filter_shlib;

  /* Name of shared object for whose symbol table this shared object
     is an auxiliary filter.  From the --auxiliary option.  */
  char **auxiliary_filters;

  /* A version symbol to be applied to the symbol names found in the
     .exports sections.  */
  char *version_exports_section;

  /* Default linker script.  */
  char *default_script;
} args_type;

extern args_type command_line;

typedef int token_code_type;

typedef struct {
  bfd_boolean magic_demand_paged;
  bfd_boolean make_executable;

  /* If TRUE, -shared is supported.  */
  /* ??? A better way to do this is perhaps to define this in the
     ld_emulation_xfer_struct since this is really a target dependent
     parameter.  */
  bfd_boolean has_shared;

  /* If TRUE, build constructors.  */
  bfd_boolean build_constructors;

  /* If TRUE, warn about any constructors.  */
  bfd_boolean warn_constructors;

  /* If TRUE, warn about merging common symbols with others.  */
  bfd_boolean warn_common;

  /* If TRUE, only warn once about a particular undefined symbol.  */
  bfd_boolean warn_once;

  /* If TRUE, warn if multiple global-pointers are needed (Alpha
     only).  */
  bfd_boolean warn_multiple_gp;

  /* If TRUE, warn if the starting address of an output section
     changes due to the alignment of an input section.  */
  bfd_boolean warn_section_align;

  /* If TRUE, warning messages are fatal */
  bfd_boolean fatal_warnings;

  sort_order sort_common;

  bfd_boolean text_read_only;

  bfd_boolean stats;

  /* If set, orphan input sections will be mapped to separate output
     sections.  */
  bfd_boolean unique_orphan_sections;

  /* If set, only search library directories explicitly selected
     on the command line.  */
  bfd_boolean only_cmd_line_lib_dirs;

  /* If set, numbers and absolute symbols are simply treated as
     numbers everywhere.  */
  bfd_boolean sane_expr;

  /* The rpath separation character.  Usually ':'.  */
  char rpath_separator;

  char *map_filename;
  FILE *map_file;

  unsigned int split_by_reloc;
  bfd_size_type split_by_file;

  bfd_size_type specified_data_size;

  /* The size of the hash table to use.  */
  unsigned long hash_table_size;

  /* The maximum page size for ELF.  */
  bfd_vma maxpagesize;

  /* The common page size for ELF.  */
  bfd_vma commonpagesize;
} ld_config_type;

extern ld_config_type config;

extern FILE * saved_script_handle;
extern bfd_boolean force_make_executable;

extern int yyparse (void);
extern void add_cref (const char *, bfd *, asection *, bfd_vma);
extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
extern void output_cref (FILE *);
extern void check_nocrossrefs (void);
extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;

/* If gcc >= 2.6, we can give a function name, too.  */
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
#define __PRETTY_FUNCTION__  NULL
#endif

#undef abort
#define abort() ld_abort (__FILE__, __LINE__, __PRETTY_FUNCTION__)

#endif


text:
using AutoMapper;
using Fancy.Common.Validator;
using Fancy.Services.Common.Contracts;

namespace Fancy.Services.Common
{
    public class MappingService : IMappingService
    {
        private readonly IMapper mapper;

        public MappingService(IMapper mapper)
        {
            Validator.ValidateNullArgument(mapper, "mapper");

            this.mapper = mapper;
        }

        public TDestination Map<TSource, TDestination>(TSource source)
        {
            var mappedEntity = this.mapper.Map<TDestination>(source);

            return mappedEntity;
        }
    }
}


text:
package com.mindoo.domino.jna.internal.structs.compoundtext;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.List;

import com.mindoo.domino.jna.IAdaptable;
import com.mindoo.domino.jna.internal.structs.BaseStructure;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
/**
 * This file was autogenerated by JNAerator,

 * a tool written by Olivier Chafik that uses a few opensource projects..

 * For help, please visit NativeLibs4Java , Rococoa, or JNA.
 */
public class NotesCDExtFieldStruct extends BaseStructure implements IAdaptable {
	// C type : WSIG */

	public short Signature; /* ORed with WORDRECORDLENGTH */
	public short Length;    /* (length is inclusive with this struct) */

	/** Field Flags (see FEXT_xxx) */
	public int Flags1;
	public int Flags2;
	/**
	 * Field entry helper type

	 * (see FIELD_HELPER_xxx)
	 */
	public short EntryHelper;
	/** Entry helper DB name length */
	public short EntryDBNameLen;
	/** Entry helper View name length */
	public short EntryViewNameLen;
	/** Entry helper column number */
	public short EntryColumnNumber;

	public NotesCDExtFieldStruct() {
		super();
	}

	public static NotesCDExtFieldStruct newInstance() {
		return AccessController.doPrivileged(new PrivilegedAction<NotesCDExtFieldStruct>() {

			@Override
			public NotesCDExtFieldStruct run() {
				return new NotesCDExtFieldStruct();
			}
		});
	}

	protected List<String> getFieldOrder() {
		return Arrays.asList("Signature", "Length", "Flags1", "Flags2", "EntryHelper", "EntryDBNameLen", "EntryViewNameLen", "EntryColumnNumber");
	}

	public NotesCDExtFieldStruct(Pointer peer) {
		super(peer);
	}

	public static NotesCDExtFieldStruct newInstance(final Pointer peer) {
		return AccessController.doPrivileged(new PrivilegedAction<NotesCDExtFieldStruct>() {

			@Override
			public NotesCDExtFieldStruct run() {
				return new NotesCDExtFieldStruct(peer);
			}
		});
	}

	public static class ByReference extends NotesCDExtFieldStruct implements Structure.ByReference {

	};

	public static class ByValue extends NotesCDExtFieldStruct implements Structure.ByValue {

	};

	@Override
	public <T> T getAdapter(Class<T> clazz) {
		if (clazz == NotesCDExtFieldStruct.class) {
			return (T) this;
		}
		return null;
	}

}


text:
'use strict';

const chalk = require('chalk')
    , program = require('commander')
    , exec = require('child_process').exec
    , pkg = require('./package.json')
    , zones = require('./zones.json');

let solat = (zone = 'SGR04')  => {

    var location = zones[zone], yellow = chalk.yellow;

    if (typeof location === 'undefined') {
        for(var key in zones){
            if (zones[key].zone.toLowerCase().indexOf(zone.toLowerCase()) > -1) {
                location = zones[key];
            }
        }
    }

    if (typeof location === 'undefined') {
       console.error(chalk.yellow.bgRed.bold('\n  Err: zone or location not found!\n'));
       process.exit(1);
    }

    let cmd = 'curl www2.e-solat.gov.my/xml/today/?zon=' + location.code;

    console.log([
        '',
        chalk.yellow('  Negeri: ') + location.state,
        chalk.yellow('  Kod: ') + location.code,
        chalk.yellow('  Zon: ') + location.zone,
        '',
    ].join('\n'));

    let output = (error, stdout, stderr) => {

        if (stdout) {
            var xml2js = require('xml2js');
            var parser = new xml2js.Parser();

            parser.parseString(stdout, function (err, result) {
                var jakim = result.rss.channel[0].item;

                var head = [], content = [];

                jakim.forEach(function(waktu) {
                    head.push(waktu.title[0]);
                    content.push(waktu.description[0]);
                });

                var Table = require('cli-table2');
                var table = new Table({ head: head });
                table.push(content);

                console.log(table.toString());

            });
        }
    };
    exec(cmd, output);
};

program
    .version(pkg.version)
    .usage('[zone]')
    .description('Waktu solat di terminal anda.')
    .action(solat)
    .parse(process.argv);

if (program.args.length === 0) solat();


text:
BOOST_AUTO_TEST_CASE(platform_count)
{
    BOOST_CHECK(boost::compute::system::platform_count() >= 1);
}

BOOST_AUTO_TEST_CASE(device_count)
{
    BOOST_CHECK(boost::compute::system::device_count() >= 1);
}

BOOST_AUTO_TEST_CASE(default_device)
{
    boost::compute::device device = boost::compute::system::default_device();
    BOOST_CHECK(device.id() != cl_device_id());
}

BOOST_AUTO_TEST_CASE(find_device)
{
    boost::compute::device device = boost::compute::system::default_device();
    const std::string &name = device.name();
    BOOST_CHECK(boost::compute::system::find_device(name).name() == device.name());
}


text:
/**
 * Tracing support.
 * @since 0.5.1
 */
package com.asakusafw.runtime.trace;


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace RawNotificationBackgroundTaskForClient.Models
{
    [DataContract(Namespace = "CommunicatePacketNamespace", Name = "CommunicatePacket")]
    internal class CommunicatePacket
    {
        [DataMember]
        internal CommunicateType Type { get; private set; }

        [DataMember]
        internal object Data { get; private set; }
        internal CommunicatePacket(CommunicateType type, object data)
        {
            Type = type;
            Data = data;
        }
    }

    internal enum CommunicateType
    {
        Register,
        GetNotificationContent,
    }

    [DataContract(Namespace = "CommunicatePacketNamespace", Name = "GetNotificationContentCommunicateData")]
    internal class GetNotificationContentCommunicateData
    {
        [DataMember]
        internal long NotificationID { get; private set; }

        internal GetNotificationContentCommunicateData(long notificationID)
        {
            this.NotificationID = notificationID;
        }
    }
    [DataContract(Namespace = "CommunicatePacketNamespace", Name = "RegisterCommunicateData")]
    internal class RegisterCommunicateData
    {
        [DataMember]
        internal string DeviceID { get; private set; }
        [DataMember]
        internal string URI { get; private set; }
        [DataMember]
        internal int OSID { get; private set; }
        [DataMember]
        internal string ReceiverOldID { get; private set; }
        [DataMember]
        internal double Token { get; private set; }

        internal RegisterCommunicateData(string deviceID, string uri, int osid, string receiverOldID, double token)
        {
            DeviceID = deviceID;
            URI = uri;
            OSID = osid;
            ReceiverOldID = receiverOldID;
            Token = token;
        }
    }
}


text:
require 'chef/resource/lwrp_base'

class Chef
  class Resource
    class GitService < Chef::Resource::LWRPBase
      self.resource_name = :git_service
      actions :create
      default_action :create

      provides :git_service
    end
  end
end


text:
#ifndef PROTON_ENGINE_H
#define PROTON_ENGINE_H 1

/**
 * @cond INTERNAL
 */

#include <proton/condition.h>
#include <proton/connection.h>
#include <proton/session.h>
#include <proton/terminus.h>
#include <proton/link.h>
#include <proton/delivery.h>
#include <proton/event.h>
#include <proton/transport.h>

/**
 * @endcond
 */

#endif /* engine.h */


text:
using ::base::SharedMemory;

namespace gpu {

CommandBufferService::CommandBufferService()
    : ring_buffer_id_(-1),
      shared_state_(NULL),
      num_entries_(0),
      get_offset_(0),
      put_offset_(0),
      token_(0),
      generation_(0),
      error_(error::kNoError),
      context_lost_reason_(error::kUnknown),
      shared_memory_bytes_allocated_(0) {
  // Element zero is always NULL.
  registered_objects_.push_back(Buffer());
}

CommandBufferService::~CommandBufferService() {
  for (size_t i = 0; i < registered_objects_.size(); ++i) {
    if (registered_objects_[i].shared_memory) {
      shared_memory_bytes_allocated_ -= registered_objects_[i].size;
      delete registered_objects_[i].shared_memory;
    }
  }
  // TODO(gman): Should we report 0 bytes to TRACE here?
}

bool CommandBufferService::Initialize() {
  return true;
}

CommandBufferService::State CommandBufferService::GetState() {
  State state;
  state.num_entries = num_entries_;
  state.get_offset = get_offset_;
  state.put_offset = put_offset_;
  state.token = token_;
  state.error = error_;
  state.context_lost_reason = context_lost_reason_;
  state.generation = ++generation_;

  return state;
}

CommandBufferService::State CommandBufferService::GetLastState() {
  return GetState();
}

void CommandBufferService::UpdateState() {
  if (shared_state_) {
    CommandBufferService::State state = GetState();
    shared_state_->Write(state);
  }
}

CommandBufferService::State CommandBufferService::FlushSync(
    int32 put_offset, int32 last_known_get) {
  if (put_offset < 0 || put_offset > num_entries_) {
    error_ = gpu::error::kOutOfBounds;
    return GetState();
  }

  put_offset_ = put_offset;

  if (!put_offset_change_callback_.is_null())
    put_offset_change_callback_.Run();

  return GetState();
}

void CommandBufferService::Flush(int32 put_offset) {
  if (put_offset < 0 || put_offset > num_entries_) {
    error_ = gpu::error::kOutOfBounds;
    return;
  }

  put_offset_ = put_offset;

  if (!put_offset_change_callback_.is_null())
    put_offset_change_callback_.Run();
}

void CommandBufferService::SetGetBuffer(int32 transfer_buffer_id) {
  DCHECK_EQ(-1, ring_buffer_id_);
  DCHECK_EQ(put_offset_, get_offset_);  // Only if it's empty.
  ring_buffer_ = GetTransferBuffer(transfer_buffer_id);
  DCHECK(ring_buffer_.ptr);
  ring_buffer_id_ = transfer_buffer_id;
  num_entries_ = ring_buffer_.size / sizeof(CommandBufferEntry);
  put_offset_ = 0;
  SetGetOffset(0);
  if (!get_buffer_change_callback_.is_null()) {
    get_buffer_change_callback_.Run(ring_buffer_id_);
  }

  UpdateState();
}

void CommandBufferService::SetSharedStateBuffer(int32 transfer_buffer_id) {
  gpu::Buffer buffer = GetTransferBuffer(transfer_buffer_id);
  shared_state_ = reinterpret_cast<CommandBufferSharedState*>(buffer.ptr);

  UpdateState();
}

void CommandBufferService::SetGetOffset(int32 get_offset) {
  DCHECK(get_offset >= 0 && get_offset < num_entries_);
  get_offset_ = get_offset;
}

int32 CommandBufferService::CreateTransferBuffer(size_t size,
                                                 int32 id_request) {
  SharedMemory buffer;
  if (!buffer.CreateAnonymous(size))
    return -1;

  shared_memory_bytes_allocated_ += size;
  TRACE_COUNTER_ID1(
      "CommandBuffer", "SharedMemory", this, shared_memory_bytes_allocated_);

  return RegisterTransferBuffer(&buffer, size, id_request);
}

int32 CommandBufferService::RegisterTransferBuffer(
    base::SharedMemory* shared_memory, size_t size, int32 id_request) {
  // Check we haven't exceeded the range that fits in a 32-bit integer.
  if (unused_registered_object_elements_.empty()) {
    if (registered_objects_.size() > std::numeric_limits<uint32>::max())
      return -1;
  }

  // Check that the requested ID is sane (not too large, or less than -1)
  if (id_request != -1 && (id_request > 100 || id_request < -1))
    return -1;

  // Duplicate the handle.
  base::SharedMemoryHandle duped_shared_memory_handle;
  if (!shared_memory->ShareToProcess(base::GetCurrentProcessHandle(),
                                     &duped_shared_memory_handle)) {
    return -1;
  }
  scoped_ptr<SharedMemory> duped_shared_memory(
      new SharedMemory(duped_shared_memory_handle, false));

  // Map the shared memory into this process. This validates the size.
  if (!duped_shared_memory->Map(size))
    return -1;

  // If it could be mapped, allocate an ID and register the shared memory with
  // that ID.
  Buffer buffer;
  buffer.ptr = duped_shared_memory->memory();
  buffer.size = size;
  buffer.shared_memory = duped_shared_memory.release();

  // If caller requested specific id, first try to use id_request.
  if (id_request != -1) {
    int32 cur_size = static_cast<int32>(registered_objects_.size());
    if (cur_size <= id_request) {
      // Pad registered_objects_ to reach id_request.
      registered_objects_.resize(static_cast<size_t>(id_request + 1));
      for (int32 id = cur_size; id < id_request; ++id)
        unused_registered_object_elements_.insert(id);
      registered_objects_[id_request] = buffer;
      return id_request;
    } else if (!registered_objects_[id_request].shared_memory) {
      // id_request is already in free list.
      registered_objects_[id_request] = buffer;
      unused_registered_object_elements_.erase(id_request);
      return id_request;
    }
  }

  if (unused_registered_object_elements_.empty()) {
    int32 handle = static_cast<int32>(registered_objects_.size());
    registered_objects_.push_back(buffer);
    return handle;
  } else {
    int32 handle = *unused_registered_object_elements_.begin();
    unused_registered_object_elements_.erase(
        unused_registered_object_elements_.begin());
    DCHECK(!registered_objects_[handle].shared_memory);
    registered_objects_[handle] = buffer;
    return handle;
  }
}

void CommandBufferService::DestroyTransferBuffer(int32 handle) {
  if (handle <= 0)
    return;

  if (static_cast<size_t>(handle) >= registered_objects_.size())
    return;

  shared_memory_bytes_allocated_ -= registered_objects_[handle].size;
  TRACE_COUNTER_ID1(
      "CommandBuffer", "SharedMemory", this, shared_memory_bytes_allocated_);

  delete registered_objects_[handle].shared_memory;
  registered_objects_[handle] = Buffer();
  unused_registered_object_elements_.insert(handle);

  if (handle == ring_buffer_id_) {
    ring_buffer_id_ = -1;
    ring_buffer_ = Buffer();
    num_entries_ = 0;
    get_offset_ = 0;
    put_offset_ = 0;
  }

  // Remove all null objects from the end of the vector. This allows the vector
  // to shrink when, for example, all objects are unregistered. Note that this
  // loop never removes element zero, which is always NULL.
  while (registered_objects_.size() > 1 &&
      !registered_objects_.back().shared_memory) {
    registered_objects_.pop_back();
    unused_registered_object_elements_.erase(
        static_cast<int32>(registered_objects_.size()));
  }
}

Buffer CommandBufferService::GetTransferBuffer(int32 handle) {
  if (handle < 0)
    return Buffer();

  if (static_cast<size_t>(handle) >= registered_objects_.size())
    return Buffer();

  return registered_objects_[handle];
}

void CommandBufferService::SetToken(int32 token) {
  token_ = token;
}

void CommandBufferService::SetParseError(error::Error error) {
  if (error_ == error::kNoError) {
    error_ = error;
    if (!parse_error_callback_.is_null())
      parse_error_callback_.Run();
  }
}

void CommandBufferService::SetContextLostReason(
    error::ContextLostReason reason) {
  context_lost_reason_ = reason;
}

void CommandBufferService::SetPutOffsetChangeCallback(
    const base::Closure& callback) {
  put_offset_change_callback_ = callback;
}

void CommandBufferService::SetGetBufferChangeCallback(
    const GetBufferChangedCallback& callback) {
  get_buffer_change_callback_ = callback;
}

void CommandBufferService::SetParseErrorCallback(
    const base::Closure& callback) {
  parse_error_callback_ = callback;
}

}  // namespace gpu


text:
// This is a variant of the prototype regex for finding CSS classes
// that was causing problems on CNN.com because it had classes
// with -'s in their names
WScript.Echo("b-b".match(/([\w\-\*]+)\b/));

// Here is a simpler repro of the above:
WScript.Echo("one two".match(/.*\b/));

// TODO - fix this:
//WScript.Echo(("a a a aa").match(/([a ]\b)*\b/));


text:
var serverUrl = "http://estebanb.no-ip.org:82/";

function postURL(path, params, callback){
    var json_data;

    var item = {}
    for(var key in params) {
         item[''+key+''] = params[key]
    }
    var xhr = new XMLHttpRequest();
        xhr.open("POST", serverUrl+"login");
    xhr.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');
        xhr.send(JSON.stringify(item));
        xhr.onreadystatechange = function()
            {
            if (xhr.readyState == 4)
                if (xhr.status == 200)
                    json_data = JSON.parse(xhr.responseText);
                    callback(json_data);
            };
    return json_data;
}

function addTable() {

            var tableBody = document.getElementById("tablita")
            var tableHead = document.getElementById("tablita_head")

            var heading = new Array();
            heading[0] = "Socios"
            heading[1] = "Numero"
            heading[2] = "Legajo"
            heading[3] = "Estado"

            var stock = new Array()
            stock[0] = new Array("Malerba", "9288", "8888", "Demente")
            stock[1] = new Array("Esteban", "6456456", "6666", "Normal")
            stock[2] = new Array("Front", "end", "fuck", "you")
            stock[3] = new Array("Hola", "Como", "Estas", "aaaa")

            var tr = document.createElement('TR');
            tableHead.appendChild(tr);
            for (i = 0; i < heading.length; i++) {
                var th = document.createElement('TH')
                th.width = '75';
                th.appendChild(document.createTextNode(heading[i]));
                tr.appendChild(th);

            }

            //TABLE ROWS
            for (i = 0; i < stock.length; i++) {
                var tr = document.createElement('TR');
                for (j = 0; j < stock[i].length; j++) {
                    var td = document.createElement('TD')
                        td.appendChild(document.createTextNode(stock[i][j]));
                    tr.appendChild(td)
                }
                tableBody.appendChild(tr);
            }

        }
function notif(){
    $('#notificaciones').append('
Alerta IMPORTANTE</a
')
}

function login(){
    if (!isEmpty(document.getElementById('nroSocio').value) && !isEmpty(document.getElementById('password').value)){

        $( "html" ).addClass( "loading" );
        hide("login-warning");

        postURL(serverUrl+'login', {nroSocio:document.getElementById('nroSocio').value, password:document.getElementById('password').value}, resultLogin);
    } else{
        hide("login-error");
        show("login-warning");
    }
}

function resultLogin(json){
    try {
        if(json.success == 1){
            $.cookie("nroSocio",json.nroSocio);
            $.cookie("nombre",json.nombre);
            console.log($.cookie("nroSocio"));
            console.log($.cookie("nombre"));
            window.location = "index.html";
        }else{
            $( "html" ).removeClass( "loading" );
            show("login-error");
        }
    }
    catch(e){
            $( "html" ).removeClass( "loading" );
    }
}

function salir(){
    $.removeCookie("nroSocio");
    window.location = "login.html";
}

function isEmpty(str) {
        return (!str || 0 === str.length);
}

//Mostrar DIV
function show(id) {
       var e = document.getElementById(id);
       e.style.display = 'block';
}
//Ocultar DIV
function hide(id) {
       var e = document.getElementById(id);
       e.style.display = 'none';
}

//addTable();
//notif();


text:
hljson
======

JSON api for hackerlist in Go


text:
<?php

namespace HWI\Bundle\OAuthBundle\OAuth\Response;

use HWI\Bundle\OAuthBundle\OAuth\ResponseInterface;
use HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken;

/**
 * UserResponseInterface
 *
 * @author Alexander <iam.asm89@gmail.com>
 * @author Joseph Bielawski <stloyd@gmail.com>
 */
interface UserResponseInterface extends ResponseInterface
{
    /**
     * Get the unique user identifier.
     *
     * Note that this is not always common known "username" because of implementation
     * in Symfony2 framework. For more details follow link below.
     * @link https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Security/Core/User/UserProviderInterface.php#L20-L28
     *
     * @return string
     */
    public function getUsername();

    /**
     * Get the username to display.
     *
     * @return string
     */
    public function getNickname();

    /**
     * Get the first name of user.
     *
     * @return null|string
     */
    public function getFirstName();

    /**
     * Get the last name of user.
     *
     * @return null|string
     */
    public function getLastName();

    /**
     * Get the real name of user.
     *
     * @return null|string
     */
    public function getRealName();

    /**
     * Get the email address.
     *
     * @return null|string
     */
    public function getEmail();

    /**
     * Get the url to the profile picture.
     *
     * @return null|string
     */
    public function getProfilePicture();

    /**
     * Get the access token used for the request.
     *
     * @return string
     */
    public function getAccessToken();

    /**
     * Get the access token used for the request.
     *
     * @return null|string
     */
    public function getRefreshToken();

    /**
     * Get oauth token secret used for the request.
     *
     * @return null|string
     */
    public function getTokenSecret();

    /**
     * Get the info when token will expire.
     *
     * @return null|string
     */
    public function getExpiresIn();

    /**
     * Set the raw token data from the request.
     *
     * @param OAuthToken $token
     */
    public function setOAuthToken(OAuthToken $token);

    /**
     * Get the raw token data from the request.
     *
     * @return OAuthToken
     */
    public function getOAuthToken();
}


text:
Plugins extend the functionality of Mousetrap.  To use a plugin just include the plugin after mousetrap.

```html
<script src="mousetrap.js"></script>
<script src="mousetrap-record.js"></script>
```

## Bind dictionary

Allows you to make multiple bindings in a single ``Mousetrap.bind`` call.

## Global bind

Allows you to set global bindings that work even inside of input fields.

## Pause/unpause

Allows you to temporarily prevent Mousetrap events from firing.

## Record

Allows you to capture a keyboard shortcut or sequence defined by a user.


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

	<title>SHTOOLS - Global spectral analysis</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../css/sh.css">
	<link rel="icon" type="image/vnd.microsoft.icon" href="../../images/favicon.ico">

				HOME
				DOWNLOAD
				DOCUMENTATION
				FAQ

>  Home > Documentation > Python > Global Spectral Analysis

SHCrossPowerL

Compute the cross-power of two real functions for a single spherical harmonic degree.

Usage

cpower = pyshtools.SHCrossPowerL (cilm1, cilm2, l)

Returns

cpower : float

The cross power of the two functions for spherical harmonic degree l.

Parameters

cilm1 : float, dimension (2, lmaxin1+1, lmaxin1+1)

The spherical harmonic coefficients of the first function.

cilm2 : float, dimension (2, lmaxin2+1, lmaxin2+1)

The spherical harmonic coefficients of the second function.

l : integer

The spherical harmonic degree. This must be less than or equal to the minimum of lmaxin1 and lmaxin2.

Description

SHCrossPowerL will calculate the cross-power of two functions for a single spherical harmonic degree l. This is explicitly calculated as:

cpower = Sum_{i=0}^1 Sum_{m=0}^l cilm1[i, l, m] * cilm2[i, l, m].

See also

shpowerl, shpowerdensityl, shcrosspowerdensityl, shpowerspectrum, shpowerspectrumdensity, shcrosspowerspectrum, shcrosspowerspectrumdensity, shadmitcorr

>  Home > Documentation > Python > Global Spectral Analysis

			Institut de Physique du Globe de Paris
			University of Sorbonne Paris Cité
			© 2015 Mark Wieczorek


text:
package net.wouterdanes.docker.remoteapi.exception;

public class ContainerNotFoundException extends DockerException {
    public ContainerNotFoundException(final String id) {
        super(String.format("Container '%s' not found.", id));
    }
}


text: This tests verifies access to captured arguments via an optimized-away arguments object.


text:
<root>
  <data xml:base="fallbackinternalxpointer.xml">test</data>
</root>


text:
package pro.luxun.luxunanimation.view.view;

import android.app.Activity;
import android.content.Context;
import android.content.res.TypedArray;
import android.os.Build;
import android.support.v4.content.ContextCompat;
import android.util.AttributeSet;
import android.widget.ImageView;
import android.widget.LinearLayout;

import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.EViewGroup;

import pro.luxun.luxunanimation.R;
import pro.luxun.luxunanimation.utils.TranslucentStatusHelper;

/**
 * Created by wufeiyang on 16/5/7.
 */
@EViewGroup
public class TranslucentStatusBarLinearLayout extends LinearLayout{

    private int mStatusColor;

    public TranslucentStatusBarLinearLayout(Context context) {
        super(context);
    }

    public TranslucentStatusBarLinearLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        TypedArray array = context.obtainStyledAttributes(attrs, R.styleable.TranslucentStatusBarLinearLayout);
        mStatusColor = array.getColor(R.styleable.TranslucentStatusBarLinearLayout_status_bar_color, ContextCompat.getColor(getContext(), R.color.colorPrimaryDark));
        array.recycle();
    }

    @AfterViews
    void init(){
        setOrientation(VERTICAL);

        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){
            Context context = getContext();
            if(context instanceof Activity){
                setFitsSystemWindows(false);
                TranslucentStatusHelper.translucentStatus((Activity) context);
                ImageView statusBar = new ImageView(context);
                statusBar.setBackgroundColor(mStatusColor);
                addView(statusBar, 0, new LayoutParams(LayoutParams.MATCH_PARENT, TranslucentStatusHelper.getStatusBarHeight(context)));
            }
        }
    }
}


text:
package org.elasticsearch.hadoop.serialization.bulk;

import org.elasticsearch.hadoop.util.BytesRef;

/**
 * Bulk command to execute.
 */
public interface BulkCommand {

    /**
     * Serialized the given object as a {@link BytesRef}.
     * Note that the {@link BytesRef} is not guaranteed to be unique - in fact,
     * expect the same instance to be reused by multiple calls.
     * In other words, make a copy if you need to hang on to this object.
     *
     * @param object
     * @return
     */
    BytesRef write(Object object);
}


text:
var esprima = require("esprima");

var Syntax = esprima.Syntax;

/**
 * Utilities for dealing with syntax trees
 */

module.exports = {
	isDefaultProperty: function(property) {
		return (property.type === Syntax.Literal && property.value === "default") ||
			(property.type === Syntax.Identifier && property.name === "default");
	}
};


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ExtractVariables async="false" continueOnError="true" enabled="true" name="ExtractSCResponse">
    <DisplayName>ExtractSCResponse</DisplayName>
    <Properties/>
    <Source clearPayload="false">SCResponse</Source>
    <JSONPayload>
        <Variable name="scjsonres" type="nodeset">
            <JSONPath>$.[*]</JSONPath>
        </Variable>
    </JSONPayload>
</ExtractVariables>


text:
import * as React from 'react';
import { StandardProps } from '..';

export interface CircularProgressProps
  extends StandardProps<React.HTMLAttributes<HTMLDivElement>, CircularProgressClassKey> {
  color?: 'primary' | 'secondary' | 'inherit';
  max?: number;
  min?: number;
  size?: number | string;
  thickness?: number;
  value?: number;
  variant?: 'determinate' | 'indeterminate' | 'static';
}

export type CircularProgressClassKey =
  | 'root'
  | 'colorPrimary'
  | 'colorSecondary'
  | 'svg'
  | 'svgIndeterminate'
  | 'circle'
  | 'circleIndeterminate';

declare const CircularProgress: React.ComponentType<CircularProgressProps>;

export default CircularProgress;


text:
SERVICES="
	registry
	#auth
	#fleet-ui
	#mongo
	#oauth
	#redis
	"
for svs in $SERVICES ; do
	unit=/var/lib/apps/$svs/units/$svs.service
	if [ -f $unit ]; then
		if [ ! $(fleetctl list-units | grep $unit grep $unit > /dev/null 2>&1) ]; then
			echo fleetctl destroy $unit
			fleetctl destroy $unit > /dev/null 2>&1
		fi
		echo fleetctl start $unit
		fleetctl start $unit
	fi
done


text:
// Copyright 2019 Google LLC
//
// 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
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.sps.servlets;

import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/** Servlet that returns a random quote. */
@WebServlet("/random-quote")
public final class RandomQuoteServlet extends HttpServlet {

  private List<String> quotes;

  @Override
  public void init() {
    quotes = new ArrayList<>();
    quotes.add(
        "A ship in port is safe, but that is not what ships are for. "
            + "Sail out to sea and do new things. - Grace Hopper");
    quotes.add("They told me computers could only do arithmetic. - Grace Hopper");
    quotes.add("A ship in port is safe, but that's not what ships are built for. - Grace Hopper");
    quotes.add("It is much easier to apologise than it is to get permission. - Grace Hopper");
    quotes.add("If you can't give me poetry, can't you give me poetical science? - Ada Lovelace");
    quotes.add("I am in a charming state of confusion. - Ada Lovelace");
    quotes.add(
        "The Analytical Engine weaves algebraic patterns, "
            + "just as the Jacquard loom weaves flowers and leaves. - Ada Lovelace");
    quotes.add(
        "Sometimes it is the people no one can imagine anything of "
            + "who do the things no one can imagine. - Alan Turing");
    quotes.add("Those who can imagine anything, can create the impossible. - Alan Turing");
  }

  @Override
  public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
    String quote = quotes.get((int) (Math.random() * quotes.size()));

    response.setContentType("text/html;");
    response.getWriter().println(quote);
  }
}


text:
using MvcTemplate.Resources.Form;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;

namespace MvcTemplate.Components.Mvc
{
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter)]
    public class FileSizeAttribute : ValidationAttribute
    {
        public Decimal MaximumMB { get; }

        public FileSizeAttribute(Double maximumMB)
            : base(() => Validations.FileSize)
        {
            MaximumMB = Convert.ToDecimal(maximumMB);
        }

        public override String FormatErrorMessage(String name)
        {
            return String.Format(ErrorMessageString, name, MaximumMB);
        }
        public override Boolean IsValid(Object value)
        {
            IEnumerable<HttpPostedFileBase> files = ToFiles(value);

            return files == null || files.Sum(file => file?.ContentLength ?? 0) <= MaximumMB * 1024 * 1024;
        }

        private IEnumerable<HttpPostedFileBase> ToFiles(Object value)
        {
            HttpPostedFileBase file = value as HttpPostedFileBase;

            return file != null ? new[] { file } : value as IEnumerable<HttpPostedFileBase>;
        }
    }
}


text:
layout: post
date: '2015-06-20'
title: "QUINCEANERA DRESSES Night Moves Quinceanera Q333 Ball Gown Prom Dress"
category: QUINCEANERA DRESSES
tags: [QUINCEANERA DRESSES]
---
### QUINCEANERA DRESSES Night Moves Quinceanera Q333 Ball Gown Prom Dress
Just **$514.99**
###

SPECIAL ORDER ONLY. Call us at 801.571.5551 for specific shipping estimates. Available in sizes 2-32.

Buy it: [https://www.eudances.com/en/quinceanera-dresses/1668-night-moves-quinceanera-q333-ball-gown-prom-dress.html](https://www.eudances.com/en/quinceanera-dresses/1668-night-moves-quinceanera-q333-ball-gown-prom-dress.html)


text:
/*
[See github project](https://github.com/bobbyabraham/artifactoryClient)
A simple client that pushes files within a folder (and sub folders) into Artifactory
The files are pushed based on a configuration file. The config file has the
following format
- a properties file

[default]
libraryFileDir=[the path to the directory that contains the files to be pushed up]
groupId=[the org name in the maven2 naming pattern under which the library
files should be pushed as ]
version=[version of the library]
repositoryName=[name of the repository in Artifactory into which the
libraries is to be pushed into]
artifactoryUrl=[URL for Artifactory instance - into which the files are to be
pushed]
artifactoryUsername=[user name to connect to Artifactory]
artifactoryPassword=[Password for the Artifactory user]

This program will check the name of the file that is to be pushed into
Artifactory and see if the file name has version appended to it at the end. If
so, the file is pushed using the group id, the module name (which is the file
name stripped off the version) and the version extracted from the file. If
the file name does not have a version number in it, then the version number
present in the configuration file is used. In this case, the file is pushed up
using the group id, the module name (which is the same as the file name), and
the version configured in the config file.
*/
package main

import (
	"fmt"
	"os"

	"github.com/bobbyabraham/artifactoryClient/afcl"
	"github.com/codegangsta/cli"
)

func main() {

	app := cli.NewApp()

	app.Name = "artifactoryClient"
	app.Usage = "Client application to Push/Pull library files into Artifactory"

	setSubCommands(app)

	app.Run(os.Args)
}

//  setSubCommands sets Commands and arguments for the application
func setSubCommands(app *cli.App) {
	app.Author = "Bobby Abraham"
	app.Version = "0.0.1"
	app.Email = "abraham.bobby@gmail.com"
	app.Commands = []cli.Command{
		{
			Name:        "push",
			Usage:       "Push Files to Artifactory",
			Description: "Pushes files to files artifactory based on the supplied configuration file",
			Flags: []cli.Flag{
				cli.StringFlag{
					Name:  "configFile",
					Usage: "Configuration file",
				},
			},
			Action: processPush,
		},
	}

}

// processPush proesses the push command
func processPush(cli *cli.Context) {

	configFilePath := cli.String("configFile")
	if len(configFilePath) < 1 {
		defaultConfigFile := "/config/conops_security_shlib.properties"
		cwd, err := os.Getwd()
		if err != nil {
			fmt.Println("Unable to obtain current working dir")
			os.Exit(1)
		}

		configFilePath = cwd + defaultConfigFile
	}

	afcl.ProcessArtifactoryClient(configFilePath)
}


text:
package proto_test

import (
	"testing"

	"github.com/golang/protobuf/proto"
	pb "github.com/golang/protobuf/proto/testdata"
)

func TestGetExtensionsWithMissingExtensions(t *testing.T) {
	msg := &pb.MyMessage{}
	ext1 := &pb.Ext{}
	if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil {
		t.Fatalf("Could not set ext1: %s", ext1)
	}
	exts, err := proto.GetExtensions(msg, []*proto.ExtensionDesc{
		pb.E_Ext_More,
		pb.E_Ext_Text,
	})
	if err != nil {
		t.Fatalf("GetExtensions() failed: %s", err)
	}
	if exts[0] != ext1 {
		t.Errorf("ext1 not in returned extensions: %T %v", exts[0], exts[0])
	}
	if exts[1] != nil {
		t.Errorf("ext2 in returned extensions: %T %v", exts[1], exts[1])
	}
}

func TestGetExtensionStability(t *testing.T) {
	check := func(m *pb.MyMessage) bool {
		ext1, err := proto.GetExtension(m, pb.E_Ext_More)
		if err != nil {
			t.Fatalf("GetExtension() failed: %s", err)
		}
		ext2, err := proto.GetExtension(m, pb.E_Ext_More)
		if err != nil {
			t.Fatalf("GetExtension() failed: %s", err)
		}
		return ext1 == ext2
	}
	msg := &pb.MyMessage{Count: proto.Int32(4)}
	ext0 := &pb.Ext{}
	if err := proto.SetExtension(msg, pb.E_Ext_More, ext0); err != nil {
		t.Fatalf("Could not set ext1: %s", ext0)
	}
	if !check(msg) {
		t.Errorf("GetExtension() not stable before marshaling")
	}
	bb, err := proto.Marshal(msg)
	if err != nil {
		t.Fatalf("Marshal() failed: %s", err)
	}
	msg1 := &pb.MyMessage{}
	err = proto.Unmarshal(bb, msg1)
	if err != nil {
		t.Fatalf("Unmarshal() failed: %s", err)
	}
	if !check(msg1) {
		t.Errorf("GetExtension() not stable after unmarshaling")
	}
}

func TestExtensionsRoundTrip(t *testing.T) {
	msg := &pb.MyMessage{}
	ext1 := &pb.Ext{
		Data: proto.String("hi"),
	}
	ext2 := &pb.Ext{
		Data: proto.String("there"),
	}
	exists := proto.HasExtension(msg, pb.E_Ext_More)
	if exists {
		t.Error("Extension More present unexpectedly")
	}
	if err := proto.SetExtension(msg, pb.E_Ext_More, ext1); err != nil {
		t.Error(err)
	}
	if err := proto.SetExtension(msg, pb.E_Ext_More, ext2); err != nil {
		t.Error(err)
	}
	e, err := proto.GetExtension(msg, pb.E_Ext_More)
	if err != nil {
		t.Error(err)
	}
	x, ok := e.(*pb.Ext)
	if !ok {
		t.Errorf("e has type %T, expected testdata.Ext", e)
	} else if *x.Data != "there" {
		t.Errorf("SetExtension failed to overwrite, got %+v, not 'there'", x)
	}
	proto.ClearExtension(msg, pb.E_Ext_More)
	if _, err = proto.GetExtension(msg, pb.E_Ext_More); err != proto.ErrMissingExtension {
		t.Errorf("got %v, expected ErrMissingExtension", e)
	}
	if _, err := proto.GetExtension(msg, pb.E_X215); err == nil {
		t.Error("expected bad extension error, got nil")
	}
	if err := proto.SetExtension(msg, pb.E_X215, 12); err == nil {
		t.Error("expected extension err")
	}
	if err := proto.SetExtension(msg, pb.E_Ext_More, 12); err == nil {
		t.Error("expected some sort of type mismatch error, got nil")
	}
}

func TestNilExtension(t *testing.T) {
	msg := &pb.MyMessage{
		Count: proto.Int32(1),
	}
	if err := proto.SetExtension(msg, pb.E_Ext_Text, proto.String("hello")); err != nil {
		t.Fatal(err)
	}
	if err := proto.SetExtension(msg, pb.E_Ext_More, (*pb.Ext)(nil)); err == nil {
		t.Error("expected SetExtension to fail due to a nil extension")
	} else if want := "proto: SetExtension called with nil value of type *testdata.Ext"; err.Error() != want {
		t.Errorf("expected error %v, got %v", want, err)
	}
	// Note: if the behavior of Marshal is ever changed to ignore nil extensions, update
	// this test to verify that E_Ext_Text is properly propagated through marshal->unmarshal.
}


text:
class PrefService;
class SupervisedUserSiteList;

namespace base {
class DictionaryValue;
class FilePath;
}

namespace component_updater {
class SupervisedUserWhitelistInstaller;
}

namespace user_prefs {
class PrefRegistrySyncable;
}

namespace sync_pb {
class ManagedUserWhitelistSpecifics;
}

class SupervisedUserWhitelistService : public syncer::SyncableService {
 public:
  typedef base::Callback<void(
      const std::vector<scoped_refptr<SupervisedUserSiteList> >&)>
      SiteListsChangedCallback;

  SupervisedUserWhitelistService(
      PrefService* prefs,
      component_updater::SupervisedUserWhitelistInstaller* installer,
      const std::string& client_id);
  ~SupervisedUserWhitelistService() override;

  static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);

  void Init();

  // Adds a callback to be called when the list of loaded site lists changes.
  // The callback will also be called immediately, to get the current
  // site lists.
  void AddSiteListsChangedCallback(const SiteListsChangedCallback& callback);

  // Returns a map (from CRX ID to name) of whitelists to be installed,
  // specified on the command line.
  static std::map<std::string, std::string> GetWhitelistsFromCommandLine();

  // Loads an already existing whitelist on disk (i.e. without downloading it as
  // a component).
  void LoadWhitelistForTesting(const std::string& id,
                               const base::string16& title,
                               const base::FilePath& path);

  // Unloads a whitelist. Public for testing.
  void UnloadWhitelist(const std::string& id);

  // Creates Sync data for a whitelist with the given |id| and |name|.
  // Public for testing.
  static syncer::SyncData CreateWhitelistSyncData(const std::string& id,
                                                  const std::string& name);

  // SyncableService implementation:
  syncer::SyncMergeResult MergeDataAndStartSyncing(
      syncer::ModelType type,
      const syncer::SyncDataList& initial_sync_data,
      scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
      scoped_ptr<syncer::SyncErrorFactory> error_handler) override;
  void StopSyncing(syncer::ModelType type) override;
  syncer::SyncDataList GetAllSyncData(syncer::ModelType type) const override;
  syncer::SyncError ProcessSyncChanges(
      const tracked_objects::Location& from_here,
      const syncer::SyncChangeList& change_list) override;

 private:
  // The following methods handle whitelist additions, updates and removals,
  // usually coming from Sync.
  void AddNewWhitelist(base::DictionaryValue* pref_dict,
                       const sync_pb::ManagedUserWhitelistSpecifics& whitelist);
  void SetWhitelistProperties(
      base::DictionaryValue* pref_dict,
      const sync_pb::ManagedUserWhitelistSpecifics& whitelist);
  void RemoveWhitelist(base::DictionaryValue* pref_dict, const std::string& id);

  enum WhitelistSource {
    FROM_SYNC,
    FROM_COMMAND_LINE,
  };

  // Registers a new or existing whitelist.
  void RegisterWhitelist(const std::string& id,
                         const std::string& name,
                         WhitelistSource source);

  void GetLoadedWhitelists(
      std::vector<scoped_refptr<SupervisedUserSiteList>>* whitelists);

  void NotifyWhitelistsChanged();

  void OnWhitelistReady(const std::string& id,
                        const base::string16& title,
                        const base::FilePath& whitelist_path);
  void OnWhitelistLoaded(
      const std::string& id,
      base::TimeTicks start_time,
      const scoped_refptr<SupervisedUserSiteList>& whitelist);

  PrefService* prefs_;
  component_updater::SupervisedUserWhitelistInstaller* installer_;

  std::string client_id_;
  std::vector<SiteListsChangedCallback> site_lists_changed_callbacks_;

  // The set of registered whitelists. A whitelist might be registered but not
  // loaded yet, in which case it will not be in |loaded_whitelists_| yet.
  // On the other hand, every loaded whitelist has to be registered.
  std::set<std::string> registered_whitelists_;
  std::map<std::string, scoped_refptr<SupervisedUserSiteList> >
      loaded_whitelists_;

  base::WeakPtrFactory<SupervisedUserWhitelistService> weak_ptr_factory_;

  DISALLOW_COPY_AND_ASSIGN(SupervisedUserWhitelistService);
};

#endif  // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_WHITELIST_SERVICE_H_


text:
from setuptools import setup, find_packages

setup(name="chowda",
      version="0.0.1",
      author="Christine Miller",
      author_email="chrismamil@gmail.com",
      description="CLAMS data analyzer.",
      url="https://github.com/chrismamil/chowda",
      license="MIT",
      namespace_packages=["chowda"],
      packages=find_packages())


text:
export {
  match,
  matchPath,
  MemoryRouter,
  Prompt,
  Redirect,
  Route,
  RouteComponentProps,
  RouteProps,
  Router,
  RouterChildContext,
  StaticRouter,
  Switch,
  withRouter
} from 'react-router';
import * as React from 'react';
import * as H from 'history';

export interface AndroidBackButtonProps {
  children: React.Component[];
}

export class AndroidBackButton extends React.Component<AndroidBackButtonProps> {}

export class DeepLinking extends React.Component {}

export interface LinkProps {
  component?: React.Component;
  replace?: boolean;
  style?: any;
  to: H.LocationDescriptor;
}

export class Link extends React.Component<LinkProps> {}

export interface NativeRouterProps {
  getUserConfirmation?: Function;
  keyLength?: number;
}

export class NativeRouter extends React.Component<NativeRouterProps> {}


text:
import * as html from '../../src/ml_parser/ast';
import {HtmlParser} from '../../src/ml_parser/html_parser';
import {PRESERVE_WS_ATTR_NAME, removeWhitespaces} from '../../src/ml_parser/html_whitespaces';
import {TokenizeOptions} from '../../src/ml_parser/lexer';

import {humanizeDom} from './ast_spec_utils';

{
  describe('removeWhitespaces', () => {
    function parseAndRemoveWS(template: string, options?: TokenizeOptions): any[] {
      return humanizeDom(removeWhitespaces(new HtmlParser().parse(template, 'TestComp', options)));
    }

    it('should remove blank text nodes', () => {
      expect(parseAndRemoveWS(' ')).toEqual([]);
      expect(parseAndRemoveWS('\n')).toEqual([]);
      expect(parseAndRemoveWS('\t')).toEqual([]);
      expect(parseAndRemoveWS('    \t    \n ')).toEqual([]);
    });

    it('should remove whitespaces (space, tab, new line) between elements', () => {
      expect(parseAndRemoveWS('

\t
\n
')).toEqual([
        [html.Element, 'br', 0],
        [html.Element, 'br', 0],
        [html.Element, 'br', 0],
        [html.Element, 'br', 0],
      ]);
    });

    it('should remove whitespaces from child text nodes', () => {
      expect(parseAndRemoveWS('

')).toEqual([
        [html.Element, 'div', 0],
        [html.Element, 'span', 1],
      ]);
    });

    it('should remove whitespaces from the beginning and end of a template', () => {
      expect(parseAndRemoveWS(` <br>\t`)).toEqual([
        [html.Element, 'br', 0],
      ]);
    });

    it('should convert &ngsp; to a space and preserve it', () => {
      expect(parseAndRemoveWS('
foo&ngsp;bar
')).toEqual([
        [html.Element, 'div', 0],
        [html.Element, 'span', 1],
        [html.Text, 'foo', 2],
        [html.Text, ' ', 1],
        [html.Element, 'span', 1],
        [html.Text, 'bar', 2],
      ]);
    });

    it('should replace multiple whitespaces with one space', () => {
      expect(parseAndRemoveWS('\n\n\nfoo\t\t\t')).toEqual([[html.Text, ' foo ', 0]]);
      expect(parseAndRemoveWS('   \n foo  \t ')).toEqual([[html.Text, ' foo ', 0]]);
    });

    it('should not replace  ', () => {
      expect(parseAndRemoveWS(' ')).toEqual([[html.Text, '\u00a0', 0]]);
    });

    it('should not replace sequences of  ', () => {
      expect(parseAndRemoveWS('  foo  ')).toEqual([
        [html.Text, '\u00a0\u00a0foo\u00a0\u00a0', 0]
      ]);
    });

    it('should not replace single tab and newline with spaces', () => {
      expect(parseAndRemoveWS('\nfoo')).toEqual([[html.Text, '\nfoo', 0]]);
      expect(parseAndRemoveWS('\tfoo')).toEqual([[html.Text, '\tfoo', 0]]);
    });

    it('should preserve single whitespaces between interpolations', () => {
      expect(parseAndRemoveWS(`{{fooExp}} {{barExp}}`)).toEqual([
        [html.Text, '{{fooExp}} {{barExp}}', 0],
      ]);
      expect(parseAndRemoveWS(`{{fooExp}}\t{{barExp}}`)).toEqual([
        [html.Text, '{{fooExp}}\t{{barExp}}', 0],
      ]);
      expect(parseAndRemoveWS(`{{fooExp}}\n{{barExp}}`)).toEqual([
        [html.Text, '{{fooExp}}\n{{barExp}}', 0],
      ]);
    });

    it('should preserve whitespaces around interpolations', () => {
      expect(parseAndRemoveWS(` {{exp}} `)).toEqual([
        [html.Text, ' {{exp}} ', 0],
      ]);
    });

    it('should preserve whitespaces around ICU expansions', () => {
      expect(parseAndRemoveWS(`<span> {a, b, =4 {c}} </span>`, {tokenizeExpansionForms: true}))
          .toEqual([
            [html.Element, 'span', 0],
            [html.Text, ' ', 1],
            [html.Expansion, 'a', 'b', 1],
            [html.ExpansionCase, '=4', 2],
            [html.Text, ' ', 1],
          ]);
    });

    it('should preserve whitespaces inside
 elements', () => {
      expect(parseAndRemoveWS(`<pre><strong>foo</strong>\n<strong>bar</strong></pre>`)).toEqual([
        [html.Element, 'pre', 0],
        [html.Element, 'strong', 1],
        [html.Text, 'foo', 2],
        [html.Text, '\n', 1],
        [html.Element, 'strong', 1],
        [html.Text, 'bar', 2],
      ]);
    });

    it('should skip whitespace trimming in <textarea>', () => {
      expect(parseAndRemoveWS(`<textarea>foo\n\n  bar</textarea>`)).toEqual([
        [html.Element, 'textarea', 0],
        [html.Text, 'foo\n\n  bar', 1],
      ]);
    });

    it(`should preserve whitespaces inside elements annotated with ${PRESERVE_WS_ATTR_NAME}`,
       () => {
         expect(parseAndRemoveWS(`<div ${PRESERVE_WS_ATTR_NAME}><img> <img></div>`)).toEqual([
           [html.Element, 'div', 0],
           [html.Element, 'img', 1],
           [html.Text, ' ', 1],
           [html.Element, 'img', 1],
         ]);
       });
  });
}


text:
package org.arquillian.smart.testing.strategies.categorized;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
import java.util.HashSet;
import java.util.Arrays;
import java.util.stream.Collectors;

import java.util.stream.Stream;
import org.arquillian.smart.testing.TestSelection;

import static org.arquillian.smart.testing.strategies.categorized.CategorizedTestsDetector.CATEGORIZED;

public abstract class AbstractParser {

    private final CategorizedConfiguration strategyConfig;
    private final List<String> specifiedCategories;
    private final List<String> excludedCategories;

    AbstractParser(CategorizedConfiguration strategyConfig) {
        this.strategyConfig = strategyConfig;
        specifiedCategories = Arrays.stream(strategyConfig.getCategories())
            .map(this::changeIfNonCaseSensitive)
            .collect(Collectors.toList());
        excludedCategories = Arrays.stream(strategyConfig.getExcludedCategories())
            .map(this::changeIfNonCaseSensitive)
            .collect(Collectors.toList());
    }

    TestSelection getTestSelectionIfMatched(Class<?> clazz) {
        if (strategyConfig.isMethods()) {
            return getSelectionWithMethods(clazz);
        }
        return shouldBeIncluded(findCategories(clazz.getAnnotations())) ? new TestSelection(clazz.getName(), CATEGORIZED)
            : TestSelection.NOT_MATCHED;
    }

    private boolean matchesCategories(Collection<String> presentCategories, Collection<String> categories) {
        if (presentCategories.isEmpty()) {
            return false;
        }

        final List<String> intersection = presentCategories.stream()
            .filter(category -> isSpecified(category, new ArrayList<>(categories)))
            .collect(Collectors.toList());
        return !intersection.isEmpty();
    }

    private boolean shouldBeIncluded(Collection<String> presentCategories) {
        if (specifiedCategories.isEmpty()) {
            return true;
        }
        return matchesCategories(presentCategories, specifiedCategories);
    }

    private boolean areCategoriesIncluded(Collection<String> presentCategories) {
        return shouldBeIncluded(presentCategories) && !matchesCategories(presentCategories, excludedCategories);
    }

    private TestSelection getSelectionWithMethods(Class<?> clazz) {
        List<String> classLevelCategories = findCategories(clazz.getAnnotations());
        List<String> applicableMethodNames = getTestMethods(clazz)
            .stream()
            .map(method -> new CategorizedMethod(method, classLevelCategories))
            .filter(method -> areCategoriesIncluded(method.getCategories()))
            .map(CategorizedMethod::getName)
            .collect(Collectors.toList());
        if (applicableMethodNames.size() == getTestMethods(clazz).size()) {
            return new TestSelection(clazz.getName(), CATEGORIZED);
        }
        if (!applicableMethodNames.isEmpty()) {
            return new TestSelection(clazz.getName(), applicableMethodNames, CATEGORIZED);
        }
        return TestSelection.NOT_MATCHED;
    }

    private List<Method> getTestMethods(Class<?> clazz) {
        return Arrays.stream(clazz.getMethods())
            .filter(this::isTestMethod)
            .collect(Collectors.toList());
    }

    protected String changeIfNonCaseSensitive(String category) {
        return strategyConfig.isCaseSensitive() ? category : category.toLowerCase();
    }

    protected abstract List<String> findCategories(Annotation[] annotations);

    protected abstract boolean isSpecified(String category, List<String> specifiedCategories);

    protected abstract boolean isTestMethod(Method method);

    private class CategorizedMethod {

        private final String name;
        private final Set<String> categories;

        CategorizedMethod(Method method, Collection<String> classLevelCategories) {
            this.name = method.getName();
            this.categories = Stream.concat(classLevelCategories.stream(), findCategories(method.getAnnotations()).stream())
                .collect(Collectors.toSet());
        }

        Set<String> getCategories() {
            return categories;
        }

        String getName() {
            return name;
        }
    }
}


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.starquestminecraft</groupId>
        <artifactId>bukkit-plugin</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>com.starquestminecraft.bukkit</groupId>
    <artifactId>powertools</artifactId>
    <version>1.0.3</version>

    <name>SQPowerTools</name>
    <description>A plugin that adds custom items.</description>

    <developers>
        <developer>
            <id>GingerWalnut</id>
            <email>Ginger_Walnut@comcast.net</email>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <dependencies>
        <dependency>
            <groupId>org.inventivetalent</groupId>
            <artifactId>particleapi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.starquestminecraft.bukkit</groupId>
            <artifactId>empire</artifactId>
            <version>3.1.33</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

</project>


text:
layout: post
title: ScienceDirect Mobile App from Elsevier is Here!
categories:
- Library News and Events
- Research Online
tags:
- apps
- Elsevier
- Mobile
- mobile devices
- ScienceDirect
status: publish
type: post
published: true
meta:
  _edit_last: '16'
---
Want to access full-text scientific articles from one of the world's largest scientific, technical, and medical information providers, but not near a computer?  You can now access Elsevier ScienceDirect content on your iPhone, iPod touch, or iPad with a new free app available in iTunes.

The only thing you need to get started is to register on ScienceDirect.com.  You will have to do this while on campus, but after that you will be able to use the application anywhere. As part of the registration process you will need to create a username and password (different from your Northeastern username and password) and provide Elsevier with your Northeastern email address.  Your Northeastern email address is used to verify that you are a member of the Northeastern community.

Try it out and let us know what you think, either here or in the comments!


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

	<!--
	This test file exemplifies a virtual-patch rule.

	Protection #1: Any request whose URI is /foo.jsp (despite content-type) will have
	               the 'bar' parameter checked to see if its alphanumeric. If a parameter
				   fails validation, the message "zomg attax" will be logged.

	-->

<policy>

	<settings>
		<mode>redirect</mode>
		<error-handling>
			<default-redirect-page>/security/error.jsp</default-redirect-page>
			<block-status>403</block-status>
		</error-handling>
	</settings>

	<virtual-patches>
		<virtual-patch id="1234" path="/foo.jsp" variable="request.parameters.bar"
			pattern="[0-9a-zA-Z]" message="zomg attax" />
	</virtual-patches>

</policy>


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

<TITLE>
MediaItemMetadata
</TITLE>

<META NAME="date" CONTENT="2013-08-28">

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

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

android.support.v7.media

Class MediaItemMetadata

java.lang.Object
  android.support.v7.media.MediaItemMetadata

public final class MediaItemMetadata
extends java.lang.Object

Constants for specifying metadata about a media item as a Bundle.

 Media item metadata is described as a bundle of key/value pairs as defined
 in this class.  The documentation specifies the type of value associated
 with each key.

 An application may specify additional custom metadata keys but there is no guarantee
 that they will be recognized by the destination.

Field Summary

static java.lang.String
KEY_ALBUM_ARTIST

          String key: Album artist name.

static java.lang.String
KEY_ALBUM_TITLE

          String key: Album title.

static java.lang.String
KEY_ARTIST

          String key: Artist name.

static java.lang.String
KEY_ARTWORK_URI

          String key: Artwork Uri.

static java.lang.String
KEY_AUTHOR

          String key: Author name.

static java.lang.String
KEY_COMPOSER

          String key: Composer name.

static java.lang.String
KEY_DISC_NUMBER

          Integer key: Disc number within a collection.

static java.lang.String
KEY_TITLE

          String key: Track title.

static java.lang.String
KEY_TRACK_NUMBER

          Integer key: Track number (such as a track on a CD).

static java.lang.String
KEY_YEAR

          Integer key: Year of publication.

Method Summary

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

KEY_ALBUM_ARTIST

public static final java.lang.String KEY_ALBUM_ARTIST

String key: Album artist name.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_ALBUM_TITLE

public static final java.lang.String KEY_ALBUM_TITLE

String key: Album title.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_ARTWORK_URI

public static final java.lang.String KEY_ARTWORK_URI

String key: Artwork Uri.

 The value is a string URI for an image file associated with the media item,
 such as album or cover art.

See Also:
Constant Field Values

KEY_ARTIST

public static final java.lang.String KEY_ARTIST

String key: Artist name.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_AUTHOR

public static final java.lang.String KEY_AUTHOR

String key: Author name.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_COMPOSER

public static final java.lang.String KEY_COMPOSER

String key: Composer name.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_TITLE

public static final java.lang.String KEY_TITLE

String key: Track title.

 The value is a string suitable for display.

See Also:
Constant Field Values

KEY_YEAR

public static final java.lang.String KEY_YEAR

Integer key: Year of publication.

 The value is an integer year number.

See Also:
Constant Field Values

KEY_TRACK_NUMBER

public static final java.lang.String KEY_TRACK_NUMBER

Integer key: Track number (such as a track on a CD).

 The value is a one-based integer track number.

See Also:
Constant Field Values

KEY_DISC_NUMBER

public static final java.lang.String KEY_DISC_NUMBER

Integer key: Disc number within a collection.

 The value is a one-based integer disc number.

See Also:
Constant Field Values

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD