text:
$packageName = 'dispcalgui.install'
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$url = 'https://sourceforge.net/projects/dispcalgui/files/release/3.1.2.0/DisplayCAL-3.1.2.0-Setup.exe/download'
$checksum = '2bf4283d937cde0fbd96a6a89a06444733738487'
$checksumType = 'sha1'
$validExitCodes = @(0)

Install-ChocolateyPackage -PackageName "$packageName" `
                          -FileType "$installerType" `
                          -SilentArgs "$silentArgs" `
                          -Url "$url" `
                          -ValidExitCodes $validExitCodes `
                          -Checksum "$checksum" `
                          -ChecksumType "$checksumType"


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MongoDB.Bson;
using MongoDB.Bson.Serialization;

namespace connectYourselfAPI.Utils {
	public class RandomIdGenerator : IIdGenerator {
		private static readonly Random _random = new Random();

		public object GenerateId(object container, object document) {
			var timestamp = DateTime.UtcNow;
			var machine = _random.Next(0, 16777215);
			var pid = (short)_random.Next(0, 32768);
			var increment = _random.Next(0, 16777215);

			return new ObjectId(timestamp, machine, pid, increment);
		}

		public bool IsEmpty(object id) {
			return (id == null || (ObjectId)id == ObjectId.Empty);
		}
	}
}

redpajama_set_name: RedPajamaGithub


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

namespace Sdl.Community.GroupShareKit.Models.Response
{
    public enum PublishProjectStatus
    {
        Uploading = 0,
        Scheduled = 1,
        Publishing = 2,
        Completed = 3,
        Cancelled = 4,
        Error = 5,
        Cancelling = 6
    }

    public class PublishingStatus
    {
        /// <summary>
        /// Gets or sets the description
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// Gets or sets the error message
        /// </summary>
        public string ErrorMessage { get; set; }
        /// <summary>
        /// Gets or sets the number of completed precent
        /// </summary>
        public int PercentComplete { get; set; }
        /// <summary>
        /// Gets or sets the status number
        /// </summary>
        public PublishProjectStatus Status { get; set; }
    }
}


text:
package io.lettuce.core.protocol;

import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import io.netty.buffer.ByteBuf;

/**
 * Unit tests for {@link DecodeBufferPolicies}.
 *
 * @author Mark Paluch
 */
@ExtendWith(MockitoExtension.class)
class DecodeBufferPoliciesUnitTests {

    @Mock
    ByteBuf byteBuf;

    @Test
    void shouldAlwaysDiscard() {

        DecodeBufferPolicy policy = DecodeBufferPolicies.always();

        policy.afterDecoding(byteBuf);
        policy.afterPartialDecode(byteBuf);
        policy.afterCommandDecoded(byteBuf);

        verify(byteBuf, never()).discardSomeReadBytes();
        verify(byteBuf, times(3)).discardReadBytes();
    }

    @Test
    void shouldAlwaysDiscardSomeReadBytes() {

        DecodeBufferPolicy policy = DecodeBufferPolicies.alwaysSome();

        policy.afterDecoding(byteBuf);
        policy.afterPartialDecode(byteBuf);
        policy.afterCommandDecoded(byteBuf);

        verify(byteBuf, never()).discardReadBytes();
        verify(byteBuf, times(3)).discardSomeReadBytes();
    }

}


text:
<?php

$url = 'https://api.calltrackingmetrics.com/api/v1/formreactor/FRT472ABB2C5B9B141A9EC85C3E43485B09FE8438726CB549EB';
$un = 'a79840d5e803e3d968de6d480a7e86f14feba9d';
$pw = 'b36406afae9e6c5b6f16ceb8a1e361fe6afa';

//url-ify the data for the POST
$fields = array(
	'caller_name' => urlencode($_POST['caller_name']),
	'email' => urlencode($_POST['email']),
	'phone_number' => urlencode($_POST['phone_number']),
);

//url-ify the data for the POST
foreach($fields as $key=>$value) {
	$fields_string .= $key.'='.$value.'&';
}
rtrim($fields_string, '&');
//open connection
$ch = curl_init();

//set the url, number of POST vars, POST data
curl_setopt($ch, CURLOPT_USERPWD, $un . ":" . $pw);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, count($fields));
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);

//execute post
$result = curl_exec($ch);

//close connection
curl_close($ch);
header("location: https://www.morningsiderecovery.com/thank-you/");
?>


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using NETGeographicLib;

namespace Projections
{
    public partial class EllipsoidPanel : UserControl
    {
        Ellipsoid m_ell = null;
        public EllipsoidPanel()
        {
            InitializeComponent();
            m_ell = new Ellipsoid();
            m_majorRadiusTextBox.Text = m_ell.MajorRadius.ToString();
            m_flatteningTextBox.Text = m_ell.Flattening.ToString();

            m_minorRadiusTextBox.Text = m_ell.MinorRadius.ToString();
            m_quarterMeridianTextBox.Text = m_ell.QuarterMeridian.ToString();
            m_areaTextBox.Text = m_ell.Area.ToString();
            m_volumeTextBox.Text = m_ell.Volume.ToString();
            m_2ndFlatTextBox.Text = m_ell.SecondFlattening.ToString();
            m_3rdFlatTextBox.Text = m_ell.ThirdFlattening.ToString();
            m_ecc2TextBox.Text = m_ell.EccentricitySq.ToString();
            m_2ecc2TextBox.Text = m_ell.SecondEccentricitySq.ToString();
        }

        private void OnSet(object sender, EventArgs e)
        {
            try
            {
                double a = Double.Parse(m_majorRadiusTextBox.Text);
                double f = Double.Parse(m_flatteningTextBox.Text);
                m_ell = new Ellipsoid(a, f);

                m_minorRadiusTextBox.Text = m_ell.MinorRadius.ToString();
                m_quarterMeridianTextBox.Text = m_ell.QuarterMeridian.ToString();
                m_areaTextBox.Text = m_ell.Area.ToString();
                m_volumeTextBox.Text = m_ell.Volume.ToString();
                m_2ndFlatTextBox.Text = m_ell.SecondFlattening.ToString();
                m_3rdFlatTextBox.Text = m_ell.ThirdFlattening.ToString();
                m_ecc2TextBox.Text = m_ell.EccentricitySq.ToString();
                m_2ecc2TextBox.Text = m_ell.SecondEccentricitySq.ToString();
            }
            catch (Exception xcpt)
            {
                MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void OnCalculateLatitudes(object sender, EventArgs e)
        {
            try
            {
                double phi = Double.Parse(m_phiTextBox.Text);
                m_parametericLatTextBox.Text = m_ell.ParametricLatitude(phi).ToString();
                m_geocentricLatTextBox.Text = m_ell.GeocentricLatitude(phi).ToString();
                m_rectifyingLatTextBox.Text = m_ell.RectifyingLatitude(phi).ToString();
                m_authalicLatTextBox.Text = m_ell.AuthalicLatitude(phi).ToString();
                m_conformalTextBox.Text = m_ell.ConformalLatitude(phi).ToString();
                m_isometricLatTextBox.Text = m_ell.IsometricLatitude(phi).ToString();
            }
            catch (Exception xcpt)
            {
                MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }

        private void OnValidate(object sender, EventArgs e)
        {
            try
            {
                Ellipsoid ee = new Ellipsoid(50000.0, .003);
                ee = new Ellipsoid();
                ee.AuthalicLatitude(30.0);
                ee.CircleHeight(30.0);
                ee.CircleRadius(30.0);
                ee.ConformalLatitude(30.0);
                ee.GeocentricLatitude(30.0);
                ee.InverseAuthalicLatitude(30.0);
                ee.InverseConformalLatitude(30.0);
                ee.InverseGeocentricLatitude(30.0);
                ee.InverseIsometricLatitude(30.0);
                ee.InverseParametricLatitude(30.0);
                ee.InverseRectifyingLatitude(30.0);
                ee.IsometricLatitude(30.0);
                ee.MeridianDistance(30.0);
                ee.MeridionalCurvatureRadius(30.0);
                ee.NormalCurvatureRadius(30.0, 60.0);
                ee.ParametricLatitude(30.0);
                ee.RectifyingLatitude(30.0);
                ee.TransverseCurvatureRadius(30.0);

                MessageBox.Show("no errors detected", "OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception xcpt)
            {
                MessageBox.Show(xcpt.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    }
}


text:
package slick.testutil

import org.junit.{Test, Assert}
import java.io._
import scala.Console

/**
 * A JUnit test which compares the console output against a recorded test run.
 */
abstract class RecordedTest {
  private[this] var _out: PrintStream = _

  def out = _out

  def run: Unit

  def basename: String

  def mask(line: String): String = line

  @Test def test(): Unit = {
    val logData = {
      val log = new ByteArrayOutputStream()
      val logP = new PrintStream(log)
      _out = logP
      Console.withOut(logP)(run)
      val logA = log.toByteArray
      Console.out.write(logA)
      val r = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(logA)))
      val masked = new StringWriter()
      val w = new BufferedWriter(masked)
      var line: String = null
      while({ line = r.readLine(); line != null }) w.write(mask(line)+"\n")
      w.flush()
      masked.getBuffer.toString
    }

    val check = {
      val f = new File(basename+".check")
      if(f.isFile) Some(read(f))
      else {
        // Disabled because now we have doctests without a check file:
        // Console.err.println("Warning: "+f+" not found")
        None
      }
    }

    val out = new FileOutputStream(new File(basename+"-run.log"))
    try {
      val w = new OutputStreamWriter(out, "UTF-8")
      w.write(logData)
      w.close
    } finally out.close

    check.foreach { checkData =>
      val matched = logData == checkData
      if(!matched) Assert.fail("Output does not match: See "+basename+"(.check,-run.log)")
    }
  }

  def read(f: File): String = {
    val buf = new StringBuilder
    val a = new Array[Char](4096)
    val in = new FileInputStream(f)
    try {
      val r = new InputStreamReader(in, "UTF-8")
      var num: Int = 0
      while({ num = r.read(a); num > 0}) buf.append(new String(a, 0, num))
      buf.toString()
    } finally in.close
  }
}


text:
package main

import (
	"encoding/json"
	"flag"
	"io/ioutil"
	"log"
	"net/http"

	"git.code4.in/spinner"
)

var (
	versionFile    string
	updateListFile string
)

func init() {
	flag.StringVar(&versionFile, "version", "spinner-central.version", "spinner central version file")
	flag.StringVar(&updateListFile, "update", "node-update.json", "spinner node update list file")
}

func readUpdateList() (map[string]map[string]string, error) {
	data, err := ioutil.ReadFile(updateListFile)
	if err != nil {
		return nil, err
	}
	var list map[string]map[string]string
	if err := json.Unmarshal(data, &list); err != nil {
		return nil, err
	}
	return list, nil
}

func genUpdateList(local string, list map[string]map[string]string, hostname string) []string {
	files := []string{local}
	m := datacenter.findMachine(hostname)
	if m == nil {
		return files
	}
	gps := datacenter.whichGroups(m)
	for _, gp := range gps {
		val := list[gp.Name]
		if val != nil && len(val) > 0 {
			for f := range val {
				files = append(files, f)
			}
		}
	}
	return files
}

func checkUpdate(rw http.ResponseWriter, req *http.Request) {
	req.ParseForm()
	version := req.FormValue("version")
	local := spinner.ReadVersion(versionFile)
	if local == "" || version == local {
		rw.WriteHeader(http.StatusNotModified)
		return
	}
	list, err := readUpdateList()
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		log.Println(err.Error())
		return
	}
	files := genUpdateList(local, list, req.FormValue("h"))
	b, err := json.Marshal(files)
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		log.Println(err.Error())
		return
	}
	rw.Write(b)
}

func findUpdateLocal(list map[string]map[string]string, hostname, remote string) string {
	m := datacenter.findMachine(hostname)
	if m == nil {
		return ""
	}
	gps := datacenter.whichGroups(m)
	var local string
	var name string
	for _, gp := range gps {
		val := list[gp.Name]
		if val != nil && len(val) > 0 {
			for k, v := range val {
				if k == remote && (name == "" || len(gp.Name) > len(name)) {
					name = gp.Name
					local = v
				}
			}
		}
	}
	return local
}

func doUpdate(rw http.ResponseWriter, req *http.Request) {
	req.ParseForm()
	file := req.FormValue("file")
	digest := req.FormValue("md5")
	if file == "" {
		rw.WriteHeader(http.StatusBadRequest)
		return
	}
	list, err := readUpdateList()
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		log.Println(err.Error())
		return
	}
	local := findUpdateLocal(list, req.FormValue("h"), file)
	if local == "" {
		rw.WriteHeader(http.StatusNotFound)
		return
	}
	s, err := spinner.FileMd5(local)
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		log.Println(err.Error())
		return
	}
	if digest == s {
		rw.WriteHeader(http.StatusNotModified)
		return
	}
	data, err := ioutil.ReadFile(local)
	if err != nil {
		rw.WriteHeader(http.StatusInternalServerError)
		log.Println(err.Error())
		return
	}
	rw.Write(data)
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syn. meth. fung. (Göttingen) 1: 83 (1801)

#### Original name
Sphaeria inquinans var. aceris Pers.

### Remarks
null


text:
App.service('Widget.sensor_graph', /*@ngInject*/ function(SensorGraph, Sensor) {
    return {
        template: '/templates/widgets/sensor_graph.html',
        render ($scope, widget) {
            var sensorIds = widget.sensor_ids.map(Number);
            var element = document.querySelector("#widget_" + widget.id + ' .chart_container');

            $scope.reload = function() {
                sensorIds.forEach(function(sensorId) {
                    Sensor.forceReadValue(sensorId);
                });
            };

            SensorGraph($scope, element, 230, sensorIds, `?from=${widget.from || 0}`);
        }
    };
});


text:
var mkdirp = require('mkdirp');
var error = require('../../../libs/error/bsod.js');
var clicolour = require("cli-color");
var datea = "./app/recovery/rollback/backup";
var exec = require('child_process').exec;
var debug = require('debug')('boot:recovery');

//var PythonShell = require('python-shell');
exports.createBackup = function createBackup(x){
  if(x === "test"){
    mkdirp("./tmp/test", function (err) {
      if(err){
        error.throwError("RECOVERY_ROLLBACK_CREATE_BACKUP_DIR:"+err.code, err, err.code);
      }
      else {
        //console.log(clicolour.cyanBright("Jakhu ")  + clicolour.yellowBright("recovery ")  + "Created Rollback DIR for today");
      };
    });
    // Copy test stuff
    exec("cp -R ./misc/testing/* ./tmp/", function(){
      //console.log(clicolour.cyanBright("Jakhu ")  + clicolour.yellowBright("recovery ")  + "Created rollback Backup");
    });
  } else {
    mkdirp(datea, function (err) {
      if(err){
        error.throwError("RECOVERY_ROLLBACK_CREATE_BACKUP_DIR:"+err.code, err, err.code);
      }
      else {
        debug("Created Rollback DIR for today");
      };
    });
    // Create backup
    if(process.env.NODE_ENV !== "dev"){
    exec("cp -R ./ ~/.jakhu/recovery/rollback/backup", function(error, stdout, stderr){
      debug("Created rollback Backup");
    });
    // rm .git
    exec("rm -rf ~/.jakhu/recovery/rollback/backup/.git ~/.jakhu/recovery/rollback/backup/node_modules", function(error, stdout, stderr){
      debug("Removed .git folder and node_modules");
    });
  } else {
    debug("Not backing up as dev env");
  }
  };
  };


text:
layout: page
title: Street International Seminar
date: 2016-05-24
author: Karen Chang
tags: weekly links, java
status: published
summary: In a porta orci. Nunc dictum massa rutrum dolor.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 03/11/2018
  endDate: 03/13/2018
  ctyhocn: STFMSHX
  groupCode: SIS
published: true
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse cursus tincidunt elit, eu facilisis magna tristique at. Nam in quam vel tortor convallis ultricies sit amet id diam. Duis quis congue orci. Maecenas dolor orci, auctor sed enim quis, vehicula aliquet turpis. Nunc id interdum justo, nec blandit augue. In rutrum malesuada pellentesque. Sed tincidunt nulla sed purus molestie, non viverra nulla ultrices. Nunc posuere mauris erat, et dapibus ligula laoreet vel. Donec euismod sem non tortor pharetra vestibulum. Sed sagittis risus nisi, et facilisis orci aliquam vitae. Aenean porttitor mattis risus eget finibus. Pellentesque ac mi vel ligula tempor aliquam eget non mauris.

* Maecenas consectetur tortor sed tellus faucibus mollis.

Cras ullamcorper et quam quis iaculis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi ullamcorper ex nec feugiat hendrerit. Vivamus ullamcorper, sem vel posuere vehicula, mauris nunc iaculis felis, ut porta leo nisi id arcu. In accumsan faucibus risus non condimentum. Donec justo nulla, lobortis sit amet orci faucibus, varius convallis ex. Praesent quis lacus eros. Aliquam tellus libero, mattis eget sollicitudin a, efficitur in nulla. Fusce et mollis neque.


text:
package piotrsliwa.blackbocs;

class TestSuite {

    private final Object testContainer;

    TestSuite(Object testContainer) {
        this.testContainer = testContainer;
    }

    void runAllTests() throws CannotFindAnyMatchingTestException {
        throw new CannotFindAnyMatchingTestException();
    }

}


text:
package com.googlecode.xmlzen;

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

/**
 * An {@link ArrayList} of {@link XmlSlicer} objects
 *
 * It acts just like a normal {@link List}, just with additional methods
 * for data conversion. XmlSlicerList is returned from XmlSlicer when
 * slicing ends up with multiple results (i.e. similar tags).
 *
 * Example use:
 * <pre>
 * List<String> tags = XmlSlicer.cut(someBigXml).getAll('sometag')
 *     .asList();
 * //Equivalent to following:
 * XmlSlicerList tagList = XmlSlicer.cut(someBigXml).getAll('sometag');
 * List<String> tags = tagList.asList();
 * </pre>
 *
 * @author Tomas Varaneckas <tomas.varaneckas@gmail.com>
 * @version $Id$
 */
public class XmlSlicerList extends ArrayList<XmlSlicer> {

    private static final long serialVersionUID = 4963346323773728803L;

    /**
     * Retuns a List of String values of underlying XmlSlicer objects.
     * Thread safe.
     *
     * @return List of Strings with tag values
     */
    public List<String> asList() {
        XmlSlicerList temp;
        synchronized (this) {
            temp = (XmlSlicerList) this.clone();
        }
        final List<String> result = new ArrayList<String>();
        for (final XmlSlicer slice : temp) {
            result.add(slice.toString());
        }
        return result;
    }
}


text:
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        Toggle navigation

      </button>
      Blog

Palestrantes

Patrocinadores

          Contato

Evento

Staff

      <form class="navbar-form navbar-left" role="search">

          <input type="text" class="form-control" placeholder="Buscar">

        <button type="submit" class="btn btn-default">Buscar</button>
      </form>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Kew Bull. , Addit. Ser. 9: 82 (1983)

#### Original name
Hygrocybe mellita Pegler

### Remarks
null


text:
.dj_ie .dojoxGridRtl .dojoxGridHeader table {
	float:none;
}
.dojoxGridRtl .dojoxGridCell {
	text-align:right;
}
.dj_ie8 .dojoxGridRtl .dojoxGridCell {
	border-left: none;
}
.dojoxGridRtl .dojoxGridArrowButtonNode {
	float:left;
}
.dojoxGridRtl .dojoxGridLoading,
.dojoxGridRtl .dojoxGridError,
.dojoxGridRtl .dojoxGridNoData {
	background-position:right;
	padding-right:25px;
	padding-left:0px;
}
.dojoxGridRtl .dojoxGridHeader {
	margin-left: 0;
	margin-right: -1px;
}
.dojoxGridRtl .dojoxGridCell {
	text-align: right;
}
.dojoxGridRtl .dojoxGridFBarStatus {
	margin-left: 0;
	margin-right: 9px;
}
.dojoxGridRtl .dojoxGridFBarClearFilterBtn {
	margin-left: 0;
	margin-right: 10px;
}
.dojoxGridRtl .dojoxGridFBarCloseBtn {
	margin: 0 0 0 4px;
	float: left;
}
.dj_ie .dojoxGridRtl .dojoxGridFBarCloseBtn {
	left: 2px;
	right: auto;
}
.dijitRtl .dojoxGridFDPaneRelation {
	margin: 0 4px 3px 0;
}
.dijitRtl .dojoxGridFDPane .dijitAccordionTitleFocus {
	margin-right: 0;
	margin-left: 14px;
}
.dijitRtl .dojoxGridFDPane .dijitAccordionTitle .dijitButton {
	left: 3px;
	right: auto;
}
.dj_ie6 .dijitRtl .dojoxGridFDPane .dijitAccordionTitle .dijitButton{
	left: -290px;
}
.dijitRtl .dojoxGridFDPaneBtns {
	left: 0;
	right: auto;
}
.dijitRtl .dojoxGridFDPaneBtns .dijitButton,
.dijitRtl .dojoxGridClearFilterBtns .dijitButton,
.dijitRtl .dojoxGridFCBoxEndValue {
	float: left;
}
.dijitRtl .dojoxGridFCBoxRangeValueTxt {
	margin-left: 0;
	margin-right: 4px;
}
.dijitRtl .dojoxGridFStatusTipTitle {
	margin-left: 1em;
	margin-right: 0;
}
.dijitRtl .dojoxGridFStatusTipHandle {
	padding-left: 16px;
	padding-right: 0;
}
.dijitRtl .dojoxGridFStatusTipDetail .dijitButton {
	left: 0;
	right: auto;
}
.dijitRtl .dojoxGridTrueBox,
.dijitRtl .dojoxGridFalseBox {
	float: right;
}
.claro .dojoxGridRtl .dojoxGridFBar {
	border-right: 1px solid white;
}
.claro .dijitRtl .dojoxGridFStatusTip th div {
	border-left: 1px solid #BCBCBC;
	border-right: 1px solid white;
}
.claro .dijitRtl .dojoxGridFStatusTip th.lastColumn div {
	border-left: 1px solid #BCBCBC;
}
.dojoxGridRtl .dojoxGridDescription {
	text-align: right;
	margin-right: 9px;
}
.dojoxGridRtl .dojoxGridPaginatorStep {
	float: left;
}
.dojoxGridRtl .dojoxGridPaginatorGotoDiv {
	margin: 0 2px 0 6px;
}
.dojoxGridRtl .dojoxGridWardButton {
	float: right;
}
.dojoxGridRtl .dojoxGridfirstPageBtn {
	margin-right: 1px;
}
.dojoxGridRtl .dojoxGridfirstPageBtnDisable {
	margin-left: 1px;
}
.dojoxGridRtl .dojoxGridprevPageBtn {
	margin: 2px 9px 0 5px;
}
.dojoxGridRtl .dojoxGridprevPageBtnDisable {
	margin: 2px 9px 0 5px;
}
.dojoxGridRtl .dojoxGridnextPageBtn {
	margin-right: 3px;
}
.dojoxGridRtl .dojoxGridnextPageBtnDisable {
	margin-right: 3px;
}
.dojoxGridRtl .dojoxGridInactived {
	margin: 1px 5px 0 6px;
	float: right;
}
.dojoxGridRtl .dojoxGridActived {
	margin: 1px 5px 0 6px;
	float: right;
}
.dijitRtl .dojoxGridDialogButton {
	float: left;
	margin-bottom: 10px;
}
.dijitRtl .dojoxGridInactiveSwitch {
	float: right;
}
.dijitRtl .dojoxGridActivedSwitch {
	float: right;
}
.dijitRtl .dojoxGridSeparator {
	float: right;
}
.dojoxGridRtl .dojoxGridCellBorderLeftTopDIV{
	left: auto;
	right: 0;
	border-width: 2px 2px 0 0;
	border-color: gray gray transparent transparent;
}
.dojoxGridRtl .dojoxGridCellBorderRightBottomDIV{
	right: auto;
	left: 0;
	border-width: 0 0 2px 2px;
	border-color: transparent transparent gray gray;
}
.dojoxGridRtl .dojoxGridSortBtnSingle {
	right: auto;
	left: 0px;
}
.dojoxGridRtl .dojoxGridSortBtnNested {
	right: auto;
	left: 10px;
}
.dojoxGridRtl .dojoxGridCellOver  .dojoxGridSortBtn,
.dj_ie6 dojoxGridRtl .dojoxGridCellOver .dojoxGridSortBtn,
.dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortBtn {
	border-left: none;
	border-right: 1px solid #999999;
}
.dijitRtl .dojoxGridCellOver .dojoxGridSortNode,
.dijitRtl .dojoxGridCellSortFocus .dojoxGridSortNode,
.dijitRtl .dojoxGridSingleSorted .dojoxGridHeader .dojoxGridCellOver .dojoxGridSortNodeMain,
.dijitRtl .dojoxGridSingleSorted .dojoxGridHeader .dojoxGridCellSortFocus .dojoxGridSortNodeMain {
	margin-right: auto;
	margin-left: 10px;
}
.dijitRtl .dojoxGridSorted .dojoxGridCellOver .dojoxGridSortNode,
.dijitRtl .dojoxGridSorted .dojoxGridCellSortFocus .dojoxGridSortNode {
	margin-right: auto;
	margin-left: 24px;
}
html.dijitRtl > body .dojoxGridCellOver .dojoxGridSortNode .dojoxGridSortBtnSingle {
	right: auto;
	left: -10px;
}
html.dijitRtl > body .dojoxGridCellSortFocus .dojoxGridSortNode .dojoxGridSortBtnSingle,
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellOver .dojoxGridSortNodeMain .dojoxGridSortBtnSingle,
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellSortFocus .dojoxGridSortNodeMain .dojoxGridSortBtnSingle {
	right: auto;
	left: -10px;
}
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellOver .dojoxGridSortBtnSingle,
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellSortFocus .dojoxGridSortBtnSingle,
html.dijitRtl > body .dojoxGridNestSorted .dojoxGridCellOver .dojoxGridSortNodeMain .dojoxGridSortBtnSingle,
html.dijitRtl > body .dojoxGridNestSorted .dojoxGridCellSortFocus .dojoxGridSortNodeMain .dojoxGridSortBtnSingle {
	right: auto;
	left: -28px;
}
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellOver .dojoxGridSortBtnNested,
html.dijitRtl > body .dojoxGridSorted .dojoxGridCellSortFocus .dojoxGridSortBtnNested {
	right: auto;
	left: -17px;
}
.dojoxGridRtl .dojoxGridCellOver .dojoxGridSortBtnNested,
.dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortBtnNested {
	background-position: -159px 5px;
	padding-left:8px;
}
.dojoxGridRtl .dojoxGridCellOver .dojoxGridSortNodeAsc .dojoxGridSortBtnNested,
.dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortNodeAsc .dojoxGridSortBtnNested {
	background-position: -139px 5px;
}
.dojoxGridRtl .dojoxGridCellOver .dojoxGridSortNodeDesc .dojoxGridSortBtnNested,
.dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortNodeDesc .dojoxGridSortBtnNested {
	background-position: -179px 5px;
}
.dojoxGridRtl .dojoxGridCellOver .dojoxGridSortBtnNested,
.dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortBtnNested {
	padding-left: 8px;
	padding-right: 0;
}
.dj_ie6 .dojoxGridRtl .dojoxGridCellOver .dojoxGridSortBtnNested,
.dj_ie6 .dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortBtnNested,
.dj_ie6 .dojoxGridRtl .dojoxGridCellOver .dojoxGridSortBtnNested,
.dj_ie6 .dojoxGridRtl .dojoxGridCellSortFocus .dojoxGridSortBtnNested {
	padding-left:0px;
}


text:
<?php

use Bono\Helper\URL;

// BONO
return [
    // Application Name
    'name' => 'VIPER Production',

    // The Middlewares
    'bono.middlewares' => [
        'KrisanAlfa\\Kraken\\Middleware\\ControllerMiddleware',

        'App\\Middleware\\SlugMiddleware',

        'KrisanAlfa\\Theme\\Middleware\\NotificationMiddleware',

        'Bono\\Middleware\\ContentNegotiatorMiddleware',

        'Bono\\Middleware\\StaticPageMiddleware',

        'ROH\\BonoAuth\\Middleware\\AuthMiddleware' => [
            'driver'       => 'ROH\\BonoAuth\\Driver\\OAuth',
            'baseUrl'      => 'https://account.app.xinix.co.id/index.php',
            'authUrl'      => '/oauth/auth', // URI to access auth
            'tokenUrl'     => '/oauth/token', // URI to get token
            'revokeUrl'    => '/oauth/revoke', // URI to revoke auth
            'clientId'     => '53f6184bb0460455148b456a.client.account.xinix.co.id',
            'clientSecret' => 'ed9d2e5e0ca5e9ddf9b2cc3284bf002c',
            'redirectUri'  => URL::site('/login'), // application redirect url
            'scope'        => 'user',
            'debug'        => true,
        ],

        'Bono\\Middleware\\SessionMiddleware',
    ],
];


text:
status: publish
tags:
- Project 365
published: true
title: Day 359 - Donald
type: post
meta:
  aktt_tweeted: "1"
  _edit_last: "2"
  aktt_notify_twitter: "yes"
layout: post
---

Christmas dinner: Everyone was having a jolly good time, except Donald, who felt it was "awfully warm in here".


text:
package com.exorathcloud.service.events;

import com.exorath.service.commons.portProvider.PortProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by Shortninja66 on 12/26/2016.
 */
public class Main {
    private static Service service;
    private static final Logger LOG = LoggerFactory.getLogger(Main.class);

    public static void main(String[] args) {
        Main.service = null;//Todo assign service implementation here
        LOG.info("Service " + Main.service.getClass() + " instantiated");
        Transport.setup(Main.service, PortProvider.getEnvironmentPortProvider());
        LOG.info("HTTP transport setup");
    }
}


text: from pygett.base import Gett


text:
class Link < ActiveRecord::Base
  belongs_to :topic

  validates_length_of :title,       :in      => 3..255
  validates_length_of :slug,        :in      => 3..255
  validates_length_of :url,         :in      => 12..255
  validates_length_of :description, :minimum => 5

  validate_url :url, :check_http => false
end


text:
'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
var _ = require('lodash');

// function createStubsAndSpies(stubs, spyManager){
//   return function(items){
//     stubs.add(items);
//     var spyManger = items.map((item)=>`${item}Something`);
//     spyManager.add(spyManger);

//     items.forEach((item)=>{
//       stubs.return(item)('returnValue', spyManager.get(`${item}Something`));
//     });
//   };
// }

function CreateSpy(spyManager) {
  return function (spy) {
    if (_.has(spy, 'callback')) {
      var title = spy.title;
      var returnType = spy.returnType;
      var callback = spy.callback;

      spyManager.addReturn(title)(returnType || 'returnValue', callback);
      return spyManager.get(title);
    }

    spyManager.add(spy);
    return spyManager.get(spy);
  };
}

function CreateStub(stubs, createSpy) {
  return function (stub) {
    if (_.has(stub, 'callback') || _.has(stub, 'spy')) {
      var title = stub.title;
      var returnType = stub.returnType;
      var callback = stub.callback;
      var spy = stub.spy;

      title = _.isArray(title) ? title : [title];
      if (spy) {
        spy = createSpy(spy);
        stubs.return.apply(this, title)('returnValue', spy);
      } else {
        stubs.return.apply(this, title)(returnType || 'returnValue', callback);
      }

      return stubs.get(title);
    }

    stubs.add(stub);
    return stubs.get(stub);
  };
}

exports.default = function (stubs, spyManager) {
  var createSpy = CreateSpy(spyManager);
  var createStub = CreateStub(stubs, createSpy);
  return function (list) {
    list.forEach(function (item) {
      if (_.has(item, 'stub')) {
        createStub(item.stub);
      } else if (_.has(item, 'spy')) {
        createSpy(item.spy);
      }
    });
  };
};

module.exports = exports['default'];


text:
git-split
=========

### Todo / Status

- [X] Structure, Planning, and GitHub Repo
- [x] Prepare Interactive Script
- [ ] Apply Interactive Script
	- [ ] Can split simple repos (no merges).
	- [ ] Can split simple merges (no conflicts).
	- [ ] Can split conflicted merges (no branch collisions, no file collisions).
	- [ ] Can split with branch problems
		- [ ] necessary branches already exist in target repo.
	- [ ] Can split with file collisions
		- [ ] file already exists at destination - delete-first, then do branch manipulations
		- [ ] file already exists at destination - overwrite (with final data)
- [ ] Publish to NPM
- ? UnitTests

# WARNING: this is WIP

# Purpose

Git Split is an interactive utility that helps you split a repository into two or more repositories, while preserving the commit history as much as possible.

If you've ever started a project out as a single repo, but later wanted to extract some of those files to distribute separately, this tool is for you.

# Features

- `git-split prepare` is an interactive utility to help you build a description of which files you want to extract, and how to deal with collisions in the target repo.
- `git-split apply` will take the provided config files, and run them on your source repos and produce the new repositories with just the history you want to preserve.
- Optional: Integrates an alias into your git config so you can use it as `git split`
- Optional: Creates a commit deleting these files from your original source repository.

# Documentation

1. Documentation for the `.splitconfig.json` file format can be found under [docs](./docs/splitconfig.json.md).
2. Examples can be found [here](./example/).
3. Documentation on commands and flags can be viewed on the commandline by passing `-h` or `--help`.

### Basics

	$ git split --help

	Usage: git-split <command>

	command
	  prepare          Interactive Git Repository Split Builder -- This command helps you adjust an existing splitconfig file, or helps you create your initial splitconfig files.
	  apply            Apply the git-split configuration files to produce new repositories preserving the history of the files specified therein.
	  installalias     Install a git alias globally so git-split can be called as 'git split'

### Prepare

	$ git split prepare --help

	Usage: git-split prepare [options]

	Options:
	   -c, --configs      Split-config file path(s) to edit or create. (If none, will help you create some)  [`*.splitconfig.json`]
	   -n, --newconfigs   Force-create new Split-configs.
	   -s, --sourcerepo   Source repository to split from.  [`pwd`]
	   --makedelete       Make a delete commit for the files referenced in the passed in configs  [false]

	Interactive Git Repository Split Builder -- This command helps you adjust an existing splitconfig file, or helps you create your initial splitconfig files.

### Apply

	$ git split apply --help

	Usage: git-split apply [options]

	Options:
	   -c, --configs      Split-config file path(s) to read & apply to the source  [`*.splitconfig.json`]
	   -s, --sourcerepo   Source repository to split from.  [`pwd`]

	Apply the git-split configuration files to produce new repositories preserving the history of the files specified therein.

### Install Alias

	$ git split installalias --help

	Usage: git-split installalias
	Install a git alias globally so git-split can be called as `git split`

## Installation

	npm install --global git-split

or

	git clone github.com/fbartho/git-split; cd git-split; npm link

To install the global git alias and using this utility as `git split`, either run:

	$ git-split installalias

Or add the following to your `~/.gitconfig`

	[alias]
		split = !git-split


text:
//
//  LTChatKeyboardFaceEmojiCollectionViewCell.h
//  LTChatUI
//
//  Created by 梁通 on 2017/11/6.
//  Copyright © 2017年 梁通. All rights reserved.
//

#import <UIKit/UIKit.h>

/**
 * 表情键盘
 **/
@interface LTChatKeyboardFaceEmojiCollectionViewCell : UICollectionViewCell

@property (nonatomic, strong) NSString* emojiStr;

@end


text:
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "LandscapeEditorPrivatePCH.h"
#include "LandscapeEdMode.h"
#include "LandscapeEditorObject.h"
#include "LandscapeEditorDetails.h"
#include "LandscapeEditorDetailCustomizations.h"

#include "DetailLayoutBuilder.h"
#include "DetailCategoryBuilder.h"
#include "IDetailPropertyRow.h"
#include "DetailWidgetRow.h"
#include "IDetailGroup.h"
#include "PropertyHandle.h"
#include "PropertyCustomizationHelpers.h"
#include "SAssetDropTarget.h"

#include "Slate/SceneViewport.h"
#include "AssetToolsModule.h"
#include "CanvasTypes.h"

#define LOCTEXT_NAMESPACE "LandscapeEditor.Brushes.Alpha"

class FTextureMaskThumbnailViewportClient : public FViewportClient
{
public:
	FTextureMaskThumbnailViewportClient(TSharedRef<class STextureMaskThumbnail> InParent)
		: Parent(InParent)
	{
	}

	/** FViewportClient interface */
	virtual void Draw(FViewport* Viewport, FCanvas* Canvas) override;

private:
	TWeakPtr<STextureMaskThumbnail> Parent;
};

class STextureMaskThumbnail : public SCompoundWidget
{
	friend FTextureMaskThumbnailViewportClient;

public:
	SLATE_BEGIN_ARGS( STextureMaskThumbnail )
		: _TextureChannel( 0 ) {}
	SLATE_ATTRIBUTE( UTexture2D*, Texture )
	SLATE_ATTRIBUTE( uint8, TextureChannel )
	SLATE_END_ARGS()

	void Construct( const FArguments& InArgs )
	{
		Texture = InArgs._Texture;
		TextureChannel = InArgs._TextureChannel;

		FAssetToolsModule& AssetToolsModule = FModuleManager::LoadModuleChecked<FAssetToolsModule>(TEXT("AssetTools"));
		TWeakPtr<IAssetTypeActions> AssetTypeActions = AssetToolsModule.Get().GetAssetTypeActionsForClass(Texture.Get()->GetClass());
		FLinearColor AssetColor = AssetTypeActions.Pin()->GetTypeColor();

		ChildSlot
		[
			SNew(SBorder)
			.Padding(4.0f)
			.BorderImage( FEditorStyle::GetBrush("PropertyEditor.AssetThumbnailShadow") )
			.OnMouseDoubleClick(this, &STextureMaskThumbnail::OnAssetThumbnailDoubleClick)
			//.OnClicked_Static(&FLandscapeEditorDetailCustomization_AlphaBrush::OnTextureButtonClicked)
			[
				SNew( SBox )
				.ToolTipText(this, &STextureMaskThumbnail::OnGetToolTip)
				.WidthOverride(64)
				.HeightOverride(64)
				[
					SNew(SBorder)
					.Padding(2)
					.BorderImage(FEditorStyle::GetBrush("AssetThumbnail", ".Border"))
					//.BorderBackgroundColor(this, &SAssetThumbnail::GetViewportBorderColorAndOpacity)
					.BorderBackgroundColor(AssetColor)
					//.ColorAndOpacity(this, &SAssetThumbnail::GetViewportColorAndOpacity)
					//.Visibility(this, &SAssetThumbnail::GetViewportVisibility)
					[
						SAssignNew( ViewportWidget, SViewport )
						.EnableGammaCorrection(false)
					]
				]
			]
		];

		ViewportClient = MakeShareable(new FTextureMaskThumbnailViewportClient(SharedThis(this)));

		Viewport = MakeShareable(new FSceneViewport(ViewportClient.Get(), ViewportWidget));

		// The viewport widget needs an interface so it knows what should render
		ViewportWidget->SetViewportInterface( Viewport.ToSharedRef() );
	}

	FReply OnAssetThumbnailDoubleClick(const FGeometry& InMyGeometry, const FPointerEvent& InMouseEvent)
	{
		GEditor->EditObject(Texture.Get());

		return FReply::Handled();
	}

	FText OnGetToolTip() const
	{
		// Display the package name which is a valid path to the object without redundant information
		return FText::FromString(Texture.Get()->GetOutermost()->GetName());
	}

	virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const
	{
		if (Texture.IsBound() || TextureChannel.IsBound())
		{
			UTexture2D* NewTexture = Texture.Get();
			int32 NewTextureChannel = TextureChannel.Get();

			if (NewTexture != CachedTexture
				|| NewTextureChannel != CachedTextureChannel)
			{
				CachedTexture = NewTexture;
				CachedTextureChannel = NewTextureChannel;
				Viewport->Invalidate();
			}
		}

		return SCompoundWidget::OnPaint(Args, AllottedGeometry, MyClippingRect, OutDrawElements, LayerId, InWidgetStyle, bParentEnabled);
	}

private:
	TAttribute<UTexture2D*> Texture;
	TAttribute<uint8> TextureChannel;

	mutable UTexture2D* CachedTexture;
	mutable uint8 CachedTextureChannel;

	TSharedPtr<FTextureMaskThumbnailViewportClient> ViewportClient;
	TSharedPtr<FSceneViewport> Viewport;
	TSharedPtr<SViewport> ViewportWidget;
};

void FTextureMaskThumbnailViewportClient::Draw(FViewport* Viewport, FCanvas* Canvas)
{
	TSharedPtr<STextureMaskThumbnail> PinnedParent = Parent.Pin();
	if (!PinnedParent.IsValid())
	{
		return;
	}

	UTexture2D* Texture = PinnedParent->Texture.Get();

	Canvas->Clear( FLinearColor::Black);

	// Fully stream in the texture before drawing it.
	UTexture2D* Texture2D = Cast<UTexture2D>(Texture);
	if (Texture2D)
	{
		Texture2D->SetForceMipLevelsToBeResident(30.0f);
		Texture2D->WaitForStreaming();
	}

	//Draw the selected texture, uses ColourChannelBlend mode parameter to filter colour channels and apply grayscale
	FCanvasTileItem TileItem( FVector2D( 0.0f, 0.0f ), Texture->Resource, Viewport->GetSizeXY(), FLinearColor::White );
	TileItem.BlendMode = (ESimpleElementBlendMode)(SE_BLEND_RGBA_MASK_START + (1<<PinnedParent->TextureChannel.Get()) + 16);
	Canvas->DrawItem( TileItem );
}

//////////////////////////////////////////////////////////////////////////

TSharedRef<IDetailCustomization> FLandscapeEditorDetailCustomization_AlphaBrush::MakeInstance()
{
	return MakeShareable(new FLandscapeEditorDetailCustomization_AlphaBrush);
}

BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void FLandscapeEditorDetailCustomization_AlphaBrush::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
	if (!IsBrushSetActive("BrushSet_Alpha") && !IsBrushSetActive("BrushSet_Pattern"))
	{
		return;
	}

	IDetailCategoryBuilder& BrushSettingsCategory = DetailBuilder.EditCategory("Brush Settings");

	TSharedRef<IPropertyHandle> PropertyHandle_AlphaTexture = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaTexture));
	DetailBuilder.HideProperty(PropertyHandle_AlphaTexture);
	TSharedRef<IPropertyHandle> PropertyHandle_AlphaTextureChannel = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaTextureChannel));
	DetailBuilder.HideProperty(PropertyHandle_AlphaTextureChannel);

	BrushSettingsCategory.AddProperty(PropertyHandle_AlphaTexture)
	.OverrideResetToDefault(false, FSimpleDelegate())
	.CustomWidget()
	.NameContent()
	[
		PropertyHandle_AlphaTexture->CreatePropertyNameWidget()
	]
	.ValueContent()
	.MinDesiredWidth(250.0f) // copied from SPropertyEditorAsset::GetDesiredWidth
	.MaxDesiredWidth(0)
	[
		SNew(SAssetDropTarget)
		.OnAssetDropped_Static(&FLandscapeEditorDetailCustomization_AlphaBrush::OnAssetDropped, PropertyHandle_AlphaTexture)
		.OnIsAssetAcceptableForDrop_Static(&FLandscapeEditorDetailCustomization_AlphaBrush::OnAssetDraggedOver)
		.ToolTipText(PropertyHandle_AlphaTexture->GetToolTipText())
		[
			SNew(SHorizontalBox)
			+ SHorizontalBox::Slot()
			.Padding(0.0f, 0.0f, 2.0f, 0.0f)
			.AutoWidth()
			[
				SNew(STextureMaskThumbnail)
				.Texture_Static(&FLandscapeEditorDetailCustomization_AlphaBrush::GetObjectPropertyValue<UTexture2D>, PropertyHandle_AlphaTexture)
				.TextureChannel_Static(&FLandscapeEditorDetailCustomization_AlphaBrush::GetPropertyValue<uint8>, PropertyHandle_AlphaTextureChannel)
			]
			+ SHorizontalBox::Slot()
			.FillWidth(1)
			[
				SNew(SObjectPropertyEntryBox)
				.IsEnabled(true)
				.PropertyHandle(PropertyHandle_AlphaTexture)
				.AllowedClass(UTexture2D::StaticClass())
				.AllowClear(false)
			]
		]
	];

	BrushSettingsCategory.AddProperty(PropertyHandle_AlphaTextureChannel)
	.OverrideResetToDefault(false, FSimpleDelegate());

	if (IsBrushSetActive("BrushSet_Pattern"))
	{
		TSharedRef<IPropertyHandle> PropertyHandle_bUseWorldSpacePatternBrush = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, bUseWorldSpacePatternBrush));
		TSharedRef<IPropertyHandle> PropertyHandle_AlphaBrushScale    = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaBrushScale));
		TSharedRef<IPropertyHandle> PropertyHandle_AlphaBrushRotation = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaBrushRotation));
		TSharedRef<IPropertyHandle> PropertyHandle_AlphaBrushPanU     = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaBrushPanU));
		TSharedRef<IPropertyHandle> PropertyHandle_AlphaBrushPanV     = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, AlphaBrushPanV));

		auto NonWorld_Visibility = TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateLambda([=]() { return GetPropertyValue<bool>(PropertyHandle_bUseWorldSpacePatternBrush) ? EVisibility::Collapsed : EVisibility::Visible;   } ));
		auto World_Visibility    = TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateLambda([=]() { return GetPropertyValue<bool>(PropertyHandle_bUseWorldSpacePatternBrush) ? EVisibility::Visible   : EVisibility::Collapsed; } ));

		BrushSettingsCategory.AddProperty(PropertyHandle_bUseWorldSpacePatternBrush);
		BrushSettingsCategory.AddProperty(PropertyHandle_AlphaBrushScale)
			.Visibility(NonWorld_Visibility);
		BrushSettingsCategory.AddProperty(PropertyHandle_AlphaBrushRotation)
			.Visibility(NonWorld_Visibility);
		BrushSettingsCategory.AddProperty(PropertyHandle_AlphaBrushPanU)
			.Visibility(NonWorld_Visibility);
		BrushSettingsCategory.AddProperty(PropertyHandle_AlphaBrushPanV)
			.Visibility(NonWorld_Visibility);

		TSharedRef<IPropertyHandle> PropertyHandle_WorldSpacePatternBrushSettings = DetailBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(ULandscapeEditorObject, WorldSpacePatternBrushSettings));
		PropertyHandle_WorldSpacePatternBrushSettings->MarkHiddenByCustomization();
		uint32 NumWorldSpaceSettings = 0;
		PropertyHandle_WorldSpacePatternBrushSettings->GetNumChildren(NumWorldSpaceSettings);
		for (uint32 i = 0; i < NumWorldSpaceSettings; i++)
		{
			BrushSettingsCategory.AddProperty(PropertyHandle_WorldSpacePatternBrushSettings->GetChildHandle(i))
				.Visibility(World_Visibility);
		}
	}
}
END_SLATE_FUNCTION_BUILD_OPTIMIZATION

bool FLandscapeEditorDetailCustomization_AlphaBrush::OnAssetDraggedOver(const UObject* InObject)
{
	check(InObject);

	return InObject->IsA(UTexture2D::StaticClass());
}

void FLandscapeEditorDetailCustomization_AlphaBrush::OnAssetDropped(UObject* InObject, TSharedRef<IPropertyHandle> PropertyHandle_AlphaTexture)
{
	ensure(PropertyHandle_AlphaTexture->SetValue((const UObject*&)InObject) == FPropertyAccess::Success);
}

#undef LOCTEXT_NAMESPACE


text:
layout: post
date:	2009-01-09 20:00:00
title:  Flowers and Plants of Kaziranga and Nameri
tags: [archived-posts]
categories: archives
permalink: /:categories/:year/:month/:day/:title/
---
Here are the flowers and plants (of course, often un id'd) that I enjoyed seeing in Kaziranga and Nameri...

Update: Arun tells me this is the Spider flower:

<lj-cut text="click here">

That's the BAUHINIA PURPUREA, which will soon bloom in Bangalore, too:

And, from the same family the BAUHINIA ALBA:

Some un id flowers that are a delightful mauve:

http://i297.photobucket.com/albums/mm205/depontis/IMG_0420.jpg

I never found out if these are buds or fruits:

These were fruits, I never knew their name, but they attracted a lot of birds:

These yellow flowers were small and delicate...

These white flowers look like the Flocurtia that blooms in Lalbagh:

These small purple flowers had a lot of cotton stainer bugs over them:

These un id fruits were clumped together on the tree-trunk:

These red flowers and the grass gave a delightful "bouquet" effect:

These white flowers were really the "stars of the forest"!

Even leaves looked stunning in the forest light:

And one tree just had showers of flame....

</lj-cut>

Even coffee-berries (yes, they have coffee, too, in Assam!) looked beautiful in the sunlight!

Will post some more, once I am back from Top Slip...but then, I hope to get some more beautiful images from there, too!

Have a great weekend, everyone.


text:
UHFogOfWarWidget::UHFogOfWarWidget(const FObjectInitializer& ObjectInitializer)
	: Super(ObjectInitializer)
	, HeroSize(10)
	, NPCSize(10)
{
}

void UHFogOfWarWidget::SynchronizeProperties()
{
	Super::SynchronizeProperties();

	MyFOWWidget->SetHeroSize(HeroSize);
	MyFOWWidget->SetNPCSize(NPCSize);
	TAttribute<const FSlateBrush*> WorldImageBinding = OPTIONAL_BINDING_CONVERT(FSlateBrush, WorldBrush, const FSlateBrush*, ConvertWorldImage);
	MyFOWWidget->SetWorldImage(WorldImageBinding);
	TAttribute<const FSlateBrush*> HeroImageBinding = OPTIONAL_BINDING_CONVERT(FSlateBrush, HeroBrush, const FSlateBrush*, ConvertHeroImage);
	MyFOWWidget->SetHeroImage(HeroImageBinding);
	TAttribute<const FSlateBrush*> NPCImageBinding = OPTIONAL_BINDING_CONVERT(FSlateBrush, WorldBrush, const FSlateBrush*, ConvertNPCImage);
	MyFOWWidget->SetNPCImage(NPCImageBinding);
}

void UHFogOfWarWidget::ReleaseSlateResources(bool bReleaseChildren)
{
	Super::ReleaseSlateResources(bReleaseChildren);
	MyFOWWidget.Reset();
}
#if WITH_EDITOR
const FText UHFogOfWarWidget::GetPaletteCategory()
{
	return LOCTEXT("Common", "Common");
}
#endif

TSharedRef<SWidget> UHFogOfWarWidget::RebuildWidget()
{
	MyFOWWidget = SNew(SFogOfWarWidget);
	return MyFOWWidget.ToSharedRef();
}

const FSlateBrush* UHFogOfWarWidget::ConvertWorldImage(TAttribute<FSlateBrush> InImageAsset) const
{
	UHFogOfWarWidget* MutableThis = const_cast<UHFogOfWarWidget*>(this);
	MutableThis->WorldBrush = InImageAsset.Get();
	return &WorldBrush;
}
const FSlateBrush* UHFogOfWarWidget::ConvertHeroImage(TAttribute<FSlateBrush> InImageAsset) const
{
	UHFogOfWarWidget* MutableThis = const_cast<UHFogOfWarWidget*>(this);
	MutableThis->HeroBrush = InImageAsset.Get();
	return &HeroBrush;
}
const FSlateBrush* UHFogOfWarWidget::ConvertNPCImage(TAttribute<FSlateBrush> InImageAsset) const
{
	UHFogOfWarWidget* MutableThis = const_cast<UHFogOfWarWidget*>(this);
	MutableThis->NPCBrush = InImageAsset.Get();
	return &NPCBrush;
}
#undef LOCTEXT_NAMESPACE


text:
package crypto_mb

// in aes.s
//go:noescape
func expandKeyAsm(nr int, key *byte, enc, dec *uint32)


text:
<?xml version="1.0" encoding="ISO-8859-1"?>
<geo:GeodesyML xsi:schemaLocation="urn:xml-gov-au:icsm:egeodesy:0.3" xmlns:geo="urn:xml-gov-au:icsm:egeodesy:0.3" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:ns9="http://www.w3.org/1999/xlink" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:gmx="http://www.isotc211.org/2005/gmx" xmlns:om="http://www.opengis.net/om/2.0" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" gml:id="GeodesyMLType_178">
   <geo:siteLog gml:id="SiteLogType_178">
      <geo:formInformation>
         <geo:preparedBy>Michael Moore</geo:preparedBy>
         <geo:datePrepared>2011-04-06T14:00:00Z</geo:datePrepared>
         <geo:reportType>UPDATE</geo:reportType>
      </geo:formInformation>
      <geo:siteIdentification>
         <geo:siteName>Echuca</geo:siteName>
         <geo:fourCharacterID>ECHU</geo:fourCharacterID>
         <geo:iersDOMESNumber>AUM000026</geo:iersDOMESNumber>
         <geo:cdpNumber></geo:cdpNumber>
         <geo:dateInstalled>2008-10-30T13:00:00Z</geo:dateInstalled>
      </geo:siteIdentification>
      <geo:siteLocation>
         <geo:city>Echuca</geo:city>
         <geo:state>Victoria</geo:state>
         <geo:countryCodeISO>AUS</geo:countryCodeISO>
         <geo:tectonicPlate codeSpace="">Australian</geo:tectonicPlate>
         <geo:approximatePositionITRF>
            <geo:xCoordinateInMeters>-4211542.9074</geo:xCoordinateInMeters>
            <geo:yCoordinateInMeters>2976029.5951</geo:yCoordinateInMeters>
            <geo:zCoordinateInMeters>-3740843.0465</geo:zCoordinateInMeters>
            <geo:latitude-North>0</geo:latitude-North>
            <geo:longitude-East>0</geo:longitude-East>
            <geo:elevation-m_ellips.>(m)</geo:elevation-m_ellips.>
         </geo:approximatePositionITRF>
      </geo:siteLocation>
      <geo:gnssReceivers>
         <geo:gnssReceiver gml:id="GnssReceiverType_788">
            <geo:manufacturerSerialNumber>4828K57132</geo:manufacturerSerialNumber>
            <geo:receiverType codeList="codelist" codeListValue="codeListValue" codeSpace="DummyCodeSpace">TRIMBLE NETR5</geo:receiverType>
            <geo:satelliteSystem>GPS+GLO</geo:satelliteSystem>
            <geo:serialNumber>4828K57132</geo:serialNumber>
            <geo:firmwareVersion>Nav  3.64 / Boot  3</geo:firmwareVersion>
            <geo:elevationCutoffSetting>0.0</geo:elevationCutoffSetting>
            <geo:dateInstalled>2008-10-31T00:00:00Z</geo:dateInstalled>
            <geo:dateRemoved></geo:dateRemoved>
            <geo:temperatureStabilization>0.0</geo:temperatureStabilization>
         </geo:gnssReceiver>
         <geo:dateInserted>2008-10-31T00:00:00Z</geo:dateInserted>
      </geo:gnssReceivers>
      <geo:gnssAntennas>
         <geo:gnssAntenna gml:id="GnssAntennaType_351">
            <geo:manufacturerSerialNumber>30882659</geo:manufacturerSerialNumber>
            <geo:antennaType codeList="codelist" codeListValue="codeListValue" codeSpace="codespace">TRM55971.00     NONE</geo:antennaType>
            <geo:serialNumber>30882659</geo:serialNumber>
            <geo:antennaReferencePoint codeSpace="">BPA</geo:antennaReferencePoint>
            <geo:marker-arpUpEcc.>0.0</geo:marker-arpUpEcc.>
            <geo:marker-arpNorthEcc.>0.0</geo:marker-arpNorthEcc.>
            <geo:marker-arpEastEcc.>0.0</geo:marker-arpEastEcc.>
            <geo:alignmentFromTrueNorth>0.0</geo:alignmentFromTrueNorth>
            <geo:antennaRadomeType codeSpace="CodeSpaceAttr">NONE</geo:antennaRadomeType>
            <geo:radomeSerialNumber></geo:radomeSerialNumber>
            <geo:antennaCableType></geo:antennaCableType>
            <geo:antennaCableLength>0.0</geo:antennaCableLength>
            <geo:dateInstalled>2008-10-31T00:00:00Z</geo:dateInstalled>
            <geo:dateRemoved></geo:dateRemoved>
         </geo:gnssAntenna>
         <geo:dateInserted>2008-10-31T00:00:00Z</geo:dateInserted>
      </geo:gnssAntennas>
      <geo:frequencyStandards>
         <geo:frequencyStandard gml:id="FrequencyStandardType_301">
            <geo:standardType codeSpace="">QUARTZ/INTERNAL</geo:standardType>
            <geo:inputFrequency>0.0</geo:inputFrequency>
            <gml:validTime nilReason="">
               <gml:TimePeriod gml:id="TimePeriodType_442">
                  <gml:beginPosition>2008-10-31T00:00:00Z</gml:beginPosition>
                  <gml:endPosition></gml:endPosition>
               </gml:TimePeriod>
            </gml:validTime>
         </geo:frequencyStandard>
         <geo:dateInserted>2016-04-14T00:03:08Z</geo:dateInserted>
      </geo:frequencyStandards>
      <geo:siteContact gml:id="AgencyPropertyType_356">
         <gmd:MD_SecurityConstraints id="MDSecurityConstraintsType_356">
            <gmd:classification>
               <gmd:MD_ClassificationCode codeList="codelist" codeListValue="codeListValue"/>
            </gmd:classification>
         </gmd:MD_SecurityConstraints>
         <gmd:CI_ResponsibleParty id="CIResponsiblePartyType_356">
            <gmd:contactInfo>
               <gmd:CI_Contact id="CIContactType_356">
                  <gmd:address>
                     <gmd:CI_Address id="CIAddressType_356"/>
                  </gmd:address>
               </gmd:CI_Contact>
            </gmd:contactInfo>
            <gmd:role>
               <gmd:CI_RoleCode codeList="codelist" codeListValue="codeListValue"/>
            </gmd:role>
         </gmd:CI_ResponsibleParty>
      </geo:siteContact>
      <geo:siteMetadataCustodian gml:id="AgencyPropertyType_357">
         <gmd:MD_SecurityConstraints id="MDSecurityConstraintsType_357">
            <gmd:classification>
               <gmd:MD_ClassificationCode codeList="codelist" codeListValue="codeListValue"/>
            </gmd:classification>
         </gmd:MD_SecurityConstraints>
         <gmd:CI_ResponsibleParty id="CIResponsiblePartyType_357">
            <gmd:contactInfo>
               <gmd:CI_Contact id="CIContactType_357">
                  <gmd:address>
                     <gmd:CI_Address id="CIAddressType_357"/>
                  </gmd:address>
               </gmd:CI_Contact>
            </gmd:contactInfo>
            <gmd:role>
               <gmd:CI_RoleCode codeList="codelist" codeListValue="codeListValue"/>
            </gmd:role>
         </gmd:CI_ResponsibleParty>
      </geo:siteMetadataCustodian>
      <geo:moreInformation>
         <geo:dataCenter></geo:dataCenter>
         <geo:urlForMoreInformation></geo:urlForMoreInformation>
         <geo:siteMap>Y</geo:siteMap>
         <geo:siteDiagram>Y</geo:siteDiagram>
         <geo:horizonMask>Y</geo:horizonMask>
         <geo:monumentDescription></geo:monumentDescription>
         <geo:sitePictures>Y</geo:sitePictures>
         <geo:antennaGraphicsWithDimensions></geo:antennaGraphicsWithDimensions>
         <geo:insertTextGraphicFromAntenna></geo:insertTextGraphicFromAntenna>
         <geo:DOI codeSpace="CodeSpaceTODO">CodeTypeTODO</geo:DOI>
      </geo:moreInformation>
   </geo:siteLog>
</geo:GeodesyML>


text:
package org.zalando.nakadi.validation.schema.diff;

import org.everit.json.schema.NumberSchema;

import java.util.Objects;

import static org.zalando.nakadi.domain.SchemaChange.Type.ATTRIBUTE_VALUE_CHANGED;

class NumberSchemaDiff {
    static void recursiveCheck(final NumberSchema numberSchemaOriginal, final NumberSchema numberSchemaUpdate,
                               final SchemaDiffState state) {
        if (!Objects.equals(numberSchemaOriginal.getMaximum(), numberSchemaUpdate.getMaximum())) {
            state.addChange("maximum", ATTRIBUTE_VALUE_CHANGED);
        } else if (!Objects.equals(numberSchemaOriginal.getMinimum(), numberSchemaUpdate.getMinimum())) {
            state.addChange("minimum", ATTRIBUTE_VALUE_CHANGED);
        } else if (!Objects.equals(numberSchemaOriginal.getMultipleOf(), numberSchemaUpdate.getMultipleOf())) {
            state.addChange("multipleOf", ATTRIBUTE_VALUE_CHANGED);
        }
    }
}


text:
layout: page
title: Delta Eternal Chemical Trade Fair
date: 2016-05-24
author: Brian Schmidt
tags: weekly links, java
status: published
summary: Nullam mi nibh, imperdiet sit amet erat at, gravida scelerisque.
banner: images/banner/people.jpg
booking:
  startDate: 11/16/2017
  endDate: 11/17/2017
  ctyhocn: MYRWEHX
  groupCode: DECTF
published: true
---
Aenean a orci vehicula, pretium leo vitae, mollis dui. Mauris nec neque arcu. Sed in porta nunc, nec hendrerit tortor. Vivamus ac ex porttitor, facilisis elit nec, pellentesque magna. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Integer dui neque, aliquet at venenatis eget, lacinia et urna. In posuere pretium maximus. Donec egestas nisl nisi, eget commodo ante euismod a.

* Pellentesque in purus ut felis consequat porta sit amet consectetur nibh
* Sed euismod sem non dui blandit, et commodo elit sagittis
* Etiam placerat nulla vitae sollicitudin rutrum
* Suspendisse sed eros ut lectus volutpat laoreet ac at ipsum.

Cras sapien orci, egestas ac fermentum lobortis, tristique eu nibh. Quisque vitae mollis nisl, in cursus lorem. Nullam justo massa, lobortis id metus eu, bibendum mollis lorem. Praesent sit amet molestie elit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Sed ex tellus, dignissim ac fringilla ut, ultricies non dui. Duis accumsan diam ac dui fringilla maximus. Morbi porttitor viverra ornare. Donec tempor, enim eu mollis varius, nibh turpis tempor dolor, a ullamcorper sem arcu eu urna. Nullam ex mi, lacinia nec lorem vitae, malesuada luctus sem. Nullam mauris ligula, varius quis porta in, gravida vel quam. Sed ut nisl vitae massa fermentum facilisis. Sed nibh turpis, lobortis at mattis quis, faucibus eu dui. Vivamus fermentum ligula in lacus viverra iaculis.


text:
<!DOCTYPE html>

  <meta charset='utf-8'>
  <meta http-equiv="X-UA-Compatible" content="chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link href='https://fonts.googleapis.com/css?family=Architects+Daughter' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
  <link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
  <link rel="stylesheet" type="text/css" href="stylesheets/print.css" media="print">

  <title>Javascript Web Socket</title>

Hasan Setiawan

Write, write, write give your wings on code!

      Follow me on GitHub

Javascript Web Socket

What are Websockets?

          Over the past few years, a new type of communication started to emerge on the web and in
          mobile apps, called websockets. This protocol has been long-awaited and was finally
          standardized by the IETF in 2011, paving the way for widespread use.

          This new protocol opens up a much faster and more efficient line of communication to the client.
          Like HTTP, websockets run on top of a TCP connection, but they're much faster because we don't
          have to open a new connection for each time we want to send a message since the connection
          is kept alive for as long as the server or client wants.

          Even better, since the connection never dies we finally have full-duplex communication
          available to us, meaning we can push data to the client instead of having to wait for them
          to ask for data from the server. This allows for data to be communicated back and forth,
          which is ideal for things like real-time chat applications, or even games.

          How do Websockets Work?

          At its core, a websocket is just a TCP connection that allows for full-duplex communication,
          meaning either side of the connection can send data to the other, even at the same time.

          To establish this connection, the protocol actually initiates the handshake as a normal
          HTTP request, but then gets 'upgraded' using the upgrade request HTTP header, like this:

  GET /ws/chat HTTP/1.1
  Host: chat.example.com
  Upgrade: websocket
  Connection: Upgrade
  Sec-WebSocket-Key: q1PZLMeDL4EwLkw4GGhADm==
  Sec-WebSocket-Protocol: chat, superchat
  Sec-WebSocket-Version: 15
  Origin: http://example.com

          The server then sends back an HTTP 101 "Switching Protocols" response, acknowledging that the
          connection is going to be upgraded. Once the this connection has been made, it switches to a
          bidirectional binary protocol, at which point the application data can be sent.

          All the protocol has to do to keep the connection open is send some ping/pong packets, which
          tells the other side that they're still there. To close the connection, a simple
          "close connection" packet is sent.

          Some Websocket Examples

          Of the many different websocket libraries for Node.js available to us, I chose to use socket.io
          throughout this article because it seems to be the most popular and is, in my opinion, the
          easiest to use. While each library has its own unique API, they also have many similarities
          since they're all built on top of the same protocol, so hopefully you'll be able to translate
          the code below to any library you want to use.

          For the HTTP server, I'll be using Express, which is the most popular Node server out there.
          Keep in mind that you can also just use the plain http module if you don't need all of the
          features of Express. Although, since most applications will use Express, that's what we'll
          be using as well.

          Note: Throughout these examples I have removed much of the boilerplate code, so some of this
          code won't work out of the box. In most cases you can refer to the first example to get the
          boilerplate code.

          Establishing the Connection

          In order for a connection to be established between the client and server, the server must
          do two things:

          Hook in to the HTTP server to handle websocket connections
          Serve up the socket.io.js client library as a static resource
          In the code below, you can see item (1) being done on the 3rd line. Item (2) is done for
          you (by default) by the socket.io library and is served on the path
          /socket.io/socket.io.js. By default, all websocket connections and resources are
          served within the /socket.io path.

          Server

var app = require('express')();
var server = require('http').Server(app);
var io = require('socket.io')(server);

app.get('/', function(req, res) {
    res.sendFile(__dirname + '/index.html');
});

server.listen(8080);

The client needs to do two things as well:

          Load the library from the server
          Call .connect() to the server address and websocket path

          Client

          If you navigate your browser to http://localhost:8080 and inspect the HTTP requests behind the
          scenes using your browser's developer tools, you should be able to see the handshake being
          executed, including the GET requests and resulting HTTP 101 Switching Protocols response.

          Sending Data from Server to Client
          Okay, now on to some of the more interesting parts. In this example we'll be showing you the
          most common way to send data from the server to the client. In this case, we'll be sending a
          message to a channel, which can be subscribed to and received by the client. So, for example,
          a client application might be listening on the 'announcements' channel, which would contain
          notifications about system-wide events, like when a user joins a chat room.

          On the server this is done by waiting for the new connection to be established, then by calling
          the socket.emit() method to send a message to all connected clients.

          Server

io.on('connection', function(socket) {
    socket.emit('announcements', { message: 'A new user has joined!' });
});

          Client

          Sending Data from Client to Server

          But what would we do when we want to send data the other way, from client to server? It is very
          similar to the last example, using both the socket.emit() and socket.on() methods.

          Server

          io.on('connection', function(socket) {
              socket.on('event', function(data) {
                  console.log('A client sent us this dumb message:', data.message);
              });
          });

          Client

          Counting Connected Users

          This is a nice example to learn since it shows a few more features of socket.io
          (like the disconnect event), it's easy to implement, and it is applicable to many webapps.
          We'll be using the connection and disconnect events to count the number of active users on our
          site, and we'll update all users with the current count.

          Server

var numClients = 0;

io.on('connection', function(socket) {
    numClients++;
    io.emit('stats', { numClients: numClients });

    console.log('Connected clients:', numClients);

    socket.on('disconnect', function() {
        numClients--;
        io.emit('stats', { numClients: numClients });

        console.log('Connected clients:', numClients);
    });
});

          Client

          A much simpler way to track the user count on the server would be to just use this:

           var numClients = io.sockets.clients().length;
          But apparently there are some issues surrounding this, so you might have to keep track of the client count yourself.

          Rooms and Namespaces

          Chances are as your application grows in complexity, you'll need more customization with your websockets, like sending messages to a specific user or set of users. Or maybe you want need strict separation of logic between different parts of your app. This is where rooms and namespaces come in to play.

          Note: These features are not part of the websocket protocol, but added on top by socket.io.

          By default, socket.io uses the root namespace (/) to send and receive data. Programmatically, you can access this namespace via io.sockets, although many of its methods have shortcuts on io. So these two calls are equivalent:

          io.sockets.emit('stats', { data: 'some data' });
          io.emit('stats', { data: 'some data' });

          To create your own namespace, all you have to do is the following:

var iosa = io.of('/stackabuse');
iosa.on('connection', function(socket){
    console.log('Connected to Stack Abuse namespace'):
});
iosa.emit('stats', { data: 'some data' });

          Also, the client must connect to your namespace explicitly:

          Now any data sent within this namespace will be separate from the default / namespace, regardless of which channel is used.

          Going even further, within each namespace you can join and leave 'rooms'. These rooms provide another layer of separation on top of namespaces, and since a client can only be added to a room on the server side, they also provide some extra security. So if you want to make sure users aren't snooping on certain data, you can use a room to hide it.

          To be added to a room, you must .join() it:

  io.on('connection', function(socket){
      socket.join('private-message-room');
  });

          Then from there you can send messages to everyone belonging to the given room:

          io.to('private-message-room').emit('some event');
          And finally, call .leave() to stop getting event messages from a room:

          socket.leave('private-message-room');

This page was generated by GitHub Pages using the Architect theme by Jason Long.

Back


text:
class Ey::Core::Client::Blueprint < Ey::Core::Model
  extend Ey::Core::Associations

  identity :id

  attribute :data, type: :hash
  attribute :name
  attribute :created_at, type: :time
  attribute :updated_at, type: :time

  has_one :account
  has_one :environment

  def save!
    requires :id

    params = {
      "id"        => self.id,
      "blueprint" => {
        "name" => self.name
      }
    }

    merge_attributes(self.connection.update_blueprint(params).body["blueprint"])
  end

  def destroy
    self.connection.destroy_blueprint("id" => self.identity)
  end
end


text:
<!doctype html>

		<title>Zabuun - Learn Egyptian Arabic for English speakers</title>
		<meta name="description" content="">
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?>

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/header.php';?>

			<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/side.php';?>

Essays > Celebrating Halloween (A)

						Expand All | Collapse All

Celebrating Halloween (A)

		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/footer.php';?>
		<?php include $_SERVER['DOCUMENT_ROOT'].'/layout/scripts.php';?>


text:
CKEDITOR.plugins.setLang("a11yhelp", "nl", {
    title: "Toegankelijkheidsinstructies",
    contents: "Help-inhoud. Druk op ESC om dit dialoog te sluiten.",
    legend: [{
        name: "Algemeen",
        items: [{
            name: "Werkbalk tekstverwerker",
            legend: "Druk op ${toolbarFocus} om naar de werkbalk te navigeren. Om te schakelen naar de volgende en vorige werkbalkgroep, gebruik TAB en SHIFT+TAB. Om te schakelen naar de volgende en vorige werkbalkknop, gebruik de PIJL RECHTS en PIJL LINKS. Druk op SPATIE of ENTER om een werkbalkknop te activeren."
        },
            {
                name: "Dialoog tekstverwerker",
                legend: "Inside a dialog, press TAB to navigate to the next dialog element, press SHIFT+TAB to move to the previous dialog element, press ENTER to submit the dialog, press ESC to cancel the dialog. When a dialog has multiple tabs, the tab list can be reached either with ALT+F10 or with TAB as part of the dialog tabbing order. With tab list focused, move to the next and previous tab with RIGHT and LEFT ARROW, respectively."
            }, {
                name: "Contextmenu tekstverwerker",
                legend: "Druk op ${contextMenu} of APPLICATION KEY om het contextmenu te openen. Schakel naar de volgende menuoptie met TAB of PIJL OMLAAG. Schakel naar de vorige menuoptie met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om een menuoptie te selecteren. Op een submenu van de huidige optie met SPATIE, ENTER of PIJL RECHTS. Ga terug naar de bovenliggende menuoptie met ESC of PIJL LINKS. Sluit het contextmenu met ESC."
            },
            {
                name: "Keuzelijst tekstverwerker",
                legend: "In een keuzelijst, schakel naar het volgende item met TAB of PIJL OMLAAG. Schakel naar het vorige item met SHIFT+TAB of PIJL OMHOOG. Druk op SPATIE of ENTER om het item te selecteren. Druk op ESC om de keuzelijst te sluiten."
            }, {
                name: "Elementenpad werkbalk tekstverwerker",
                legend: "Druk op ${elementsPathFocus} om naar het elementenpad te navigeren. Om te schakelen naar het volgende element, gebruik TAB of PIJL RECHTS. Om te schakelen naar het vorige element, gebruik SHIFT+TAB or PIJL LINKS. Druk op SPATIE of ENTER om een element te selecteren in de tekstverwerker."
            }]
    },
        {
            name: "Opdrachten",
            items: [{name: "Ongedaan maken opdracht", legend: "Druk op ${undo}"}, {
                name: "Opnieuw uitvoeren opdracht",
                legend: "Druk op ${redo}"
            }, {name: "Vetgedrukt opdracht", legend: "Druk op ${bold}"}, {
                name: "Cursief opdracht",
                legend: "Druk op ${italic}"
            }, {name: "Onderstrepen opdracht", legend: "Druk op ${underline}"}, {
                name: "Link opdracht",
                legend: "Druk op ${link}"
            }, {
                name: "Werkbalk inklappen opdracht",
                legend: "Druk op ${toolbarCollapse}"
            }, {
                name: "Ga naar vorige focus spatie commando",
                legend: "Druk ${accessPreviousSpace} om toegang te verkrijgen tot de dichtstbijzijnde onbereikbare focus spatie voor de caret, bijvoorbeeld: twee aangrenzende HR elementen. Herhaal de toetscombinatie om de verste focus spatie te bereiken."
            },
                {
                    name: "Ga naar volgende focus spatie commando",
                    legend: "Druk ${accessNextSpace} om toegang te verkrijgen tot de dichtstbijzijnde onbereikbare focus spatie na de caret, bijvoorbeeld: twee aangrenzende HR elementen. Herhaal de toetscombinatie om de verste focus spatie te bereiken."
                }, {name: "Toegankelijkheidshulp", legend: "Druk op ${a11yHelp}"}]
        }],
    tab: "Tab",
    pause: "Pause",
    capslock: "Caps Lock",
    escape: "Escape",
    pageUp: "Page Up",
    pageDown: "Page Down",
    leftArrow: "Pijl naar links",
    upArrow: "Pijl omhoog",
    rightArrow: "Pijl naar rechts",
    downArrow: "Pijl naar beneden",
    insert: "Invoegen",
    leftWindowKey: "Linker Windows-toets",
    rightWindowKey: "Rechter Windows-toets",
    selectKey: "Selecteer toets",
    numpad0: "Numpad 0",
    numpad1: "Numpad 1",
    numpad2: "Numpad 2",
    numpad3: "Numpad 3",
    numpad4: "Numpad 4",
    numpad5: "Numpad 5",
    numpad6: "Numpad 6",
    numpad7: "Numpad 7",
    numpad8: "Numpad 8",
    numpad9: "Numpad 9",
    multiply: "Vermenigvuldigen",
    add: "Toevoegen",
    subtract: "Aftrekken",
    decimalPoint: "Decimaalteken",
    divide: "Delen",
    f1: "F1",
    f2: "F2",
    f3: "F3",
    f4: "F4",
    f5: "F5",
    f6: "F6",
    f7: "F7",
    f8: "F8",
    f9: "F9",
    f10: "F10",
    f11: "F11",
    f12: "F12",
    numLock: "Num Lock",
    scrollLock: "Scroll Lock",
    semiColon: "Puntkomma",
    equalSign: "Is gelijk-teken",
    comma: "Komma",
    dash: "Koppelteken",
    period: "Punt",
    forwardSlash: "Slash",
    graveAccent: "Accent grave",
    openBracket: "Vierkant haakje openen",
    backSlash: "Backslash",
    closeBracket: "Vierkant haakje sluiten",
    singleQuote: "Apostrof"
});


text:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">

<beans>

	<bean id="rod1" class="org.springframework.tests.sample.beans.DependenciesBean"
			autowire="byType" dependency-check="objects">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="rod1a" class="org.springframework.tests.sample.beans.DependenciesBean"
			autowire="autodetect" dependency-check="objects">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="rod2" class="org.springframework.tests.sample.beans.DependenciesBean"
			autowire="byName" dependency-check="objects">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="rod2a" class="org.springframework.tests.sample.beans.DependenciesBean"
			autowire="byName" dependency-check="objects">
		<property name="spouse" ref="spouse"/>
	</bean>

	<bean id="rod3" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
			autowire="constructor" dependency-check="objects">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="rod3a" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
			autowire="autodetect" dependency-check="objects">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="rod4" class="org.springframework.beans.factory.xml.ConstructorDependenciesBean"
			scope="prototype" dependency-check="objects">
		<!-- Should not pick up spouse automatically -->
	</bean>

	<bean id="rod5" class="org.springframework.tests.sample.beans.DependenciesBean"
			scope="prototype" autowire="constructor">
		<!-- Should pick up spouse automatically -->
	</bean>

	<bean id="other" class="org.springframework.tests.sample.beans.IndexedTestBean"/>

	<bean id="parentAppCtx" class="org.springframework.context.support.ClassPathXmlApplicationContext">
		<constructor-arg>
			<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-collections.xml</value>
		</constructor-arg>
	</bean>

	<bean id="childAppCtx" class="org.springframework.context.support.ClassPathXmlApplicationContext">
		<constructor-arg>
			<list>
				<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-constructorArg.xml</value>
				<value>/org/springframework/beans/factory/xml/XmlBeanFactoryTests-initializers.xml</value>
			</list>
		</constructor-arg>
		<constructor-arg><ref bean="parentAppCtx"/></constructor-arg>
	</bean>

</beans>


text:
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from primitive_list.djinni

package com.dropbox.djinni.test;

import java.util.ArrayList;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

public class PrimitiveList {

    /*package*/ final ArrayList<Long> mList;

    public PrimitiveList(
            @Nonnull ArrayList<Long> list) {
        this.mList = list;
    }

    @Nonnull
    public ArrayList<Long> getList() {
        return mList;
    }

    @Override
    public String toString() {
        return "PrimitiveList{" +
                "mList=" + mList +
        "}";
    }

}


text:
/* $OpenBSD$ */

/*
 * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

#include <sys/types.h>

#include <ctype.h>
#include <libgen.h>
#include <stdlib.h>
#include <string.h>

#include "tmux.h"

static void	 name_time_callback(int, short, void *);
static int	 name_time_expired(struct window *, struct timeval *);

static char	*format_window_name(struct window *);

static void
name_time_callback(__unused int fd, __unused short events, void *arg)
{
	struct window	*w = arg;

	/* The event loop will call check_window_name for us on the way out. */
	log_debug("@%u name timer expired", w->id);
}

static int
name_time_expired(struct window *w, struct timeval *tv)
{
	struct timeval	offset;

	timersub(tv, &w->name_time, &offset);
	if (offset.tv_sec != 0 || offset.tv_usec > NAME_INTERVAL)
		return (0);
	return (NAME_INTERVAL - offset.tv_usec);
}

void
check_window_name(struct window *w)
{
	struct timeval	 tv, next;
	char		*name;
	int		 left;

	if (w->active == NULL)
		return;

	if (!options_get_number(w->options, "automatic-rename"))
		return;

	if (~w->active->flags & PANE_CHANGED) {
		log_debug("@%u active pane not changed", w->id);
		return;
	}
	log_debug("@%u active pane changed", w->id);

	gettimeofday(&tv, NULL);
	left = name_time_expired(w, &tv);
	if (left != 0) {
		if (!event_initialized(&w->name_event))
			evtimer_set(&w->name_event, name_time_callback, w);
		if (!evtimer_pending(&w->name_event, NULL)) {
			log_debug("@%u name timer queued (%d left)", w->id,
			    left);
			timerclear(&next);
			next.tv_usec = left;
			event_add(&w->name_event, &next);
		} else {
			log_debug("@%u name timer already queued (%d left)",
			    w->id, left);
		}
		return;
	}
	memcpy(&w->name_time, &tv, sizeof w->name_time);
	if (event_initialized(&w->name_event))
		evtimer_del(&w->name_event);

	w->active->flags &= ~PANE_CHANGED;

	name = format_window_name(w);
	if (strcmp(name, w->name) != 0) {
		log_debug("@%u new name %s (was %s)", w->id, name, w->name);
		window_set_name(w, name);
		server_status_window(w);
	} else
		log_debug("@%u name not changed (still %s)", w->id, w->name);

	free(name);
}

char *
default_window_name(struct window *w)
{
	char    *cmd, *s;

	cmd = cmd_stringify_argv(w->active->argc, w->active->argv);
	if (cmd != NULL && *cmd != '\0')
		s = parse_window_name(cmd);
	else
		s = parse_window_name(w->active->shell);
	free(cmd);
	return (s);
}

static char *
format_window_name(struct window *w)
{
	struct format_tree	*ft;
	const char		*fmt;
	char			*name;

	ft = format_create(NULL, NULL, FORMAT_WINDOW|w->id, 0);
	format_defaults_window(ft, w);
	format_defaults_pane(ft, w->active);

	fmt = options_get_string(w->options, "automatic-rename-format");
	name = format_expand(ft, fmt);

	format_free(ft);
	return (name);
}

char *
parse_window_name(const char *in)
{
	char	*copy, *name, *ptr;

	name = copy = xstrdup(in);
	if (strncmp(name, "exec ", (sizeof "exec ") - 1) == 0)
		name = name + (sizeof "exec ") - 1;

	while (*name == ' ' || *name == '-')
		name++;
	if ((ptr = strchr(name, ' ')) != NULL)
		*ptr = '\0';

	if (*name != '\0') {
		ptr = name + strlen(name) - 1;
		while (ptr > name &&
		    !isalnum((u_char)*ptr) &&
		    !ispunct((u_char)*ptr))
			*ptr-- = '\0';
	}

	if (*name == '/')
		name = basename(name);
	name = xstrdup(name);
	free(copy);
	return (name);
}


text: Isometric open world game developed as a java application using lwjgl as an openGL interface.


text:
package com.takisoft.datetimepicker.widget;

import android.content.Context;
import android.os.Build;
import androidx.annotation.StyleRes;
import android.util.AttributeSet;

import com.takisoft.datetimepicker.widget.DayPickerView.OnDaySelectedListener;

import java.util.Calendar;

// TODO import android.icu.util.Calendar;

class CalendarViewMaterialDelegate extends CalendarView.AbstractCalendarViewDelegate {
    private final DayPickerView mDayPickerView;

    private CalendarView.OnDateChangeListener mOnDateChangeListener;

    public CalendarViewMaterialDelegate(CalendarView delegator, Context context, AttributeSet attrs,
                                        int defStyleAttr, int defStyleRes) {
        super(delegator, context);

        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            mDayPickerView = new DayPickerView(context, attrs, defStyleAttr, defStyleRes);
        } else {
            mDayPickerView = new DayPickerView(context, attrs, defStyleAttr);
        }

        mDayPickerView.setOnDaySelectedListener(mOnDaySelectedListener);

        delegator.addView(mDayPickerView);
    }

    @Override
    public void setWeekDayTextAppearance(@StyleRes int resId) {
        mDayPickerView.setDayOfWeekTextAppearance(resId);
    }

    @StyleRes
    @Override
    public int getWeekDayTextAppearance() {
        return mDayPickerView.getDayOfWeekTextAppearance();
    }

    @Override
    public void setDateTextAppearance(@StyleRes int resId) {
        mDayPickerView.setDayTextAppearance(resId);
    }

    @StyleRes
    @Override
    public int getDateTextAppearance() {
        return mDayPickerView.getDayTextAppearance();
    }

    @Override
    public void setMinDate(long minDate) {
        mDayPickerView.setMinDate(minDate);
    }

    @Override
    public long getMinDate() {
        return mDayPickerView.getMinDate();
    }

    @Override
    public void setMaxDate(long maxDate) {
        mDayPickerView.setMaxDate(maxDate);
    }

    @Override
    public long getMaxDate() {
        return mDayPickerView.getMaxDate();
    }

    @Override
    public void setFirstDayOfWeek(int firstDayOfWeek) {
        mDayPickerView.setFirstDayOfWeek(firstDayOfWeek);
    }

    @Override
    public int getFirstDayOfWeek() {
        return mDayPickerView.getFirstDayOfWeek();
    }

    @Override
    public void setDate(long date) {
        mDayPickerView.setDate(date, true);
    }

    @Override
    public void setDate(long date, boolean animate, boolean center) {
        mDayPickerView.setDate(date, animate);
    }

    @Override
    public long getDate() {
        return mDayPickerView.getDate();
    }

    @Override
    public void setOnDateChangeListener(CalendarView.OnDateChangeListener listener) {
        mOnDateChangeListener = listener;
    }

    private final OnDaySelectedListener mOnDaySelectedListener = new OnDaySelectedListener() {
        @Override
        public void onDaySelected(DayPickerView view, Calendar day) {
            if (mOnDateChangeListener != null) {
                final int year = day.get(Calendar.YEAR);
                final int month = day.get(Calendar.MONTH);
                final int dayOfMonth = day.get(Calendar.DAY_OF_MONTH);
                mOnDateChangeListener.onSelectedDayChange(mDelegator, year, month, dayOfMonth);
            }
        }
    };
}


text:
"""
Test the PowerOnCommand.
"""
from .. import PowerOnCommand
from .power_fixures import *

class MockStepUpdateResource(PowerOnCommand):
    """Fail resource update mocked object"""
    def __init__(self, **options):
        super(MockStepUpdateResource, self).__init__(**options)

    def _update_resource_state(self, new_state):
        return False

class TestPowerOnCommand(PowerCommandsCommon):
    """Test case for the PowerOnNodeCommand class."""
    def setUp(self):
        super(TestPowerOnCommand, self).setUp()
        self.write_state('Off')
        self.command_options["subcommand"] = 'on'
        self.command = PowerOnCommand(**self.command_options)
        self.command.plugin_name = 'mock'

    def test_positive_on_from_off(self):
        result = self.command.execute()
        self.assertEqual('Success: Device Powered On: test_node',
                         result[0].message)
        self.assertEqual(0, result[0].return_code)

    def test_power_plugin_object_exists(self):
        self.command.power_plugin = self.manager.\
            create_instance('power_control', 'mock', **self.command.node_options)
        result = self.command.execute()
        self.assertEqual('Success: Device Powered On: test_node',
                         result[0].message)
        self.assertEqual(0, result[0].return_code)

    def test_parse_arguments(self):
        self.command.force = None
        self.command.subcommand = 'bad_subcommand'
        result = self.command.execute()
        self.assertEqual("Incorrect arguments passed to turn on a node: "
                         "['test_node']", result[0].message)
        self.assertEqual(-1, result[0].return_code)

    def test_parse_arguments_2(self):
        self.args = None
        result = self.command.execute()
        self.assertEqual('Success: Device Powered On: test_node',
                         result[0].message)
        self.assertEqual(0, result[0].return_code)

    def test_parse_arguments_3(self):
        self.command.subcommand = 'unknown'
        result = self.command.execute()
        self.assertEqual("Incorrect arguments passed to turn on a node: "
                         "['test_node']", result[0].message)
        self.assertEqual(-1, result[0].return_code)

    def test_parse_arguments_4(self):
        self.command.force = True
        result = self.command.execute()
        self.assertEqual('Success: Device Powered On: test_node',
                         result[0].message)
        self.assertEqual(0, result[0].return_code)

    def test_positive_on_from_on(self):
        self.write_state('On:bmc_on')
        result = self.command.execute()
        self.assertEqual('Power on for test_node; Device is already Powered on',
                         result[0].message)
        self.assertEqual(-1, result[0].return_code)

    def test_failure_to_change_state(self):
        self.command.power_plugin = MockPowerPlugin(**self.options)
        result = self.command.execute()
        self.assertEqual('Failed to change state to On on device '
                         'test_node: False', result[0].message)
        self.assertEqual(-1, result[0].return_code)

    def test_failure_to_change_state_with_exception(self):
        self.command.power_plugin = MockPowerPluginException(**self.options)
        result = self.command.execute()
        self.assertEqual('Mock exception', result[0].message)
        self.assertEqual(-1, result[0].return_code)

    def test_resource_failure(self):
        cmd = MockStepUpdateResource(**self.command_options)
        cmd.plugin_name = 'mock'
        result = cmd.execute()
        self.assertEqual("Failed to inform the resource manager of the state "
                         "change for device ['test_node']", result[0].message)
        self.assertEqual(-1, result[0].return_code)

if __name__ == '__main__':
    unittest.main()


text:
require 'test_helper'

class DependencyTest < ActiveSupport::TestCase
  setup do
    @dependency = dependencies :last_cd_runs_on_atahualpa
  end

  test 'blank attributes' do
    @dependency.schedule = nil

    assert @dependency.invalid?
    assert_error @dependency, :schedule, :blank
  end
end


text:
package esendex.sdk.java.parser;

import com.thoughtworks.xstream.converters.Converter;
import com.thoughtworks.xstream.converters.MarshallingContext;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;

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

public class RecipientDataConverter implements Converter {

    public boolean canConvert(Class clazz) {
        return AbstractMap.class.isAssignableFrom(clazz);
    }

    @Override
    public void marshal(Object o, HierarchicalStreamWriter hierarchicalStreamWriter, MarshallingContext marshallingContext) {

    }

    public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {

        Map<String, String> map = new HashMap<>();

        while(reader.hasMoreChildren()) {
            String key = "", value = "";
            reader.moveDown();

            while(reader.hasMoreChildren()) {
                reader.moveDown();

                String nodeName = reader.getNodeName();

                if (nodeName.equals("key")) {
                    key = reader.getValue();
                }
                else {
                    value = reader.getValue();
                }

                reader.moveUp();
            }

            map.put(key, value);
            reader.moveUp();
        }

        return map;
    }
}


text:
module("wysihtml.dom.autoLink", {
  equal: function(actual, expected, message) {
    return QUnit.assert.htmlEqual(actual, expected, message);
  },

  autoLink: function(html) {
    var container = wysihtml.dom.getAsDom(html);
    return wysihtml.dom.autoLink(container).innerHTML;
  }
});

test("Basic test", function() {
  ok(wysihtml.dom.autoLink.URL_REG_EXP, "URL reg exp is revealed to be access globally");

  this.equal(
    this.autoLink("hey check out this search engine http://www.google.com"),
    "hey check out this search engine http://www.google.com",
    "Urls starting with http:// are correctly linked"
  );

  this.equal(
    this.autoLink("hey check out this search engine https://www.google.com"),
    "hey check out this search engine https://www.google.com",
    "Urls starting with https:// are correctly linked"
  );

  this.equal(
    this.autoLink("hey check out this search engine www.google.com"),
    "hey check out this search engine www.google.com",
    "Urls starting with www. are correctly linked"
  );

  this.equal(
    this.autoLink("hey check out this mail christopher.blum@xing.com"),
    "hey check out this mail christopher.blum@xing.com",
    "E-Mails are not linked"
  );

  this.equal(
    this.autoLink("http://google.de"),
    "http://google.de",
    "Single url without www. but with http:// is auto linked"
  );

  this.equal(
    this.autoLink("hey check out this search engine www.google.com"),
    "hey check out this search engine www.google.com",
    "Already auto-linked stuff isn't causing a relinking"
  );

  this.equal(
    this.autoLink("hey check out this search engine http://www.google.com"),
    "hey check out this search engine http://www.google.com",
    "Urls inside 'code' elements are not auto linked"
  );

  this.equal(
    this.autoLink("hey check out this search engine
http://www.google.com
"),
    "hey check out this search engine
http://www.google.com
",
    "Urls inside 'pre' elements are not auto linked"
  );

  this.equal(
    this.autoLink("hey check out this search engine (http://www.google.com)"),
    "hey check out this search engine (http://www.google.com)",
    "Parenthesis around url are not part of url #1"
  );

  this.equal(
    this.autoLink("hey check out this search engine (http://www.google.com?q=hello(spencer))"),
    "hey check out this search engine (http://www.google.com?q=hello(spencer))",
    "Parenthesis around url are not part of url #2"
  );

  this.equal(
    this.autoLink("hey check out this search engine http://www.google.com?q=hello(spencer)"),
    "hey check out this search engine http://www.google.com?q=hello(spencer)",
    "Urls in tags are correctly auto linked"
  );

  this.equal(
    this.autoLink("http://google.de and http://yahoo.com as well as http://de.finance.yahoo.com http://google.com"),
    "http://google.de and http://yahoo.com as well as http://de.finance.yahoo.com http://google.com",
    "Multiple urls are correctly auto linked"
  );

  this.equal(
    this.autoLink(""),
    "",
    "Urls in SCRIPT elements are not touched"
  );

  this.equal(
    this.autoLink(""),
    "",
    "Urls in SCRIPT elements are not touched"
  );

  this.equal(
    this.autoLink(" http://www.google.de"),
    " http://www.google.de",
    "Check if white space in front of url is preserved"
  );

  this.equal(
    this.autoLink("<b>foo</b> http://www.google.de"),
    "<b>foo</b> http://www.google.de",
    "Check if plain HTML markup isn't evaluated"
  );
});


text:
require "riveter/version"

require 'active_model'
require 'active_support'
require 'validates_timeliness'

require 'active_support/core_ext'
require 'active_support/inflector'

module Riveter
  autoload :AttributeDefaultValues, 'riveter/attribute_default_values'
  autoload :AssociatedTypeRegistry, 'riveter/associated_type_registry'
  autoload :Attributes, 'riveter/attributes'
  autoload :BooleanessValidator, 'riveter/booleaness_validator'
  autoload :Command, 'riveter/command'
  autoload :CommandController, 'riveter/command_controller'
  autoload :EmailValidator, 'riveter/email_validator'
  autoload :Enquiry, 'riveter/enquiry'
  autoload :EnquiryController, 'riveter/enquiry_controller'
  autoload :Enumerated, 'riveter/enumerated'
  autoload :HashWithDependency, 'riveter/hash_with_dependency'
  autoload :Presenter, 'riveter/presenter'
  autoload :Query, 'riveter/query'
  autoload :QueryFilter, 'riveter/query_filter'
  autoload :Service, 'riveter/service'
end

# add autoload's for validators
module ActiveModel
  module Validations
    autoload :BooleanessValidator, 'riveter/booleaness_validator'
    autoload :EmailValidator, 'riveter/email_validator'
  end
end

require 'riveter/errors'
require 'riveter/core_extensions'

# Rails bits...
require 'riveter/rails/railtie' if defined?(::Rails::Railtie)
require 'riveter/rails/engine' if defined?(::Rails)

# include locale in load path
I18n.load_path += Dir.glob(File.expand_path('../../config/locales/*.yml', __FILE__))