text:
import { E2EGlobal } from './helpers/E2EGlobal';
import { E2EApp } from './helpers/E2EApp';
import { E2EMeetingSeries } from './helpers/E2EMeetingSeries';
import { E2EMinutes } from './helpers/E2EMinutes';
import { E2ETopics } from './helpers/E2ETopics';

describe('Minutes Finalize', function () {

    const aProjectName = "E2E Minutes Finalize";
    let aMeetingCounter = 0;
    let aMeetingNameBase = "Meeting Name #";
    let aMeetingName;

    before("reload page and reset app", function () {
        E2EApp.resetMyApp(true);
        E2EApp.launchApp();
    });

    beforeEach("goto start page and make sure test user is logged in", function () {
        E2EApp.gotoStartPage();
        expect (E2EApp.isLoggedIn()).to.be.true;
    });

    it('can finalize minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(0);

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);
        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;
        E2EMinutes.finalizeCurrentMinutes();

        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.true;
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(1);
    });

    // this test does only make sense if mail delivery is enabled
    if (E2EGlobal.SETTINGS.email && E2EGlobal.SETTINGS.email.enableMailDelivery) {
        it('asks if emails should be sent before finalizing the minute', function () {
            aMeetingCounter++;
            aMeetingName = aMeetingNameBase + aMeetingCounter;

            E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
            E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);

            E2ETopics.addTopicToMinutes('some topic');
            E2ETopics.addInfoItemToTopic({
                subject: 'action item',
                itemType: "actionItem"
            }, 1);
            E2ETopics.addInfoItemToTopic({
                subject: 'info item',
                itemType: "infoItem"
            }, 1);

            E2EMinutes.finalizeCurrentMinutes(/*autoConfirmDialog*/false);

            expect(browser.isExisting('#cbSendAI')).to.be.true;
            expect(browser.isExisting('#cbSendII')).to.be.true;

            // close dialog otherwise beforeEach-hook will fail!
            E2EApp.confirmationDialogAnswer(false, "failingtest");
            E2EGlobal.waitSomeTime(300);   // make next test happy
        });
    }

    it('can not add minutes if unfinalized minutes exist', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        let countInitialMinutes = E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName);

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);
        // No finalize here!
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        browser.waitForVisible("#btnAddMinutes");

        // check that nothing happens if the add minutes button will be pressed
        const urlBefore = browser.getUrl();
        expect(browser.isExisting('#btnAddMinutes'), "btnAddMinutes should be there").to.be.true;
        try {
            browser.click("#btnAddMinutes");
        } catch (e) {
            // Intentionally left empty
            // We expect the above click to fail, as button is disabled
        }
        E2EGlobal.waitSomeTime(750);
        expect(browser.getUrl(), "Route should not have changed").to.equal(urlBefore);
        expect(
            E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName),
            "Only one minute should have been added"
        ).to.equal(countInitialMinutes + 1);
    });

    it('can finalize minutes at later timepoint', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        let countInitialMinutes = E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName);

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);
        // No finalize here!
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        browser.waitForVisible("#btnAddMinutes");
        browser.click("a#id_linkToMinutes");        // goto first available minutes
        // Now finalize!
        E2EMinutes.finalizeCurrentMinutes();
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);

        // check if button is clicked, it does add 2nd minutes
        browser.click("#btnAddMinutes");
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(countInitialMinutes +2);
    });

    it('can not delete or finalize already finalized minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate = "2015-03-17";  // date of first project commit ;-)

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate);
        E2EMinutes.finalizeCurrentMinutes();
        E2EMinutes.gotoMinutes(myDate);

        expect(browser.isExisting("#btn_finalizeMinutes")).to.be.false;
        expect(browser.isExisting("#btn_deleteMinutes")).to.be.false;
    });

    it('can unfinalize minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate = "2015-03-17";  // date of first project commit ;-)

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate);
        E2EMinutes.finalizeCurrentMinutes();

        E2EMinutes.unfinalizeCurrentMinutes();
        expect(browser.isExisting("#btn_finalizeMinutes")).to.be.true;
        expect(browser.isExisting("#btn_deleteMinutes")).to.be.true;
    });

    it('does show name of user that did finalize', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate = "2015-03-17";  // date of first project commit ;-)
        let currentUsername = E2EGlobal.SETTINGS.e2eTestUsers[0];

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate);
        E2EMinutes.finalizeCurrentMinutes();
        let finalizedText = browser.getText('#txt_FinalizedBy');
        expect(finalizedText).to.contain(currentUsername);

        // Now leave and re-enter minutes to trigger fresh render
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.gotoMinutes(myDate);
        finalizedText = browser.getText('#txt_FinalizedBy');
        expect(finalizedText).to.contain(currentUsername);
    });

    it('prohibits editing date of finalized minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate = "2015-03-17";  // date of first project commit ;-)

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate);
        E2EMinutes.finalizeCurrentMinutes();

        let dateOfMinutes = browser.getValue('#id_minutesdateInput');
        expect(dateOfMinutes).to.equal(myDate);
        // try to change read-only field... we expect an exception in the next statement...  ;-)
        try {browser.setValue('#id_minutesdateInput', "2015-05-22")} catch (e) {}
        dateOfMinutes = browser.getValue('#id_minutesdateInput');
        expect(dateOfMinutes).to.equal(myDate); // still same as above?
    });

    it('prohibits unfinalizing of non-latest minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate1 = "2015-03-17";  // date of first project commit ;-)
        let myDate2 = "2015-03-18";

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate1);
        E2EMinutes.finalizeCurrentMinutes();

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate2); // myDate2 is kept UNFINALIZED!

        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.gotoMinutes(myDate1);
        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;

        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);  // now FINALIZE myDate2
        E2EMinutes.gotoMinutes(myDate2);
        E2EMinutes.finalizeCurrentMinutes();

        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.gotoMinutes(myDate1);
        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;
    });

    it('prohibits minutes on dates before the latest minutes', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate1 = "2015-03-17";  // date of first project commit ;-)
        let myDate2 = "2010-01-01";

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate1);
        E2EMinutes.finalizeCurrentMinutes();

        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate2);
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);

        expect(E2EMinutes.getMinutesId(myDate2)).not.to.be.ok;
        let currentDateISO = E2EGlobal.formatDateISO8601(new Date());
        expect(E2EMinutes.getMinutesId(currentDateISO)).to.be.ok;
    });

    it('prohibits two minutes on the same date', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;
        let myDate1 = "2015-03-17";  // date of first project commit ;-)

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate1);
        E2EMinutes.finalizeCurrentMinutes();

        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);
        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName, myDate1);
        E2EMeetingSeries.gotoMeetingSeries(aProjectName, aMeetingName);

        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(2);
        let currentDateISO = E2EGlobal.formatDateISO8601(new Date());
        expect(E2EMinutes.getMinutesId(currentDateISO)).to.be.ok;
    });

    it('cancel finalize Minutes, when no participants are present and warning-box appears', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(0);

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);
        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;
        E2EMinutes.finalizeCurrentMinutesWithoutParticipants(true, false);

        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(1);
    });

    it('process finalize Minutes, when no participants are present and warning-box appears', function () {
        aMeetingCounter++;
        aMeetingName = aMeetingNameBase + aMeetingCounter;

        E2EMeetingSeries.createMeetingSeries(aProjectName, aMeetingName);
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(0);

        E2EMinutes.addMinutesToMeetingSeries(aProjectName, aMeetingName);
        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.false;
        E2EMinutes.finalizeCurrentMinutesWithoutParticipants(true, true);

        expect(browser.isExisting('#btn_unfinalizeMinutes')).to.be.true;
        expect(E2EMinutes.countMinutesForSeries(aProjectName, aMeetingName)).to.equal(1);
    });

});


text:
package net.lshift.diffa.agent.rest

import javax.ws.rs._
import core.{Context, UriInfo, Response}
import net.lshift.diffa.kernel.frontend.{Configuration, Changes}
import javax.servlet.http.HttpServletRequest
import net.lshift.diffa.kernel.config.DomainConfigStore
import scala.collection.JavaConversions._
import com.sun.jersey.core.util.MultivaluedMapImpl
import net.lshift.diffa.client.RequestBuildingHelper
import java.net.URLEncoder
import net.lshift.diffa.adapter.scanning.{ScanRequest, AggregationBuilder, ConstraintsBuilder}
import net.lshift.diffa.agent.rest.PermissionUtils._
import org.springframework.security.access.PermissionEvaluator
import net.lshift.diffa.agent.auth.{EndpointTarget, Privileges}

/**
 * Resource allowing participants to provide bulk details of their current status.
 */
class InventoryResource(changes:Changes, configStore:DomainConfigStore, space:Long, permissionEvaluator:PermissionEvaluator)
    extends IndividuallySecuredResource {
  @GET
  @Path("/{endpoint}")
  def startInventory(@PathParam("endpoint") endpoint: String):Response = startInventory(endpoint, null)

  @GET
  @Path("/{endpoint}/{view}")
  def startInventory(@PathParam("endpoint") endpoint: String, @PathParam("view") view:String):Response = {
    ensurePrivilege(permissionEvaluator, Privileges.POST_INVENTORY, new EndpointTarget(space, endpoint))

    val requests = changes.startInventory(space, endpoint, if (view != null) Some(view) else None)

    Response.status(Response.Status.OK).
      `type`("text/plain").
      entity(ScanRequestWriter.writeScanRequests(requests)).build()
  }

  @POST
  @Path("/{endpoint}")
  @Consumes(Array("text/csv"))
  def submitInventory(@PathParam("endpoint") endpoint: String, @Context request:HttpServletRequest, content:ScanResultList):Response =
    submitInventory(endpoint, null, request, content)

  @POST
  @Path("/{endpoint}/{view}")
  @Consumes(Array("text/csv"))
  def submitInventory(@PathParam("endpoint") endpoint: String, @PathParam("view") view: String, @Context request:HttpServletRequest, content:ScanResultList):Response = {
    ensurePrivilege(permissionEvaluator, Privileges.POST_INVENTORY, new EndpointTarget(space, endpoint))

    val constraintsBuilder = new ConstraintsBuilder(request)
    val aggregationBuilder = new AggregationBuilder(request)

    val ep = configStore.getEndpoint(space, endpoint)
    ep.buildConstraints(constraintsBuilder)
    ep.buildAggregations(aggregationBuilder)

    val nextRequests = changes.submitInventory(space, endpoint, if (view != null) Some(view) else None,
      constraintsBuilder.toList.toSeq, aggregationBuilder.toList.toSeq, content.results)

    Response.status(Response.Status.ACCEPTED).
      `type`("text/plain").
      entity(ScanRequestWriter.writeScanRequests(nextRequests)).build()
  }
}

redpajama_set_name: RedPajamaGithub


text:
package com.dslplatform.client.json.Decimal;

import com.dslplatform.client.JsonSerialization;
import com.dslplatform.patterns.Bytes;
import java.io.IOException;

public class OneSetOfOneDecimalsDefaultValueTurtle {
	private static JsonSerialization jsonSerialization;

	@org.junit.BeforeClass
	public static void initializeJsonSerialization() throws IOException {
		jsonSerialization = com.dslplatform.client.StaticJson.getSerialization();
	}

	@org.junit.Test
	public void testDefaultValueEquality() throws IOException {
		final java.util.Set<java.math.BigDecimal> defaultValue = new java.util.HashSet<java.math.BigDecimal>(0);
		final Bytes defaultValueJsonSerialized = jsonSerialization.serialize(defaultValue);
		final java.util.List<java.math.BigDecimal> deserializedTmpList = jsonSerialization.deserializeList(java.math.BigDecimal.class, defaultValueJsonSerialized.content, defaultValueJsonSerialized.length);
		final java.util.Set<java.math.BigDecimal> defaultValueJsonDeserialized = deserializedTmpList == null ? null : new java.util.HashSet<java.math.BigDecimal>(deserializedTmpList);
		com.dslplatform.ocd.javaasserts.DecimalAsserts.assertOneSetOfOneEquals(defaultValue, defaultValueJsonDeserialized);
	}

	@org.junit.Test
	public void testBorderValue1Equality() throws IOException {
		final java.util.Set<java.math.BigDecimal> borderValue1 = new java.util.HashSet<java.math.BigDecimal>(java.util.Arrays.asList(java.math.BigDecimal.ZERO));
		final Bytes borderValue1JsonSerialized = jsonSerialization.serialize(borderValue1);
		final java.util.List<java.math.BigDecimal> deserializedTmpList = jsonSerialization.deserializeList(java.math.BigDecimal.class, borderValue1JsonSerialized.content, borderValue1JsonSerialized.length);
		final java.util.Set<java.math.BigDecimal> borderValue1JsonDeserialized = deserializedTmpList == null ? null : new java.util.HashSet<java.math.BigDecimal>(deserializedTmpList);
		com.dslplatform.ocd.javaasserts.DecimalAsserts.assertOneSetOfOneEquals(borderValue1, borderValue1JsonDeserialized);
	}

	@org.junit.Test
	public void testBorderValue2Equality() throws IOException {
		final java.util.Set<java.math.BigDecimal> borderValue2 = new java.util.HashSet<java.math.BigDecimal>(java.util.Arrays.asList(new java.math.BigDecimal("1E28")));
		final Bytes borderValue2JsonSerialized = jsonSerialization.serialize(borderValue2);
		final java.util.List<java.math.BigDecimal> deserializedTmpList = jsonSerialization.deserializeList(java.math.BigDecimal.class, borderValue2JsonSerialized.content, borderValue2JsonSerialized.length);
		final java.util.Set<java.math.BigDecimal> borderValue2JsonDeserialized = deserializedTmpList == null ? null : new java.util.HashSet<java.math.BigDecimal>(deserializedTmpList);
		com.dslplatform.ocd.javaasserts.DecimalAsserts.assertOneSetOfOneEquals(borderValue2, borderValue2JsonDeserialized);
	}

	@org.junit.Test
	public void testBorderValue3Equality() throws IOException {
		final java.util.Set<java.math.BigDecimal> borderValue3 = new java.util.HashSet<java.math.BigDecimal>(java.util.Arrays.asList(java.math.BigDecimal.ZERO, java.math.BigDecimal.ONE, new java.math.BigDecimal("3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679").setScale(28, java.math.BigDecimal.ROUND_HALF_UP), new java.math.BigDecimal("-1E-28"), new java.math.BigDecimal("1E28")));
		final Bytes borderValue3JsonSerialized = jsonSerialization.serialize(borderValue3);
		final java.util.List<java.math.BigDecimal> deserializedTmpList = jsonSerialization.deserializeList(java.math.BigDecimal.class, borderValue3JsonSerialized.content, borderValue3JsonSerialized.length);
		final java.util.Set<java.math.BigDecimal> borderValue3JsonDeserialized = deserializedTmpList == null ? null : new java.util.HashSet<java.math.BigDecimal>(deserializedTmpList);
		com.dslplatform.ocd.javaasserts.DecimalAsserts.assertOneSetOfOneEquals(borderValue3, borderValue3JsonDeserialized);
	}
}


text:
from stack_interface import StackInterface

class StackList(StackInterface):
  """ a stack implementation using a python list """

  def __init__(self):
    """ create an empty stack """
    self.items = []

  def push(self, new_item):
    """ add a new item to the stack """
    self.items.append(new_item)

  def pop(self):
    """ remove and return the last added item from the stack """
    return self.items.pop()

  def isEmpty(self):
    """ check is the stack is empty """
    return (self.items == [])


text:
@interface PluralsView : UIView

@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIPickerView *pickerView;

@end


text:
package com.feicent.zhang.util.sequence.test;

import org.junit.Test;

import com.feicent.zhang.util.sequence.Sequence;

public class SequenceTest1 {

	@Test
	public void name() {
		try {
			int times = 0, maxTimes = 10000*10;
			Sequence sequence = new Sequence(0, 0);
			for (int i = 0; i < maxTimes; i++) {
				long id = sequence.nextId();
				System.out.println(id);
				if(id%2==0){
					times++;
				}
				//Thread.sleep(10);
			}
			System.out.println("偶数:" + times + ",奇数:" + (maxTimes - times) + "!");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}


text:
require "spec_helper"

describe DeadSimpleCMS::Group::Presenter::RenderMixin do

  subject { Class.new { include DeadSimpleCMS::Group::Presenter::RenderMixin }.new }

  shared_context :presenter_class do
    let(:presenter_class) { Class.new(DeadSimpleCMS::Group::Presenter::Base) { def render ; "render result" ; end } }
    before(:each) { subject.display(presenter_class) }
  end

  describe "#render" do
    context "when presenter_class is set" do

      include_context :presenter_class

      specify { subject.render(:view_context).should == "render result" }

    end

    context "when render_proc is set" do

      before(:each) { subject.display { |group, first, second| "#{first} #{second}" } }

      specify { subject.render(:view_context, :first_arg, :second_arg).should == "first_arg second_arg" }

      context "and when group is passed in arguments" do
        let(:group) { DeadSimpleCMS::Group.new(:group_identifier) }
        before(:each) { subject.display { |group, arg1, arg2| "#{group.identifier} #{arg1} #{arg2}" } }

        it "should use the passed in group for the render_proc" do
          subject.render([:view_context, group], "arg1", "arg2").should == "group_identifier arg1 arg2"
        end
      end

    end

    context "when group is passed in" do
      include_context :presenter_class

      it "should use that as the group" do
        presenter_class.stub(:new).with(:view_context, :group).and_return(double(:render => :result))
        subject.render([:view_context, :group])
      end

    end
  end
end


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

<TITLE>
Uses of Interface org.codehaus.groovy.grails.scaffolding.ScaffoldCallback (Grails 1.0.4)
</TITLE>

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

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Interface
org.codehaus.groovy.grails.scaffolding.ScaffoldCallback

Packages that use ScaffoldCallback

org.codehaus.groovy.grails.scaffolding

Uses of ScaffoldCallback in org.codehaus.groovy.grails.scaffolding

Classes in org.codehaus.groovy.grails.scaffolding that implement ScaffoldCallback

 class
DefaultScaffoldCallback

Methods in org.codehaus.groovy.grails.scaffolding with parameters of type ScaffoldCallback

 Map
ScaffoldRequestHandler.handleCreate(HttpServletRequest request,
             HttpServletResponse reponse,
             ScaffoldCallback callback)

          Handles a create request

 Map
DefaultScaffoldRequestHandler.handleCreate(HttpServletRequest request,
             HttpServletResponse reponse,
             ScaffoldCallback callback)

 Map
ScaffoldRequestHandler.handleDelete(HttpServletRequest request,
             HttpServletResponse reponse,
             ScaffoldCallback callback)

          Handles a request to delete a scaffolded instance

 Map
DefaultScaffoldRequestHandler.handleDelete(HttpServletRequest request,
             HttpServletResponse response,
             ScaffoldCallback callback)

 Map
ScaffoldRequestHandler.handleSave(HttpServletRequest request,
           HttpServletResponse reponse,
           ScaffoldCallback callback)

          Handles a request to save a scaffolded instance

 Map
DefaultScaffoldRequestHandler.handleSave(HttpServletRequest request,
           HttpServletResponse reponse,
           ScaffoldCallback callback)

 Map
ScaffoldRequestHandler.handleShow(HttpServletRequest request,
           HttpServletResponse reponse,
           ScaffoldCallback callback)

          Handles a request to show a scaffolded instance

 Map
DefaultScaffoldRequestHandler.handleShow(HttpServletRequest request,
           HttpServletResponse response,
           ScaffoldCallback callback)

 Map
ScaffoldRequestHandler.handleUpdate(HttpServletRequest request,
             HttpServletResponse reponse,
             ScaffoldCallback callback)

          Handles a request to update a scaffolded instance

 Map
DefaultScaffoldRequestHandler.handleUpdate(HttpServletRequest request,
             HttpServletResponse reponse,
             ScaffoldCallback callback)

 boolean
ScaffoldDomain.save(Object domainObject,
     ScaffoldCallback callback)

          Saves an instance of the persistent class using the specified properties

 boolean
GrailsScaffoldDomain.save(Object domainObject,
     ScaffoldCallback callback)

 boolean
DefaultScaffoldDomain.save(Object domainObject,
     ScaffoldCallback callback)

 boolean
ScaffoldDomain.update(Object domainObject,
       ScaffoldCallback callback)

          Updates an existing instance

 boolean
GrailsScaffoldDomain.update(Object domainObject,
       ScaffoldCallback callback)

 boolean
DefaultScaffoldDomain.update(Object domainObject,
       ScaffoldCallback callback)

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Copyright (c) 2005-2006 The Grails project


text:
using System;

using Sitecore.Ship.Core.Domain;

namespace Sitecore.Ship.Core.Services
{
    public class ZipEntryDataParser
    {
        public static PackageManifestEntry GetManifestEntry(string dataKey)
        {
            if (dataKey.EndsWith("}", StringComparison.InvariantCultureIgnoreCase))
            {
                var elements = dataKey.Split(new[] { "_{" }, 2, StringSplitOptions.None);

                return new PackageManifestEntry
                {
                    ID = new Guid(elements[1].Trim(new[] { '{', '}' })),
                    Path = elements[0]
                };
            }

            if (dataKey.EndsWith("/xml", StringComparison.InvariantCultureIgnoreCase))
            {
                var elements = dataKey.Split(new[] { "/{" }, 2, StringSplitOptions.None);
                // fix - support XML folders
                if (elements.Length > 1)
                {
                    return new PackageManifestEntry
                    {
                        ID = new Guid(elements[1].Split(new[] { '}' })[0]),
                        Path = elements[0]
                    };
                }
            }

            const string filesPrefix = "addedfiles";
            if (dataKey.StartsWith(filesPrefix, StringComparison.InvariantCultureIgnoreCase))
            {
                return new FileManifestEntry(dataKey.Substring(filesPrefix.Length));
            }

            return new PackageManifestEntryNotFound();
        }
    }
}


text:
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using Windows.Data.Json;
using Windows.Storage;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Media.Imaging;

// The data model defined by this file serves as a representative example of a strongly-typed
// model.  The property names chosen coincide with data bindings in the standard item templates.
//
// Applications may use this model as a starting point and build on it, or discard it entirely and
// replace it with something appropriate to their needs. If using this model, you might improve app
// responsiveness by initiating the data loading task in the code behind for App.xaml when the app
// is first launched.

namespace DncPdfReader.Data
{
    /// <summary>
    /// Generic item data model.
    /// </summary>
    public class SampleDataItem
    {
        public SampleDataItem(String uniqueId, String pageNumber, String imagePath)
        {
            this.UniqueId = uniqueId;
            this.PageNumber = pageNumber;
            this.ImagePath = imagePath;
        }

        public string UniqueId { get; private set; }
        public string PageNumber { get; private set; }
        public string ImagePath { get; private set; }
        public override string ToString()
        {
            return this.PageNumber;
        }
    }

    /// <summary>
    /// Generic group data model.
    /// </summary>
    public class SampleDataGroup
    {
        public SampleDataGroup(String uniqueId, String title, String subtitle, String imagePath, DateTime lastAccessed)
        {
            this.UniqueId = uniqueId;
            this.FileName = title;
            this.FilePath = subtitle;
            this.LastAccessed = lastAccessed;
            this.ImagePath = imagePath;
            this.Items = new ObservableCollection<SampleDataItem>();
        }

        public string UniqueId { get; private set; }
        public string FileName { get; private set; }
        public string FilePath { get; private set; }
        public DateTime LastAccessed { get; private set; }
        public string ImagePath { get; private set; }
        public ObservableCollection<SampleDataItem> Items { get; private set; }

        public override string ToString()
        {
            return this.FileName;
        }
    }

    /// <summary>
    /// Creates a collection of groups and items with content read from a static json file.
    ///
    /// SampleDataSource initializes with data read from a static json file included in the
    /// project.  This provides sample data at both design-time and run-time.
    /// </summary>
    public sealed class SampleDataSource
    {
        private static SampleDataSource _sampleDataSource = new SampleDataSource();

        private ObservableCollection<SampleDataGroup> _groups = new ObservableCollection<SampleDataGroup>();
        public ObservableCollection<SampleDataGroup> Groups
        {
            get { return this._groups; }
        }

        public static async Task<IEnumerable<SampleDataGroup>> GetGroupsAsync()
        {
            await _sampleDataSource.GetSampleDataAsync();

            return _sampleDataSource.Groups;
        }

        public static async Task<SampleDataGroup> GetGroupAsync(string uniqueId)
        {
            await _sampleDataSource.GetSampleDataAsync();
            // Simple linear search is acceptable for small data sets
            var matches = _sampleDataSource.Groups.Where((group) => group.UniqueId.Equals(uniqueId));
            if (matches.Count() == 1) return matches.First();
            return null;
        }

        public static async Task<SampleDataItem> GetItemAsync(string uniqueId)
        {
            await _sampleDataSource.GetSampleDataAsync();
            // Simple linear search is acceptable for small data sets
            var matches = _sampleDataSource.Groups.SelectMany(group => group.Items).Where((item) => item.UniqueId.Equals(uniqueId));
            if (matches.Count() == 1) return matches.First();
            return null;
        }

        private async Task GetSampleDataAsync()
        {
            if (this._groups.Count != 0)
                return;

            Uri dataUri = new Uri("ms-appx:///DataModel/SampleData.json");

            StorageFile file = await StorageFile.GetFileFromApplicationUriAsync(dataUri);
            string jsonText = await FileIO.ReadTextAsync(file);
            JsonObject jsonObject = JsonObject.Parse(jsonText);
            JsonArray jsonArray = jsonObject["Groups"].GetArray();

            foreach (JsonValue groupValue in jsonArray)
            {
                JsonObject groupObject = groupValue.GetObject();
                SampleDataGroup group = new SampleDataGroup(groupObject["UniqueId"].GetString(),
                                                            groupObject["FileName"].GetString(),
                                                            groupObject["FilePath"].GetString(),
                                                            groupObject["ImagePath"].GetString(),
                                                            DateTime.Now);

                foreach (JsonValue itemValue in groupObject["Items"].GetArray())
                {
                    JsonObject itemObject = itemValue.GetObject();
                    group.Items.Add(new SampleDataItem(itemObject["UniqueId"].GetString(),
                                                       itemObject["PageNumber"].GetString(),
                                                       itemObject["ImagePath"].GetString()));
                }
                this.Groups.Add(group);
            }
        }
    }
}


text:
using System;
using StackExchange.Redis;
using Xunit;

namespace TrackableData.Redis
{
    public class RedisTypeConverterTest
    {
        [Fact]
        public void RegisterTypeConverterAsExplicitType_WorkWell()
        {
            var converter = new RedisTypeConverter();
            converter.Register(
                v => ('`' + v + '`'),
                v => ((string)v).Trim('`'));

            AssertConversionEqual(converter, "Value", "`Value`");
        }

        [Fact]
        public void RegisterTypeConverterAsObjectType_WorkWell()
        {
            var converter = new RedisTypeConverter();
            converter.Register(
                typeof(string),
                v => ('`' + (string)v + '`'),
                v => ((string)v).Trim('`'));

            AssertConversionEqual(converter, "Value", "`Value`");
        }

        [Fact]
        public void DefaultConverter_WorkWell()
        {
            var converter = new RedisTypeConverter();

            AssertConversionEqual(converter, true);
            AssertConversionEqual(converter, (short)1);
            AssertConversionEqual(converter, (int)1);
            AssertConversionEqual(converter, (long)1);
            AssertConversionEqual(converter, 'c');
            AssertConversionEqual(converter, "string:\xAC00");
            AssertConversionEqual(converter, 3.141592f);
            AssertConversionEqual(converter, 3.1415927410125732);
            AssertConversionEqual(converter, new byte[] { 0, 1, 2 });
            AssertConversionEqual(converter, new DateTime(2001, 1, 1, 1, 1, 1));
            AssertConversionEqual(converter, new DateTimeOffset(2001, 1, 1, 1, 1, 1, TimeSpan.FromHours(2)));
            AssertConversionEqual(converter, new TimeSpan(1, 2, 3));
            AssertConversionEqual(converter, Guid.NewGuid());
        }

        [Fact]
        public void Nullable_WorkWell()
        {
            var converter = new RedisTypeConverter();

            AssertConversionEqual(converter, (bool?)null, RedisValue.Null);
            AssertConversionEqual(converter, (bool?)true, true);
            AssertConversionEqual(converter, (int?)null, RedisValue.Null);
            AssertConversionEqual(converter, (int?)100, 100);
        }

        [Fact]
        public void JsonFallback_WorkWell()
        {
            var converter = new RedisTypeConverter();

            AssertConversionEqual(converter, new { Value = "123" }, "{\"Value\":\"123\"}");
        }

        private void AssertConversionEqual<T>(RedisTypeConverter converter, T value,
                                              RedisValue? expectedRedisValue = null)
        {
            // check from(to(V)) == V (explicit type version)
            var rv1 = converter.GetToRedisValueFunc<T>()(value);
            var nv1 = converter.GetFromRedisValueFunc<T>()(rv1);
            Assert.Equal(value, nv1);

            // check from(to(V)) == V (object type version)
            var rv2 = converter.GetToRedisValueFunc(typeof(T))(value);
            var nv2 = converter.GetFromRedisValueFunc(typeof(T))(rv2);
            Assert.Equal(value, nv2);

            // check to1(V) == to2(V)
            Assert.Equal(rv1, rv2);

            if (expectedRedisValue != null)
                Assert.Equal(expectedRedisValue.Value, rv1);
        }
    }
}


text:
module.exports = function(mongoose) {
    var schema = new mongoose.Schema({
        server:{type:mongoose.Schema.Types.ObjectId,ref:"file_servers"},
        host:String,
        path:String,
        type:String,
        isUse:Boolean,
        hash:String,
        isAdminDeleted:Boolean,
        thumbnailPath:String,
    },{
        timestamps:true
    })
    schema.methods.getUrl= function() {
        return this.host+this.path
    }
    schema.methods.getThumbnailUrl = function() {
        if (!this.thumbnailPath) {
            switch (this.type) {
                case 'video':
                    return this.getUrl() + ".thumbnail.jpg"
                case 'image':
                    return this.getUrl()
            }
        }
        return this.host+this.thumbnailPath
    }
    schema.methods.toResponseObject = async function (token) {
        var obj = this.toObject()
        obj.id = this._id
        obj._id = undefined
        obj.__v = undefined
        obj.server = undefined
        obj.thumbnailPath = undefined
        obj.thumbnailUrl = this.host + this.thumbnailPath
        if (!obj.isUse) {
            obj.host = undefined
            obj.path = undefined
        } else if (obj.isAdminDeleted) {
            obj.url = obj.host+"/public/admin_deleted.png"
            obj.path = "/public/admin_deleted.png"
            obj.type = "image"
        } else {
            obj.url = obj.host+obj.path
            if (!this.thumbnailPath) {
                switch (obj.type) {
                    case 'video':
                        obj.thumbnailUrl = obj.url + ".thumbnail.jpg"
                        break
                    case 'image':
                        obj.thumbnailUrl = obj.url
                }
            }
        }
        return obj
    }
    return mongoose.model("files",schema)
}


text:
/**
 * Created by yangyxu on 7/14/15.
 */
zn.define([
    'node:fs',
    'node:path'
], function (fs, path) {

    return zn.Class({
        properties: {
            env: null,
            argv: null
        },
        methods: {
            init: function (env, argv){
                this._env = env;
                this._argv = argv;
                this.exec();
            },
            exec: function (){
                var _configFilePath = this.getConfigFilePath();
                var _name = argv[1];
                if(!_name){
                    zn.error('The plugin name is required.');
                    return;
                }
                if(fs.existsSync(_configFilePath)){
                    var _pluginsDir = __dirname + '/../src/net/http.server/inits/plugins';
                    var _target =  _pluginsDir + '/' + _name;
                    fs.mkdirSync(_pluginsDir);
                } else {
                    zn.error('The current directory is not an zn app, the file "zn.app.config.js" is required.');
                }
            },
            getConfigFilePath: function (){
                return process.cwd() + zn.SLASH + (this._argv.config || 'zn.app.config.js');
            }
        }
    });

});


text:
module CodeDrivenDevelopment
  module TestComponent
    class Test
      def initialize(description = "", body = "")
        @description, @body = description, body
      end

      attr_accessor :description, :body

      def indented_output io
        io << "it \"#@description\" do"
        io.indented do
          body.each { |line| io << line }
        end
        io << "end"
      end
    end
  end
end


text:
namespace feather {

TableReader::TableReader() {}

Status TableReader::Open(const std::shared_ptr<RandomAccessReader>& source) {
  source_ = source;

  int magic_size = strlen(FEATHER_MAGIC_BYTES);
  int footer_size = magic_size + sizeof(uint32_t);

  // Pathological issue where the file is smaller than
  if (source->size() < magic_size + footer_size) {
    return Status::Invalid("File is too small to be a well-formed file");
  }

  std::shared_ptr<Buffer> buffer;
  RETURN_NOT_OK(source->Read(magic_size, &buffer));

  if (memcmp(buffer->data(), FEATHER_MAGIC_BYTES, magic_size)) {
    return Status::Invalid("Not a feather file");
  }

  // Now get the footer and verify
  RETURN_NOT_OK(source->ReadAt(source->size() - footer_size, footer_size, &buffer));

  if (memcmp(buffer->data() + sizeof(uint32_t), FEATHER_MAGIC_BYTES, magic_size)) {
    return Status::Invalid("Feather file footer incomplete");
  }

  uint32_t metadata_length = *reinterpret_cast<const uint32_t*>(buffer->data());
  if (source->size() < magic_size + footer_size + metadata_length) {
    return Status::Invalid("File is smaller than indicated metadata size");
  }
  RETURN_NOT_OK(source->ReadAt(source->size() - footer_size - metadata_length,
          metadata_length, &buffer));

  if (!metadata_.Open(buffer)) {
    return Status::Invalid("Invalid file metadata");
  }

  return Status::OK();
}

Status TableReader::OpenFile(const std::string& abspath,
    std::unique_ptr<TableReader>* out) {
  auto reader = std::unique_ptr<MemoryMapReader>(new MemoryMapReader());
  RETURN_NOT_OK(reader->Open(abspath));
  std::shared_ptr<RandomAccessReader> source(reader.release());
  out->reset(new TableReader());
  return (*out)->Open(source);
}

bool TableReader::HasDescription() const {
  return metadata_.has_description();
}

std::string TableReader::GetDescription() const {
  return metadata_.description();
}

int TableReader::version() const {
  return metadata_.version();
}

int64_t TableReader::num_rows() const {
  return metadata_.num_rows();
}

int64_t TableReader::num_columns() const {
  return metadata_.num_columns();
}

Status TableReader::GetPrimitiveArray(const ArrayMetadata& meta,
    PrimitiveArray* out) const {
  // Buffer data from the source (may or may not perform a copy depending on
  // input source)
  std::shared_ptr<Buffer> buffer;

  RETURN_NOT_OK(source_->ReadAt(meta.offset, meta.total_bytes, &buffer));

  const uint8_t* data = buffer->data();

  // If there are nulls, the null bitmask is first
  if (meta.null_count > 0) {
    out->nulls = data;
    data += util::bytes_for_bits(meta.length);
  } else {
    out->nulls = nullptr;
  }

  if (IsVariableLength(meta.type)) {
    out->offsets = reinterpret_cast<const int32_t*>(data);
    data += (meta.length + 1) * sizeof(int32_t);
  }

  // TODO(wesm): dictionary encoded values

  // The value bytes are last
  out->values = data;

  out->type = meta.type;
  out->length = meta.length;
  out->null_count = meta.null_count;

  // Hold on to this data
  out->buffers.push_back(buffer);

  return Status::OK();
}

Status TableReader::GetPrimitive(std::shared_ptr<metadata::Column> col_meta,
    std::unique_ptr<Column>* out) const {
  auto values_meta = col_meta->values();
  PrimitiveArray values;
  RETURN_NOT_OK(GetPrimitiveArray(values_meta, &values));

  out->reset(new Column(col_meta->type(), col_meta, values));
  return Status::OK();
}

Status TableReader::GetCategory(std::shared_ptr<metadata::Column> col_meta,
    std::unique_ptr<Column>* out) const {
  PrimitiveArray values, levels;
  auto cat_meta = static_cast<metadata::CategoryColumn*>(col_meta.get());

  auto values_meta = cat_meta->values();
  RETURN_NOT_OK(GetPrimitiveArray(values_meta, &values));

  auto levels_meta = cat_meta->levels();
  RETURN_NOT_OK(GetPrimitiveArray(levels_meta, &levels));

  out->reset(new CategoryColumn(col_meta, values, levels,
      cat_meta->ordered()));

  return Status::OK();
}

Status TableReader::GetTimestamp(std::shared_ptr<metadata::Column> col_meta,
    std::unique_ptr<Column>* out) const {
  PrimitiveArray values;
  auto ts_meta = static_cast<metadata::TimestampColumn*>(col_meta.get());

  auto values_meta = ts_meta->values();
  RETURN_NOT_OK(GetPrimitiveArray(values_meta, &values));

  out->reset(new TimestampColumn(col_meta, values));
  return Status::OK();
}

Status TableReader::GetTime(std::shared_ptr<metadata::Column> col_meta,
    std::unique_ptr<Column>* out) const {
  PrimitiveArray values;
  auto time_meta = static_cast<metadata::TimeColumn*>(col_meta.get());

  auto values_meta = time_meta->values();
  RETURN_NOT_OK(GetPrimitiveArray(values_meta, &values));

  out->reset(new TimeColumn(col_meta, values));
  return Status::OK();
}

Status TableReader::GetColumn(int i, std::unique_ptr<Column>* out) const {
  std::shared_ptr<metadata::Column> col_meta = metadata_.GetColumn(i);
  switch (col_meta->type()) {
    case ColumnType::PRIMITIVE:
      RETURN_NOT_OK(GetPrimitive(col_meta, out));
      break;
    case ColumnType::CATEGORY:
      RETURN_NOT_OK(GetCategory(col_meta, out));
      break;
    case ColumnType::TIMESTAMP:
      RETURN_NOT_OK(GetTimestamp(col_meta, out));
      break;
    case ColumnType::DATE:
      RETURN_NOT_OK(GetPrimitive(col_meta, out));
      break;
    case ColumnType::TIME:
      RETURN_NOT_OK(GetTime(col_meta, out));
      break;
    default:
      out->reset(nullptr);
      break;
  }
  return Status::OK();
}

} // namespace feather


text:
```
layout: showcase
title: "Pakkuman's Defense"
android: https://play.google.com/store/apps/details?id=air.tametick.pakkuman
ios: http://itunes.apple.com/us/app/pakkumansdefense/id560453722?ls=1&mt=8
blackberry: https://appworld.blackberry.com/webstore/content/133926/
flash: http://tametick.com/pd/
website: http://tametick.com/pd/
```


text:
// Copyright 2022 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include <grpc/support/port_platform.h>

#ifdef GPR_WINDOWS
#include <grpc/support/alloc.h>
#include <grpc/support/log_windows.h>

#include "src/core/lib/event_engine/executor/executor.h"
#include "src/core/lib/event_engine/trace.h"
#include "src/core/lib/event_engine/windows/win_socket.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/error.h"

#if defined(__MSYS__) && defined(GPR_ARCH_64)
/* Nasty workaround for nasty bug when using the 64 bits msys compiler
   in conjunction with Microsoft Windows headers. */
#define GRPC_FIONBIO _IOW('f', 126, uint32_t)
#else
#define GRPC_FIONBIO FIONBIO
#endif

namespace grpc_event_engine {
namespace experimental {

WinSocket::WinSocket(SOCKET socket, Executor* executor) noexcept
    : socket_(socket),
      executor_(executor),
      read_info_(OpState(this)),
      write_info_(OpState(this)) {}

WinSocket::~WinSocket() { GPR_ASSERT(is_shutdown_.load()); }

SOCKET WinSocket::socket() { return socket_; }

void WinSocket::MaybeShutdown(absl::Status why) {
  // if already shutdown, return early. Otherwise, set the shutdown flag.
  if (is_shutdown_.exchange(true)) {
    if (GRPC_TRACE_FLAG_ENABLED(grpc_event_engine_trace)) {
      gpr_log(GPR_DEBUG, "WinSocket::%p already shutting down", this);
    }
    return;
  }
  if (GRPC_TRACE_FLAG_ENABLED(grpc_event_engine_trace)) {
    gpr_log(GPR_DEBUG, "WinSocket::%p shutting down now. Reason: %s", this,
            why.ToString().c_str());
  }
  // Grab the function pointer for DisconnectEx for that specific socket.
  // It may change depending on the interface.
  GUID guid = WSAID_DISCONNECTEX;
  LPFN_DISCONNECTEX DisconnectEx;
  DWORD ioctl_num_bytes;
  int status = WSAIoctl(socket_, SIO_GET_EXTENSION_FUNCTION_POINTER, &guid,
                        sizeof(guid), &DisconnectEx, sizeof(DisconnectEx),
                        &ioctl_num_bytes, NULL, NULL);

  if (status == 0) {
    DisconnectEx(socket_, NULL, 0, 0);
  } else {
    char* utf8_message = gpr_format_message(WSAGetLastError());
    gpr_log(GPR_INFO, "Unable to retrieve DisconnectEx pointer : %s",
            utf8_message);
    gpr_free(utf8_message);
  }
  closesocket(socket_);
}

void WinSocket::NotifyOnReady(OpState& info, EventEngine::Closure* closure) {
  if (IsShutdown()) {
    info.SetError(WSAESHUTDOWN);
    executor_->Run(closure);
    return;
  };
  if (absl::exchange(info.has_pending_iocp_, false)) {
    executor_->Run(closure);
  } else {
    info.closure_ = closure;
  }
}

void WinSocket::NotifyOnRead(EventEngine::Closure* on_read) {
  NotifyOnReady(read_info_, on_read);
}

void WinSocket::NotifyOnWrite(EventEngine::Closure* on_write) {
  NotifyOnReady(write_info_, on_write);
}

WinSocket::OpState::OpState(WinSocket* win_socket) noexcept
    : win_socket_(win_socket), closure_(nullptr) {}

void WinSocket::OpState::SetReady() {
  GPR_ASSERT(!has_pending_iocp_);
  if (closure_) {
    win_socket_->executor_->Run(closure_);
  } else {
    has_pending_iocp_ = true;
  }
}

void WinSocket::OpState::SetError(int wsa_error) {
  bytes_transferred_ = 0;
  wsa_error_ = wsa_error;
}

void WinSocket::OpState::GetOverlappedResult() {
  DWORD flags = 0;
  DWORD bytes;
  BOOL success = WSAGetOverlappedResult(win_socket_->socket(), &overlapped_,
                                        &bytes, FALSE, &flags);
  bytes_transferred_ = bytes;
  wsa_error_ = success ? 0 : WSAGetLastError();
}

void WinSocket::SetReadable() { read_info_.SetReady(); }

void WinSocket::SetWritable() { write_info_.SetReady(); }

bool WinSocket::IsShutdown() { return is_shutdown_.load(); }

WinSocket::OpState* WinSocket::GetOpInfoForOverlapped(OVERLAPPED* overlapped) {
  if (GRPC_TRACE_FLAG_ENABLED(grpc_event_engine_trace)) {
    gpr_log(GPR_DEBUG,
            "WinSocket::%p looking for matching OVERLAPPED::%p. "
            "read(%p) write(%p)",
            this, overlapped, &read_info_.overlapped_,
            &write_info_.overlapped_);
  }
  if (overlapped == &read_info_.overlapped_) return &read_info_;
  if (overlapped == &write_info_.overlapped_) return &write_info_;
  return nullptr;
}

namespace {

grpc_error_handle grpc_tcp_set_non_block(SOCKET sock) {
  int status;
  uint32_t param = 1;
  DWORD ret;
  status = WSAIoctl(sock, GRPC_FIONBIO, &param, sizeof(param), NULL, 0, &ret,
                    NULL, NULL);
  return status == 0
             ? GRPC_ERROR_NONE
             : GRPC_WSA_ERROR(WSAGetLastError(), "WSAIoctl(GRPC_FIONBIO)");
}

static grpc_error_handle set_dualstack(SOCKET sock) {
  int status;
  DWORD param = 0;
  status = setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (const char*)&param,
                      sizeof(param));
  return status == 0
             ? GRPC_ERROR_NONE
             : GRPC_WSA_ERROR(WSAGetLastError(), "setsockopt(IPV6_V6ONLY)");
}

static grpc_error_handle enable_socket_low_latency(SOCKET sock) {
  int status;
  BOOL param = TRUE;
  status = ::setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
                        reinterpret_cast<char*>(&param), sizeof(param));
  if (status == SOCKET_ERROR) {
    status = WSAGetLastError();
  }
  return status == 0 ? GRPC_ERROR_NONE
                     : GRPC_WSA_ERROR(status, "setsockopt(TCP_NODELAY)");
}

}  // namespace

absl::Status PrepareSocket(SOCKET sock) {
  absl::Status err;
  err = grpc_tcp_set_non_block(sock);
  if (!GRPC_ERROR_IS_NONE(err)) return err;
  err = enable_socket_low_latency(sock);
  if (!GRPC_ERROR_IS_NONE(err)) return err;
  err = set_dualstack(sock);
  if (!GRPC_ERROR_IS_NONE(err)) return err;
  return GRPC_ERROR_NONE;
}

}  // namespace experimental
}  // namespace grpc_event_engine

#endif  // GPR_WINDOWS


text:
GEDIR=../../src
EXEC=target
CC=gcc
CFLAGS= -W -Wall -Wno-unused-parameter -Werror-implicit-function-declaration -ansi -pedantic -std=c11 `sdl2-config --cflags` -I$(GEDIR)
LDFLAGS= `sdl2-config --libs` -lSDL2_image -lSDL2_mixer
CPPFLAGS= -DUSE_IMAGE

TARGET := $(notdir $(CURDIR))
SOURCEDIR := src
SOURCE := $(GEDIR)/game_engine.c $(GEDIR)/sound_engine.c $(GEDIR)/image.c $(GEDIR)/image_animated.c $(GEDIR)/sprite_animated.c $(GEDIR)/sprite.c $(GEDIR)/fontmap.c $(GEDIR)/TM/map2d.c $(GEDIR)/TM/cartesian.c $(GEDIR)/UI/menu.c $(foreach DIR,$(SOURCEDIR),$(wildcard $(DIR)/*.c))

DEBUG=no
ifeq ($(DEBUG),yes)
	CPPFLAGS += -DDEBUG -g
endif

DEV=no
ifeq ($(DEV),yes)
	CPPFLAGS += -DDEV
endif

LOG=no
ifeq ($(LoG),yes)
	CPPFLAGS += -DLOG
endif

#---------------------------------------------------------------------------------

#inference
%.o: %.c
	$(CC) -o $@ -c $< $(CFLAGS)

#build target
all: $(EXEC)

target: $(OBJ)
	$(CC) $(SOURCE) -o $(TARGET) $^ $(LDFLAGS) $(CFLAGS) $(CPPFLAGS)

#mingw target
mingw: LDFLAGS := -lmingw32 -static-libgcc $(LDFLAGS)
mingw: TARGET := $(TARGET).exe
mingw: $(EXEC)

#clean targets
.PHONY: clean mrproper

clean:
	rm -rf *.o

mrproper: clean
	rm -rf $(TARGET)


text:
namespace network {

namespace test {

namespace {

const char kIssuanceRelativePath[] = "/issue";
const char kRedemptionRelativePath[] = "/redeem";
const char kSignedRequestVerificationRelativePath[] = "/sign";

std::unique_ptr<net::test_server::HttpResponse>
MakeTrustTokenFailureResponse() {
  // No need to report a failure HTTP code here: returning a vanilla OK should
  // fail the Trust Tokens operation client-side.
  return std::make_unique<net::test_server::BasicHttpResponse>();
}

// Constructs and returns an HTTP response bearing the given base64-encoded
// Trust Tokens issuance or redemption protocol response message.
std::unique_ptr<net::test_server::HttpResponse> MakeTrustTokenResponse(
    base::StringPiece contents) {
  CHECK([&]() {
    std::string temp;
    return base::Base64Decode(contents, &temp);
  }());

  auto ret = std::make_unique<net::test_server::BasicHttpResponse>();
  ret->AddCustomHeader("Sec-Trust-Token", std::string(contents));
  return ret;
}

}  // namespace

void RegisterTrustTokenTestHandlers(net::EmbeddedTestServer* test_server,
                                    TrustTokenRequestHandler* handler) {
  test_server->RegisterRequestHandler(base::BindLambdaForTesting(
      [handler](const net::test_server::HttpRequest& request)
          -> std::unique_ptr<net::test_server::HttpResponse> {
        // Decline to handle the request if it isn't destined for this
        // endpoint.
        if (request.relative_url != kIssuanceRelativePath)
          return nullptr;

        if (!base::Contains(request.headers, "Sec-Trust-Token"))
          return MakeTrustTokenFailureResponse();

        base::Optional<std::string> operation_result =
            handler->Issue(request.headers.at("Sec-Trust-Token"));

        if (!operation_result)
          return MakeTrustTokenFailureResponse();

        return MakeTrustTokenResponse(*operation_result);
      }));

  test_server->RegisterRequestHandler(base::BindLambdaForTesting(
      [handler](const net::test_server::HttpRequest& request)
          -> std::unique_ptr<net::test_server::HttpResponse> {
        if (request.relative_url != kRedemptionRelativePath)
          return nullptr;

        if (!base::Contains(request.headers, "Sec-Trust-Token"))
          return MakeTrustTokenFailureResponse();

        base::Optional<std::string> operation_result =
            handler->Redeem(request.headers.at("Sec-Trust-Token"));

        if (!operation_result)
          return MakeTrustTokenFailureResponse();

        return MakeTrustTokenResponse(*operation_result);
      }));

  test_server->RegisterRequestHandler(base::BindLambdaForTesting(
      [handler](const net::test_server::HttpRequest& request)
          -> std::unique_ptr<net::test_server::HttpResponse> {
        if (request.relative_url != kSignedRequestVerificationRelativePath)
          return nullptr;

        std::string error;
        net::HttpRequestHeaders headers;
        for (const auto& name_and_value : request.headers)
          headers.SetHeader(name_and_value.first, name_and_value.second);

        bool success =
            handler->VerifySignedRequest(request.GetURL(), headers, &error);
        LOG_IF(ERROR, !success) << error;

        // Unlike issuance and redemption, there's no special state to return
        // on success for signing.
        return std::make_unique<net::test_server::BasicHttpResponse>();
      }));
}

}  // namespace test

}  // namespace network


text:
//-----------------------------------------------------------------------
// <copyright file="MultiNodeFact.cs" company="Akka.NET Project">
//     Copyright (C) 2009-2016 Typesafe Inc. <http://www.typesafe.com>
//     Copyright (C) 2013-2016 Akka.NET project <https://github.com/akkadotnet/akka.net>
// </copyright>
//-----------------------------------------------------------------------

using System;
using Xunit;

namespace Akka.Remote.TestKit
{
    public class MultiNodeFactAttribute : FactAttribute
    {
        public static Lazy<bool> ExecutedByMultiNodeRunner =
            new Lazy<bool>(() =>
            {
                var args = Environment.GetCommandLineArgs();
                if (args.Length == 0) return false;
                var firstArg = args[0];
                return firstArg.Contains("Akka.MultiNodeTestRunner")
                    || firstArg.Contains("Akka.NodeTestRunner");
            });

        public override string Skip
        {
            get
            {
                return ExecutedByMultiNodeRunner.Value
                    ? base.Skip
                    : "Must be executed by multi-node test runner";
            }
            set { base.Skip = value; }
        }
    }
}


text:
/** @file
 *
 * @defgroup nrf_dfu_app_handler DFU BLE packet handling in Application
 * @{
 *
 * @brief DFU BLE packet handling for application.
 *
 * @details This module implements handling of DFU packets transmitted over BLE for switching from
 *          application mode to Bootloader running full DFU service.
 *          This module only handles the StartDFU packet allowing for any BLE application to expose
 *          support for the DFU service.
 *          Actual DFU service will execute in dedicated environment after a BLE disconnect and
 *          reset of the nRF51 chip.
 *          The host must then reconnect and can continue the update procedure with access to full
 *          DFU service.
 *
 * @note The application must propagate dfu events to the DFU App handler module by calling
 *       dfu_app_on_dfu_evt() from the from the @ref ble_dfu_evt_handler_t callback.
 */

#ifndef DFU_APP_HANDLER_H__
#define DFU_APP_HANDLER_H__

#include "dfu_app_handler.h"
#include "ble_dfu.h"

/**@brief DFU Application reset prepare function. This function is a callback which allows the
 *        application to prepare for an upcoming application reset.
 */
typedef void (*dfu_app_reset_prepare_t)(void);

/**@brief   Function for handling of \ref ble_dfu_evt_t from DFU Service.
 *
 * @details The application must inject this function into the DFU service or propagate DFU events
 *          to dfu_app_handler module by calling this function in application specific DFU event
 *          handler.
 *
 * @param[in] p_dfu  Pointer to the DFU Service structure for which the include event relates.
 * @param[in] p_evt  Pointer to the DFU event.
 */
void dfu_app_on_dfu_evt(ble_dfu_t * p_dfu, ble_dfu_evt_t * p_evt);

/**@brief Function for registering for reset prepare calls.
 *
 * @details The function provided will be executed before reseting the system into Bootloader/DFU
 *          mode. By setting this function the caller will be notified prior to the reset and can
 *          thus prepare the application for reset. As example the application can gracefully
 *          disconnect any peers on BLE, turning of LEDS, ensure all pending flash operations
 *          has completed, etc.
 *
 * @param[in] reset_prepare_func  Function to be execute prior to a reset.
 */
void dfu_app_reset_prepare_set(dfu_app_reset_prepare_t reset_prepare_func);

#endif // DFU_APP_HANDLER_H__

/** @} */


text:
/*
 * f_step_ellipsoid.c
 *
 * The BBOB step ellipsoid function intertwines the variable and objective transformations in such a way
 * that it is hard to devise a composition of generic transformations to implement it. In the end one would
 * have to implement several custom transformations which would be used solely by this problem. Therefore
 * we opt to implement it as a monolithic function instead.
 *
 * TODO: It would be nice to have a generic step ellipsoid function to complement this one.
 */
#include <assert.h>

#include "coco.h"
#include "coco_problem.c"
#include "coco_utilities.c"
#include "suite_bbob_legacy_code.c"

typedef struct {
  double *x, *xx;
  double *xopt, fopt;
  double **rot1, **rot2;
} f_step_ellipsoid_data_t;

static double f_step_ellipsoid_raw(const double *x, size_t number_of_variables, f_step_ellipsoid_data_t *data) {

  static const double condition = 100;
  static const double alpha = 10.0;
  size_t i, j;
  double penalty = 0.0, x1;
  double result;

  assert(number_of_variables > 1);

  for (i = 0; i < number_of_variables; ++i) {
    double tmp;
    tmp = fabs(x[i]) - 5.0;
    if (tmp > 0.0)
      penalty += tmp * tmp;
  }

  for (i = 0; i < number_of_variables; ++i) {
    double c1;
    data->x[i] = 0.0;
    c1 = sqrt(pow(condition / 10., (double) i / (double) (number_of_variables - 1)));
    for (j = 0; j < number_of_variables; ++j) {
      data->x[i] += c1 * data->rot2[i][j] * (x[j] - data->xopt[j]);
    }
  }
  x1 = data->x[0];

  for (i = 0; i < number_of_variables; ++i) {
    if (fabs(data->x[i]) > 0.5)
      data->x[i] = coco_round_double(data->x[i]);
    else
      data->x[i] = coco_round_double(alpha * data->x[i]) / alpha;
  }

  for (i = 0; i < number_of_variables; ++i) {
    data->xx[i] = 0.0;
    for (j = 0; j < number_of_variables; ++j) {
      data->xx[i] += data->rot1[i][j] * data->x[j];
    }
  }

  /* Computation core */
  result = 0.0;
  for (i = 0; i < number_of_variables; ++i) {
    double exponent;
    exponent = (double) (long) i / ((double) (long) number_of_variables - 1.0);
    result += pow(condition, exponent) * data->xx[i] * data->xx[i];
    ;
  }
  result = 0.1 * coco_max_double(fabs(x1) * 1.0e-4, result) + penalty + data->fopt;

  return result;
}

static void f_step_ellipsoid_evaluate(coco_problem_t *self, const double *x, double *y) {
  assert(self->number_of_objectives == 1);
  y[0] = f_step_ellipsoid_raw(x, self->number_of_variables, self->data);
}

static void f_step_ellipsoid_free(coco_problem_t *self) {
  f_step_ellipsoid_data_t *data;
  data = self->data;
  coco_free_memory(data->x);
  coco_free_memory(data->xx);
  coco_free_memory(data->xopt);
  bbob2009_free_matrix(data->rot1, self->number_of_variables);
  bbob2009_free_matrix(data->rot2, self->number_of_variables);
  /* Let the generic free problem code deal with all of the coco_problem_t fields */
  self->free_problem = NULL;
  coco_problem_free(self);
}

/* Note: there is no separate f_step_ellipsoid_allocate() function! */

static coco_problem_t *f_step_ellipsoid_bbob_problem_allocate(const size_t function,
                                                              const size_t dimension,
                                                              const size_t instance,
                                                              const long rseed,
                                                              const char *problem_id_template,
                                                              const char *problem_name_template) {

  f_step_ellipsoid_data_t *data;
  size_t i;
  coco_problem_t *problem = coco_problem_allocate_from_scalars("step ellipsoid function",
      f_step_ellipsoid_evaluate, f_step_ellipsoid_free, dimension, -5.0, 5.0, 0);

  data = coco_allocate_memory(sizeof(*data));
  /* Allocate temporary storage and space for the rotation matrices */
  data->x = coco_allocate_vector(dimension);
  data->xx = coco_allocate_vector(dimension);
  data->xopt = coco_allocate_vector(dimension);
  data->rot1 = bbob2009_allocate_matrix(dimension, dimension);
  data->rot2 = bbob2009_allocate_matrix(dimension, dimension);

  data->fopt = bbob2009_compute_fopt(function, instance);
  bbob2009_compute_xopt(data->xopt, rseed, dimension);
  bbob2009_compute_rotation(data->rot1, rseed + 1000000, dimension);
  bbob2009_compute_rotation(data->rot2, rseed, dimension);

  problem->data = data;

  /* Compute best solution
   *
   * OME: Dirty hack for now because I did not want to invert the
   * transformations to find the best_parameter :/
   */
  for (i = 0; i < problem->number_of_variables; i++) {
      problem->best_parameter[i] = data->xopt[i];
  }
  problem->best_value[0] = data->fopt;

  coco_problem_set_id(problem, problem_id_template, function, instance, dimension);
  coco_problem_set_name(problem, problem_name_template, function, instance, dimension);
  coco_problem_set_type(problem, "2-moderate");

  return problem;
}


text:
$(document).ready(function(){
    setInterval(function() {
        if (ajax) { ajax.abort(); }
        getMessage();
    },30000);
    var ajax;
    $('.belousovSendMessage').click(function () {
        var message = $('.belousovMessageText');
        var addressee = $('#belousovChat').attr('data-addressee');
        var url = $('form[name=chat]').attr('action');
        if (addressee == "" || message == "") {
            alert('Escull Usuari');
        }
        $.ajax({
            type: "POST",
            url: url,
            data: {'messageText': message.val(), 'addressee' : addressee},
            cache: "false",
            dataType: "json",
            success: function (response) {
                if (response.error === undefined){
                    message.val('');
                }
            }
        });
    });
    function getMessage(){
        var chat = $('#belousovChat');
        var user_id = chat.attr('data-author');
        var addressee = chat.attr('data-addressee');
        var url = chat.attr('data-action');
        ajax = $.ajax({
            type:'POST',
            url:url,
            data:{'user_id' : user_id, 'addressee_id' : addressee},
            dataType:'json',
            success:function(resp){
                if (resp.error === undefined){
                    var html;
                    resp.forEach(function (item) {
                          if (item.author.id == user_id){
                            html = '
'+ item.author.username +": " + item.messageText +'
';
                            $('#belousovMessageZone').append(html);
                        }
                        if (item.addressee.id == user_id){
                            html = '
'+ item.author.username +": " + item.messageText +'
';
                            $('#belousovMessageZone').append(html);
                        }
                    });
                    $.ajax({
                        type: 'POST',
                        url: url,
                        data: {'user_id': user_id, 'addressee_id': addressee, 'update' : true},
                        dataType: 'json',
                        success: function (resp) {
                        }
                    });
                }
                setTimeout(function(){
                    getMessage()
                },1000)
            }
        });
    }
    $('.changeUser').click(function () {
        var addressee = $(this).attr('data-number');
        var chat = $('#belousovChat');
        var url = chat.attr('data-action');
        var user_id = chat.attr('data-author');
        chat.attr('data-addressee', addressee);
        $.ajax({
            type: "POST",
            url: url,
            data: {'changeUser' : true, 'user_id' : addressee},
            cache: "false",
            dataType: "json",
            success: function (response) {
                var html;
                $('#belousovMessageZone').html('');
                if (ajax) { ajax.abort(); }
                getMessage();
                if (response) {
                    response.forEach(function (item) {
                        if (item.author.id == user_id){
                            html = '
'+ item.author.username +": " + item.messageText +'
';
                            $('#belousovMessageZone').append(html);
                        }
                        if (item.addressee.id == user_id){
                            html = '
'+ item.author.username +": " + item.messageText +'
';
                            $('#belousovMessageZone').append(html);
                        }
                    });
                }
            }
        });
    });
});


text:
/**
 * Test suite for ColumnChart.BarChart.
 */
describe('Test Bar-Chart', function() {

    var spyEvent;

	function createFixtures() {
        for (var i = 0; i < 5; i++) {
			d3.select('body').append('div')
                             .attr('class', 'barchart')
                             .attr('data-for-column', 'datacol')
                             .attr('data-bar-value', 10 + i)
                             .attr('data-bar-color', '#CD4876')
                             .attr('data-bar-tooltip-text', 10 + i);
        }
	}

    function tearDownFixtures() {
        $('div.barchart').remove();
        $('svg').remove();
        $('.tooltip').remove();
    }

    function flushAllD3Transitions() {
        var now = Date.now;
        Date.now = function() { return Infinity; };
        d3.timer.flush();
        Date.now = now;
    }

    function d3DispatchEvent(element, eventType) {
        var e = document.createEvent('UIEvents');
        e.initUIEvent(eventType, true, true, window, 1);
        d3.select(element).node().dispatchEvent(e);
    }

	beforeEach(function() {
        createFixtures();
        this.barChartObj = new ColumnChart.BarChart('dummytableid');
	});

	afterEach(function() {
        tearDownFixtures();
	});

	it('tests if the div placeholders are in DOM', function() {
        var divPlaceHolders = $('.barchart');
        expect(divPlaceHolders.length).toBe(5);
	});

	it('tests if SVG elements have correct values/attributes', function() {
        // render the bar charts
        this.barChartObj.renderInlineBarcharts();
        // verify the SVG elements created.
        var allSvgs = $('svg');
        expect(allSvgs.length).toBe(5);
        for (var j = 0; j < allSvgs.length; j++) {
            expect($(allSvgs[j]).text()).toBe((10 + j).toString());
            expect($(allSvgs[j]).children().length).toBe(1);
            expect(d3.select('rect').attr('height')).toBe(
                DEFAULT_HEIGHT.toString());
            expect(d3.select('rect').attr('style')).toContain('opacity: 0.8;');
            expect(d3.select('rect').attr('style')).toMatch(
                /(#cd4876)|(rgb\(205, 72, 118\))/);
        }
    });

    it('test mousover and mousout', function() {
        var toolTip = $('tooltip');
        // render the bar charts
        this.barChartObj.renderInlineBarcharts();
        // trigger mouseover and test state change
        var allSvgs = $('svg');
        var rectElem;
        expect(allSvgs.length).toBe(5);
        for (var k = 0; k < allSvgs.length; k++) {
            rectElem = $(allSvgs[k]).find('>:first-child');
            // test for mouse-over event
            d3DispatchEvent(rectElem[0], 'mouseover');
            flushAllD3Transitions();
            expect($(rectElem).attr('style')).toContain('opacity: 1;');
            expect($('.tooltip').attr('style')).toContain('opacity: 0.9;');
            // test for mouse-out event
            d3DispatchEvent(rectElem[0], 'mouseout');
            flushAllD3Transitions();
            expect($(rectElem).attr('style')).toContain('opacity: 0.8;');
            expect($('.tooltip').attr('style')).toContain('opacity: 0;');
        }
    });

});


text:
package com.notnoop.apns;

import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.notnoop.apns.internal.Utilities;

/**
 * Represents a builder for constructing Payload requests, as specified by Apple
 * Push Notification Programming Guide.
 */
public final class PayloadBuilder {
	private static final ObjectMapper mapper = new ObjectMapper();

	private boolean useBody;
	private final Map<String, Object> root;
	private final Map<String, Object> aps;
	private final Map<String, Object> customAlert;

	/**
	 * Constructs a new instance of {@code PayloadBuilder}
	 */
	PayloadBuilder() {
		root = new HashMap<String, Object>();
		aps = new HashMap<String, Object>();
		customAlert = new HashMap<String, Object>();
		useBody = false;
	}

	/**
	 *
	 * Sets the configuration to use alert body
	 *
	 * @param useBody
	 */
	public PayloadBuilder withAlertBody(boolean useBody) {
		this.useBody = useBody;
		return this;
	}

	/**
	 * Sets the alert body text, the text the appears to the user, to the passed
	 * value
	 *
	 * @param alert
	 *            the text to appear to the user
	 * @return this
	 */
	public PayloadBuilder alertBody(final String alert) {
		customAlert.put("body", alert);
		return this;
	}

	/**
	 * Sets the alert sound to be played.
	 *
	 * Passing {@code null} disables the notification sound.
	 *
	 * @param sound
	 *            the file name or song name to be played when receiving the
	 *            notification
	 * @return this
	 */
	public PayloadBuilder sound(final String sound) {
		if (sound != null) {
			aps.put("sound", sound);
		} else {
			aps.remove("sound");
		}
		return this;
	}

	/**
	 * Sets the category of the notification for iOS8 notification actions
	 *
	 * Passing {@code null} removes the category.
	 *
	 * @param category
	 *            the name of the category supplied to the app when receiving
	 *            the notification
	 * @return this
	 */
	public PayloadBuilder category(final String category) {
		if (category != null) {
			aps.put("category", category);
		} else {
			aps.remove("category");
		}
		return this;
	}

	/**
	 * Sets the notification badge to be displayed next to the application icon.
	 *
	 * The passed value is the value that should be displayed (it will be added
	 * to the previous badge number), and a badge of 0 clears the badge
	 * indicator.
	 *
	 * @param badge
	 *            the badge number to be displayed
	 * @return this
	 */
	public PayloadBuilder badge(final int badge) {
		aps.put("badge", badge);
		return this;
	}

	/**
	 * Requests clearing of the badge number next to the application icon.
	 *
	 * This is an alias to {@code badge(0)}.
	 *
	 * @return this
	 */
	public PayloadBuilder clearBadge() {
		return badge(0);
	}

	/**
	 * Sets the value of action button (the right button to be displayed). The
	 * default value is "View".
	 *
	 * The value can be either the simple String to be displayed or a
	 * localizable key, and the iPhone will show the appropriate localized
	 * message.
	 *
	 * A {@code null} actionKey indicates no additional button is displayed,
	 * just the Cancel button.
	 *
	 * @param actionKey
	 *            the title of the additional button
	 * @return this
	 */
	public PayloadBuilder actionKey(final String actionKey) {
		customAlert.put("action-loc-key", actionKey);
		return this;
	}

	/**
	 * Set the notification view to display an action button.
	 *
	 * This is an alias to {@code actionKey(null)}
	 *
	 * @return this
	 */
	public PayloadBuilder noActionButton() {
		return actionKey(null);
	}

	/**
	 * Sets the notification type to be a 'newstand' notification.
	 *
	 * A Newstand Notification targets the Newstands app so that the app updates
	 * the subscription info and content.
	 *
	 * @return this
	 */
	public PayloadBuilder forNewsstand() {
		aps.put("content-available", 1);
		return this;
	}

	/**
	 * Set the notification localized key for the alert body message.
	 *
	 * @param key
	 *            the localizable message body key
	 * @return this
	 */
	public PayloadBuilder localizedKey(final String key) {
		customAlert.put("loc-key", key);
		return this;
	}

	/**
	 * Sets the arguments for the alert message localizable message.
	 *
	 * The iPhone doesn't localize the arguments.
	 *
	 * @param arguments
	 *            the arguments to the localized alert message
	 * @return this
	 */
	public PayloadBuilder localizedArguments(final Collection<String> arguments) {
		customAlert.put("loc-args", arguments);
		return this;
	}

	/**
	 * Sets the arguments for the alert message localizable message.
	 *
	 * The iPhone doesn't localize the arguments.
	 *
	 * @param arguments
	 *            the arguments to the localized alert message
	 * @return this
	 */
	public PayloadBuilder localizedArguments(final String... arguments) {
		return localizedArguments(Arrays.asList(arguments));
	}

	/**
	 * Sets the launch image file for the push notification
	 *
	 * @param launchImage
	 *            the filename of the image file in the application bundle.
	 * @return this
	 */
	public PayloadBuilder launchImage(final String launchImage) {
		customAlert.put("launch-image", launchImage);
		return this;
	}

	/**
	 * Sets any application-specific custom fields. The values are presented to
	 * the application and the iPhone doesn't display them automatically.
	 *
	 * This can be used to pass specific values (urls, ids, etc) to the
	 * application in addition to the notification message itself.
	 *
	 * @param key
	 *            the custom field name
	 * @param value
	 *            the custom field value
	 * @return this
	 */
	public PayloadBuilder customField(final String key, final Object value) {
		root.put(key, value);
		return this;
	}

	public PayloadBuilder mdm(final String s) {
		return customField("mdm", s);
	}

	/**
	 * Set any application-specific custom fields. These values are presented to
	 * the application and the iPhone doesn't display them automatically.
	 *
	 * This method *adds* the custom fields in the map to the payload, and
	 * subsequent calls add but doesn't reset the custom fields.
	 *
	 * @param values
	 *            the custom map
	 * @return this
	 */
	public PayloadBuilder customFields(
			final Map<String, ? extends Object> values) {
		root.putAll(values);
		return this;
	}

	/**
	 * Returns the length of payload bytes once marshaled to bytes
	 *
	 * @return the length of the payload
	 */
	public int length() {
		return copy().buildBytes().length;
	}

	/**
	 * Returns true if the payload built so far is larger than the size
	 * permitted by Apple (which is 256 bytes).
	 *
	 * @return true if the result payload is too long
	 */
	public boolean isTooLong() {
		return length() > Utilities.MAX_PAYLOAD_LENGTH;
	}

	/**
	 * Shrinks the alert message body so that the resulting payload message fits
	 * within the passed expected payload length.
	 *
	 * This method performs best-effort approach, and its behavior is
	 * unspecified when handling alerts where the payload without body is
	 * already longer than the permitted size, or if the break occurs within
	 * word.
	 *
	 * @param payloadLength
	 *            the expected max size of the payload
	 * @return this
	 */
	public PayloadBuilder resizeAlertBody(final int payloadLength) {
		return resizeAlertBody(payloadLength, "");
	}

	/**
	 * Shrinks the alert message body so that the resulting payload message fits
	 * within the passed expected payload length.
	 *
	 * This method performs best-effort approach, and its behavior is
	 * unspecified when handling alerts where the payload without body is
	 * already longer than the permitted size, or if the break occurs within
	 * word.
	 *
	 * @param payloadLength
	 *            the expected max size of the payload
	 * @param postfix
	 *            for the truncated body, e.g. "..."
	 * @return this
	 */
	public PayloadBuilder resizeAlertBody(final int payloadLength,
			final String postfix) {
		int currLength = length();
		if (currLength <= payloadLength) {
			return this;
		}

		// now we are sure that truncation is required
		String body = (String) customAlert.get("body");

		final int acceptableSize = Utilities.toUTF8Bytes(body).length
				- (currLength - payloadLength + Utilities.toUTF8Bytes(postfix).length);
		body = Utilities.truncateWhenUTF8(body, acceptableSize) + postfix;

		// set it back
		customAlert.put("body", body);

		// calculate the length again
		currLength = length();

		if (currLength > payloadLength) {
			// string is still too long, just remove the body as the body is
			// anyway not the cause OR the postfix might be too long
			customAlert.remove("body");
		}

		return this;
	}

	/**
	 * Shrinks the alert message body so that the resulting payload message fits
	 * within require Apple specification (256 bytes).
	 *
	 * This method performs best-effort approach, and its behavior is
	 * unspecified when handling alerts where the payload without body is
	 * already longer than the permitted size, or if the break occurs within
	 * word.
	 *
	 * @return this
	 */
	public PayloadBuilder shrinkBody() {
		return shrinkBody("");
	}

	/**
	 * Shrinks the alert message body so that the resulting payload message fits
	 * within require Apple specification (256 bytes).
	 *
	 * This method performs best-effort approach, and its behavior is
	 * unspecified when handling alerts where the payload without body is
	 * already longer than the permitted size, or if the break occurs within
	 * word.
	 *
	 * @param postfix
	 *            for the truncated body, e.g. "..."
	 *
	 * @return this
	 */
	public PayloadBuilder shrinkBody(final String postfix) {
		return resizeAlertBody(Utilities.MAX_PAYLOAD_LENGTH, postfix);
	}

	/**
	 * Returns the JSON String representation of the payload according to Apple
	 * APNS specification
	 *
	 * @return the String representation as expected by Apple
	 */
	public String build() {
		if (!root.containsKey("mdm")) {
			insertCustomAlert();
			root.put("aps", aps);
		}
		try {
			return mapper.writeValueAsString(root);
		} catch (final Exception e) {
			throw new RuntimeException(e);
		}
	}

	private void insertCustomAlert() {
		switch (customAlert.size()) {
		case 0:
			aps.remove("alert");
			break;
		case 1:
			if (customAlert.containsKey("body") && !useBody) {
				aps.put("alert", customAlert.get("body"));
				break;
			}
			// else follow through
			//$FALL-THROUGH$
		default:
			aps.put("alert", customAlert);

		}
	}

	/**
	 * Returns the bytes representation of the payload according to Apple APNS
	 * specification
	 *
	 * @return the bytes as expected by Apple
	 */
	public byte[] buildBytes() {
		return Utilities.toUTF8Bytes(build());
	}

	@Override
	public String toString() {
		return build();
	}

	private PayloadBuilder(final Map<String, Object> root,
			final Map<String, Object> aps,
			final Map<String, Object> customAlert, boolean useBody) {
		this.root = new HashMap<String, Object>(root);
		this.aps = new HashMap<String, Object>(aps);
		this.customAlert = new HashMap<String, Object>(customAlert);
		this.useBody = useBody;
	}

	/**
	 * Returns a copy of this builder
	 *
	 * @return a copy of this builder
	 */
	public PayloadBuilder copy() {
		return new PayloadBuilder(root, aps, customAlert, useBody);
	}

	/**
	 * @return a new instance of Payload Builder
	 */
	public static PayloadBuilder newPayload() {
		return new PayloadBuilder();
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.thgrayfiles</groupId>
    <artifactId>javadoc-bootstrap</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>compile-javadoc</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>javadoc</goal>
                                </goals>
                                <phase>compile</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


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

public class NetworkManager : MonoBehaviour {

	private string gameName = "";
	private int playerNum = 0;
	private int playerCount = 1;

	public GameObject playerPrefab;
	public GameObject ghostPrefab;

	[RPC] void SpawnPlayer(int num)
	{
		playerNum = num;
		BoardLocation pos = new BoardLocation( new IntVector2(0,0), new IntVector2( 0, 0 ) );
		int x = 1;
		int y = 1;
		switch (num)
		{
			case 0: x = 1; y = 1; break;
			case 1: x = 17; y = 1; break;
			case 2: x = 1; y = 8; break;
			case 3: x = 17; y = 8; break;
		}

		pos = new BoardLocation( new IntVector2( x, y ), pos.offset );

		PacmanData player = (PacmanData)((GameObject) Network.Instantiate(playerPrefab, new Vector3(0,0,0), Quaternion.identity, 0)).GetComponent<PacmanData>();

		PacmanData animate = player.GetComponent<PacmanData>();
		animate.Data.maxSpeed = 8;
		animate.Data.boardLocation = pos;

		animate.setPlayerNum(playerNum);

		SpawnGhost();
	}

	void OnMasterServerEvent(MasterServerEvent msEvent)
	{
		if (msEvent == MasterServerEvent.HostListReceived)
		{
			//hostList = MasterServer.PollHostList();
		}
	}

	void OnPlayerConnected(NetworkPlayer player) {
		networkView.RPC("SpawnPlayer", player, playerCount);
		playerCount++;
	}

	void OnConnectedToServer()
	{
		Debug.Log("Server Joined");
	}

	void OnPlayerDisconnected(NetworkPlayer player)
	{
		Network.RemoveRPCs(player);
		Network.DestroyPlayerObjects(player);
	}

	private void SpawnGhost()
	{
		GhostMover ghost = ((GameObject)Network.Instantiate(ghostPrefab, new Vector3(0,0,0), Quaternion.identity, 0)).GetComponent<GhostMover>();
		ghost.setGhostNumber( 0 );

		GhostMover animate = ghost.GetComponent<GhostMover>();
		animate.Data.maxSpeed = 4;

	}

	// Use this for initialization
	void Start () {
		Network.InitializeServer(4, 25000, !Network.HavePublicAddress());

		SpawnPlayer(0);
		SpawnGhost();
	}

	// Update is called once per frame
	void Update () {

	}
}


text:
package main

import (
	"crypto/tls"
	"crypto/x509"
	"errors"
	"fmt"
	"io/ioutil"
	"log"
	"net"
	"net/http"
	"time"

	"github.com/ghodss/yaml"
	"github.com/spf13/cobra"
	"golang.org/x/net/context"
	"google.golang.org/grpc"
	"google.golang.org/grpc/credentials"

	"github.com/coreos/dex/api"
	"github.com/coreos/dex/server"
	"github.com/coreos/dex/storage"
)

func commandServe() *cobra.Command {
	return &cobra.Command{
		Use:     "serve [ config file ]",
		Short:   "Connect to the storage and begin serving requests.",
		Long:    ``,
		Example: "dex serve config.yaml",
		RunE:    serve,
	}
}

func serve(cmd *cobra.Command, args []string) error {
	switch len(args) {
	default:
		return errors.New("surplus arguments")
	case 0:
		// TODO(ericchiang): Consider having a default config file location.
		return errors.New("no config file specified")
	case 1:
	}

	configFile := args[0]
	configData, err := ioutil.ReadFile(configFile)
	if err != nil {
		return fmt.Errorf("read config file %s: %v", configFile, err)
	}

	var c Config
	if err := yaml.Unmarshal(configData, &c); err != nil {
		return fmt.Errorf("parse config file %s: %v", configFile, err)
	}

	// Fast checks. Perform these first for a more responsive CLI.
	checks := []struct {
		bad    bool
		errMsg string
	}{
		{c.Issuer == "", "no issuer specified in config file"},
		{len(c.Connectors) == 0 && !c.EnablePasswordDB, "no connectors supplied in config file"},
		{!c.EnablePasswordDB && len(c.StaticPasswords) != 0, "cannot specify static passwords without enabling password db"},
		{c.Storage.Config == nil, "no storage suppied in config file"},
		{c.Web.HTTP == "" && c.Web.HTTPS == "", "must supply a HTTP/HTTPS  address to listen on"},
		{c.Web.HTTPS != "" && c.Web.TLSCert == "", "no cert specified for HTTPS"},
		{c.Web.HTTPS != "" && c.Web.TLSKey == "", "no private key specified for HTTPS"},
		{c.GRPC.TLSCert != "" && c.GRPC.Addr == "", "no address specified for gRPC"},
		{c.GRPC.TLSKey != "" && c.GRPC.Addr == "", "no address specified for gRPC"},
		{(c.GRPC.TLSCert == "") != (c.GRPC.TLSKey == ""), "must specific both a gRPC TLS cert and key"},
		{c.GRPC.TLSCert == "" && c.GRPC.TLSClientCA != "", "cannot specify gRPC TLS client CA without a gRPC TLS cert"},
	}

	for _, check := range checks {
		if check.bad {
			return errors.New(check.errMsg)
		}
	}

	var grpcOptions []grpc.ServerOption
	if c.GRPC.TLSCert != "" {
		if c.GRPC.TLSClientCA != "" {
			// Parse certificates from certificate file and key file for server.
			cert, err := tls.LoadX509KeyPair(c.GRPC.TLSCert, c.GRPC.TLSKey)
			if err != nil {
				return fmt.Errorf("parsing certificate file: %v", err)
			}

			// Parse certificates from client CA file to a new CertPool.
			cPool := x509.NewCertPool()
			clientCert, err := ioutil.ReadFile(c.GRPC.TLSClientCA)
			if err != nil {
				return fmt.Errorf("reading from client CA file: %v", err)
			}
			if cPool.AppendCertsFromPEM(clientCert) != true {
				return errors.New("failed to parse client CA")
			}

			tlsConfig := tls.Config{
				Certificates: []tls.Certificate{cert},
				ClientAuth:   tls.RequireAndVerifyClientCert,
				ClientCAs:    cPool,
			}
			grpcOptions = append(grpcOptions, grpc.Creds(credentials.NewTLS(&tlsConfig)))
		} else {
			opt, err := credentials.NewServerTLSFromFile(c.GRPC.TLSCert, c.GRPC.TLSKey)
			if err != nil {
				return fmt.Errorf("load grpc certs: %v", err)
			}
			grpcOptions = append(grpcOptions, grpc.Creds(opt))
		}
	}

	connectors := make([]server.Connector, len(c.Connectors))
	for i, conn := range c.Connectors {
		if conn.ID == "" {
			return fmt.Errorf("no ID field for connector %d", i)
		}
		if conn.Config == nil {
			return fmt.Errorf("no config field for connector %q", conn.ID)
		}
		c, err := conn.Config.Open()
		if err != nil {
			return fmt.Errorf("open %s: %v", conn.ID, err)
		}
		connectors[i] = server.Connector{
			ID:          conn.ID,
			DisplayName: conn.Name,
			Connector:   c,
		}
	}

	s, err := c.Storage.Config.Open()
	if err != nil {
		return fmt.Errorf("initializing storage: %v", err)
	}
	if len(c.StaticClients) > 0 {
		s = storage.WithStaticClients(s, c.StaticClients)
	}
	if len(c.StaticPasswords) > 0 {
		passwords := make([]storage.Password, len(c.StaticPasswords))
		for i, p := range c.StaticPasswords {
			passwords[i] = storage.Password(p)
		}
		s = storage.WithStaticPasswords(s, passwords)
	}

	serverConfig := server.Config{
		SupportedResponseTypes: c.OAuth2.ResponseTypes,
		SkipApprovalScreen:     c.OAuth2.SkipApprovalScreen,
		Issuer:                 c.Issuer,
		Connectors:             connectors,
		Storage:                s,
		TemplateConfig:         c.Templates,
		EnablePasswordDB:       c.EnablePasswordDB,
	}
	if c.Expiry.SigningKeys != "" {
		signingKeys, err := time.ParseDuration(c.Expiry.SigningKeys)
		if err != nil {
			return fmt.Errorf("parsing signingKeys expiry: %v", err)
		}
		serverConfig.RotateKeysAfter = signingKeys
	}
	if c.Expiry.IDTokens != "" {
		idTokens, err := time.ParseDuration(c.Expiry.IDTokens)
		if err != nil {
			return fmt.Errorf("parsing idTokens expiry: %v", err)
		}
		serverConfig.IDTokensValidFor = idTokens
	}

	serv, err := server.NewServer(context.Background(), serverConfig)
	if err != nil {
		return fmt.Errorf("initializing server: %v", err)
	}
	errc := make(chan error, 3)
	if c.Web.HTTP != "" {
		log.Printf("listening (http) on %s", c.Web.HTTP)
		go func() {
			errc <- http.ListenAndServe(c.Web.HTTP, serv)
		}()
	}
	if c.Web.HTTPS != "" {
		log.Printf("listening (https) on %s", c.Web.HTTPS)
		go func() {
			errc <- http.ListenAndServeTLS(c.Web.HTTPS, c.Web.TLSCert, c.Web.TLSKey, serv)
		}()
	}
	if c.GRPC.Addr != "" {
		log.Printf("listening (grpc) on %s", c.GRPC.Addr)
		go func() {
			errc <- func() error {
				list, err := net.Listen("tcp", c.GRPC.Addr)
				if err != nil {
					return fmt.Errorf("listen grpc: %v", err)
				}
				s := grpc.NewServer(grpcOptions...)
				api.RegisterDexServer(s, server.NewAPI(serverConfig.Storage))
				return s.Serve(list)
			}()
		}()
	}

	return <-errc
}


text:
<?php

namespace Google\AdsApi\AdManager\v202211;

/**
 * This file was generated from WSDL. DO NOT EDIT.
 */
class runReportJobResponse
{

    /**
     * @var \Google\AdsApi\AdManager\v202211\ReportJob $rval
     */
    protected $rval = null;

    /**
     * @param \Google\AdsApi\AdManager\v202211\ReportJob $rval
     */
    public function __construct($rval = null)
    {
      $this->rval = $rval;
    }

    /**
     * @return \Google\AdsApi\AdManager\v202211\ReportJob
     */
    public function getRval()
    {
      return $this->rval;
    }

    /**
     * @param \Google\AdsApi\AdManager\v202211\ReportJob $rval
     * @return \Google\AdsApi\AdManager\v202211\runReportJobResponse
     */
    public function setRval($rval)
    {
      $this->rval = $rval;
      return $this;
    }

}


text:
<!DOCTYPE html>

    <title>TronDelegate Protocol Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">

          TRON 5.4.1 Docs

         (91% documented)

        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>

            View on GitHub

            Install in Dash

      TRON Reference

      TronDelegate Protocol Reference

            Classes

                APIError

                APIRequest

                APIStub

                BaseRequest

                CodableParser

                CodableSerializer

                DownloadAPIRequest

                NetworkLoggerPlugin

                TRON

                URLBuilder

                – Behavior

                UploadAPIRequest

            Enumerations

                DownloadRequestType

                UploadRequestType

            Extensions

                DataRequest

                DownloadRequest

            Protocols

                DownloadErrorSerializable

                ErrorSerializable

                Plugin

                RequestCancellable

                TronDelegate

            Structures

                DownloadError

                FileURLPassthroughResponseSerializer

                – MissingURLError

                TRONDataResponseSerializer

                TRONDownloadResponseSerializer

TronDelegate

public protocol TronDelegate : AnyObject

Protocol used to allow APIRequest to communicate with TRON instance.

                    session

Alamofire.Session used to send requests

Declaration

Swift

var session: Alamofire.Session { get }

                    plugins

Global array of plugins on TRON instance

Declaration

Swift

var plugins: [Plugin] { get }

© 2021 Denys Telezhkin. All rights reserved. (Last updated: 2021-08-24)

Generated by jazzy ♪♫ v0.14.0, a Realm project.


text:
package com.shansown.androidarchitecture.di.annotation;

import java.lang.annotation.Retention;
import javax.inject.Scope;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * A scoping annotation to permit objects whose lifetime should
 * conform to signed/unsigned user to be memorized in the
 * correct component.
 */
@Scope
@Retention(RUNTIME)
public @interface PerUser {}


text:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package br.hugo.sistema.dao;

import br.hugo.sistema.model.Setores;
import java.util.List;

/**
 *
 * @author 1553910
 */
public interface SetoresDao {

    public void save(Setores setores);

    public Setores getSetores(int id);

    public List<Setores> listarSetores();

    public void remove(int id);

    public void update(Setores setores);
}


text:
package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.CosmosDbSettings;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class CosmosDbSettingsTests {
    @Test
    public void testDeserialize() {
        CosmosDbSettings model =
            BinaryData.fromString("{\"collectionsThroughput\":1098993569}").toObject(CosmosDbSettings.class);
        Assertions.assertEquals(1098993569, model.collectionsThroughput());
    }

    @Test
    public void testSerialize() {
        CosmosDbSettings model = new CosmosDbSettings().withCollectionsThroughput(1098993569);
        model = BinaryData.fromObject(model).toObject(CosmosDbSettings.class);
        Assertions.assertEquals(1098993569, model.collectionsThroughput());
    }
}


text:
layout: page
title: Ready Electronics Trade Fair
date: 2016-05-24
author: Jennifer Chang
tags: weekly links, java
status: published
summary: Aliquam et condimentum ipsum. Interdum et malesuada fames ac ante.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 09/13/2016
  endDate: 09/18/2016
  ctyhocn: WASWBHX
  groupCode: RETF
published: true
---
Cras ut dapibus lectus, gravida molestie purus. Quisque at ullamcorper ante, fermentum pharetra ante. Fusce id sapien sapien. Duis laoreet diam efficitur quam porta, eget imperdiet felis congue. Cras accumsan mattis arcu, vitae varius purus facilisis eget. Nunc efficitur arcu nec orci lacinia, nec finibus metus cursus. Aliquam ante tellus, vehicula nec pretium et, condimentum eu urna. Curabitur sodales, quam et tempus sagittis, leo neque mollis magna, lobortis luctus nunc leo quis lectus. Donec vulputate mi sed urna sagittis, at fermentum leo ullamcorper. Quisque at condimentum nunc, vitae eleifend sem. Nunc eget augue id turpis pulvinar dapibus.

* Vivamus luctus metus non neque scelerisque convallis
* Quisque non risus consequat, interdum erat sed, pretium tortor
* Quisque sed eros sit amet quam sodales suscipit vitae ac nunc.

Integer libero odio, consequat ut hendrerit id, posuere quis tortor. Phasellus gravida varius quam, eu posuere nisi placerat et. Nam molestie urna nibh, sit amet placerat augue euismod ut. Phasellus tristique in massa sit amet aliquam. Maecenas ligula risus, mollis ac pulvinar eu, pretium in lorem. Integer eu vehicula lacus, quis sollicitudin tellus. Donec eu erat at odio convallis volutpat. Etiam aliquet velit lacus, non rhoncus lorem imperdiet et. Vestibulum consectetur nulla vitae dolor dapibus pulvinar. Nam eget eleifend arcu.