text:
package com.facebook.buck.intellij.ideabuck.ws.buckevents;

import com.facebook.buck.event.external.events.BuckEventExternalInterface;
import com.facebook.buck.intellij.ideabuck.ws.buckevents.consumers.BuckEventsConsumerFactory;
import com.facebook.buck.intellij.ideabuck.ws.buckevents.handlers.BuckEventHandler;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;

import java.io.IOException;

public class BuckEventsQueue implements BuckEventsQueueInterface {

    private static final Logger LOG = Logger.getInstance(BuckEventsQueue.class);

    private final BuckEventsConsumerFactory mFactory;
    private ObjectMapper mObjectMapper;
    private BuckEventsAdapter mBuckEventsAdapter;

    public BuckEventsQueue(ObjectMapper objectMapper, BuckEventsConsumerFactory factory) {
        mFactory = factory;
        mObjectMapper = objectMapper;
        mBuckEventsAdapter = new BuckEventsAdapter();
    }

    @Override
    public void add(String rawMessage, BuckEventExternalInterface event) {
        handleEvent(rawMessage, event);
    }

    private void handleEvent(final String rawMessage, final BuckEventExternalInterface event) {
        ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
            @Override
            public void run() {
                synchronized (BuckEventsQueue.this.mFactory) {
                    try {
                        String eventName = event.getEventName();
                        BuckEventHandler buckEventHandler = mBuckEventsAdapter.get(eventName);
                        if (buckEventHandler == null) {
                            LOG.warn("Unhandled event '" + eventName + "': " + rawMessage);
                        } else {
                            buckEventHandler.handleEvent(
                                rawMessage,
                                event,
                                mFactory,
                                mObjectMapper);
                        }
                    } catch (IOException e) {
                        // TODO(cosmin1123) Handle exception
                        e.printStackTrace();
                    }
                }
            }
        });
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.deviceatlas.cloud.deviceidentification.utils;

import com.deviceatlas.cloud.deviceidentification.client.ClientException;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.io.UnsupportedEncodingException;

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

public class StringUtils {
    private StringUtils() {
    }
    /**
     * Creates an MD5 hash from a string.
     */
    public static String md5(String toDigest) throws ClientException {
        StringBuilder md5String = new StringBuilder();

        try {
            byte[] input = toDigest.getBytes("UTF-8");
            MessageDigest digester = MessageDigest.getInstance("MD5");
            digester.reset();
            digester.update(input);
            byte[] messageDigest = digester.digest();
            for (int i = 0; i < messageDigest.length; i++) {
                md5String.append(Integer.toHexString(0xFF & messageDigest[i]));
            }

        } catch (NoSuchAlgorithmException ex) {
            throw new ClientException("Error creating Md5 from user-agent: ", ex);
        } catch (UnsupportedEncodingException ex) {
            throw new ClientException("Error creating Md5 from user-agent: ", ex);
        }

        return md5String.toString();
    }

    /**
     * Normalize the keys in the passed in key value map. This lower-cases the
     * keys, replaces "_" with "-" and removes any HTTP_ prefix.
     * @param keyVals - Key Values
     * @return Map
     */
    public static Map<String, String> normaliseKeys(Map<String, String> keyVals) {
        Map<String, String> normalised = new HashMap<String, String>();

        for (Map.Entry<String, String> keys : keyVals.entrySet()) {
            String value = keys.getValue();
            String key   = keys.getKey().toLowerCase().replace("_", "-");
            // if it was routed through Apache it may have a HTTP_ prefix
            // remove this... it was already lowercased and _ replaced with -
            if(key.startsWith("http-")) {
                key = key.substring(5);
            }
            normalised.put(key, value);
        }

        return normalised;
    }
}


text:
/*
 *  This file is part of Alfred Library.
 *
 *  Alfred Library is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Alfred Library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Alfred Library.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.github.thiagonego.alfred.data;

import java.util.Calendar;
import java.util.Date;

/**
 * Utilit�rio para realizar c�lculos com Data.
 *
 * @author Marlon Silva Carvalho
 * @since 03/06/2009
 */
final public class CalculoData {

	/**
	 * Somar uma determinada quantidade de dias a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeDias Quantidade de dias a somar.
	 * @return Data com a soma de dias.
	 */
	public static Date somarDias(Date data, int quantidadeDias) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.DAY_OF_MONTH, quantidadeDias);
		return calendar.getTime();
	}

	/**
	 * Subtrair uma determinada quantidade de dias a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeDias Quantidade de dias a subtrair.
	 * @return Data com a subtra��o de dias.
	 */
	public static Date subtrairDias(Date data, int quantidadeDias) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.DAY_OF_MONTH, -quantidadeDias);
		return calendar.getTime();
	}

	/**
	 * Somar uma determinada quantidade de meses a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeMeses Quantidade de meses a somar.
	 * @return Data com a soma de meses.
	 */
	public static Date somarMeses(Date data, int quantidadeMeses) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.MONTH, quantidadeMeses);
		return calendar.getTime();
	}

	/**
	 * Subtrair uma determinada quantidade de meses a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeMeses Quantidade de meses a subtrair.
	 * @return Data com a subtra��o de meses.
	 */
	public static Date subtrairMeses(Date data, int quantidadeMeses) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.MONTH, -quantidadeMeses);
		return calendar.getTime();
	}

	/**
	 * Somar uma determinada quantidade de anos a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeAnos Quantidade de anos a somar.
	 * @return Data com a soma de anos.
	 */
	public static Date somarAnos(Date data, int quantidadeAnos) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.YEAR, quantidadeAnos);
		return calendar.getTime();
	}

	/**
	 * Subtrair uma determinada quantidade de anos a uma data.
	 *
	 * @param data Data.
	 * @param quantidadeAnos Quantidade de anos a subtrair.
	 * @return Data com a subtra��o de anos.
	 */
	public static Date subtrairAnos(Date data, int quantidadeAnos) {
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(data);
		calendar.add(Calendar.YEAR, -quantidadeAnos);
		return calendar.getTime();
	}

	/**
	 * Calcular a quantidade de dias que existe entre as duas datas informadas.
	 *
	 * @param data1 Data 1.
	 * @param data2 Data 2.
	 * @return Diferen�a em dias.
	 */
	public static int calcularDiferencaDias(Date data1, Date data2) {
		Calendar calendarData1 = Calendar.getInstance();
		calendarData1.setTime(data1);
		Calendar calendarData2 = Calendar.getInstance();
		calendarData2.setTime(data2);
		return Math.abs(calendarData1.get(Calendar.DAY_OF_YEAR) - calendarData2.get(Calendar.DAY_OF_YEAR));
	}

}


text:
module.exports = function () {
    this.setDefaultTimeout(60 * 1000)
};


text:
using Microsoft.SharePoint.Client.NetCore.Runtime;
using System;
using System.ComponentModel;
using System.Xml;

namespace Microsoft.SharePoint.Client.NetCore
{
    [ScriptType("SP.VisualizationField", ValueObject = true, ServerTypeId = "{4f32c806-2dde-4142-9e2b-2e2e082fb9cf}")]
    public class VisualizationField : ClientValueObject
    {
        private string m_internalName;

        private string m_style;

        [Remote]
        public string InternalName
        {
            get
            {
                return this.m_internalName;
            }
            set
            {
                this.m_internalName = value;
            }
        }

        [Remote]
        public string Style
        {
            get
            {
                return this.m_style;
            }
            set
            {
                this.m_style = value;
            }
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override string TypeId
        {
            get
            {
                return "{4f32c806-2dde-4142-9e2b-2e2e082fb9cf}";
            }
        }

        [EditorBrowsable(EditorBrowsableState.Never)]
        public override void WriteToXml(XmlWriter writer, SerializationContext serializationContext)
        {
            if (writer == null)
            {
                throw new ArgumentNullException("writer");
            }
            if (serializationContext == null)
            {
                throw new ArgumentNullException("serializationContext");
            }
            writer.WriteStartElement("Property");
            writer.WriteAttributeString("Name", "InternalName");
            DataConvert.WriteValueToXmlElement(writer, this.InternalName, serializationContext);
            writer.WriteEndElement();
            writer.WriteStartElement("Property");
            writer.WriteAttributeString("Name", "Style");
            DataConvert.WriteValueToXmlElement(writer, this.Style, serializationContext);
            writer.WriteEndElement();
            base.WriteToXml(writer, serializationContext);
        }

        protected override bool InitOnePropertyFromJson(string peekedName, JsonReader reader)
        {
            bool flag = base.InitOnePropertyFromJson(peekedName, reader);
            if (flag)
            {
                return flag;
            }
            if (peekedName != null)
            {
                if (!(peekedName == "InternalName"))
                {
                    if (peekedName == "Style")
                    {
                        flag = true;
                        reader.ReadName();
                        this.m_style = reader.ReadString();
                    }
                }
                else
                {
                    flag = true;
                    reader.ReadName();
                    this.m_internalName = reader.ReadString();
                }
            }
            return flag;
        }
    }
}


text:
#include "ThinClientGatewayTest.hpp"

DUNIT_MAIN
  { runListenerInit(); }
END_MAIN


text:
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
BOOL OnCreate(HWND hWnd, LPCREATESTRUCT lpCreateStruct);
void OnSize(HWND hWnd, UINT state, INT cx, INT cy);
void OnLButtonDown(HWND hWnd, BOOL fDoubleClick, INT x, INT y, UINT keyFlags);
void OnRButtonDown(HWND hWnd, BOOL fDoubleClick, INT x, INT y, UINT keyFlags);
void OnPaint(HWND hWnd);
void OnClose(HWND hWnd);
void OnDestroy(HWND hWnd);
void OnCommand(HWND hWnd, INT id, HWND hWndCtl, UINT codeNotify);
HBRUSH OnCtlColorStatic(HWND, HDC hdc, HWND, INT);


text:
pix-table
=========

Python Modules for RGB LED Table (Raspberry PI)

table example: http://stetro.wordpress.com/2013/02/28/led-coffee-table-raspberry-pi/


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

		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" href="css/scatterplot.css" />
		<link rel="stylesheet" href="css/default.css" />
		<link rel="stylesheet" href="css/histogram.css" />

Vizualization of Third Millennium Ideal Gas and Condensed Phase Thermochemical Database for Combustion

Goos, E.; Burcat, A.; Ruscic, B.: Aerospace Engineering, and Argonne National Laboratory, Chemistry Division, 2010

Elemental composition

		<svg class="bubble"></svg>

Molecular weight distribution

		<svg class="chart"></svg>

Uncertainty on standard enthalpy of formation at 298K

		<svg class="scatter"></svg>

Individual molecule entries

Sort: <select></select>


text:
package Login_UC7240;

import junit.framework.TestCase;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;

public class login_test_6 extends TestCase {
    private Selenium selenium;
    public void setUp() {
    	selenium = new DefaultSelenium("localhost",
            4444, "*iexplore", "http://array-qa.nci.nih.gov/caarray/");
    	//*iehta - internet explore experimental browser for https
    	//*chrome - firefox experimental browser for https
    	//*firefox - firefox browser
    	//*iexplore - internet explore browser
        selenium.start();
    }

    public void testcaarray() throws InterruptedException {
		selenium.open("/caarray/protected/project/workspace.action");
		selenium.type("j_username", "caarrayadmin");
		selenium.type("j_password", "");
		Thread.sleep(5000);
		selenium.click("//span/span");
		selenium.waitForPageToLoad("30000");
		for (int second = 0;; second++) {
			if (second >= 10) fail("timeout");
			try { if (selenium.isTextPresent("Invalid username and/or password, please try again.")) break; } catch (Exception e) {}
			Thread.sleep(1000);
		}

    }

    public void tearDown() {
        //selenium.stop();
    }
}