text:
package com.github.zhongl.housemd.command

import org.scalatest.FunSpec
import org.scalatest.matchers.ShouldMatchers
import org.mockito.Mockito._
import instrument.Instrumentation

/**
 * @author zhongl
 */

class MethodFilterCompleterSpec extends FunSpec with ShouldMatchers {
  val c = new MethodFilterCompleter {
    lazy val inst = {
      val m = mock(classOf[Instrumentation])
      doReturn(Array(classOf[CCC], classOf[Runnable])).when(m).getAllLoadedClasses
      m
    }
  }

  describe("MethodFilterCompleter") {
    it("should complete CCC") {
      val candidates = new java.util.ArrayList[CharSequence]()
      c.complete("C", 1, candidates) should be(0)
      candidates should contain("CCC".asInstanceOf[CharSequence])
    }

    it("should complete CCC.m*") {
      val candidates = new java.util.ArrayList[CharSequence]()
      c.complete("CCC.m", 5, candidates) should be(4)
      candidates should {
        contain("<init>".asInstanceOf[CharSequence])
        contain("m1".asInstanceOf[CharSequence])
        contain("m22".asInstanceOf[CharSequence])
      }
    }

    it("should complete Runnable with +") {
      val candidates = new java.util.ArrayList[CharSequence]()
      c.complete("R", 1, candidates) should be(0)
      candidates should contain("Runnable+".asInstanceOf[CharSequence])
    }

    it("should complete Runnable+. ") {
      val candidates = new java.util.ArrayList[CharSequence]()
      c.complete("Runnable+.", 10, candidates) should be(10)
      candidates should contain("run".asInstanceOf[CharSequence])
    }

    it("should complete Runnable+.r ") {
      val candidates = new java.util.ArrayList[CharSequence]()
      c.complete("Runnable+.r", 11, candidates) should be(10)
      candidates should contain("run".asInstanceOf[CharSequence])
    }
  }

}

class CCC {
  def m1() {}

  def m22() {}
}


text:
<!DOCTYPE HTML>

		<meta http-equiv="Content-Type"
			content="text/html;charset=utf-8">
		<meta name="viewport"
			content="initial-scale=1.0">
		<meta name="Author"
			content="Matt McDonald">
		<title>Matt's DOM Utils (Utils): Download</title>
		<link href="../Assets/CSS/style-main.css"
			media="all" rel="stylesheet"
			type="text/css">
		<link href="../favicon.ico"
			media="all" rel="icon prefetch">

				Matt's DOM Utils (Utils)

				Home

				Demos

				Download

				Documentation

				Tests

				GitHub

				About

Download

		<form action="build.php" class="primary_row row" method="get">
			<fieldset class="build_set cell primary_cell">
				<legend>Optional Modules</legend>

					<input id="raise_file" name="raise_file"
						type="checkbox" value="raise">

						Utils.raise

					<input id="types_file" name="types_file"
						type="checkbox" value="types">

						Utils.types

					<input id="is_file" name="is_file"
						type="checkbox" value="is">

						Utils.is

					<input id="node_file" name="node_file"
						type="checkbox" value="node">

						Utils.node

					<input id="create_file" name="create_file"
						type="checkbox" value="create">

						Utils.create

					<input id="classes_file" name="classes_file"
						type="checkbox" value="classes">

						Utils.classes

					<input id="traverse_file" name="traverse_file"
						type="checkbox" value="traverse">

						Utils.traverse

					<input id="text_file" name="text_file"
						type="checkbox" value="text">

						Utils.text

					<input id="ancestors_file" name="ancestors_file"
						type="checkbox" value="ancestors">

						Utils.ancestors

					<input id="select_file" name="select_file"
						type="checkbox" value="select">

						Utils.select

					<input id="event_file" name="event_file"
						type="checkbox" value="event">

						Utils.event

			</fieldset>
			<fieldset class="cell build_set primary_cell">
				<legend>Checkout</legend>

					<input id="minify_build" name="minify_build"
						type="checkbox" value="minify">

						Minify build0

					<input type="submit"
						value="Submit Build">

			</fieldset>
		</form>

					Stipulations

						0

						Due to the heavy amount of inline documentation in
						Utils, minification is recommended for
						“production” usage.

			<address class="cell footer_cell">
				Developed by Matt McDonald;
			</address>
			<address class="cell footer_cell">
				Logo designed by Nathan Malone;
			</address>

				Viewable with any browser

redpajama_set_name: RedPajamaGithub


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
  <title>web-socket demo page</title>

Echo socket

    <arc-demo-helper>
      <template>
        <web-socket auto id="socket" url="wss://echo.websocket.org"></web-socket>

          <anypoint-input id="msg" label="message"></anypoint-input>
          <anypoint-button id="send">send</anypoint-button>

        Received messages

      </template>
    </arc-demo-helper>


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

using wojilu.Web.Mvc;
using wojilu.Apps.Photo.Domain;
using wojilu.Apps.Photo.Service;
using wojilu.Web.Context;
using wojilu.Apps.Photo.Interface;

namespace wojilu.Web.Controller.Photo.Vo {

    public class Post {

        public String Title { get; set; }
        public String Description { get; set; }
        public String ImgUrl { get; set; }
        public String ImgMediumUrl { get; set; }
        public String ImgThumbUrl { get; set; }

        public String Creator { get; set; }
        public String Created { get; set; }
        public int Hits { get; set; }

        public String Album { get; set; }
        public String AlbumLink { get; set; }
        public String AlbumAndLink { get; set; }

        public String Tags { get; set; }
        public String PrevNext { get; set; }
        public String NextLink { get; set; }

        public static Post Fill( PhotoPost post, MvcContext ctx, IPhotoPostService postService ) {

            Post p = new Post();

            p.Title = post.Title;
            p.Description = post.Description;
            p.ImgUrl = post.ImgUrl;
            p.ImgMediumUrl = post.ImgMediumUrl;
            p.ImgThumbUrl = post.ImgThumbUrl;

            p.Creator = post.Creator.Name;
            p.Created = post.Created.ToShortDateString();
            p.Hits = post.Hits;

            if (post.PhotoAlbum == null || post.PhotoAlbum.Id == 0)
                p.Album = alang( ctx, "defaultAlbum" );
            else
                p.Album = post.PhotoAlbum.Name;

            p.AlbumLink = ctx.GetLink().To( new PhotoController().Album, post.PhotoAlbum.Id );

            String lnk = string.Format( " | {1}《{2}》 ", p.AlbumLink, alang( ctx, "returnAlbum" ), p.Album );

            p.AlbumAndLink = lnk;// strUtil.HasText( p.Album ) ? lnk : "";

            p.Tags = post.Tag.List.Count > 0 ? "tag:" + post.Tag.HtmlString : "";
            String prevnext = getPreNextHtml( ctx, post, postService );
            String nextLink = getNextLink( ctx, post, postService );

            p.PrevNext = prevnext;
            p.NextLink = nextLink;

            return p;
        }

        private static String alang( MvcContext ctx, String key ) {
            return ctx.controller.alang( key );
        }

        private static String getPreNextHtml( MvcContext ctx, PhotoPost post, IPhotoPostService postService ) {

            PhotoPost prev = postService.GetPre( post );
            PhotoPost next = postService.GetNext( post );

            String prenext;
            if (prev == null && next == null)
                prenext = "";
            else if (prev == null)
                prenext = "" + alang( ctx, "nextPhoto" ) + " ";
            else if (next == null)
                prenext = "" + alang( ctx, "prevPhoto" ) + " ";
            else
                prenext = "" + alang( ctx, "prevPhoto" ) + " | " + alang( ctx, "nextPhoto" ) + "";
            return prenext;
        }

        private static String getNextLink( MvcContext ctx, PhotoPost post, IPhotoPostService postService ) {
            PhotoPost next = postService.GetNext( post );
            if (next == null) {
                PhotoPost first = postService.GetFirst( post );
                return alink.ToAppData( first );
            }
            return alink.ToAppData( next );
        }

    }

}


text:
using System.IO;

namespace TeknikProgramlama.Tools.Stream {
    public static class Utils {
        /// <summary>
        /// Stolen From http://stackoverflow.com/a/8613300/1766716
        /// </summary>
        /// <param name="reader"></param>
        /// <returns></returns>
        public static byte[] Read(this BinaryReader reader, int bufferSize = 4096)
        {
            using (var ms = new MemoryStream())
            {
                var buffer = new byte[bufferSize];
                int count;
                while ((count = reader.Read(buffer, 0, buffer.Length)) != 0)
                    ms.Write(buffer, 0, count);
                return ms.ToArray();
            }
        }
    }
}


text:
<?php

namespace League\CommonMark\Inline\Parser;

use League\CommonMark\Delimiter\Delimiter;
use League\CommonMark\Inline\Element\Text;
use League\CommonMark\InlineParserContext;
use League\CommonMark\Util\RegexHelper;

class EmphasisParser extends AbstractInlineParser
{
    /**
     * @return string[]
     */
    public function getCharacters()
    {
        return ['*', '_'];
    }

    /**
     * @param InlineParserContext $inlineContext
     *
     * @return bool
     */
    public function parse(InlineParserContext $inlineContext)
    {
        $character = $inlineContext->getCursor()->getCharacter();
        if (!in_array($character, $this->getCharacters())) {
            return false;
        }

        $numDelims = 0;

        $cursor = $inlineContext->getCursor();
        $charBefore = $cursor->peek(-1);
        if ($charBefore === null) {
            $charBefore = "\n";
        }

        while ($cursor->peek($numDelims) === $character) {
            ++$numDelims;
        }

        $cursor->advanceBy($numDelims);

        $charAfter = $cursor->getCharacter();
        if ($charAfter === null) {
            $charAfter = "\n";
        }

        $afterIsWhitespace = preg_match('/\pZ|\s/u', $charAfter);
        $afterIsPunctuation = preg_match(RegexHelper::REGEX_PUNCTUATION, $charAfter);
        $beforeIsWhitespace = preg_match('/\pZ|\s/u', $charBefore);
        $beforeIsPunctuation = preg_match(RegexHelper::REGEX_PUNCTUATION, $charBefore);

        $leftFlanking = $numDelims > 0 && !$afterIsWhitespace &&
            !($afterIsPunctuation &&
            !$beforeIsWhitespace &&
            !$beforeIsPunctuation);

        $rightFlanking = $numDelims > 0 && !$beforeIsWhitespace &&
            !($beforeIsPunctuation &&
            !$afterIsWhitespace &&
            !$afterIsPunctuation);

        if ($character === '_') {
            $canOpen = $leftFlanking && (!$rightFlanking || $beforeIsPunctuation);
            $canClose = $rightFlanking && (!$leftFlanking || $afterIsPunctuation);
        } else {
            $canOpen = $leftFlanking;
            $canClose = $rightFlanking;
        }

        $node = new Text($cursor->getPreviousText(), ['delim' => true]);
        $inlineContext->getContainer()->appendChild($node);

        // Add entry to stack to this opener
        $delimiter = new Delimiter($character, $numDelims, $node, $canOpen, $canClose);
        $inlineContext->getDelimiterStack()->push($delimiter);

        return true;
    }
}


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycopath. Mycol. appl. 36: 5 (1968)

#### Original name
Penicillium senticosum D.B. Scott, 1968

### Remarks
null


text:
package org.dswarm.persistence.service.schema;

import javax.persistence.EntityManager;

import com.google.inject.Inject;
import com.google.inject.Provider;

import org.dswarm.persistence.DMPPersistenceException;
import org.dswarm.persistence.model.schema.Attribute;
import org.dswarm.persistence.model.schema.proxy.ProxyAttribute;
import org.dswarm.persistence.service.AdvancedDMPJPAService;

/**
 * A persistence service for {@link Attribute}s.
 *
 * @author tgaengler
 */
public class AttributeService extends AdvancedDMPJPAService<ProxyAttribute, Attribute> {

	/**
	 * Creates a new attribute persistence service with the given entity manager provider.
	 *
	 * @param entityManagerProvider an entity manager provider
	 */
	@Inject
	public AttributeService(final Provider<EntityManager> entityManagerProvider) {

		super(Attribute.class, ProxyAttribute.class, entityManagerProvider);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	protected void prepareObjectForRemoval(final Attribute object) {

		// should clear the relationship to the attribute paths
		// object.setAttributePaths(null);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public void updateObjectInternal(final Attribute object, final Attribute updateObject)
			throws DMPPersistenceException {

		final String name = object.getName();
		// final Set<AttributePath> attributePaths = object.getUniqueAttributePaths();

		updateObject.setName(name);
		// updateObject.setAttributePaths(attributePaths);
	}

}


text:
using System;
using System.Runtime.Serialization;
using Newtonsoft.Json;

namespace OneDrive
{
    public class ODItem : ODDataModel
    {
        [JsonProperty("id", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string Id { get; set; }

        [JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string Name { get; set; }

        [JsonProperty("etag", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string ETag { get; set; }

        [JsonProperty("ctag", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string CTag { get; set; }

        [JsonProperty("createdBy", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ODIdentitySet CreatedBy { get; set; }

        [JsonProperty("createdDateTime", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public DateTimeOffset CreatedDateTime { get; set; }

        [JsonProperty("lastModifiedBy", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ODIdentitySet LastModifiedBy { get; set; }

        [JsonProperty("lastModifiedDateTime", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public DateTimeOffset LastModifiedDateTime { get; set; }

        [JsonProperty("size", DefaultValueHandling=DefaultValueHandling.Ignore)]
        public long Size { get; set; }

        [JsonProperty("webUrl", NullValueHandling = NullValueHandling.Ignore)]
        public string WebUrl { get; set; }

        [JsonProperty("parentReference", NullValueHandling = NullValueHandling.Ignore)]
        public ODItemReference ParentReference { get; set; }

        [JsonProperty("folder", NullValueHandling=NullValueHandling.Ignore)]
        public Facets.FolderFacet Folder { get; set; }

        [JsonProperty("file", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.FileFacet File { get; set; }

        [JsonProperty("image", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.ImageFacet Image { get; set; }

        [JsonProperty("photo", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.PhotoFacet Photo { get; set; }

        [JsonProperty("audio", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.AudioFacet Audio { get; set; }

        [JsonProperty("video", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.VideoFacet Video { get; set; }

        [JsonProperty("location", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.LocationFacet Location { get; set; }

        [JsonProperty("deleted", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.TombstoneFacet Deleted { get; set; }

        [JsonProperty("specialFolder", NullValueHandling = NullValueHandling.Ignore)]
        public Facets.SpecialFolderFacet SpecialFolder { get; set; }

        [JsonProperty(ApiConstants.NameConflictParameter, DefaultValueHandling = DefaultValueHandling.Ignore)]
        public NameConflictBehavior? NameConflictBehaiorAnnotation { get; set; }

        [JsonProperty("@content.downloadUrl", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string DownloadUrlAnnotation { get; set; }

        [JsonProperty("@content.sourceUrl", DefaultValueHandling = DefaultValueHandling.Ignore)]
        public string SourceUrlAnnotation { get; set; }

        [JsonProperty("children@odata.nextLink", DefaultValueHandling=DefaultValueHandling.Ignore)]
        public string ChildrenNextLinkAnnotation { get; set; }

        [JsonProperty(ApiConstants.ThumbnailsRelationshipName, DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ODThumbnailSet[] Thumbnails { get; set; }

        [JsonProperty(ApiConstants.ChildrenRelationshipName, DefaultValueHandling = DefaultValueHandling.Ignore)]
        public ODItem[] Children { get; set; }
    }

    public enum NameConflictBehavior
    {
        [EnumMember(Value = "fail")]
        Fail,

        [EnumMember(Value = "replace")]
        Replace,

        [EnumMember(Value = "rename")]
        Rename
    }
}


text:
This page was generated with Wiki Builder. Do not change the format!

## Info

## Schema
* **Schema Type:** Class
* **Type:** object

## Properties
Name | Type | Description
---- | ---- | -----------
member | [[GroupMember|GroupsV2-GroupMember]] |
group | [[GroupV2|GroupsV2-GroupV2]] |

## Example
```javascript
{
    // Type: [[GroupMember|GroupsV2-GroupMember]]
    "member": {
        // Type: [[RuntimeGroupMemberType|GroupsV2-RuntimeGroupMemberType]]:Enum
        "memberType": 0,
        // Type: boolean
        "isOnline": false,
        // Type: integer:int64
        "groupId": 0,
        // Type: [[UserInfoCard|User-UserInfoCard]]
        "destinyUserInfo": {
            // Type: string
            "supplementalDisplayName": "",
            // Type: string
            "iconPath": "",
            // Type: [[BungieMembershipType|BungieMembershipType]]:Enum
            "membershipType": {},
            // Type: integer:int64
            "membershipId": 0,
            // Type: string
            "displayName": ""
        },
        // Type: [[UserInfoCard|User-UserInfoCard]]
        "bungieNetUserInfo": {
            // Type: string
            "supplementalDisplayName": "",
            // Type: string
            "iconPath": "",
            // Type: [[BungieMembershipType|BungieMembershipType]]:Enum
            "membershipType": {},
            // Type: integer:int64
            "membershipId": 0,
            // Type: string
            "displayName": ""
        },
        // Type: string:date-time
        "joinDate": ""
    },
    // Type: [[GroupV2|GroupsV2-GroupV2]]
    "group": {
        // Type: integer:int64
        "groupId": 0,
        // Type: string
        "name": "",
        // Type: [[GroupType|GroupsV2-GroupType]]:Enum
        "groupType": 0,
        // Type: integer:int64
        "membershipIdCreated": 0,
        // Type: string:date-time
        "creationDate": "",
        // Type: string:date-time
        "modificationDate": "",
        // Type: string
        "about": "",
        // Type: string[]
        "tags": [
           // Type: string
            ""
        ],
        // Type: integer:int32
        "memberCount": 0,
        // Type: boolean
        "isPublic": false,
        // Type: boolean
        "isPublicTopicAdminOnly": false,
        // Type: integer:int64
        "primaryAlliedGroupId": 0,
        // Type: string
        "motto": "",
        // Type: boolean
        "allowChat": false,
        // Type: boolean
        "isDefaultPostPublic": false,
        // Type: [[ChatSecuritySetting|GroupsV2-ChatSecuritySetting]]:Enum
        "chatSecurity": 0,
        // Type: string
        "locale": "",
        // Type: integer:int32
        "avatarImageIndex": 0,
        // Type: [[GroupHomepage|GroupsV2-GroupHomepage]]:Enum
        "homepage": 0,
        // Type: [[MembershipOption|GroupsV2-MembershipOption]]:Enum
        "membershipOption": 0,
        // Type: [[GroupPostPublicity|GroupsV2-GroupPostPublicity]]:Enum
        "defaultPublicity": 0,
        // Type: string
        "theme": "",
        // Type: string
        "bannerPath": "",
        // Type: string
        "avatarPath": "",
        // Type: boolean
        "isAllianceOwner": false,
        // Type: integer:int64
        "conversationId": 0,
        // Type: boolean
        "enableInvitationMessagingForAdmins": false,
        // Type: string:date-time:nullable
        "banExpireDate": "",
        // Type: [[GroupFeatures|GroupsV2-GroupFeatures]]
        "features": {
            // Type: integer:int32
            "maximumMembers": 0,
            // Type: integer:int32
            "maximumMembershipsOfGroupType": 0,
            // Type: [[Capabilities|GroupsV2-Capabilities]]:Enum
            "capabilities": 0,
            // Type: [[BungieMembershipType|BungieMembershipType]]:Enum[]
            "membershipTypes": [
               // Type: [[BungieMembershipType|BungieMembershipType]]:Enum
                0
            ],
            // Type: boolean
            "invitePermissionOverride": false,
            // Type: boolean
            "updateCulturePermissionOverride": false,
            // Type: [[HostGuidedGamesPermissionLevel|GroupsV2-HostGuidedGamesPermissionLevel]]:Enum
            "hostGuidedGamePermissionOverride": {},
            // Type: boolean
            "updateBannerPermissionOverride": false,
            // Type: [[RuntimeGroupMemberType|GroupsV2-RuntimeGroupMemberType]]:Enum
            "joinLevel": {}
        },
        // Type: [[GroupV2ClanInfoAndInvestment|GroupsV2-GroupV2ClanInfoAndInvestment]]
        "clanInfo": {
            // Type: Dictionary<integer:uint32,[[DestinyProgression|Destiny-DestinyProgression]]>
            "d2ClanProgressions": {
                "0": {
                    // Type: [[Destiny.Definitions.DestinyProgressionDefinition|Destiny-Definitions-DestinyProgressionDefinition]]:integer:uint32
                    "progressionHash": 0,
                    // Type: integer:int32
                    "dailyProgress": 0,
                    // Type: integer:int32
                    "dailyLimit": 0,
                    // Type: integer:int32
                    "weeklyProgress": 0,
                    // Type: integer:int32
                    "weeklyLimit": 0,
                    // Type: integer:int32
                    "currentProgress": 0,
                    // Type: integer:int32
                    "level": 0,
                    // Type: integer:int32
                    "levelCap": 0,
                    // Type: integer:int32
                    "stepIndex": 0,
                    // Type: integer:int32
                    "progressToNextLevel": 0,
                    // Type: integer:int32
                    "nextLevelAt": 0
                }
            },
            // Type: string
            "clanCallsign": "",
            // Type: [[ClanBanner|GroupsV2-ClanBanner]]
            "clanBannerData": {
                // Type: integer:uint32
                "decalId": 0,
                // Type: integer:uint32
                "decalColorId": 0,
                // Type: integer:uint32
                "decalBackgroundColorId": 0,
                // Type: integer:uint32
                "gonfalonId": 0,
                // Type: integer:uint32
                "gonfalonColorId": 0,
                // Type: integer:uint32
                "gonfalonDetailId": 0,
                // Type: integer:uint32
                "gonfalonDetailColorId": 0,
                // Type: [[ClanBanner|GroupsV2-ClanBanner]]
            }
        }
    }
}

```

## References
1. https://bungie-net.github.io/multi/schema_GroupsV2-GroupMembership.html#schema_GroupsV2-GroupMembership


text:
package com.gk969.gallery.gallery3d.glrenderer;

// FadeOutTexture is a texture which begins with a given texture, then gradually animates
// into fading out totally.
public class FadeOutTexture extends FadeTexture {
    @SuppressWarnings("unused")
    private static final String TAG = "FadeOutTexture";

    private final BasicTexture mTexture;

    public FadeOutTexture(BasicTexture texture) {
        super(texture.getWidth(), texture.getHeight(), texture.isOpaque());
        mTexture = texture;
    }

    @Override
    public void draw(GLCanvas canvas, int x, int y, int w, int h) {
        if (isAnimating()) {
            canvas.save(GLCanvas.SAVE_FLAG_ALPHA);
            canvas.setAlpha(getRatio());
            mTexture.draw(canvas, x, y, w, h);
            canvas.restore();
        }
    }
}


text:
using System;

using NUnit.Framework;

using B2.Client.Apis.AuthorizeAccountV1;
using B2.Client.Rest;

namespace B2.Client.Test.Apis.ErrorResponse
{
    [TestFixture]
    public class TestErrorResponse
    {

        [Test]
        [Category(TestCategories.Integration)]
        public void TestErrorResponseFromApiCall()
        {
            var client = new UnauthenticatedB2Client(new Uri(TestEnvironment.B2ApiUrl));
            var req = new AuthorizeAccountV1Request("nonsense", "nonsense");

            var exception = Assert.ThrowsAsync<B2Exception>(
                async () => await client.PerformAuthenticationRequestAsync(new AuthorizeAccountV1Api(), req));

            var response = exception.ErrorResponse;

            Assert.That(response.StatusCode, Is.EqualTo(401U));
        }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        android:padding="16dp">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/detail_day_textview" />

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@+id/detail_date_textview"/>

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="horizontal"
            android:layout_marginTop="16dp">

                <LinearLayout
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:orientation="vertical">

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/detail_high_textview" />

                        <TextView
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:id="@+id/detail_low_textview" />
                </LinearLayout>

            <LinearLayout
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:orientation="vertical"
                android:gravity="center_horizontal">

                <ImageView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/detail_icon" />

                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:id="@+id/detail_forecast_textview"/>
            </LinearLayout>
        </LinearLayout>

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/detail_humidity_textview" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/detail_wind_textview" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:id="@+id/detail_pressure_textview" />

    </LinearLayout>

</ScrollView>


text:
(function (r) {
    "use strict";

    var modules = {
        helper: r('./../helpers'),
        data: r('./../data'),
        playerSetup: {
            player: r('./../PlayerSetup/player-manager')
        },
        commands: r('./../commands'),
        loadPlayerLocation: r('./../loadRoom'),
        world: {
            valston: r('../../World/valston/prison')
        },
    };

    var room = {
        playerLocation: function(location) {

           // console.log(location)
            var region = location.region;
            var area = location.area;
            var areaId = location.areaID;

            return modules['world'][region][area][areaId];

        }

    };
    exports.room = room;
})(require);


text:
# Apache RAT (Release Audit Tool) Gradle Plugin

[![CI](https://github.com/eskatos/creadur-rat-gradle/actions/workflows/gradle-build-pr.yml/badge.svg)](https://github.com/eskatos/creadur-rat-gradle/actions/workflows/gradle-build-pr.yml)
[![Apache License 2](http://img.shields.io/badge/license-ASF2-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.txt)

This plugin allows to run the [Apache RAT](https://creadur.apache.org/rat/) release audit tool, focused on licenses.

## Installation

In your `build.gradle(.kts)` file:

```kotlin
plugins {
    id("org.nosphere.apache.rat") version "0.8.0"
}
```

## Usage

The plugin registers a task named `rat` that you can configure in your `build.gradle(.kts)` file:

Kotlin DSL

```kotlin
tasks.rat {

    // Use the default RAT license header matchers, defaults to `true`
    addDefaultMatchers.set(false)

    // Add custom substring license header matchers
    substringMatcher("family", "category", "pattern-1", "pattern-2")

    // Declare approved license families, if used, any non-declared family won't be approved
    approvedLicense("MIT")

    // Input directory, defaults to '.'
    inputDir.set("some/path")

    // List of Gradle exclude directives, defaults to ['**/.gradle/**']
    excludes.add("**/build/**")

    // RatTask 0.5.0+ implements PatternFilterable
    exclude { it.file in configurations.someConf.files }

    // Rat excludes file, one directive per line
    excludeFile.set(layout.projectDirectory.file(".rat-excludes.txt"))

    // XML, TXT and HTML reports directory, defaults to 'build/reports/rat'
    reportDir.set(file("some/other/path"))

    // Custom XSL stylesheet for the HTML report
    stylesheet.set(file("custom/rat-html-stylesheet.xsl"))

    // Fail the build on rat errors, defaults to true
    failOnError.set(false)
}
```

Groovy DSL

```groovy
rat {

    // Input directory, defaults to '.'
    inputDir.set(file("some/path"))

    // List of Gradle exclude directives, defaults to ['**/.gradle/**']
    excludes.add("**/build/**")

    // Rat excludes file, one directive per line
    excludeFile.set(layout.projectDirectory.file(".rat-excludes.txt"))

    // XML, TXT and HTML reports directory, defaults to 'build/reports/rat'
    reportDir.set(file("some/other/path"))

    // Custom XSL stylesheet for the HTML report
    stylesheet.set(file("custom/rat-html-stylesheet.xsl"))

    // Fail the build on rat errors, defaults to true
    failOnError.set(false)

    // Prints the list of files with unapproved licences to the console, defaults to false
    verbose.set(true)
}
```

You can run the `rat` task by invoking Gradle:

```
gradle rat
```

If the project has a `check` task, then the `rat` task is automatically registered as dependent on the former.

When a Rat audit fails, a clickable URL of the HTML report will be printed out:

```
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':rat'.
> Apache Rat audit failure - 35 unapproved licenses
    See file:///path/to/build/reports/rat/index.html
```

![Apache Rat HTML Report](src/docs/resources/html_report_header.png "Apache Rat HTML Report")

## Compatibility matrix

| Plugin  | Min Java | Min Gradle | Max Gradle | [Configuration Cache](https://docs.gradle.org/current/userguide/configuration_cache.html) | [Build Cache](https://docs.gradle.org/current/userguide/build_cache.html)
|---------| -------- | ---------- | ---------- | --- | ---
| `0.8.0` | `1.8`    | `6.0`      | `8.x`      | 🟢  | 🟢
| `0.7.1` | `1.8`    | `6.0`      | `7.x`      | 🟢  | 🟢
| `0.7.0` | `1.8`    | `6.0`      | `7.x`      | 🟢  | 🟢
| `0.6.0` | `1.6`    | `4.7`      | `6.x`      | 🟢  | 🟢
| `0.5.3` | `1.6`    | `4.7`      | `6.x`      | 🔴  | 🟢
| `0.5.2` | `1.6`    | `4.7`      | `6.x`      | 🔴  | 🟢
| `0.5.1` | `1.6`    | `4.7`      | `5.x`      | 🔴  | 🟢
| `0.5.0` | `1.6`    | `4.7`      | `5.x`      | 🔴  | 🟢
| `0.4.0` | `1.6`    | `4.7`      | `5.x`      | 🔴  | 🟢
| `0.3.1` | `1.6`    | `2.14`     | `4.x`      | 🔴  | 🟢
| `0.3.0` | `1.6`    | `2.14`     | `4.x`      | 🔴  | 🟢
| `0.2.0` | `1.6`    | `2.14`     | `4.x`      | 🔴  | 🟢
| `0.1.0` | `1.6`    | `2.14`     | `4.x`      | 🔴  | 🟢


text:
"use strict";

var express = require('express');
var path = require('path');
var kiwi = require('kiwi');
var publicDir = path.join(__dirname, 'public');

var decks = [{id: 1, name: 'English', slug: 'english', user_id: 1, description: 'Basic english words', stats: {new: 20, review: 15, again: 3, total: 2600}}, {id: 1, name: 'Heisigs Remember the Kanji (RTK)', slug: 'rtk1', user_id: 1, description: 'Classic book for learning kanji', stats: {new: 2, review: 1, again: 0, total: 2520}}];

var app = express();

app.configure(function(){
	app.set('views', path.join(__dirname, 'view'));
	app.set('port', process.env.PORT || 8080);
	app.set('view engine', 'kiwi');
	this.engine('kiwi', function(filename, options, callback) {
		kiwi.__express(filename, options, function(err, rendered) {
			if(!process.env.production && err){
				console.error(err);
			}
			callback(err, rendered.toString());
		});
	});

	app.use(express.compress());
	app.use(require('less-middleware')({src: publicDir}));
	app.use(express.favicon());
	app.use(express.static(publicDir));
	app.use('/components', express.static(path.join(__dirname, 'components')));
});
app.configure('development', function(){
	app.use(express.logger());
});

app.get('/', function(req, res){
	res.render('index', {title: 'miwi'});
});

app.get('/decks', function(req, res){
	res.render('decks', {title: 'My decks', decks: decks});
});

app.get('/:deck', function(req, res){
	var deck = null;
	for(var i = 0; i < decks.length; i++) {
		if(decks[i].slug == req.params.deck) {
			deck = decks[i];
		}
	};
	if(deck) {
		res.render('card', {title: deck.name, deck: deck});
	} else {
		res.send(404);
	}
});

app.listen(app.get('port'), function() {
	console.log('Started app on port %d', app.get('port'));
});


text:
package io.airlift.drift.codec.internal.reflection;

import io.airlift.drift.annotations.ThriftField;
import io.airlift.drift.codec.ThriftCodec;
import io.airlift.drift.codec.ThriftCodecManager;
import io.airlift.drift.codec.internal.ProtocolReader;
import io.airlift.drift.codec.internal.ProtocolWriter;
import io.airlift.drift.codec.metadata.ThriftConstructorInjection;
import io.airlift.drift.codec.metadata.ThriftFieldInjection;
import io.airlift.drift.codec.metadata.ThriftFieldMetadata;
import io.airlift.drift.codec.metadata.ThriftInjection;
import io.airlift.drift.codec.metadata.ThriftMethodInjection;
import io.airlift.drift.codec.metadata.ThriftParameterInjection;
import io.airlift.drift.codec.metadata.ThriftStructMetadata;
import io.airlift.drift.protocol.TProtocolException;
import io.airlift.drift.protocol.TProtocolReader;
import io.airlift.drift.protocol.TProtocolWriter;

import javax.annotation.concurrent.Immutable;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

import static com.google.common.base.Throwables.throwIfInstanceOf;
import static com.google.common.base.Throwables.throwIfUnchecked;
import static com.google.common.base.Verify.verify;
import static io.airlift.drift.codec.metadata.FieldKind.THRIFT_FIELD;

@Immutable
public class ReflectionThriftStructCodec<T>
        extends AbstractReflectionThriftCodec<T>
{
    public ReflectionThriftStructCodec(ThriftCodecManager manager, ThriftStructMetadata metadata)
    {
        super(manager, metadata);
    }

    @Override
    public T read(TProtocolReader protocol)
            throws Exception
    {
        ProtocolReader reader = new ProtocolReader(protocol);
        reader.readStructBegin();

        Map<Short, Object> data = new HashMap<>(metadata.getFields().size());
        while (reader.nextField()) {
            short fieldId = reader.getFieldId();

            // do we have a codec for this field
            ThriftCodec<?> codec = fields.get(fieldId);
            if (codec == null) {
                reader.skipFieldData();
                continue;
            }

            // is this field readable
            ThriftFieldMetadata field = metadata.getField(fieldId);
            if (field.isReadOnly() || field.getType() != THRIFT_FIELD) {
                reader.skipFieldData();
                continue;
            }

            // read the value
            Object value = reader.readField(codec);
            if (value == null) {
                if (field.getRequiredness() == ThriftField.Requiredness.REQUIRED) {
                    throw new TProtocolException("required field was not set");
                }
                else {
                    continue;
                }
            }

            data.put(fieldId, value);
        }
        reader.readStructEnd();

        // build the struct
        return constructStruct(data);
    }

    @Override
    public void write(T instance, TProtocolWriter protocol)
            throws Exception
    {
        ProtocolWriter writer = new ProtocolWriter(protocol);
        writer.writeStructBegin(metadata.getStructName());

        for (ThriftFieldMetadata fieldMetadata : metadata.getFields(THRIFT_FIELD)) {
            // is the field readable?
            if (fieldMetadata.isWriteOnly()) {
                continue;
            }

            // get the field value
            Object fieldValue = getFieldValue(instance, fieldMetadata);

            // write the field
            if (fieldValue != null) {
                @SuppressWarnings("unchecked")
                ThriftCodec<Object> codec = (ThriftCodec<Object>) fields.get(fieldMetadata.getId());
                writer.writeField(fieldMetadata.getName(), fieldMetadata.getId(), codec, fieldValue);
            }
        }
        writer.writeStructEnd();
    }

    @SuppressWarnings("unchecked")
    private T constructStruct(Map<Short, Object> data)
            throws Exception
    {
        // construct instance
        Object instance;
        {
            ThriftConstructorInjection constructor = metadata.getConstructorInjection().get();
            Object[] parametersValues = new Object[constructor.getParameters().size()];
            for (ThriftParameterInjection parameter : constructor.getParameters()) {
                Object value = data.get(parameter.getId());
                if (value == null) {
                    value = metadata.getField(parameter.getId()).getThriftType().getNullValue();
                }
                parametersValues[parameter.getParameterIndex()] = value;
            }

            instance = invokeConstructor(constructor.getConstructor(), parametersValues);
        }

        // inject fields
        for (ThriftFieldMetadata fieldMetadata : metadata.getFields(THRIFT_FIELD)) {
            for (ThriftInjection injection : fieldMetadata.getInjections()) {
                if (injection instanceof ThriftFieldInjection) {
                    ThriftFieldInjection fieldInjection = (ThriftFieldInjection) injection;
                    Object value = data.get(fieldInjection.getId());
                    if (value != null) {
                        fieldInjection.getField().set(instance, value);
                    }
                }
            }
        }

        // inject methods
        for (ThriftMethodInjection methodInjection : metadata.getMethodInjections()) {
            boolean shouldInvoke = false;
            Object[] parametersValues = new Object[methodInjection.getParameters().size()];
            for (ThriftParameterInjection parameter : methodInjection.getParameters()) {
                Object value = data.get(parameter.getId());
                if (value != null) {
                    parametersValues[parameter.getParameterIndex()] = value;
                    shouldInvoke = true;
                }
            }

            if (shouldInvoke) {
                invokeMethod(methodInjection.getMethod(), instance, parametersValues);
            }
        }

        // builder method
        if (metadata.getBuilderMethod().isPresent()) {
            ThriftMethodInjection builderMethod = metadata.getBuilderMethod().get();
            Object[] parametersValues = new Object[builderMethod.getParameters().size()];
            for (ThriftParameterInjection parameter : builderMethod.getParameters()) {
                Object value = data.get(parameter.getId());
                parametersValues[parameter.getParameterIndex()] = value;
            }

            instance = invokeMethod(builderMethod.getMethod(), instance, parametersValues);
            validateCreatedInstance(metadata.getStructClass(), instance);
        }

        return (T) instance;
    }

    static void validateCreatedInstance(Class<?> clazz, Object instance)
    {
        verify(instance != null, "Builder method returned a null instance");

        verify(
                clazz.isInstance(instance),
                "Builder method returned instance of type %s, but an instance of %s is required",
                instance.getClass().getName(),
                clazz.getName());
    }

    static <T> T invokeConstructor(Constructor<T> constructor, Object[] args)
            throws Exception
    {
        try {
            return constructor.newInstance(args);
        }
        catch (InvocationTargetException e) {
            throwIfUnchecked(e.getCause());
            throwIfInstanceOf(e.getCause(), Exception.class);
            throw e;
        }
    }

    static Object invokeMethod(Method method, Object instance, Object[] args)
            throws Exception
    {
        try {
            return method.invoke(instance, args);
        }
        catch (InvocationTargetException e) {
            throwIfUnchecked(e.getCause());
            throwIfInstanceOf(e.getCause(), Exception.class);
            throw e;
        }
    }
}


text:
package com.edms.core.common.util;

import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;

/**
 * httpRequest工具类
 * @author Administrator
 *
 */
public class HttpRequestUtil {
	/**
	 * 发起http请求获取返回结果
	 *
	 * @param requestUrl
	 *            请求地址
	 * @return
	 */
	public static String httpRequest(String requestUrl) {
		StringBuffer buffer = new StringBuffer();
		try {
			URL url = new URL(requestUrl);
			HttpURLConnection httpUrlConn = (HttpURLConnection) url
					.openConnection();

			httpUrlConn.setDoOutput(false);
			httpUrlConn.setDoInput(true);
			httpUrlConn.setUseCaches(false);

			httpUrlConn.setRequestMethod("GET");
			httpUrlConn.connect();

			// 将返回的输入流转换成字符串
			InputStream inputStream = httpUrlConn.getInputStream();
			InputStreamReader inputStreamReader = new InputStreamReader(
					inputStream, "utf-8");
			BufferedReader bufferedReader = new BufferedReader(
					inputStreamReader);

			String str = null;
			while ((str = bufferedReader.readLine()) != null) {
				buffer.append(str);
			}
			bufferedReader.close();
			inputStreamReader.close();
			// 释放资源
			inputStream.close();
			inputStream = null;
			httpUrlConn.disconnect();

		} catch (Exception e) {
		}
		return buffer.toString();
	}

	/**
	 * 发送http请求取得返回的输入流
	 *
	 * @param requestUrl
	 *            请求地址
	 * @return InputStream
	 */
	public static InputStream httpRequestToInputStream(String requestUrl) {
		InputStream inputStream = null;
		try {
			URL url = new URL(requestUrl);
			HttpURLConnection httpUrlConn = (HttpURLConnection) url
					.openConnection();
			httpUrlConn.setDoInput(true);
			httpUrlConn.setRequestMethod("GET");
			httpUrlConn.connect();
			// 获得返回的输入流
			inputStream = httpUrlConn.getInputStream();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return inputStream;
	}

	/**
	 * utf编码
	 *
	 * @param source
	 * @return
	 */
	public static String urlEncodeUTF8(String source) {
		String result = source;
		try {
			result = java.net.URLEncoder.encode(source, "utf-8");
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return result;
	}
}


text:
/*-----------------------------------------------------------------------------------

 Template Name:Chatloop APP
 Template URI: themes.pixelstrap.com/chatloop
 Description: This is App Landing Page
 Author: Pixelstrap
 Author URI: https://themeforest.net/user/pixelstrap

 -----------------------------------------------------------------------------------*/
"use strict";
$(document).ready(function(){

    /*----------------------------------------
     mobile menu nav click hide collapse
     ----------------------------------------*/
    var mobile_menu = $( window ).width();
    if(mobile_menu < 991){
        $("nav a.nav-link").on('click', function(event) {
            if(!$(this).hasClass('dropdown-toggle')){

                console.log('click');
                $(".navbar-collapse").collapse('hide');
            }

        });
    }

    var dropdown = document.getElementsByClassName("dropdown-btn");
    var i;
    for (i = 0; i < dropdown.length; i++) {
        dropdown[i].addEventListener("click", function() {
            this.classList.toggle("active");
            var dropdownContent = this.nextElementSibling;
            if (dropdownContent.style.display === "block") {
                dropdownContent.style.display = "none";
            } else {
                dropdownContent.style.display = "block";
            }
        });
    }

    /*------------------------
     Tap to top
     --------------------------*/
    $(window).on('scroll', function() {
        if ($(this).scrollTop() > 600) {
            $('.tap-top').fadeIn();
        } else {
            $('.tap-top').fadeOut();
        }
    });
    $('.tap-top').on('click', function() {
        $("html, body").animate({
            scrollTop: 0
        }, 600);
        return false;
    });
    /*------------------------
     How it Work
     --------------------------*/
    $(".work-link").on('click', function(event) {
        $('.nav-item').removeClass('active');
        $(this).parent().addClass('active');
    });

    /*-----------------------
     Team
     -------------------------*/
    $("#hide").on('click', function(event){
        $("p").hide();
    });
    $("#show").on('click', function(event){
        $("p").show();
    });
    $('.team-hover').hide();

    $(".team-under-box-button").on('click', function(event){
        $('.team-box').hide(1000);
        $('.team-hover').show(1000);
        $('.team-hover').fadeIn("slow");
    });
    $(".team-close-btn").on('click', function(event){
        $(".team-hover").hide(1000);
        $('.team-box').show(1000);
        $('.team-box').fadeIn("slow");
    });

    $("#mymenu li a").on('click', function(event){
        $('a.nav-link').removeClass('active');
        $(this).addClass('active');
    });

    /*----------------------
     Screen slider
     -------------------------*/
    var swiper = new Swiper('.swiper-screenshots-container-1', {
        effect: 'coverflow',
        grabCursor: true,
        initialSlide: 2,
        centeredSlides: true,
        loop: true,
        spaceBetween: 0,
        slidesPerView: 4,
        pagination: false,
        coverflowEffect: {
            rotate: 0,
            stretch: 0,
            depth: 100,
            modifier: 1.43,
            slideShadows: false,
        },
        autoplay: {
            delay: 5000,
        },
        breakpoints: {
            360: {
                slidesPerView: 1,
                coverflowEffect: {
                    depth: 50,
                    modifier: 0,
                },
            },
            640: {
                slidesPerView: 3,
                coverflowEffect: {
                    depth: 80,
                    modifier: 0,
                },
            }
        }
    });

});


text:
@interface JImageViewC(JEx)
-(void)onPressCenter;
@end

@interface JImageViewScroll : UIScrollView{
	CGPoint pressPos;
	double pressTime;

@public
	JImageViewC * control;
}
@end
@implementation JImageViewScroll
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
	if([touches count]==1){
		UITouch *touch = [touches anyObject];
		CGPoint p = [touch locationInView:self];
		double cur=[touch timestamp];
		double d=(p.x-pressPos.x)*(p.x-pressPos.x) + (p.y-pressPos.y)*(p.y-pressPos.y);
		if(d<120 && cur-pressTime<0.3f){
			[control onPressCenter];
		}
	}
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
	if([touches count]==1){
		UITouch *touch = [touches anyObject];
		pressPos = [touch locationInView:self];
		pressTime=[touch timestamp];
	}
}
@end

@implementation JImageViewC
@synthesize  smallImage=_smallImage;
@synthesize  url=_url;
@synthesize  smallImages=_smallImages;
@synthesize  urls=_urls;
@synthesize  index=_index;
@synthesize details=_details;

-(int)getURLHash{
	NSString * s=[NSString stringWithFormat:@"big_640_640_%@",self.url];
	return [Api hashCode:s];
}

-(void)setBigImage:(UIImage *)img{
	if(img==NULL){
		[imgView setImage:NULL];
		return;
	}
	CGSize s=img.size;
	if(s.width<=0 || s.height<=0){
		return;
	}
	CGRect re=[imgScrollView frame];
	[imgView setImage:img];
	float iw=re.size.width;
	float ih=re.size.height;
	if(s.width/s.height>re.size.width/re.size.height){
		ih=s.height*re.size.width/s.width;
	}
	else {
		iw=s.width*re.size.height/s.height;
	}
	re=CGRectMake((re.size.width-iw)/2, (re.size.height-ih)/2, iw+1, ih+1);
	[imgView setFrame:re];
	imgScrollView.contentSize=re.size;
	imgScrollView.contentOffset=CGPointZero;
}

-(void)startDownloadImage_down:(JNetItem*)it{
	[self setBusy:-1];
	if(it.rcode==0){
		NSArray * rs=[it.rmap valueForKey:@"datas"];
		if(1==[rs count]){
			NSData * rdata=[rs objectAtIndex:0];
			if([rdata isKindOfClass:[NSData class]] && [rdata length]>10){
				int hash=[self getURLHash];
				[Api saveTmpFileByHash:hash forData:rdata forTime:9999999];
				bigImage=[[UIImage imageWithData:rdata]retain];
				if(bigImage!=NULL){
					[self setBigImage:bigImage];
					self.navigationItem.rightBarButtonItem=bizCreateStringItem(self, @selector(save), @"保存");
				}
			}
		}
	}
}

-(void)startDownloadImage{
	if(self.url==NULL){
		return;
	}
	int hash=[self getURLHash];
	NSData * rdata=[Api loadTmpFileByHash:hash forTime:9999999];
	if([rdata length]>10){
		bigImage=[[UIImage imageWithData:rdata]retain];
		if(bigImage!=NULL){
			[self setBigImage:bigImage];
			self.navigationItem.rightBarButtonItem=bizCreateStringItem(self, @selector(save), @"保存");
			return;
		}
	}

	NSArray * as=[NSArray arrayWithObject:self.url];
	NSMutableDictionary *umap=[NSMutableDictionary dictionaryWithObjectsAndKeys:
							   [JInteger withValue:2],@"scan",
							   [JInteger withValue:640],@"imgW",
							   [JInteger withValue:640],@"imgH",
							   as,@"ids",
							   NULL];
	[self setBusy:1];
	bizGetUserInfo(umap);
	JNetItem * it=[JNetItem new];
	it.target=JTargetMake(self, @selector(startDownloadImage_down:));
	[it setComm:@"getWallIcons" data:umap];
	[JNet addItem:it];
	[it release];
}

-(void)save{
	//gAna_click(@"SaveImage", 1);
	if(bigImage!=NULL){
		UIImageWriteToSavedPhotosAlbum(bigImage, NULL, 0, 0);
        [Api alert:@"保存图片成功!"];
	}
}

-(void)nav{
    self.navigationItem.title=[NSString stringWithFormat:@"%d/%d",
                               self.index+1,[self.urls count]];
    if (self.smallImages==nil) {
        //smallImage = nil;
    } else {
        self.smallImage = [self.smallImages objectAtIndex:self.index];
    }
    self.url = [self.urls objectAtIndex:self.index];

    UIView *v = [self.view viewWithTagName:@"bigimage.label"];
    UILabel *label = [v viewWithTagName:@"bigimage.text"];

    v.hidden = YES;
    if ([self.details count]>self.index) {
        //label.text = @"我用的是rails3.2.5,百度了很多方法都不适用了?总之,想问一下怎么中文化呢,就是那个属性名中文化的问题……";
        label.text = [self.details objectAtIndex:self.index];
    } else {
        label.text = @"";
    }
    if ([label.text length]>0) {
        v.hidden = NO;
    }

    [JNet cancelAll];

    //[self setBigImage:smallImage];
    [self startDownloadImage];
}

-(void)nav_pre {
    if (self.index<=0) {
        return;
    }

    self.index --;
    [self nav];
}

-(void)nav_next{
    if (self.index >=[self.urls count]-1 ) {
        return;
    }

    self.index ++;
    [self nav];
}

-(void)loadView{
	[super loadView];
	if(imgScrollView==NULL){
		JImageViewScroll* ts=[[JImageViewScroll alloc]initWithFrame:CGRectMake(0, -20, 320, 480)];
		ts->control=self;
		imgScrollView=ts;
		imgScrollView.delegate=self;
		imgScrollView.contentSize=CGSizeMake(321, 481);
		imgScrollView.showsHorizontalScrollIndicator=TRUE;//显示水平滚动条
		imgScrollView.showsVerticalScrollIndicator=TRUE;//显示垂直滚动条
		imgScrollView.alwaysBounceVertical=TRUE;
		imgScrollView.alwaysBounceHorizontal=TRUE;
		imgScrollView.maximumZoomScale = 3.0;
		imgScrollView.minimumZoomScale = 1.0f;
		//imgScrollView.clipsToBounds = YES;
		imgScrollView.bounces = YES;//是否可以超出范围并反弹
		[imgScrollView setCanCancelContentTouches:YES];
		[imgScrollView setScrollEnabled:YES];
		imgScrollView.zoomScale = 1.00; //
		imgScrollView.bouncesZoom = YES;//缩放是否可以超过最高和最低限额
        imgScrollView.backgroundColor = [UIColor blackColor];

		imgView=[[UIImageView alloc]initWithImage:NULL];
		//[imgView setTagName:@"image.view"];
		//isSmallIcon=TRUE;
		//imgView.image=smallImage;
		[ts addSubview:imgView];

		[self setBigImage:self.smallImage];
		[self startDownloadImage];

        oldBarStyle = [ [UIApplication sharedApplication] statusBarStyle];
	}

    if ([self.urls count]<=0) {
        self.navigationItem.title=@"1/1";
    } else {
        self.navigationItem.title=[NSString stringWithFormat:@"%d/%d",
                                   self.index+1,[self.urls count]];
    }

	self.view=[[[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)] autorelease];
    self.view.backgroundColor = [UIColor blackColor];
	[self.view addSubview:imgScrollView];

	UINavigationBar * bar=[[[UINavigationBar alloc]initWithFrame:CGRectMake(0, 20, 320, 44)]autorelease];
    [bar setBarStyle:UIBarStyleBlack];
	[bar setTagName:@"nav.bar"];
    [bar setTranslucent:YES];
    bar.alpha=1;
    bar.tintColor = nil;
	bar.items=[NSArray arrayWithObject:self.navigationItem];
    bar.center = CGPointMake(bar.center.x, bar.center.y-20);

    self.navigationItem.leftBarButtonItem=bizCreateStringItem(self, @selector(onReturn), @"返回");

    if ([self.urls count]>0) {
        UIToolbar *toolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0,460-44, 320, 44)];
        [toolbar setTranslucent:YES];
        [toolbar setBarStyle:UIBarStyleBlack];
        toolbar.tintColor = nil;

        NSMutableArray *myToolBarItems = [NSMutableArray array];

        [myToolBarItems addObject:[[[UIBarButtonItem alloc]
                                    initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]];

        [myToolBarItems addObject:[[[UIBarButtonItem alloc]
                                    initWithImage:[UIImage imageNamed:@"icon_pre"] style:UIBarButtonItemStylePlain
                                    target:self
                                    action:@selector(nav_pre)] autorelease]];

        [myToolBarItems addObject:[[[UIBarButtonItem alloc]
                                    initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]];

        [myToolBarItems addObject:[[[UIBarButtonItem alloc]
                                    initWithImage:[UIImage imageNamed:@"icon_next"] style:UIBarButtonItemStylePlain
                                    target:self
                                    action:@selector(nav_next)] autorelease]];
        [myToolBarItems addObject:[[[UIBarButtonItem alloc]
                                    initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil] autorelease]];

        [toolbar setTagName:@"tool.bar"];
        toolbar.alpha = 0;
        [toolbar setItems:myToolBarItems];
        [self.view addSubview:toolbar];
        [toolbar release];

        UIView *v = [[UIView alloc]initWithFrame:CGRectMake(0, 460-44-100, 320, 100)];
        v.backgroundColor = [UIColor colorWithIntA:0x72000000];
         [self.view addSubview:v];
        [v setTagName:@"bigimage.label"];
        [v release];

        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, 300, 100)];
        label.backgroundColor = [UIColor clearColor];
        label.textColor = [UIColor whiteColor];
        [label setTagName:@"bigimage.text"];
        label.numberOfLines = 0;
        if ([self.details count]>0) {
            //label.text = @"我用的是rails3.2.5,百度了很多方法都不适用了?总之,想问一下怎么中文化呢,就是那个属性名中文化的问题……";
            label.text = [self.details objectAtIndex:self.index];
        }

        [v addSubview:label];
        [label release];

        UIView *line = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 1)];
        line.backgroundColor = [UIColor colorWithIntA:0x72FFFFFF];
        [v addSubview:line];
        [line release];

        v.alpha = 0;
    }

	[self.view addSubview:bar];

    [self performSelector:@selector(onPressCenter) withObject:nil afterDelay:2.0];
}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {

    NSLog(@"x = %f",scrollView.contentOffset.x);
    if (scrollView.contentOffset.x<-30) {
        [self nav_pre];
    }
    else if(scrollView.contentOffset.x>30){
        [self nav_next];
    }
}

- (void)scrollViewDidZoom:(UIScrollView *)usv{
	//处理图片内容居中显示的问题
	//
	CGRect re=[imgScrollView frame];
	CGSize s=usv.contentSize;

	if(s.width<re.size.width || s.height<re.size.height){
		if(s.width<re.size.width){
			s.width=re.size.width;
		}
		if(s.height<re.size.height){
			s.height=re.size.height;
		}
		imgScrollView.contentSize=s;
	}
	CGPoint p=imgView.center;
	float dx=p.x-s.width/2;
	float dy=p.y-s.height/2;
	if(dx*dx+dy*dy>=1.1f){
		imgView.center=CGPointMake(s.width/2, s.height/2);
	}
}

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
	return imgView;
}

-(bool)hiddenNavigationBar{
	return TRUE;
}

-(void)viewDidAppear:(BOOL)animated{

	[UIView beginAnimations:NULL context:NULL];
	[UIView setAnimationDuration:0.3f];
	[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:FALSE];
    //    [self dismissModalViewControllerAnimated:YES];
	[UIView commitAnimations];

    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent];
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation duration:(NSTimeInterval)duration {

	NSLog(@"UIInterfaceOrientation=%d",interfaceOrientation);
	UINavigationBar * bar=[self.view viewWithTagName:@"nav.bar"];
	bar.alpha=0;
    [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:FALSE];
	if(interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight){
		CGRect re= CGRectMake(0, 0, 480, 320);
		[self.view setFrame:re];
		[imgScrollView setFrame:CGRectMake(0, 0, 480, 320)];
		[bar setFrameIfNeed:CGRectMake(0, 20, 480, 32)];
	}
	else {
		CGRect re= CGRectMake(0, 0, 320, 480);
		[self.view setFrame:re];
		[imgScrollView setFrame: CGRectMake(0, 0, 320, 480)];
		[bar setFrameIfNeed:CGRectMake(0, 20, 320, 44)];
	}
	[self setBigImage:imgView.image];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
    return TRUE;
}

-(void)onPressCenter{//
	UINavigationBar * bar=[self.view viewWithTagName:@"nav.bar"];
    UIToolbar * toolbar=[self.view viewWithTagName:@"tool.bar"];
    UILabel *label = [self.view viewWithTagName:@"bigimage.label"];

    UILabel *textL = [label viewWithTagName:@"bigimage.text"];

    label.hidden = YES;
    if ([textL.text length]>0) {
        label.hidden = NO;
    }

	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:0.3];
	if(bar.alpha>0.3){
		bar.alpha=0;
        [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:FALSE];
        toolbar.alpha = 0;
        label.alpha = 0;
	}
	else {
		bar.alpha=0.7;
        toolbar.alpha = 0.7;
        label.alpha = 1.0;
        [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:FALSE];
	}

	[UIView commitAnimations];
}

-(void)onReturn{
	[[UIApplication sharedApplication] setStatusBarHidden:FALSE withAnimation:FALSE];

    [[UIApplication sharedApplication] setStatusBarStyle:oldBarStyle];
	[JNet cancelAll];
	//[Api loadView];

	[self dismissModalViewControllerAnimated:YES];
}

-(void)dealloc{
	[bigImage release];
	[imgScrollView release];
	[_smallImage release];
	[imgView release];
	[_url release];

    [_smallImages release];
    [_urls release];
    [_details release];

	[super dealloc];
}

@end


text:
'use strict';

var handleError = require(__dirname + '/handle_error');
var responseHandler = require(__dirname + '/response_handler');
var File = require(__dirname + '/../models/file');
var Metadata = require(__dirname + '/../models/metadata');
var EventEmitter = require('events').EventEmitter;
var ee = new EventEmitter();

module.exports = function(req, res) {
  ee.emit('findFileLink', req, res);
};

ee.on('findFileLink', function(req,res) {
  Metadata.find({_id: req.params.id}, function(err, data){
    if (err) return handleError.err404(err, res);
    ee.emit('removeFile', req, res, data.fileLink);
  });
});

ee.on('removeFile', function(req, res, fileLink) {
  File.remove({_id: fileLink}, function(err) {
    if (err) return handleError.err500(err, res);
    ee.emit('removeMeta', req, res);
  });
});

ee.on('removeMeta', function(req, res) {
  Metadata.remove({_id: req.params.id}, function(err) {
    if (err) return handleError.err500(err, res);
    responseHandler.send202(res, 'deleting');
  });
});


text:
<?php defined("BASEPATH") OR exit("No Direct script access allowed");

	class Featured_company_model extends CI_Model{

		var $table = 'tb_featured_companies';
		var $column = array('tb_featured_companies.id','tb_employer.company_name','tb_industy.industry_name', 'tb_region.region_name', 'tb_cities.city_name','start_date', 'tb_featured_companies.duration','end_date', 'date_created', 'is_active');
		var $order = array('tb_position.id' => 'ASC');

		public function __construct(){

			parent:: __construct();
		}

		private function _get_datatables_query()
	    {
	    	$sql = '(tb_featured_companies.id LIKE "%'.$_POST['search']['value'].'%" OR company_name LIKE "%'. $_POST['search']['value'].'%" OR tb_industry.industry_name LIKE "%'.$_POST['search']['value'].'%" OR tb_region.region_name LIKE "%'.$_POST['search']['value'].'%" OR tb_cities.city_name LIKE "%'.$_POST['search']['value'].'%")';

	        $this->db->select('*, tb_featured_companies.id AS id, tb_featured_companies.is_active AS is_active');
			$this->db->from($this->table);
			$this->db->join('tb_employer','tb_employer.user_id = tb_featured_companies.company_id');
			$this->db->join('tb_industry','tb_industry.id = tb_employer.industry');
			$this->db->join('tb_region', 'tb_region.id = tb_employer.province_1');
			$this->db->join('tb_cities', 'tb_cities.id = tb_employer.city_1');

			$i = 0;

			foreach ($this->column as $item)
			{
				$column[$i] = $item;
				$i++;
			}

			if( $_POST['search']['value'])
			{
				$this->db->where($sql);
			}

			if(isset($_POST['order']))
			{
				$this->db->order_by($column[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);
			}
			else if(isset($this->order))
			{
				$order = $this->order;
				$this->db->order_by(key($order), $order[key($order)]);
			}
	    }

	    function get_datatables()
	    {
	    	$this->_get_datatables_query();
	    	if($_POST['length'] != -1)
	    		$this->db->limit($_POST['length'], $_POST['start']);
	    	$query = $this->db->get();
	    	return $query->result();
	    }

	    function count_filtered()
	    {
	    	$this->_get_datatables_query();
	    	$query = $this->db->get();
	    	return $query->num_rows();
	    }

	    function get_query()
	    {
	    	$this->_get_datatables_query();
	    	$query = $this->db->get();
	    	return $this->db->last_query();
	    }

	    public function count_all()
	    {
	    	$this->db->from($this->table);
	    	return $this->db->count_all_results();
	    }

	}


text:
package models.base

import scalaz._
import Scalaz._
import scalaz.effect.IO
import scalaz.Validation
import scalaz.Validation.FlatMap._
import scalaz.NonEmptyList._

import cache._
import db._
import io.megam.auth.funnel.FunnelErrors._
import controllers.Constants._

import io.megam.auth.stack.AccountResult
import io.megam.auth.stack.{ Name, Phone, Password, States, Approval, Dates, Suspend }
import io.megam.auth.stack.SecurePasswordHashing
import io.megam.auth.stack.SecurityActions

import io.megam.common.uid.UID
import io.megam.util.Time
import net.liftweb.json._
import net.liftweb.json.scalaz.JsonScalaz._
import java.nio.charset.Charset

import java.util.UUID
import com.datastax.driver.core.{ ResultSet, Row }
import com.websudos.phantom.dsl._
import scala.concurrent.{ Future => ScalaFuture }
import com.websudos.phantom.connectors.{ ContactPoint, KeySpaceDef }
import scala.concurrent.Await
import scala.concurrent.duration._
import scala.annotation.tailrec

import models.team._
import models.base.Events._
import models.billing._
import controllers.stack.ImplicitJsonFormats

/**
 * @author rajthilak
 *
 */
case class AccountInput(name: Name, phone: Phone, email: String, api_key: String, password: Password, states: States, approval: Approval, suspend: Suspend, registration_ip_address: String,  dates: Dates) {
  val json = "{\"name\":" +name.json+",\"phone\":" + phone.json + ",\"email\":\"" + email + "\",\"api_key\":\"" + api_key + "\",\"password\":" + password.json + ",\"states\":" + states.json + ",\"approval\":" + approval.json + ",\"suspend\":" + suspend.json + ",\"registration_ip_address\":\"" + registration_ip_address + "\",\"dates\":" + dates.json + "}"
}

case class AccountReset(password_reset_key: String, password_reset_sent_at: String) {
  val password = Password(password_reset_key, password_reset_sent_at)
  val json = "{\"id\":\""+ "\",\"name\":" + Name.empty.json+",\"phone\":" + Phone.empty.json + ",\"email\":\"" + "\",\"api_key\":\""  + "\",\"password\":" + password.json + ",\"states\":" + States.empty.json + ",\"approval\":" + Approval.empty.json + ",\"suspend\":" + Suspend.empty.json + ",\"registration_ip_address\":\"" + "\",\"dates\":" + Dates.empty.json + "}"

}

sealed class AccountSacks extends CassandraTable[AccountSacks, AccountResult]  with ImplicitJsonFormats {

  object id extends StringColumn(this)

  object name extends JsonColumn[AccountSacks, AccountResult, Name](this) {
    override def fromJson(obj: String): Name = {
      JsonParser.parse(obj).
      extract[Name]
    }

    override def toJson(obj: Name): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object phone extends JsonColumn[AccountSacks, AccountResult, Phone](this) {
    override def fromJson(obj: String): Phone = {
      JsonParser.parse(obj).extract[Phone]
    }

    override def toJson(obj: Phone): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object email extends StringColumn(this) with PrimaryKey[String]

  object api_key extends StringColumn(this)

  object password extends JsonColumn[AccountSacks, AccountResult, Password](this) {
    override def fromJson(obj: String): Password = {
      JsonParser.parse(obj).extract[Password]
    }

    override def toJson(obj: Password): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object states extends JsonColumn[AccountSacks, AccountResult, States](this) {
    override def fromJson(obj: String): States = {
      JsonParser.parse(obj).extract[States]
    }

    override def toJson(obj: States): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object approval extends JsonColumn[AccountSacks, AccountResult, Approval](this) {
    override def fromJson(obj: String): Approval = {
      JsonParser.parse(obj).extract[Approval]
    }

    override def toJson(obj: Approval): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object suspend extends JsonColumn[AccountSacks, AccountResult, Suspend](this) {
    override def fromJson(obj: String): Suspend = {
      JsonParser.parse(obj).extract[Suspend]
    }

    override def toJson(obj: Suspend): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  object registration_ip_address extends StringColumn(this)

  object dates extends JsonColumn[AccountSacks, AccountResult, Dates](this) {
    override def fromJson(obj: String): Dates = {
      JsonParser.parse(obj).extract[Dates]
    }

    override def toJson(obj: Dates): String = {
      compactRender(Extraction.decompose(obj))
    }
  }

  def fromRow(row: Row): AccountResult = {
    AccountResult(
      id(row),
      name(row),
      phone(row),
      email(row),
      api_key(row),
      password(row),
      states(row),
      approval(row),
      suspend(row),
      registration_ip_address(row),
      dates(row))
  }
}

abstract class ConcreteAccounts extends AccountSacks with RootConnector {

  override lazy val tableName = "accounts"
  override implicit def space: KeySpace = scyllaConnection.space
  override implicit def session: Session = scyllaConnection.session

  def dbCount: ValidationNel[Throwable, Option[Long]] =  {
    val res = select.count.one
    Await.result(res, 5.seconds).successNel
  }

  def dbInsert(account: AccountResult): ValidationNel[Throwable, ResultSet] = {
    val res = insert.value(_.id, account.id)
    .value(_.name, account.name)
     .value(_.phone, account.phone)
      .value(_.email, NilorNot(account.email, ""))
      .value(_.api_key, NilorNot(account.api_key, ""))
      .value(_.password, account.password)
      .value(_.states, account.states)
      .value(_.approval, account.approval)
      .value(_.suspend, account.suspend)
      .value(_.registration_ip_address, NilorNot(account.registration_ip_address, ""))
      .value(_.dates, account.dates)
      .future()
    Await.result(res, 5.seconds).successNel
  }

  def dbGet(email: String): ValidationNel[Throwable, Option[AccountResult]] = {
    val res = select.where(_.email eqs email).one()
    Await.result(res, 5.seconds).successNel
  }

  def dbSelectAll: ValidationNel[Throwable, Seq[AccountResult]] = {
    val res = select.fetch
    Await.result(res, 5.seconds).successNel
  }

  def deleteRecords(email: String): ValidationNel[Throwable, ResultSet] = {
    val res = delete.where(_.email eqs email).future()
    Await.result(res, 5.seconds).successNel
  }

  def dbUpdate(email: String, rip: AccountResult, aor: Option[AccountResult]): ValidationNel[Throwable, ResultSet] = {
    val res = update.where(_.email eqs NilorNot(email, aor.get.email))
      .modify(_.id setTo NilorNot(rip.id, aor.get.id))
      .and(_.name setTo new Name(NilorNot(rip.name.first_name, aor.get.name.first_name),
         NilorNot(rip.name.last_name, aor.get.name.last_name)))

       .and(_.phone setTo new Phone(NilorNot(rip.phone.phone, aor.get.phone.phone),
       NilorNot(rip.phone.phone_verified, aor.get.phone.phone_verified)))

      .and(_.api_key setTo NilorNot(rip.api_key, aor.get.api_key))

      .and(_.password setTo new Password(NilorNot(rip.password.password_hash, aor.get.password.password_hash),
        NilorNot(rip.password.password_reset_key, aor.get.password.password_reset_key),
        NilorNot(rip.password.password_reset_sent_at, aor.get.password.password_reset_sent_at)))

       .and(_.states setTo new States(NilorNot(rip.states.authority, aor.get.states.authority),
         NilorNot(rip.states.active, aor.get.states.active),
         NilorNot(rip.states.blocked, aor.get.states.blocked),
         NilorNot(rip.states.staged, aor.get.states.staged)))

    .and(_.approval setTo new Approval(NilorNot(rip.approval.approved, aor.get.approval.approved),
      NilorNot(rip.approval.approved_by_id, aor.get.approval.approved_by_id),
      NilorNot(rip.approval.approved_at, aor.get.approval.approved_at)))

      .and(_.suspend setTo new Suspend(NilorNot(rip.suspend.suspended, aor.get.suspend.suspended),
        NilorNot(rip.suspend.suspended_at, aor.get.suspend.suspended_at),
        NilorNot(rip.suspend.suspended_till, aor.get.suspend.suspended_till)))

      .and(_.registration_ip_address setTo NilorNot(rip.registration_ip_address, aor.get.registration_ip_address))

      .and(_.dates setTo new Dates(NilorNot(rip.dates.last_posted_at, aor.get.dates.last_posted_at),
        NilorNot(rip.dates.last_emailed_at, aor.get.dates.last_emailed_at),
        NilorNot(rip.dates.previous_visit_at, aor.get.dates.previous_visit_at),
          NilorNot(rip.dates.first_seen_at, aor.get.dates.first_seen_at),
            NilorNot(rip.dates.created_at, aor.get.dates.created_at)))
      .future()
    Await.result(res, 5.seconds).successNel
  }

  private def NilorNot(rip: String, aor: String): String = {
    rip == null || rip == "" match {
      case true => return aor
      case false => return rip
    }
  }

}
object Accounts extends ConcreteAccounts {

  ///////////////// All these conversion stuff should move out. ///////////
  // 1. Get me an account input object from a string
  // 2. Get me an account result object from account_input
  // 3. Get me a clone of account result with password hashed
  // 3. Get me a account result with passticket verified and mutated with new password hash
  // 5. Get me a account result with passticket updated.
  private def parseAccount(input: String): ValidationNel[Throwable, AccountInput] = {
    (Validation.fromTryCatchThrowable[AccountInput, Throwable] {
      parse(input).extract[AccountInput]
    } leftMap { t: Throwable => new MalformedBodyError(input, t.getMessage) }).toValidationNel
  }

  private def mkAccountResult(id: String, m: AccountInput): ValidationNel[Throwable, AccountResult] = {
    (Validation.fromTryCatchThrowable[AccountResult, Throwable] {
      val dates = new Dates(m.dates.last_posted_at, m.dates.last_emailed_at, m.dates.previous_visit_at,
          m.dates.first_seen_at, Time.now.toString)

      val pwd = new Password(SecurePasswordHashing.hashPassword(m.password.password_hash),"","")
      AccountResult(id, m.name,  m.phone, m.email, m.api_key, pwd, m.states, m.approval,  m.suspend,  m.registration_ip_address,  dates)
    } leftMap { t: Throwable => new MalformedBodyError(m.json, t.getMessage) }).toValidationNel
  }

  private def mkAccountResultDup(m: AccountResult): ValidationNel[Throwable, AccountResult] = {
    (Validation.fromTryCatchThrowable[AccountResult, Throwable] {
      if(m.password!=null && m.password.password_hash!=null && m.password.password_hash.trim.length >0) {
        val pwd = new Password(SecurePasswordHashing.hashPassword(m.password.password_hash),"","")

        AccountResult(m.id, m.name,  m.phone, m.email, m.api_key, pwd, m.states, m.approval,  m.suspend,  m.registration_ip_address,  m.dates)
      } else {
        AccountResult(m.id, m.name,  m.phone, m.email, m.api_key, m.password, m.states, m.approval,  m.suspend,  m.registration_ip_address,  m.dates)
      }
    }).toValidationNel
  }

  private def mkAccountResultWithPassword(m: AccountResult, old: AccountResult): ValidationNel[Throwable, AccountResult] = {
    if (m.password.password_reset_key == old.password.password_reset_key) {
      val pwd =  new Password(SecurePasswordHashing.hashPassword(m.password.password_hash),"","")

      val mupd = AccountResult(m.id, m.name,  m.phone, m.email, m.api_key, pwd, m.states, m.approval,  m.suspend,  m.registration_ip_address,  m.dates)

      Validation.success[Throwable, AccountResult](mupd).toValidationNel
    } else {
      Validation.failure[Throwable, AccountResult](new CannotAuthenticateError(m.email, "Password token didn't match.")).toValidationNel
    }
  }

  private def mkAccountResultWithToken(t: String): ValidationNel[Throwable, AccountResult] = {
      val pwd =  new Password("",t, Time.now.toString)
      val m = AccountResult("dum")

      val mupd = AccountResult("", m.name,  m.phone, "", m.api_key, pwd, m.states, m.approval,  m.suspend,  m.registration_ip_address,  m.dates)

      Validation.success[Throwable, AccountResult](mupd).toValidationNel

  }
  ///////////////// All these conversion stuff should move out. ///////////

  private def mkOrgIfEmpty(email: String, orgs: Seq[OrganizationsResult], acc: AccountResult): ValidationNel[Throwable, AccountResult] = {
    val org_json    = "{\"name\":\"" + app.MConfig.org + "\"}"
    val domain_json = "{\"name\":\"" + app.MConfig.domain + "\"}"

     if (!orgs.isEmpty)
      return Validation.success[Throwable, AccountResult](acc).toValidationNel
    else {
      (models.team.Organizations.create(email, org_json.toString) leftMap { t: NonEmptyList[Throwable] =>
        new ServiceUnavailableError(email, (t.list.map(m => m.getMessage)).mkString("\n"))
      }).toValidationNel.flatMap { xso: Option[OrganizationsResult] =>
        xso match {
          case Some(xs) => {
            (models.team.Domains.create(xs.id, domain_json.toString) leftMap { t: NonEmptyList[Throwable] =>
              new ServiceUnavailableError(xs.id, (t.list.map(m => m.getMessage)).mkString("\n"))
            }).toValidationNel.flatMap { dso: DomainsResult =>
              Validation.success[Throwable, AccountResult](acc).toValidationNel
            }
          }
          case None => Validation.success[Throwable, AccountResult](acc).toValidationNel
        }
      }
    }
  }

  def login(input: String): ValidationNel[Throwable, AccountResult] = {
    for {
      p <- parseAccount(input)
      a <- (Accounts.findByEmail(p.email) leftMap { t: NonEmptyList[Throwable] => t })
      s <- SecurityActions.Validate(p.password.password_hash, a.get.password.password_hash)
      e <- Events(a.get.id, EVENTUSER, Events.LOGIN, Map(EVTEMAIL -> p.email)).createAndPub()
    } yield {
     a.get
    }
  }

  def create(input: String): ValidationNel[Throwable, AccountResult] = {
    for {
      p   <- parseAccount(input)
      uir <- (UID("act").get leftMap { err: NonEmptyList[Throwable] => err })
      ast <- mkAccountResult(uir.get._1 + uir.get._2, p)
      ins <- dbInsert(ast)
      org <- Organizations.findByEmail(p.email)
      res <- mkOrgIfEmpty(p.email, org, ast)
      bal <- Balances.onboardAccountBalance(p.email)
      evn <- Events(ast.id, EVENTUSER, Events.ONBOARD, Map(EVTEMAIL -> ast.email, EVTPASSWORD_HASH -> p.password.password_hash)).createAndPub()
    } yield {
      res
    }
  }

  def update(email: String, input: String): ValidationNel[Throwable, Option[AccountResult]] = {
    val accountResult: ValidationNel[Throwable, AccountResult] = (Validation.fromTryCatchThrowable[AccountResult, Throwable] {
      parse(input).extract[AccountResult]
    } leftMap { t: Throwable => new MalformedBodyError(input, t.getMessage) }).toValidationNel //capture failure
    for {
      t <- accountResult
      c <- mkAccountResultDup(t)
      a <- (Accounts.findByEmail(email) leftMap { t: NonEmptyList[Throwable] => t })
      d <- dbUpdate(email, c, a)
    } yield {
      a
    }
  }

  def forgot(email: String): ValidationNel[Throwable, Option[AccountResult]] = {
    val token = generateToken(26)

    for {
      a <- (Accounts.findByEmail(email) leftMap { t: NonEmptyList[Throwable] => t })
      s <- mkAccountResultWithToken(token)
      d <- dbUpdate(email,s, a)
      e <- Events(a.get.id, EVENTUSER, Events.RESET, Map(EVTEMAIL -> a.get.email, EVTTOKEN -> token)).createAndPub()
    } yield {
      a
    }
  }

  def password_reset(input: String): ValidationNel[Throwable, Option[AccountResult]] = {
    val accountResult: ValidationNel[Throwable, AccountResult] = (Validation.fromTryCatchThrowable[AccountResult, Throwable] {
      parse(input).extract[AccountResult]
    } leftMap { t: Throwable => new MalformedBodyError(input, t.getMessage) }).toValidationNel //capture failure

    for {
      c  <- accountResult
      a  <- (Accounts.findByEmail(c.email) leftMap { t: NonEmptyList[Throwable] => t })
      m  <- (mkAccountResultWithPassword(c, a.get) leftMap { t: NonEmptyList[Throwable] => t })
      u  <- (dbUpdate(c.email, m, a) leftMap { t: NonEmptyList[Throwable] => t})
    } yield {
      c.some
    }
  }

  def findByEmail(email: String): ValidationNel[Throwable, Option[AccountResult]] = {
    InMemory[ValidationNel[Throwable, Option[AccountResult]]]({
      name: String =>
        {
          play.api.Logger.debug(("%-20s -->[%s]").format("LIV", email))
          (dbGet(email) leftMap { t: NonEmptyList[Throwable] =>
            new ServiceUnavailableError(email, (t.list.map(m => m.getMessage)).mkString("\n"))
          }).toValidationNel.flatMap { xso: Option[AccountResult] =>
            xso match {
              case Some(xs) => {
                Validation.success[Throwable, Option[AccountResult]](xs.some).toValidationNel
              }
              case None => Validation.failure[Throwable, Option[AccountResult]](new ResourceItemNotFound(email, "")).toValidationNel
            }
          }
        }
    }).get(email).eval(InMemoryCache[ValidationNel[Throwable, Option[AccountResult]]]())
  }

  //Admin authority can list users hack for 1.5.
  def list: ValidationNel[Throwable, Seq[AccountResult]] = {
    (dbSelectAll leftMap { t: NonEmptyList[Throwable] =>
      new ResourceItemNotFound("Admin", "Users = nothing found.")
    }).toValidationNel.flatMap { nm: Seq[AccountResult] =>
      if (!nm.isEmpty)
        Validation.success[Throwable, Seq[AccountResult]](nm).toValidationNel
      else
        Validation.failure[Throwable, Seq[AccountResult]](new ResourceItemNotFound("Admin", "Users = nothing found.")).toValidationNel
    }
  }

  //Admin authority: scaffolding method to call update for another users
  def update(input: String): ValidationNel[Throwable, Option[AccountResult]] = {
    val accountResult: ValidationNel[Throwable, AccountResult] = (Validation.fromTryCatchThrowable[AccountResult, Throwable] {
      parse(input).extract[AccountResult]
    } leftMap { t: Throwable => new MalformedBodyError(input, t.getMessage) }).toValidationNel

    for {
      c  <- accountResult
      a  <- update(c.email, input)
    } yield {
      c.some
    }
  }

  def delete(email: String): ValidationNel[Throwable, Option[AccountResult]] = {
    for {
      a  <- (Accounts.findByEmail(email) leftMap { t: NonEmptyList[Throwable] => t })
    } yield {
      val suspended = (if (a.get.suspend.suspended !=null && (a.get.suspend.suspended.trim.length > 0))  a.get.suspend.suspended.toBoolean else false)

      val blocked   = (if (a.get.states.blocked !=null && (a.get.states.blocked.trim.length > 0))  a.get.states.blocked.toBoolean else false)

      if (suspended || blocked) { deleteRecords(email) }

      AccountResult("dum").some
    }

  }

  def countAll: ValidationNel[Throwable, String] = dbCount.map(l => l.getOrElse(0L).toString)

  implicit val sedimentAccountEmail = new Sedimenter[ValidationNel[Throwable, Option[AccountResult]]] {
    def sediment(maybeASediment: ValidationNel[Throwable, Option[AccountResult]]): Boolean = {
       maybeASediment.isSuccess
    }
  }

  private def generateToken(length: Int): String = {
    val chars = ('a' to 'z') ++ ('A' to 'Z') ++ ('0' to '9')
    generateTokenFrom(length, chars)
  }

  private def generateTokenFrom(length: Int, chars: Seq[Char]): String = {
    val sb = new StringBuilder
    for (i <- 1 to length) {
      val randomNum = util.Random.nextInt(chars.length)
      sb.append(chars(randomNum))
    }
    sb.toString
  }

}


text:
module Tango
  module Fetch

    def fetch(url)
      if have_wget?
        shell("wget", "--progress=bar:force", "--continue", url)
      else
        shell("curl", "-O", "-C", "-", "-L", "--progress-bar", url)
      end
    end

  private

    def have_wget?
      shell("which", "wget", :echo => false).succeeded?
    end

  end
end


text:
<?=$title?>

Example of table created by fetching information from database

<?=$table1?>

Example of table created manually from scratch

<?=$table2?>


text:
package store

import "github.com/pachyderm/pachyderm/src/pps"

type Client interface {
	Close() error
	AddPipelineRun(pipelineRun *pps.PipelineRun) error
	GetPipelineRun(id string) (*pps.PipelineRun, error)
	AddPipelineRunStatus(id string, statusType pps.PipelineRunStatusType) error
	GetPipelineRunStatusLatest(id string) (*pps.PipelineRunStatus, error)
	AddPipelineRunContainers(pipelineContainers ...*pps.PipelineRunContainer) error
	GetPipelineRunContainers(id string) ([]*pps.PipelineRunContainer, error)
	AddPipelineRunLogs(pipelineRunLogs ...*pps.PipelineRunLog) error
	GetPipelineRunLogs(id string) ([]*pps.PipelineRunLog, error)
	AddPfsCommitMapping(pfsCommitMapping *pps.PfsCommitMapping) error
	GetPfsCommitMappingLatest(inputRepository string, inputCommitID string) (*pps.PfsCommitMapping, error)
}

func NewInMemoryClient() Client {
	return newInMemoryClient()
}

func NewRethinkClient(address string, databaseName string) (Client, error) {
	return newRethinkClient(address, databaseName)
}


text:
package fr.sii.ogham.core.exception.template;

import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID;

import fr.sii.ogham.core.template.detector.TemplateEngineDetector;

/**
 * Ogham is able to handle several template engines. In order to use the right
 * template engine, Ogham has an automatic engine detection mechanism.
 *
 * This exception is thrown when the auto-detection can't be performed because
 * either no {@link TemplateEngineDetector} is registered or none of the
 * registered {@link TemplateEngineDetector}s could handle the template.
 *
 * @author Aurélien Baudet
 *
 */
public class NoEngineDetectionException extends EngineDetectionException {
	private static final long serialVersionUID = SERIAL_VERSION_UID;

	public NoEngineDetectionException(String message) {
		super(message);
	}

}


text:
'use strict';

describe('GeoDetails', function () {
    var React = require('react/addons');
    var GeoDetails, component;

    beforeEach(function () {
        window.google = {
            maps: {
                Geocoder: function () {

                }
            }
        };
        GeoDetails = require('components/GeoDetails.js');
        component = React.createElement(GeoDetails);
    });

    it('should create a new instance of GeoDetails', function () {
        expect(component).toBeDefined();
    });
});


text:
namespace Evolution.Plugins.WeiXin.Entities
{
    using Data;
    using Domain;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;

    public class FirstAttentionTextEntity : EntityBase, ICreationAudited, IDeleteAudited, IModificationAudited
    {
        public string AppId { get; set; }
        public string Type { get; set; }
        public string Content { get; set; }
        public string TenantId { get; set; }
    }
}


text:
Tutorial - Adding a Subject Group
=================================

.. note:: Adding a subject group requires the project-level permission "Add Project Data".  See :doc:`../permissions`

#.  Login to the ReFlow server.

#.  From the ReFlow home page, navigate to the project by clicking on the project link.

#.  From the project detail page, click the **Add Subject Group** link located under the **Subject** heading.

    .. image:: ../images/project-detail.png
       :width: 1000

    .. note:: Subject groups can also be added from the **Subject Group** list page by clicking on the **Add Subject Group** button located near the upper right of that page (beside the main heading).

#. A new modal window will appear displaying the form fields.

    .. image:: ../images/new-subject-group-modal.png
       :scale: 50

#.  Fill out the form fields. Note, subject group **Name** is required and a project cannot have duplicate subject group names. The description field is optional. Once the form is completed, click the **Save** button.

    .. note:: If there were validation errors with the submitted form, the form will be re-displayed along with the validation errors.

#.  Once the new subject group is created, the modal window will close.


text:
import {Injectable} from '@angular/core';
import {Observable} from 'rxjs/Observable';
import {Extensions} from '../extensions.data';

import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import {Headers, Http, RequestOptions, Response} from '@angular/http';
import {Extension} from '../extension.data';
import {environment} from '../../../../environments/environment';

@Injectable()
export class NewExtensionsService {
  private URL = environment.kiimate_url;

  constructor(private http: Http) {
  }

  commit(form: Extensions): Observable<Extension> {
    const headers = new Headers({
      'X-SUMMER-OperatorId': 'wangyj',
      'X-SUMMER-RequestId': Math.random()
    });
    const options = new RequestOptions({headers: headers});

    const url = this.URL + '/' + form.ownerId + '/extensions';
    return this.http.post(url, form, options)
      .map((res: Response) => res.json() || [])
      .catch((error: any) => Observable.throw(error.json().error || 'Server error'));
  }

}


text:
**Current version: 0.9.4**

[![Build Status](https://travis-ci.org/x-tag/core.png)](https://travis-ci.org/x-tag/core)

[![Selenium Test Status](https://saucelabs.com/browser-matrix/aschaar.svg)](https://saucelabs.com/u/aschaar)

**This is the repository for the core [X-Tag](http://x-tags.org) library.**

Based on the current W3 Web Components [draft][1], X-Tag enables the custom element portion of the proposal.
Custom elements let you register new tags/elements with the parser, so they are recognized and inflated with
special abilities you define.

You can find out more about what X-Tag does, where it works, and how to use it, on the project page: [http://x-tags.org](http://x-tags.org).

X-Tag (excluding third-party icons or images) is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

  [1]: https://dvcs.w3.org/hg/webcomponents/raw-file/tip/explainer/index.html       "W3 Web Components Spec (Draft)"

## Getting started

To get started hacking on X-Tag core:

````bash
git clone https://github.com/x-tag/core x-tag-core --recursive
cd x-tag-core
npm install     # installs all the required dependencies using package.json
grunt polyfill  # rebuilds polyfill file
grunt build     # outputs x-tag-core.js and x-tag-core.min.js to ./dist
````

If you are interested in building your own custom elements, you can use our [web-component-stub](https://github.com/x-tag/web-component-stub) as a starting point.

## Updating

If you already have cloned the library and want to update to the latest changes, do:

````bash
cd x-tag-core
git pull origin master
git submodule update
npm install
grunt polyfill
grunt build
````

This assumes you just cloned the library and its remote repository is labelled `origin`. Suppose you had your own fork where your own remote is `origin`; you should add another remote origin and label it as `upstream`. Then your `git pull` line would need to be `git pull upstream master` instead.

## Tests

Jasmine tests via grunt are not working yet, please open [test/index.html](test/index.html) in your browser to see if everything passes.

## Regenerating the distributable build

In the interest of not reinventing the wheel, X-Tag core uses a few existing libraries which get pulled into the project. But distributing a bunch of separate files is not efficient, so we need to generate a single file that contains all this code.

If you make changes on the library and want to regenerate the build, just run

````bash
grunt build
````

and both `x-tag-core.js` and `x-tag-core.min.js` will be rebuilt and placed in the `./dist` directory.

## Creating your own web components

To learn more about X-Tags visit [x-tags.org](http://x-tags.org).

To create your own component, use our [web-component-stub](https://github.com/x-tag/web-component-stub).

Share your components by adding them to the [Custom Elements Registry](http://customelements.io/) or Bower.


text:
using namespace std;

namespace Ui {
class AddScientistDialog;
}

class AddScientistDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AddScientistDialog(QWidget *parent = 0);
    ~AddScientistDialog();

private slots:
    void on_AddScientist_clicked();

private:
    Ui::AddScientistDialog *ui;
    ScientistService scientistService;

};

#endif // ADDSCIENTISTDIALOG_H


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//

using Microsoft.AzureStack.Management.InfrastructureInsights.Admin;
using Microsoft.AzureStack.Management.InfrastructureInsights.Admin.Models;
using Xunit;

namespace InfrastructureInsights.Tests
{

    public class ServiceHealthTests : InfrastructureInsightsTestBase
    {

        private void AssertServiceHealthsEqual(ServiceHealth expected, ServiceHealth found) {
            if (expected == null)
            {
                Assert.Null(found);
            }
            else
            {
                Assert.True(InfrastructureInsightsCommon.ResourceAreSame(expected, found));
            }
        }

        private void ValidateServiceHealth(ServiceHealth serviceHealth) {
            Assert.NotNull(serviceHealth);

            Assert.NotNull(serviceHealth.AlertSummary);
            Assert.True(serviceHealth.AlertSummary.WarningAlertCount >= 0);
            Assert.True(serviceHealth.AlertSummary.CriticalAlertCount >= 0);

            Assert.NotNull(serviceHealth.HealthState);
            Assert.NotNull(serviceHealth.InfraURI);
            Assert.NotNull(serviceHealth.NamespaceProperty);
            Assert.NotNull(serviceHealth.RegistrationId);
            Assert.NotNull(serviceHealth.RoutePrefix);
            Assert.NotNull(serviceHealth.ServiceLocation);
        }

        [Fact]
        public void TestListServiceHealths() {
            RunTest((client) => {
                var regionHealths = client.RegionHealths.List(ResourceGroupName);
                Common.MapOverIPage(regionHealths, client.RegionHealths.ListNext, (regionHealth) => {
                    var regionName = ExtractName(regionHealth.Name);
                    var list = client.ServiceHealths.List(ResourceGroupName, regionName);
                    list.ForEach(ValidateServiceHealth);
                    Common.WriteIEnumerableToFile(list, "ListAllServiceHealths.txt", ResourceName);
                });
            });
        }

        [Fact]
        public void TestGetServiceHealth() {
            RunTest((client) => {
                var region = client.RegionHealths.List(ResourceGroupName).GetFirst();
                var regionName = ExtractName(region.Name);
                var service = client.ServiceHealths.List(ResourceGroupName, regionName).GetFirst();
                if (service != null)
                {
                    var serviceName = ExtractName(service.Name);
                    var retrieved = client.ServiceHealths.Get(ResourceGroupName, regionName, serviceName);
                    AssertServiceHealthsEqual(service, retrieved);
                }
            });
        }

        [Fact]
        public void TestGetAllServiceHealths() {
            RunTest((client) => {
                var regionHealths = client.RegionHealths.List(ResourceGroupName);
                Common.MapOverIPage(regionHealths, client.RegionHealths.ListNext, (regionHealth) => {
                    var regionName = ExtractName(regionHealth.Name);

                    var serviceHealths = client.ServiceHealths.List(ResourceGroupName, regionName);
                    Common.MapOverIPage(serviceHealths, client.ServiceHealths.ListNext, (service) => {
                        var serviceName = ExtractName(service.Name);

                        var retrieved = client.ServiceHealths.Get(ResourceGroupName, regionName, serviceName);
                        AssertServiceHealthsEqual(service, retrieved);
                    });
                });
            });
        }

    }
}


text:
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.

namespace Microsoft.Azure.ServiceBus.Amqp
{
    using System;
    using Azure.Amqp;
    using Azure.Amqp.Encoding;
    using Azure.Amqp.Framing;

    internal sealed class AmqpRequestMessage
    {
        readonly AmqpMessage requestMessage;

        AmqpRequestMessage(string operation, TimeSpan timeout, string trackingId)
        {
            this.Map = new AmqpMap();
            this.requestMessage = AmqpMessage.Create(new AmqpValue { Value = this.Map });
            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Request.Operation] = operation;
            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Properties.ServerTimeout] = (uint)timeout.TotalMilliseconds;
            this.requestMessage.ApplicationProperties.Map[ManagementConstants.Properties.TrackingId] = trackingId ?? Guid.NewGuid().ToString();
        }

        public AmqpMessage AmqpMessage => this.requestMessage;

        public AmqpMap Map { get; }

        public static AmqpRequestMessage CreateRequest(string operation, TimeSpan timeout, string trackingId)
        {
            return new AmqpRequestMessage(operation, timeout, trackingId);
        }
    }
}