text:
package com.codepath.apps.mysimpletweets.fragments;

import android.os.Bundle;
import android.util.Log;

import com.codepath.apps.mysimpletweets.TwitterApplication;
import com.codepath.apps.mysimpletweets.TwitterClient;
import com.codepath.apps.mysimpletweets.models.Tweet;
import com.loopj.android.http.JsonHttpResponseHandler;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.ArrayList;

import cz.msebera.android.httpclient.Header;

/**
 * Created by floko_000 on 8/8/2016.
 */
public class HomeTimelineFragment extends TweetsListFragment{

    private TwitterClient client;
    public long max_id;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        client = TwitterApplication.getRestClient();
        populateTimeline(-1);
    }

    @Override
    public void populateTimeline(int page){
        client.getHomeTimeline(max_id, new JsonHttpResponseHandler(){
            @Override
            public void onSuccess(int statusCode, Header[] headers, JSONArray json) {
                Log.d("DEBUG", json.toString());
                ArrayList<Tweet> tweets = Tweet.fromJSONArray(json);
                addAll(Tweet.fromJSONArray(json));
                max_id = aTweets.getItem(aTweets.getCount()-1).getUid();

            }

            @Override
            public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
                Log.d("DEBUG", errorResponse.toString());
            }

        });
    }

}


text:
package cn.aposoft.tutorial.http.range;

import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Arrays;

import org.apache.http.Header;
import org.apache.http.HttpEntity;
import org.apache.http.StatusLine;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;

/**
 * HTTP协议,分段读取协议
 *
 * @author LiuJian
 * @date 2017年4月15日
 *
 */
public class HttpRangeStub {

    /**
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {

        // Range: bytes=0-499
        try (CloseableHttpClient client = HttpClients.createDefault()) {
            HttpGet get = new HttpGet("http://www.aposoft.cn");
            get.addHeader("Range", "bytes=0-499");
            try (CloseableHttpResponse resp = client.execute(get);) {
            }
            get.setHeader("Range", "bytes=500-999");
            try (CloseableHttpResponse resp = client.execute(get);) {
            }
        }

    }

}

redpajama_set_name: RedPajamaGithub


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

    <LinearLayout
        android:id="@+id/ll_item_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_item_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ITEM"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_name"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Name" >

            <requestFocus />
        </com.parse.parsepush.FloatingHintEditText>

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_base_value"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Base Value" />

        <Spinner
            android:id="@+id/s_item_type"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_weapon_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_weapon_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="WEAPON"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_weapon_damages"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Damage(s) [use proper codes]" />

        <com.parse.parsepush.MultiSelectSpinner
            android:id="@+id/mss_weapon_type"
            style="@style/multiselectspinner_tall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />

        <com.parse.parsepush.MultiSelectSpinner
            android:id="@+id/mss_weapon_slots"
            style="@style/multiselectspinner_tall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_ammo_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_ammo_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="AMMO"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_ammo_damages"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Damage(s) [use proper codes]" />

        <com.parse.parsepush.MultiSelectSpinner
            android:id="@+id/mss_ammo_weapons"
            style="@style/multiselectspinner_tall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_armor_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_armor_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="ARMOR"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_resistances"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Resistance(s) [use proper codes]" />

        <com.parse.parsepush.MultiSelectSpinner
            android:id="@+id/mss_armor_slots"
            style="@style/multiselectspinner_tall"
            android:layout_width="match_parent"
            android:layout_height="wrap_content" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_ingredient_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_ingredient_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="INGREDIENT"
            android:textAppearance="?android:attr/textAppearanceLarge" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/ll_durability_elements"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginBottom="16dp"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/tv_durability_title"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="DURABILITY"
            android:textAppearance="?android:attr/textAppearanceLarge" />

        <com.parse.parsepush.FloatingHintEditText
            android:id="@+id/et_durability"
            style="@style/Widget.FloatingHintEditText"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:hint="Number of Uses" />
    </LinearLayout>

</LinearLayout>


text:
<?php

class RecipeParser_Parser_Epicuriouscom {

    static public function parse($html, $url) {
        $recipe = RecipeParser_Parser_MicrodataSchema::parse($html, $url);

        // Turn off libxml errors to prevent mismatched tag warnings.
        libxml_use_internal_errors(true);
        $html = mb_convert_encoding($html, 'HTML-ENTITIES', "UTF-8");
        $doc = new DOMDocument();
        $doc->loadHTML('<?xml encoding="UTF-8">' . $html);
        $xpath = new DOMXPath($doc);

        // OVERRIDES for epicurious
        // Prep Times
        $nodes = $xpath->query('//*[@class="summary_data"]');
        if ($nodes->length) {
            foreach ($nodes as $node) {
                if( preg_match('/ACTIVE/', $node->nodeValue) ){
                    $ing_nodes = $node->childNodes;
                    foreach ($ing_nodes as $ing_node) {
                        if($ing_node->nodeName == "span"){
                            $recipe->prep_time = RecipeParser_Text::formatAsOneLine($ing_node->nodeValue);
                        }
                    }
                }
                else if( preg_match('/TOTAL/', $node->nodeValue) ){
                    $ing_nodes = $node->childNodes;
                    foreach ($ing_nodes as $ing_node) {
                        if($ing_node->nodeName == "span"){
                            $recipe->total_time = RecipeParser_Text::formatAsOneLine($ing_node->nodeValue);
                        }
                    }
                }
            }
        }

        // Total Time
        $nodes = $xpath->query('//*[@itemprop="totalTime"]');
        if ($nodes->length) {
            $value = $nodes->item(0)->getAttribute("content");
            $recipe->time['total'] = RecipeParser_Text::iso8601ToMinutes($value);
        }

        // Ingredients
        $recipe->resetIngredients();
        $nodes = $xpath->query('//div[@id = "ingredients"]/*');
        foreach ($nodes as $node) {

            //  contains ingredient section names
            if ($node->nodeName == 'strong') {
                $line = RecipeParser_Text::formatSectionName($node->nodeValue);
                $recipe->addIngredientsSection($line);
                continue;
            }

            // Extract ingredients from inside of

            if ($node->nodeName == 'ul') {
                // Child nodes should all be

                $ing_nodes = $node->childNodes;
                foreach ($ing_nodes as $ing_node) {
                    if ($ing_node->nodeName == 'li') {
                        $line = trim($ing_node->nodeValue);
                        $recipe->appendIngredient($line);
                    }
                }
            }
        }

        return $recipe;
    }

}


text:
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

package org.openqa.selenium;

import java.util.List;

/**
 * A WebElement that wraps another WebElement, for purposes of testing that JSON converters
 * serialized wrapped elements correctly.
 */
public class WrappedWebElement implements WebElement, WrapsElement {

  private WebElement wrappedElement;

  public WrappedWebElement(WebElement element) {
    this.wrappedElement = element;
  }

  public WebElement getWrappedElement() {
    return wrappedElement;
  }

  public void click() {
    throw new UnsupportedOperationException();
  }

  public void submit() {
    throw new UnsupportedOperationException();
  }

  public void sendKeys(CharSequence... keysToSend) {
    throw new UnsupportedOperationException();
  }

  public void clear() {
    throw new UnsupportedOperationException();
  }

  public String getTagName() {
    throw new UnsupportedOperationException();
  }

  public String getAttribute(String name) {
    throw new UnsupportedOperationException();
  }

  public boolean isSelected() {
    throw new UnsupportedOperationException();
  }

  public boolean isEnabled() {
    throw new UnsupportedOperationException();
  }

  public String getText() {
    throw new UnsupportedOperationException();
  }

  public List<WebElement> findElements(By by) {
    throw new UnsupportedOperationException();
  }

  public WebElement findElement(By by) {
    throw new UnsupportedOperationException();
  }

  public boolean isDisplayed() {
    throw new UnsupportedOperationException();
  }

  public Point getLocation() {
    throw new UnsupportedOperationException();
  }

  public Dimension getSize() {
    throw new UnsupportedOperationException();
  }

  public Rectangle getRect() {
    throw new UnsupportedOperationException();
  }

  public String getCssValue(String propertyName) {
    throw new UnsupportedOperationException();
  }

  public <X> X getScreenshotAs(OutputType<X> outputType) throws WebDriverException {
    throw new UnsupportedOperationException();
  }
}


text:
<?php

namespace Prooph\ServiceBus\Exception;

use Prooph\Common\Event\ActionEvent;

/**
 * Class MessageDispatchException
 *
 * @package Prooph\ServiceBus\Exception
 * @author Alexander Miertsch <kontakt@codeliner.ws>
 */
class MessageDispatchException extends RuntimeException
{
    /**
     * @var ActionEvent
     */
    protected $actionEvent;

    /**
     * @param ActionEvent $actionEvent
     * @param \Exception $previousException
     * @return MessageDispatchException
     */
    public static function failed(ActionEvent $actionEvent, \Exception $previousException = null)
    {
        $ex = new self(
            sprintf(
                "Message dispatch failed during %s phase.%s",
                $actionEvent->getName(),
                (is_null($previousException))? '' : ' Error: ' . $previousException->getMessage()
            ),
            422,
            $previousException
        );

        $ex->setFailedDispatch($actionEvent);

        return $ex;
    }

    /**
     * @return ActionEvent
     */
    public function getFailedDispatchEvent()
    {
        return $this->actionEvent;
    }

    protected function setFailedDispatch(ActionEvent $actionEvent)
    {
        $this->actionEvent = $actionEvent;
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../">
  <title data-ice="title">Variable | wpxml2md</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">

<meta name="description" content="Convert the WordPress XML file to Markdown files."><meta property="twitter:card" content="summary"><meta property="twitter:title" content="wpxml2md"><meta property="twitter:description" content="Convert the WordPress XML file to Markdown files.">

  Home

  Reference
  Source
  Test

    <input class="search-input">

TCLIOptions

TMdConverter

TModes

TReplaceLinkPrefix

EWritableStream

binFCLI

libCLogger

CUtil

FComment

FConvert

FImageLinkReplacer

FConvertShortCode

FWordPressXmlToMarkdown

VGfmConverters

VMarkdownConverters

Variable

Static Public Summary

      public

          GfmConverters: Array<MdConverter>

Convert the HTML DOM Node to GFM (GitHub Flavored Markdown) text.

      public

          MarkdownConverters: MdConverter[]

Convert the HTML DOM Node to Markdown text.

Static Public

    public

    GfmConverters: Array<MdConverter>

      source

import GfmConverters from 'wpxml2md/src/lib/gfm.js'

Convert the HTML DOM Node to GFM (GitHub Flavored Markdown) text.

See:

https://github.com/domchristie/to-markdown/blob/master/lib/gfm-converters.js

    public

    MarkdownConverters: MdConverter[]

      source

import MarkdownConverters from 'wpxml2md/src/lib/markdown.js'

Convert the HTML DOM Node to Markdown text.

See:

https://github.com/domchristie/to-markdown/blob/master/lib/md-converters.js

  Generated by ESDoc(1.1.0)


text:
#import "LoggerDataEntry.h"
#import "NullStringCheck.h"

@interface LoggerDataEntry()
static void _split_dir_only(char**, const char*);
@end

@implementation LoggerDataEntry
{
	LoggerMessageType				_dataType;
	NSString						*_filepath;
	char							*_fpath_dir_part;
	NSString						*_dirOfFilepath;
	NSMutableArray					*_dataOperations;
	NSData							*_data;
}
@synthesize dataType = _dataType;
@synthesize filepath = _filepath;
@synthesize dirOfFilepath = _dirOfFilepath;
@synthesize dataOperations = _dataOperations;
@synthesize data = _data;

// This function come from ephemient of stackoverflow
//http://stackoverflow.com/questions/1575278/function-to-split-a-filepath-into-path-and-file/1575314#1575314
void
_split_dir_only(char** p, const char *pf)
{
    char *slash = (char *)pf, *next;
    while ((next = strpbrk(slash + 1, "\\/"))) slash = next;
    if (pf != slash) slash++;
    *p = strndup(pf, slash - pf);
}

-(id)initWithFilepath:(NSString *)aFilepath type:(LoggerMessageType)aType
{
	self = [super init];

	if(self)
	{
		_dataType = aType;

		// should never pass a null string
		assert(!IS_NULL_STRING(aFilepath));

		_filepath = [aFilepath retain];

		// split diretory part from file path
		_fpath_dir_part = NULL;
		_split_dir_only(&_fpath_dir_part,[aFilepath UTF8String]);

		// this is an error. should never happpen
		assert(_fpath_dir_part != NULL);

		// in case when you want to write a file at basepath...
		if(strlen(_fpath_dir_part) == 0)
		{
			//clean up and proceed
			free(_fpath_dir_part),_fpath_dir_part = NULL;
			_dirOfFilepath = nil;
		}
		// we have proper dir part of filepath now.
		else
		{
			_dirOfFilepath = \
				[[NSString alloc]
				 initWithBytesNoCopy:_fpath_dir_part
				 length:strlen(_fpath_dir_part)
				 encoding:NSASCIIStringEncoding
				 freeWhenDone:NO];
		}

		_dataOperations = [[NSMutableArray alloc] initWithCapacity:0];

	}
	return self;
}

-(void)dealloc
{
	[_filepath release],_filepath = nil;

	if(_dirOfFilepath != nil)
	{
		[_dirOfFilepath release],_dirOfFilepath = nil;
	}

	if(_fpath_dir_part != NULL)
	{
		free(_fpath_dir_part),_fpath_dir_part = NULL;
	}

	[_dataOperations removeAllObjects];
	[_dataOperations release],_dataOperations = nil;

	if(_data != nil)
	{
		[_data release],_data = nil;
	}

	[super dealloc];
}

-(NSInteger)totalDataLength
{
	return ([_filepath length] + [_dirOfFilepath length] + [_data length]);
}

@end


text:
var mongoose = require('mongoose')

var Room = mongoose.model('Room', {
    name: String,
    title:String,
    event_color: String
});

mongoose.model('Room', Room);


text:
import {CSS} from '../../../build/amp-delight-player-0.1.css';
import {Deferred} from '../../../src/utils/promise';
import {Services} from '../../../src/services';
import {VideoAttributes, VideoEvents} from '../../../src/video-interface';
import {
  createFrameFor,
  objOrParseJson,
  originMatches,
  redispatch,
} from '../../../src/iframe-video';
import {dict} from '../../../src/utils/object';
import {getData, listen, listenOncePromise} from '../../../src/event-helper';
import {htmlFor} from '../../../src/static-template';
import {installVideoManagerForDoc} from '../../../src/service/video-manager-impl';
import {isLayoutSizeDefined} from '../../../src/layout';
import {removeElement} from '../../../src/dom';
import {setStyle} from '../../../src/style';
import {userAssert} from '../../../src/log';

/** @const */
const TAG = 'amp-delight-player';

/**
 * TODO: export this from a lower level, like 'src'
 * @private @const
 * */
const ANALYTICS_EVENT_TYPE_PREFIX = 'video-custom-';

/** @const @enum {string} */
const DelightEvent = {
  READY: 'x-dl8-to-parent-ready',
  PLAYING: 'x-dl8-to-parent-playing',
  PAUSED: 'x-dl8-to-parent-paused',
  ENDED: 'x-dl8-to-parent-ended',
  TIME_UPDATE: 'x-dl8-to-parent-timeupdate',
  DURATION: 'x-dl8-to-parent-duration',
  MUTED: 'x-dl8-to-parent-muted',
  UNMUTED: 'x-dl8-to-parent-unmuted',
  ENTERED_FULLSCREEN: 'x-dl8-to-parent-entered-fullscreen',
  EXITED_FULLSCREEN: 'x-dl8-to-parent-exited-fullscreen',
  AD_START: 'x-dl8-to-parent-amp-ad-start',
  AD_END: 'x-dl8-to-parent-amp-ad-end',
  PLAY: 'x-dl8-to-iframe-play',
  PAUSE: 'x-dl8-to-iframe-pause',
  ENTER_FULLSCREEN: 'x-dl8-to-iframe-enter-fullscreen',
  EXIT_FULLSCREEN: 'x-dl8-to-iframe-exit-fullscreen',
  MUTE: 'x-dl8-to-iframe-mute',
  UNMUTE: 'x-dl8-to-iframe-unmute',
  ENABLE_INTERFACE: 'x-dl8-to-iframe-enable-interface',
  DISABLE_INTERFACE: 'x-dl8-to-iframe-disable-interface',
  SEEK: 'x-dl8-to-iframe-seek',
  CUSTOM_TICK: 'x-dl8-to-parent-amp-custom-tick',

  PING: 'x-dl8-ping',
  PONG: 'x-dl8-pong',
  EXPANDED: 'x-dl8-iframe-enter-fullscreen',
  MINIMIZED: 'x-dl8-iframe-exit-fullscreen',
  SCREEN_CHANGE: 'x-dl8-iframe-screen-change',
  WINDOW_ORIENTATIONCHANGE: 'x-dl8-iframe-window-orientationchange',
  WINDOW_DEVICEORIENTATION: 'x-dl8-iframe-window-deviceorientation',
  WINDOW_DEVICEMOTION: 'x-dl8-iframe-window-devicemotion',
};

/** @implements {../../../src/video-interface.VideoInterface} */
class AmpDelightPlayer extends AMP.BaseElement {
  /** @param {!AmpElement} element */
  constructor(element) {
    super(element);

    /** @private {string} */
    this.baseURL_ = 'https://players.delight-vr.com';

    /** @private {string} */
    this.contentID_ = '';

    /** @private {number} */
    this.totalDuration_ = 1;

    /** @private {number} */
    this.currentTime_ = 0;

    /** @private {Array} */
    this.playedRanges_ = [];

    /** @private {boolean} */
    this.isFullscreen_ = false;

    /** @private {Element} */
    this.iframe_ = null;

    /** @private {?Promise} */
    this.playerReadyPromise_ = null;

    /** @private {?Function} */
    this.playerReadyResolver_ = null;

    /** @private {?Function} */
    this.unlistenMessage_ = null;

    /** @private {?Function} */
    this.unlistenScreenOrientationChange_ = null;

    /** @private {?Function} */
    this.unlistenOrientationChange_ = null;

    /** @private {?Function} */
    this.unlistenDeviceOrientation_ = null;

    /** @private {?Function} */
    this.unlistenDeviceMotion_ = null;

    /** @private {HTMLElement} */
    this.placeholderEl_ = null;
  }

  /**
   * @param {boolean=} onLayout
   * @override
   */
  preconnectCallback(onLayout) {
    Services.preconnectFor(this.win).url(
      this.getAmpDoc(),
      this.baseURL_,
      onLayout
    );
  }

  /** @override */
  renderOutsideViewport() {
    return false;
  }

  /** @override */
  buildCallback() {
    this.contentID_ = userAssert(
      this.element.getAttribute('data-content-id'),
      'The data-content-id attribute is required'
    );

    const deferred = new Deferred();
    this.playerReadyPromise_ = deferred.promise;
    this.playerReadyResolver_ = deferred.resolve;

    installVideoManagerForDoc(this.element);
    Services.videoManagerForDoc(this.element).register(this);
  }

  /** @override */
  layoutCallback() {
    const src = `${this.baseURL_}/player/${this.contentID_}?amp=1`;
    const iframe = createFrameFor(this, src);

    iframe.setAttribute('allow', 'vr');

    this.unlistenMessage_ = listen(this.win, 'message', (event) => {
      this.handleDelightMessage_(event);
    });

    this.iframe_ = iframe;

    this.registerEventHandlers_();

    return this.loadPromise(iframe);
  }

  /** @override */
  unlayoutCallback() {
    if (this.element.hasAttribute(VideoAttributes.DOCK)) {
      return false; // do nothing, do not relayout
    }

    if (this.iframe_) {
      removeElement(this.iframe_);
      this.iframe_ = null;
    }
    if (this.unlistenMessage_) {
      this.unlistenMessage_();
    }

    const deferred = new Deferred();
    this.playerReadyPromise_ = deferred.promise;
    this.playerReadyResolver_ = deferred.resolve;

    this.unregisterEventHandlers_();

    return true;
  }

  /** @override */
  isLayoutSupported(layout) {
    return isLayoutSizeDefined(layout);
  }

  /** @override */
  createPlaceholderCallback() {
    const html = htmlFor(this.element);
    const placeholder = html`
      <div placeholder><amp-img layout="fill"></amp-img></div>
    `;

    const src = `${this.baseURL_}/poster/${this.contentID_}`;

    placeholder.firstElementChild.setAttribute('src', src);

    this.placeholderEl_ = /** @type {HTMLElement} */ (placeholder);

    return placeholder;
  }

  /** @override */
  firstLayoutCompleted() {
    const el = this.placeholderEl_;
    let promise = null;
    if (el && this.isInViewport()) {
      el.classList.add('i-amphtml-delight-player-faded');
      promise = listenOncePromise(el, 'transitionend');
    } else {
      promise = Promise.resolve();
    }
    return promise.then(() => super.firstLayoutCompleted());
  }

  /** @override  */
  pauseCallback() {
    if (this.iframe_ && this.iframe_.contentWindow) {
      this.pause();
    }
  }

  /** @override */
  resumeCallback() {
    if (this.iframe_ && this.iframe_.contentWindow) {
      this.play(false);
    }
  }

  /**
   * @param {!Event} event
   * @private
   */
  handleDelightMessage_(event) {
    if (!originMatches(event, this.iframe_, /.*/)) {
      return;
    }

    const data = objOrParseJson(getData(event));
    if (!data || !data['type']) {
      return; // We only process valid JSON.
    }

    const {element} = this;

    const redispatched = redispatch(element, data['type'], {
      [DelightEvent.PLAYING]: VideoEvents.PLAYING,
      [DelightEvent.PAUSED]: VideoEvents.PAUSE,
      [DelightEvent.ENDED]: VideoEvents.ENDED,
      [DelightEvent.MUTED]: VideoEvents.MUTED,
      [DelightEvent.UNMUTED]: VideoEvents.UNMUTED,
      [DelightEvent.AD_START]: VideoEvents.AD_START,
      [DelightEvent.AD_END]: VideoEvents.AD_END,
    });

    if (redispatched) {
      return;
    }

    switch (data['type']) {
      case DelightEvent.PING: {
        const guid = data['guid'];
        if (guid) {
          this.iframe_.contentWindow./*OK*/ postMessage(
            JSON.stringify(
              /** @type {JsonObject} */ ({
                type: DelightEvent.PONG,
                guid,
                idx: 0,
              })
            ),
            '*'
          );
        }
        break;
      }
      case DelightEvent.READY: {
        element.dispatchCustomEvent(VideoEvents.LOAD);
        this.playerReadyResolver_(this.iframe_);
        break;
      }
      case DelightEvent.TIME_UPDATE: {
        const payload = data['payload'];
        this.currentTime_ = payload.currentTime;
        this.playedRanges_ = payload.playedRanges;
        break;
      }
      case DelightEvent.DURATION: {
        const payload = data['payload'];
        this.totalDuration_ = payload.duration;
        break;
      }
      case DelightEvent.EXPANDED: {
        this.setFullHeight_();
        break;
      }
      case DelightEvent.MINIMIZED: {
        this.setInlineHeight_();
        break;
      }
      case DelightEvent.ENTERED_FULLSCREEN: {
        this.isFullscreen_ = true;
        break;
      }
      case DelightEvent.EXITED_FULLSCREEN: {
        this.isFullscreen_ = false;
        break;
      }
      case DelightEvent.CUSTOM_TICK: {
        const payload = data['payload'];
        this.dispatchCustomAnalyticsEvent_(payload.type, payload);
        break;
      }
    }
  }

  /**
   * @param {string} eventType The eventType must be prefixed with video-custom- to prevent naming collisions with other analytics event types.
   * @param {!Object<string, string>=} vars
   */
  dispatchCustomAnalyticsEvent_(eventType, vars) {
    this.element.dispatchCustomEvent(
      VideoEvents.CUSTOM_TICK,
      dict({
        'eventType': ANALYTICS_EVENT_TYPE_PREFIX + eventType,
        'vars': vars,
      })
    );
  }

  /**
   * Sends a command to the player through postMessage.
   * @param {string} type
   * @param {Object=} payload
   * @private
   */
  sendCommand_(type, payload = {}) {
    this.playerReadyPromise_.then((iframe) => {
      if (iframe && iframe.contentWindow) {
        iframe.contentWindow./*OK*/ postMessage(
          JSON.stringify(/** @type {JsonObject} */ ({type, payload})),
          '*'
        );
      }
    });
  }

  /**
   * Expands the player's height in the DOM
   * @private
   */
  setFullHeight_() {
    setStyle(this.iframe_, 'position', 'fixed');
  }

  /**
   * Retracts the player's height in the DOM
   * @private
   */
  setInlineHeight_() {
    setStyle(this.iframe_, 'position', 'absolute');
  }

  /**
   * Register event handlers to pass events to iframe
   * @private
   */
  registerEventHandlers_() {
    const dispatchScreenOrientationChangeEvents = () => {
      const orientation =
        window.screen.orientation ||
        window.screen.mozOrientation ||
        window.screen.msOrientation;
      this.sendCommand_(DelightEvent.SCREEN_CHANGE, {
        orientation: {
          angle: orientation.angle,
          type: orientation.type,
        },
      });
    };
    const dispatchOrientationChangeEvents = () => {
      const {orientation} = window;
      this.sendCommand_(DelightEvent.WINDOW_ORIENTATIONCHANGE, {
        orientation,
      });
    };
    const dispatchDeviceOrientationEvents = (event) => {
      this.sendCommand_(DelightEvent.WINDOW_DEVICEORIENTATION, {
        alpha: event.alpha,
        beta: event.beta,
        gamma: event.gamma,
        absolute: event.absolute,
        timeStamp: event.timeStamp,
      });
    };
    const dispatchDeviceMotionEvents = (event) => {
      const payload = {
        interval: event.interval,
        timeStamp: event.timeStamp,
      };
      if (event.acceleration) {
        Object.assign(payload, {
          acceleration: {
            x: event.acceleration.x,
            y: event.acceleration.y,
            z: event.acceleration.z,
          },
        });
      }
      if (event.accelerationIncludingGravity) {
        Object.assign(payload, {
          accelerationIncludingGravity: {
            x: event.accelerationIncludingGravity.x,
            y: event.accelerationIncludingGravity.y,
            z: event.accelerationIncludingGravity.z,
          },
        });
      }
      if (event.rotationRate) {
        Object.assign(payload, {
          rotationRate: {
            alpha: event.rotationRate.alpha,
            beta: event.rotationRate.beta,
            gamma: event.rotationRate.gamma,
          },
        });
      }
      this.sendCommand_(DelightEvent.WINDOW_DEVICEMOTION, payload);
    };
    if (window.screen) {
      const screen =
        window.screen.orientation ||
        window.screen.mozOrientation ||
        window.screen.msOrientation;
      if (screen && screen.addEventListener) {
        this.unlistenScreenOrientationChange_ = listen(
          screen,
          'change',
          dispatchScreenOrientationChangeEvents
        );
      } else {
        this.unlistenOrientationChange_ = listen(
          this.win,
          'orientationchange',
          dispatchOrientationChangeEvents
        );
      }
    } else {
      this.unlistenOrientationChange_ = listen(
        this.win,
        'orientationchange',
        dispatchOrientationChangeEvents
      );
    }
    this.unlistenDeviceOrientation_ = listen(
      this.win,
      'deviceorientation',
      dispatchDeviceOrientationEvents
    );
    this.unlistenDeviceMotion_ = listen(
      this.win,
      'devicemotion',
      dispatchDeviceMotionEvents
    );
  }

  /**
   * Unregister event handlers that pass events to iframe
   * @private
   */
  unregisterEventHandlers_() {
    if (this.unlistenScreenOrientationChange_) {
      this.unlistenScreenOrientationChange_();
    }
    if (this.unlistenOrientationChange_) {
      this.unlistenOrientationChange_();
    }
    if (this.unlistenDeviceOrientation_) {
      this.unlistenDeviceOrientation_();
    }
    if (this.unlistenDeviceMotion_) {
      this.unlistenDeviceMotion_();
    }
  }

  // VideoInterface Implementation. See ../src/video-interface.VideoInterface

  /** @override */
  supportsPlatform() {
    return true;
  }

  /** @override */
  isInteractive() {
    return true;
  }

  /** @override */
  play(unusedIsAutoplay) {
    this.sendCommand_(DelightEvent.PLAY);
  }

  /** @override */
  pause() {
    this.sendCommand_(DelightEvent.PAUSE);
  }

  /** @override */
  mute() {
    this.sendCommand_(DelightEvent.MUTE);
  }

  /** @override */
  unmute() {
    this.sendCommand_(DelightEvent.UNMUTE);
  }

  /** @override */
  showControls() {
    this.sendCommand_(DelightEvent.ENABLE_INTERFACE);
  }

  /** @override */
  hideControls() {
    this.sendCommand_(DelightEvent.DISABLE_INTERFACE);
  }

  /**
   * @override
   */
  fullscreenEnter() {
    this.sendCommand_(DelightEvent.ENTER_FULLSCREEN);
  }

  /**
   * @override
   */
  fullscreenExit() {
    this.sendCommand_(DelightEvent.EXIT_FULLSCREEN);
  }

  /** @override */
  isFullscreen() {
    return this.isFullscreen_;
  }

  /** @override */
  getMetadata() {
    // Not implemented
  }

  /** @override */
  preimplementsMediaSessionAPI() {
    return false;
  }

  /** @override */
  preimplementsAutoFullscreen() {
    return false;
  }

  /** @override */
  getCurrentTime() {
    return this.currentTime_;
  }

  /** @override */
  getDuration() {
    return this.totalDuration_;
  }

  /** @override */
  getPlayedRanges() {
    return /** @type {!Array<Array<number>>} */ (this.playedRanges_);
  }

  /** @override */
  seekTo(time) {
    this.sendCommand_(DelightEvent.SEEK, {time});
  }
}

AMP.extension(TAG, '0.1', (AMP) => {
  AMP.registerElement(TAG, AmpDelightPlayer, CSS);
});


text:
#ifndef DALE_OPERATION_COERCE
#define DALE_OPERATION_COERCE

#include "../../Context/Context.h"
#include "../../Node/Node.h"
#include "../../ParseResult/ParseResult.h"
#include "../../Type/Type.h"

#include "../../llvm_Function.h"
#include "../../llvm_IRBuilder.h"
#include "../../llvm_Module.h"

namespace dale {
namespace Operation {
/*! Coerce a value from one type to another.
 *  @param ctx The current context.
 *  @param block The current block.
 *  @param value The value to be cast.
 *  @param from_type The type from which the value should be cast.
 *  @param to_type The type to which the value should be cast.
 *  @param pr The parse result for the coercion result.
 *
 *  The coercion operation is akin to cast, except that it only
 *  applies when the from type is a char array and the to type is a
 *  char pointer.
 */
bool Coerce(Context *ctx, llvm::BasicBlock *block, llvm::Value *value,
            Type *from_type, Type *to_type, ParseResult *pr);
}
}

#endif


text:
'''
Implementation of simple JSON serialization mechanism.
'''

from __future__ import absolute_import

import json

from whmonit.common.time import datetime_to_milliseconds, milliseconds_to_datetime

from .base import TypeRegistrySerializationBase, DeserializationError

class JSONTypeRegistrySerializer(TypeRegistrySerializationBase):
    '''JSON Serializer implementation.'''

    # Most of the methods could be functions but we want to keep methods.
    # pylint: disable=R0201

    # `schema` is not always used but this is the method interface.
    # pylint: disable=W0613

    # Methods are named after types so can contains CamelCase.
    # pylint: disable=C0103

    # There is probably not much sense in documenting these methods with
    # docstrings.
    # pylint: disable=C0111

    # R0903: Too many public methods
    # pylint: disable=R0904

    signature = 1

    def serialize_bool(self, data):
        return json.dumps(data)

    def deserialize_bool(self, data, schema):
        return json.loads(data)

    def serialize_float(self, data):
        return json.dumps(data)

    def deserialize_float(self, data, schema):
        return json.loads(data)

    def serialize_str(self, data):
        return json.dumps(data)

    def deserialize_str(self, data, schema):
        return str(json.loads(data))

    def serialize_datetime(self, data):
        return str(datetime_to_milliseconds(data))

    def deserialize_datetime(self, data, schema):
        # TODO #704: Too short time ranges.
        # nanotime has different time range than python/c datetime so there
        # might be.
        # `datetime` has range as (1, 2038),
        # `nanotime` has range as (1970, 2554).
        return milliseconds_to_datetime(int(data))

    def serialize_TimeSeries(self, data):
        serialized = []
        for key, value in data.iteritems():
            serialized.append([self.serialize(key), self.serialize(value)])
        return json.dumps(serialized)

    def deserialize_TimeSeries(self, serialized_data, schema):
        # TODO #601: Optimize serialization/deserialization.
        # Current implementation is not pretty, it needs 2x memory of actual
        # data to deserialize it :(.

        expected_type = self.schema_to_type(schema)
        sub_schema = self._unwrap_series(schema)[0]

        value_deserializer = self._select_deserializer(expected_type.item_type)
        deserialized_data = json.loads(serialized_data)
        data = expected_type()

        if not isinstance(deserialized_data, list):
            raise DeserializationError()
        for item in deserialized_data:
            if not isinstance(item, list) or len(item) is not 2:
                raise DeserializationError()
            data.add(self.deserialize_datetime(item[0], 'datetime'),
                     value_deserializer(item[1], sub_schema))

        return data

    def serialize_IntervalSeries(self, data):
        serialized = [
            [self.serialize(key[0]), self.serialize(key[1]), self.serialize(value)]
            for key, value in data.iteritems()]
        return json.dumps(serialized)

    def deserialize_IntervalSeries(self, serialized_data, schema):
        # TODO #1408: Implement real serialization of IntervalSeries

        expected_type = self.schema_to_type(schema)
        sub_schema = self._unwrap_series(schema)[0]

        value_deserializer = self._select_deserializer(expected_type.item_type)
        deserialized_data = json.loads(serialized_data)
        data = expected_type()

        if not isinstance(deserialized_data, list):
            raise DeserializationError()
        for item in deserialized_data:
            if not isinstance(item, list) or len(item) != 3:
                raise DeserializationError()
            data.add(
                (self.deserialize_datetime(item[0], 'datetime'),
                 self.deserialize_datetime(item[1], 'datetime')),
                value_deserializer(item[2], sub_schema))

        return data

    def serialize_ID(self, data):
        return json.dumps(str(data))

    def deserialize_ID(self, data, schema):
        expected_type = self.schema_to_type(schema)
        return expected_type(str(json.loads(data)))

    def serialize_SensorName(self, data):
        return json.dumps(str(data))

    def deserialize_SensorName(self, data, schema):
        expected_type = self.schema_to_type(schema)
        return expected_type(str(json.loads(data))[:16])

    def serialize_LogDBConfigEntry(self, data):
        _dict = {
            "config_id": self.serialize(data.config_id),
            "target_id": self.serialize(data.target_id),
            "agent_id": self.serialize(data.agent_id),
            "sensor_name": self.serialize(data.sensor_name),
            "stream_name": self.serialize(data.stream_name),
            "timestamp": self.serialize(data.timestamp),
            "config": self.serialize(data.config)
        }
        return json.dumps(_dict)

    def deserialize_LogDBConfigEntry(self, data, schema):
        expected_type = self.schema_to_type(schema)
        _dict = json.loads(data)
        return expected_type(
            self.deserialize(_dict["config_id"], "ID"),
            self.deserialize(_dict["target_id"], "ID"),
            self.deserialize(_dict["agent_id"], "ID"),
            self.deserialize(_dict["sensor_name"], "SensorName"),
            self.deserialize(_dict["stream_name"], "StreamName"),
            self.deserialize(_dict["timestamp"], "datetime"),
            self.deserialize(_dict["config"], "SensorConfig")
        )

    def serialize_SensorConfig(self, data):
        return json.dumps(data)

    def deserialize_SensorConfig(self, data, schema):
        expected_type = self.schema_to_type(schema)
        return expected_type(json.loads(data))

    def serialize_StreamName(self, data):
        return json.dumps(str(data))

    def deserialize_StreamName(self, data, schema):
        expected_type = self.schema_to_type(schema)
        return expected_type(str(json.loads(data)))

    def serialize_AgentRequestChunk(self, data):
        _dict = {
            'config_id': self.serialize(data.config_id),
            'stream_name': self.serialize(data.stream_name),
            'timestamp': self.serialize(data.timestamp),
            'data': self.pack(data.data)
        }
        return json.dumps(_dict)

    def deserialize_AgentRequestChunk(self, data, schema):
        expected_type = self.schema_to_type(schema)
        _dict = json.loads(data)
        return expected_type(
            self.deserialize(_dict['config_id'], "ID"),
            self.deserialize(_dict['stream_name'], "StreamName"),
            self.deserialize(_dict['timestamp'], "datetime"),
            self.unpack(_dict['data'])
        )

    def serialize_AgentRequest(self, data):
        serialized = []
        for req in data:
            serialized.append(self.serialize(req))
        return json.dumps(serialized)

    def deserialize_AgentRequest(self, data, schema):
        _list = self.schema_to_type(schema)()
        for req in json.loads(data):
            _list.append(self.deserialize(req, 'AgentRequestChunk'))
        return _list

    def serialize_CertificateState(self, data):
        return json.dumps(str(data))

    def deserialize_CertificateState(self, data, schema):
        expected_type = self.schema_to_type(schema)
        return expected_type(str(json.loads(data)))


text:
<?xml version="1.0" encoding="UTF-8"?>
<workingSetManager>
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1384778826523_0" label="Window Working Set" name="Aggregate for window 1384778826520"/>
</workingSetManager>


text:
package me.fallblank.weiworld.util;

import android.content.Context;

import com.sina.weibo.sdk.net.NetUtils;

import me.fallblank.weiworld.R;

import static com.sina.weibo.sdk.openapi.legacy.CommonAPI.CAPITAL.g;
import static com.sina.weibo.sdk.openapi.legacy.CommonAPI.CAPITAL.m;

/**
 * Created by fallb on 2017/4/19.
 */

public class ColorGenerator {

    private int[] sColorTable;
    private int mLength;
    private static ColorGenerator mInstance;

    private ColorGenerator(Context context) {
        sColorTable = context.getResources().getIntArray(R.array.colorCard);
        mLength = sColorTable.length;
    }

    public int generate() {
        int index = (int) (Math.random() * mLength);
        return sColorTable[index];
    }

    public static int genetateColor(Context context) {
        if (null == mInstance) {
            synchronized (ColorGenerator.class) {
                if (null == mInstance) {
                    mInstance = new ColorGenerator(context);
                }
            }
        }
        return mInstance.generate();
    }
}


text:
package org.insightech.er.editor.view.action.line;

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

import org.eclipse.gef.EditPart;
import org.eclipse.gef.ui.actions.MatchHeightAction;
import org.eclipse.ui.IWorkbenchPart;
import org.insightech.er.ERDiagramActivator;
import org.insightech.er.ImageKey;
import org.insightech.er.editor.controller.editpart.element.node.column.NormalColumnEditPart;

public class ERDiagramMatchHeightAction extends MatchHeightAction {

    public ERDiagramMatchHeightAction(final IWorkbenchPart part) {
        super(part);
        setImageDescriptor(ERDiagramActivator.getImageDescriptor(ImageKey.MATCH_HEIGHT));
        setDisabledImageDescriptor(null);
    }

    @SuppressWarnings("unchecked")
    @Override
    protected List getSelectedObjects() {
        final List objects = new ArrayList(super.getSelectedObjects());
        boolean first = true;

        for (final Iterator iter = objects.iterator(); iter.hasNext();) {
            final Object object = iter.next();

            if (!(object instanceof EditPart)) {
                iter.remove();

            } else {
                final EditPart editPart = (EditPart) object;
                if (editPart instanceof NormalColumnEditPart) {
                    iter.remove();

                } else {
                    if (first) {
                        editPart.setSelected(2);
                        first = false;
                    }
                }
            }
        }

        return objects;
    }

}


text:
{-# LANGUAGE ViewPatterns #-}
import Control.Exception
import Control.Monad
import Data.Foldable (for_)
import Foreign
import System.Environment

import Data.Vector.Storable (Vector)
import System.Posix.Files
import System.Posix.IO

import System.Posix.MemoryManagement

main :: IO ()
main = do
  args <- getArgs
  for_ args $ residency >=> print

residency :: FilePath -> IO (Vector Residency)
residency path = bracket open close $ \fd -> do
  (fromIntegral . fileSize -> size) <- getFdStatus fd
  bracket
    (mmap nullPtr size PROT_NONE MAP_SHARED fd 0)
    (flip munmap size)
    (flip mincore size)
  where
    open = openFd path ReadOnly Nothing defaultFileFlags
    close = closeFd


text:
h1 {  font-family: Arial, Helvetica, sans-serif; font-size: large; font-weight: bold; color: #000066}
h2 {  font-family: Arial, Helvetica, sans-serif; font-size: large; font-weight: bold; color: #000066}
h3 {  font-size: large; font-style: italic; font-weight: bold; color: #000066}
h4 {  font-style: italic; font-weight: bold; color: #000066}
.YouAreHere {  font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000099}
.subscript {  font-size: 8pt; vertical-align: sub}
.boxTitle {  font-weight: bold}
.box { background-color: #ffffff; valign=top; border: solid grey; margin: 5pt 10pt; }


text:
TisprCardStack
============

The tispr  left/right feature. Cards UI

Ever wanted to know how to code the UI for the swipe left/right feature?
	•	in Swift
	•	for iOS8

please pay attention:
- 0.2.x versions with swift 2.0
- 0.1.x versions with swift 1.2

Installation: With tools
------------

###[CocoaPods](http://cocoapods.org/):
In your `Podfile`:

*swift 1.2*
```
pod "TisprCardStack"
```
*swift 2.0*
```
pod 'TisprCardStack', '~> 0.2.0beta1'
```
And in your `*.swift`:
```swift
import TisprCardStack
```

###Installation: Manual
Add `TisprCardStackViewCell.swift`,`TisprCardStackViewController.swift`, `TisprCardStackViewLayout.swift` into your Xcode project.

Usage start
-----
1. Create controller 'TisprCardStackViewController' with 'TisprCardStackViewLayout' collectionViewLayout

2. Configuration TisprCardStackViewController,

  ```swift
        setAnimationSpeed(0.85)
        setCardSize(size)
  ```

3. then specify count of cards,
  ```swift
  func numberOfCards() -> Int {}
  ```

4. return cards by index:
  ```swift
  card(collectionView: UICollectionView, cardForItemAtIndexPath indexPath: NSIndexPath) -> TisprCardStackViewCell {}
  ```

Additional features/options
-----
1. Adding a new card: How to call the animation:

  ```swift
func newCardWasAdded()
  ```

1. How to configure the amount of visible cards in each stack (top and bottom):
  ```swift
        layout.topStackMaximumSize = 4
        layout.bottomStackMaximumSize = 30
        layout.bottomStackCardHeight = 45
  ```

1. Changing card position: How to call the movement of a card from the top to the bottom stack and vice versa:
  ```swift
        moveCardUp()
        moveCardDown()
  ```
1. You can track changing of card stack in method:
  ```swift
	func cardDidChangeState(cardIndex: Int)
   ```

For more detail, see the sample project.

Contact
-------

andrei.pitsko@tispr.com

License
-------
Apache License
                           Version 2.0. See LICENSE.txt


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

namespace NFCoreEx
{
    public class NFCProperty : NFIProperty
    {
        public NFCProperty( NFIDENTID self, string strPropertyName, NFIDataList varData)
        {
            mSelf = self;
            msPropertyName = strPropertyName;
            mVarProperty = new NFCDataList(varData);
        }

        public override void SetValue(NFIDataList varData)
        {
            mVarProperty = varData;
        }

        public override NFIDataList GetValue()
        {
            return mVarProperty;
        }

        public override string GetKey()
        {
            return msPropertyName;
        }

		public override NFIDataList.VARIANT_TYPE GetType()
		{
			return mVarProperty.GetType(0);
		}

        public override Int64 QueryInt()
        {
            return mVarProperty.IntVal(0);
        }

        public override float QueryFloat()
        {
            return mVarProperty.FloatVal(0);
        }

        public override double QueryDouble()
        {
            return mVarProperty.DoubleVal(0);
        }

        public override string QueryString()
        {
            return mVarProperty.StringVal(0);
        }

        public override NFIDENTID QueryObject()
        {
            return mVarProperty.ObjectVal(0);
        }

        public override bool SetInt(Int64 value)
		{
			if (mVarProperty.IntVal(0) != value)
			{
				NFCDataList oldValue = new NFCDataList(mVarProperty);

				mVarProperty.SetInt(0, value);

				NFCDataList newValue = new NFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }

			}

			return true;
		}

		public override bool SetFloat(float value)
		{
			if (mVarProperty.FloatVal(0) - value > 0.01f
				|| mVarProperty.FloatVal(0) - value < -0.01f)
			{
				NFCDataList oldValue = new NFCDataList(mVarProperty);

				mVarProperty.SetFloat(0, value);

				NFCDataList newValue = new NFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
			}

			return true;
		}

		public override bool SetDouble(double value)
		{
            if (mVarProperty.DoubleVal(0) - value > 0.01f
                || mVarProperty.DoubleVal(0) - value < -0.01f)
            {
                NFCDataList oldValue = new NFCDataList(mVarProperty);

                mVarProperty.SetDouble(0, value);

                NFCDataList newValue = new NFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

			return true;
		}

		public override bool SetString(string value)
		{
            if (mVarProperty.StringVal(0) != value)
            {
                NFCDataList oldValue = new NFCDataList(mVarProperty);

                mVarProperty.SetString(0, value);

                NFCDataList newValue = new NFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

			return true;
		}

		public override bool SetObject(NFIDENTID value)
		{

            if (mVarProperty.ObjectVal(0) != value)
            {
                NFCDataList oldValue = new NFCDataList(mVarProperty);

                mVarProperty.SetObject(0, value);

                NFCDataList newValue = new NFCDataList(mVarProperty);

                if (null != doHandleDel)
                {
                    doHandleDel(mSelf, msPropertyName, oldValue, newValue);
                }
            }

			return true;
		}

		public override void RegisterCallback(PropertyEventHandler handler)
		{
			doHandleDel += handler;
		}

		PropertyEventHandler doHandleDel;

		NFIDENTID mSelf;
		string msPropertyName;
		NFIDataList mVarProperty;
    }
}


text:
<?php

namespace ISG\ProjectSubmissionAppBundle\Model;

use ISG\ProjectSubmissionAppBundle\Model\om\BaseProfile;

class Profile extends BaseProfile
{
}


text:
name: Template Parsing
sort: 1
---

# Template Parsing

Beego uses Go's builtin package `html/template` as the template parser.  Upon startup, it will compile and cache the templates into a map for efficient rendering.

## Template Directory

The default template directory for Beego is `views`. Template files can be put in this directory and Beego will parse and cache them automatically. However if the development mode is enabled, Beego parses templates everytime without caching. Beego can only have one template directory which can be customized:

	beego.ViewsPath = "myviewpath"

## Auto Rendering

You don't need to render and output template manually. Beego will call Render automatically after finishing the method. You can disable auto rendering in configuration file or in `main.go` if you don't need it.

In configuration file:

	autorender = false

In main.go:

	beego.AutoRender = false

## Template Tags

Go uses `{{` and `}}` as the default template tags. In the case that these tags confilict with other template tags as in AngularJS, we can use other tags. To do so, add these to the configuration:

	beego.TemplateLeft = "<<<"
	beego.TemplateRight = ">>>"

## Template Data

Template gets its data from `this.Data` in Controller. So for example if you need `{{.Content}}` in template, you need to assign it in Controller first:

	this.Data["Content"] = "value"

Different rendering types:

- struct

  Struct variable:

		type A struct{
			Name string
			Age  int
		}

  Assign value in Controller:

		this.Data["a"]=&A{Name:"astaxie",Age:25}

  Render it in template:

		the username is {{.a.Name}}
		the age is {{.a.Age}}

- map

  Assign value in Controller:

		mp["name"]="astaxie"
		mp["nickname"] = "haha"
		this.Data["m"]=mp

  Render it in template:

		the username is {{.m.name}}
		the username is {{.m.nickname}}

- slice

  Assign value in Controller:

		ss :=[]string{"a","b","c"}
		this.Data["s"]=ss

  Render it in template:

		{{range $key, $val := .s}}
		{{$key}}
		{{$val}}
	    {{end}}

## Template Name

Beego uses Go's builtin template engine, so the syntax is same as Go.  To learn more about template see [Templates](https://github.com/Unknwon/build-web-application-with-golang_EN/blob/master/ebook/07.4.md).

You can set template name in Controller and Beego will find the template file under the viewpath and render it automatically. In the config below, Beego will find add.tpl under admin and render it.

	this.TplNames = "admin/add.tpl"

Beego supports `.tpl` and `.html` file extensions by default. If you're using other extensions, you must set it in the configuration first:

	beego.AddTemplateExt("file_extension_you_needed")

If TplNames is not set in Controller while `autorender` is enabled, Beego will use TplNames below by default:

	c.TplNames = strings.ToLower(c.controllerName) + "/" + strings.ToLower(c.actionName) + "." + c.TplExt

It is Controller name + "/" + request method name + "." + template extension. So if the Controller name is `AddController`, request method is `POST` and the default template extension is `tpl`, Beego will render `/viewpath/addcontroller/post.tpl` template file.

## Layout Design

Beego supports layout design. For example, if in your application the main navigation and footer don't change and only the content part is different, you can use a layout like this:

	this.Layout = "admin/layout.html"
	this.TplNames = "admin/add.tpl"

In `layout.html` you must set a variable like this:

	{{.LayoutContent}}

Beego will parse file of `TplNames` and assign it to `LayoutContent` then render `layout.html`.

Beego will cache all the template files. You can also implement a layout this way:

	{{template "header.html"}}
	Logic code
	{{template "footer.html"}}

## LayoutSection

`LayoutContent` is a little complicated, as it can include Javascript and CSS. Since in most situations having only one `LayoutContent` is not enough, there is an attribute called `LayoutSections` in `Controller`. It allows us to set multiple `section` in `Layout` page and each `section` can contain its own sub-template page.

layout_blog.tpl:

```
<!DOCTYPE html>
<html>
<head>
    <title>Lin Li</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
    {{.HtmlHead}}
</head>
<body>

    <div class="container">
        {{.LayoutContent}}
    </div>
    <div>
        {{.SideBar}}
    </div>
    <script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
    <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    {{.Scripts}}
</body>
</html>
```

html_head.tpl:

```
<style>
     h1 {
        color: red;
     }
</style>
```

scripts.tpl:

```
<script type="text/javascript">
    $(document).ready(function() {
        // bla bla bla
    });
</script>
```

Here is the logic in Controller:

```
type BlogsController struct {
    beego.Controller
}

func (this *BlogsController) Get() {
    this.Layout = "layout_blog.tpl"
    this.TplNames = "blogs/index.tpl"
    this.LayoutSections = make(map[string]string)
    this.LayoutSections["HtmlHead"] = "blogs/html_head.tpl"
    this.LayoutSections["Scripts"] = "blogs/scripts.tpl"
    this.LayoutSections["Sidebar"] = ""
}
```

## renderform

Define struct:

	type User struct {
		Id    int         `form:"-"`
		Name  interface{} `form:"username"`
		Age   int         `form:"age,text,age:"`
		Sex   string
		Intro string `form:",textarea"`
	}

* StructTag definition uses `form` as tag. It uses same tags as [Parse Form](../controller/params.md#parse-to-struct). There are three optional params separated by ',':

  * The first param is `name` attribute of the form field. If empty, will use `struct field name` as the value.
  * The second param is the form field type. If empty, it is assumed as `text`.
  * The third param is the tag of form field. If empty, will use `struct field name` as the tag name.

* If the `form` tag only has one value, it is the `name` attribute of the form field. Except last value can be ignore all the other place must be separated by ','. E.g.: `form:",,username:"`

* To ignore a field there are two ways:
  * The first one is to use lowercase for the field name in the struct.
  * The second one is to set `-` as the value of `form` tag.

controller:

	func (this *AddController) Get() {
	    this.Data["Form"] = &User{}
	    this.TplNames = "index.tpl"
	}

The param of Form must be a pointor to a struct.

template:

	<form action="" method="post">
	{{.Form | renderform}}
	</form>

The code above will generate the form below:

```
	Name: <input name="username" type="text" value="test"></br>
	Age: <input name="age" type="text" value="0"></br>
	Gender: <input name="Sex" type="text" value=""></br>
	Intro: <input name="Intro" type="textarea" value="">
```


text:
require 'spec_helper'

describe 'avatar', :type => :request, :js => true do

  def test_img(avatar)
    find('img')[:src].should match /\/avatars\/#{avatar.id}$/
  end

  let(:user) { User.create }
  before(:each) { visit edit_user_path(user) }

  it 'should not be auto associated' do
    within '.edit_user' do
      attach_sample :jpg
      avatar = Avatar.last
      test_img avatar
      avatar.user.should == nil
    end
  end

  it 'should not be replaced by an invalid file' do
    within '.edit_user' do
      attach_sample :jpg
      avatar = Avatar.last
      attach_sample :pdf
      test_img avatar
    end
  end

  it 'should be associated after submit' do
    within '.edit_user' do
      attach_sample :jpg
      avatar = Avatar.last
      click_button 'Update User'
      test_img avatar
      attach_sample :jpg
      new_avatar = Avatar.last
      click_button 'Update User'
      test_img new_avatar
      Avatar.exists?(avatar).should == false
    end
  end

  it 'should allow asynchronous upload' do
    Avatar.destroy_all
    within '.edit_user' do
      5.times { attach_sample :jpg, 0 }
      attach_sample :png
      click_button 'Update User'
      user.avatar.mimetype.should == 'image/png'
    end
  end

end


text:
const i     = require("bt-cyclejs");
const path  = require("path");

const _path = path.resolve(process.cwd(), "./public222");
console.log(_path);

i.buildWebApp(path.resolve(process.cwd(), "./public222"));


text:
require 'prosper/api'

require 'minitest/spec'
require 'minitest/autorun'

describe Prosper::Api::LancamentoFinanceiro do

  # tá comentado porque essa base tá vazia

  # before do
  #   @prosper_lancamento_financeiro = Prosper::Api::LancamentoFinanceiro.new( {
  #     :id                 => 9999,
  #     :valor              => 100,
  #     :data               => '2014-01-30',
  #     :data_prevista      => '2014-01-30',
  #     :descricao          => "Pagamento de Comissão #1",
  #     :observacoes        => "Pagamento referente às comissões do representante: '<Nome do representante>'\nConsulte o sistema de comissões para mais detalhes.",
  #     :forma_pagamento_id => 1,
  #     :conta_id           => 1,
  #     :link_detalhes      => 'http://localhost:3001/pagamentos_comissao',
  #     :empresa_id         => 1
  #   })
  # end

  # it "deveria listar corretamente" do
  #   @lancamentos = Prosper::Api::LancamentoFinanceiro.all
  #   @lancamentos.count.must_be :>, 0
  #   @lancamentos.first.must_be_instance_of Prosper::Api::LancamentoFinanceiro
  # end

  # it "deveria guardar dados corretamente" do
  #   @prosper_lancamento_financeiro.id.must_equal 9999
  #   @prosper_lancamento_financeiro.valor.must_equal 100
  #   @prosper_lancamento_financeiro.data.must_equal '2014-01-30'
  #   @prosper_lancamento_financeiro.data_prevista.must_equal '2014-01-30'
  #   @prosper_lancamento_financeiro.descricao.must_equal "Pagamento de Comissão #1"
  #   @prosper_lancamento_financeiro.observacoes.must_equal "Pagamento referente às comissões do representante: '<Nome do representante>'\nConsulte o sistema de comissões para mais detalhes."
  #   @prosper_lancamento_financeiro.forma_pagamento_id.must_equal 1
  #   @prosper_lancamento_financeiro.conta_id.must_equal 1
  #   @prosper_lancamento_financeiro.link_detalhes.must_equal 'http://localhost:3001/pagamentos_comissao'
  # end

  # it "deveria recuperar dados corretamente" do
  #   lf = Prosper::Api::LancamentoFinanceiro.find(1363)
  #   lf.valor.to_f.must_equal 39.33

  #   lf = Prosper::Api::LancamentoFinanceiro.find(1363222)
  #   lf.valor.must_equal nil
  # end

  # it "deveria salvar dados corretamente" do
  #   @prosper_lancamento_financeiro.save

  #   lf = Prosper::Api::LancamentoFinanceiro.find(9999)
  #   lf.valor.to_f.must_equal 100
  #   lf.data.must_equal '2014-01-30'
  # end

end


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

  <Prefixes>
  	<Prefix id="rdf" namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
    <Prefix id="rdfs" namespace="http://www.w3.org/2000/01/rdf-schema#" />
    <Prefix id="dcterms" namespace="http://dublincore.org/documents/dcmi-terms/#" />
    <Prefix id="mus" namespace="http://data.doremus.org/ontology/" />
    <Prefix id="cidoc-crm" namespace="http://www.cidoc-crm.org/cidoc-crm/" />
    <Prefix id="frbroo" namespace="http://erlangen-crm.org/efrbroo/" />
  </Prefixes>

    <DataSources>
    <DataSource type="file" id="ontoA">
      <Param name="file" value="../../data/DOREMUS/9-heterogeneities/PP-1.ttl" />
      <Param name="format" value="TURTLE"/>
    </DataSource>
    <DataSource type="file" id="ontoB">
      <Param name="file" value="../../data/DOREMUS/9-heterogeneities/Bnf-1.ttl" />
      <Param name="format" value="TURTLE"/>
    </DataSource>
  </DataSources>
<Blocking blocks="100" />

  <Interlinks>
    <Interlink id="oeuvres">
      <LinkType>owl:sameAs</LinkType>

        <SourceDataset dataSource="ontoA" var="a">
        <RestrictTo>
          ?a a mus:Self_Contained_Expression .
        </RestrictTo>
      </SourceDataset>

      <TargetDataset dataSource="ontoB" var="b">
        <RestrictTo>
          ?b a mus:Self_Contained_Expression .
        </RestrictTo>
      </TargetDataset>
      <LinkageRule>
        <Aggregate type="average">
          <Compare metric="levenshtein" threshold="1">
            <TransformInput function="tokenize">
              <Input path="?a/cidoc-crm:P102_has_title" />
            </TransformInput>
             <TransformInput function="tokenize">
              <Input path="?b/cidoc-crm:P102_has_title" />
            </TransformInput>
          </Compare>
        </Aggregate>
        <Filter limit="1" />
      </LinkageRule>
    </Interlink>
  </Interlinks>

      <Outputs>
        <Output  type="file" minConfidence="0.9">
          <Param name="file" value="accepted_termm_9_C2.nt" />
          <Param name="format" value="ntriples" />
        </Output>
      </Outputs>

</Silk>


text:
<?xml version="1.0"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="view_holiday_pivot">
            <field name="name">hr.holidays.report_pivot</field>
            <field name="model">hr.holidays</field>
            <field name="priority">20</field>
            <field name="arch" type="xml">
                <pivot string="Leaves Summary">
                    <field name="employee_id" type="row"/>
                    <field name="type" type="row"/>
                    <field name="date_from" type="col"/>
                    <field name="number_of_days" type="measure"/>
                </pivot>
            </field>
        </record>

        <record model="ir.ui.view" id="view_holiday_graph">
            <field name="name">hr.holidays.report_graph</field>
            <field name="model">hr.holidays</field>
            <field name="priority">20</field>
            <field name="arch" type="xml">
                <graph string="Leaves Summary">
                    <field name="employee_id"/>
                    <field name="type"/>
                    <field name="number_of_days" type="measure"/>
                </graph>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_hr_available_holidays_report">
            <field name="name">Leaves Analysis</field>
            <field name="res_model">hr.holidays</field>
            <field name="view_type">form</field>
            <field name="view_mode">graph,pivot,calendar,form</field>
            <field name="view_id"></field>  <!-- force empty -->
            <field name="context">{'search_default_leaves':1}</field>
            <field name="search_view_id" ref="view_hr_holidays_filter"/>
        </record>

        <record model="ir.actions.act_window.view" id="action_window_leave_pivot">
            <field name="sequence" eval="2"/>
            <field name="view_mode">pivot</field>
            <field name="view_id" ref="view_holiday_pivot"/>
            <field name="act_window_id" ref="action_hr_available_holidays_report"/>
        </record>
        <record model="ir.actions.act_window.view" id="action_window_leave_graph">
            <field name="sequence" eval="2"/>
            <field name="view_mode">graph</field>
            <field name="view_id" ref="view_holiday_graph"/>
            <field name="act_window_id" ref="action_hr_available_holidays_report"/>
        </record>

        <menuitem
            name="Leaves"
            id="menu_hr_available_holidays_report_tree"
            action="action_hr_available_holidays_report"
            parent="menu_hr_holidays_report" sequence="5" />

    </data>
</openerp>


text:
package com.intel.analytics.zoo.pipeline.api.keras.layers

import com.intel.analytics.bigdl.tensor.Tensor
import com.intel.analytics.bigdl.utils.Shape
import com.intel.analytics.zoo.pipeline.api.keras.models.Sequential
import com.intel.analytics.zoo.pipeline.api.keras.serializer.ModuleSerializationTest

class GetShapeSpec extends KerasBaseSpec {

  "GetShape" should "be test" in {
    val seq = Sequential[Float]()
    val input = InputLayer[Float](inputShape = Shape(3, 4), name = "input1")
    seq.add(input)
    val dense = Dense[Float](2, activation = "relu")
    seq.add(dense)
    val ss = new GetShape[Float]()
    seq.add(ss)
    seq.getOutputShape().toSingle().toArray should be(Array(3))
    val outShape = seq.forward(Tensor[Float](Array(2, 3, 4)).randn())
    outShape.toTensor[Float].storage().toArray should be(Array(2, 3, 2))
  }

}

class GetShapeSerialTest extends ModuleSerializationTest {
  override def test(): Unit = {
    val ss = new GetShape[Float](inputShape = Shape(3, 2))
    ss.build(Shape(2, 3, 2))
    val input = Tensor[Float](2, 3, 2).rand()
    runSerializationTest(ss, input)
  }
}


text:
using System.Security.Claims;
using Microsoft.Owin;
using Microsoft.Owin.Security;

namespace MobileServices
{
    public static partial class WebApi
    {
        public class AuthenticatedContext : Microsoft.Owin.Security.Provider.BaseContext
        {
            public AuthenticatedContext(string name, IOwinContext context)
                : base(context)
            {
                Id = name;
            }

            public ClaimsIdentity Identity { get; set; }
            public string Id { get; private set; }
            public AuthenticationProperties Properties { get; set; }
        }
    }
}


text:
namespace cwt {
  template<typename tag_t>
  class debug_allocator_base {
  public:
    static size_t total_bytes_allocated() {
      return m_total_bytes_allocated;
    }

    static size_t current_bytes_allocated() {
      return m_current_bytes_allocated;
    }

    static size_t total_allocations() {
      return m_total_allocations;
    }

    static const std::map<void*, size_t>& live_allocations() {
      return m_live_allocations;
    }

  protected:
    static size_t m_total_bytes_allocated;
    static size_t m_current_bytes_allocated;
    static size_t m_total_allocations;
    static std::map<void*, size_t> m_live_allocations;
  };

  template<typename T, typename tag_t>
  class debug_allocator : public debug_allocator_base<tag_t>{
  public:
    using value_type = T;
    using pointer = T*;
    using const_pointer = T const*;
    using reference = T&;
    using const_reference = T const&;
    using difference_type = ptrdiff_t;
    using size_type = size_t;

    debug_allocator() = default;
    template<typename U>
    debug_allocator(const debug_allocator<U, tag_t>&) {}
    template<typename U>
    debug_allocator(debug_allocator<U, tag_t>&&) {}

    template<typename U>
    struct rebind{ using other = debug_allocator<U,tag_t>; };

    pointer allocate(size_t n) {
      pointer ptr = std::allocator<T>().allocate(n);

      size_t num_bytes = n * sizeof(T);
      this->m_total_bytes_allocated += num_bytes;
      this->m_current_bytes_allocated += num_bytes;
      ++this->m_total_allocations;

      if (this->m_live_allocations.find(ptr) != this->m_live_allocations.end()) {
        std::abort();
      }

      this->m_live_allocations.emplace(ptr, num_bytes);

      return ptr;
    }

    pointer allocate( std::size_t n, const void *) {
      return allocate(n);
    }

    void deallocate(pointer ptr, size_t n) {
      auto it = this->m_live_allocations.find(ptr);
      if (it == this->m_live_allocations.end()) {
        std::abort();
      }

      size_t num_bytes = n * sizeof(T);
      if (it->second != num_bytes) {
        std::abort();
      }

      this->m_live_allocations.erase(ptr);

      this->m_current_bytes_allocated -= num_bytes;

      std::allocator<T>().deallocate(ptr, n);
    }

    template<typename ...Args>
    void construct(pointer ptr, Args&&... args) {
      new (ptr) value_type{std::forward<Args>(args)...};
    }

    template<typename U>
    void destroy(U* ptr) noexcept {
      (void)ptr;
      ptr->~U();
    }

    size_type max_size() const noexcept {
      return std::numeric_limits<size_type>::max() / sizeof(value_type);
    }

  private:
  };
}

template<typename tag_t>
size_t cwt::debug_allocator_base<tag_t>::m_total_bytes_allocated = 0;

template<typename tag_t>
size_t cwt::debug_allocator_base<tag_t>::m_current_bytes_allocated = 0;

template<typename tag_t>
size_t cwt::debug_allocator_base<tag_t>::m_total_allocations = 0;

template<typename tag_t>
std::map<void*, size_t> cwt::debug_allocator_base<tag_t>::m_live_allocations;


text:
#include "hpdf_conf.h"
#include "hpdf_utils.h"
#include "hpdf_info.h"
#include "hpdf_3dmeasure.h"
#include "hpdf.h"

/*----------------------------------------------------------------------------*/
/*------ HPDF_3DMeasure -----------------------------------------------------*/

HPDF_STATUS
HPDF_Dict_AddPoint3D(HPDF_Dict dict, const char* key, HPDF_Point3D point)
{
	HPDF_Array array;
	HPDF_STATUS ret = HPDF_OK;
	array = HPDF_Array_New (dict->mmgr);
	if (!array)
		return HPDF_Error_GetCode ( dict->error);

	if (HPDF_Dict_Add (dict, key, array) != HPDF_OK)
		return HPDF_Error_GetCode ( dict->error);

	ret += HPDF_Array_AddReal(array, point.x);
	ret += HPDF_Array_AddReal(array, point.y);
	ret += HPDF_Array_AddReal(array, point.z);

	return ret;
}

HPDF_3DMeasure
HPDF_3DC3DMeasure_New(HPDF_MMgr mmgr,
					  HPDF_Xref xref,
					  HPDF_Point3D    firstanchorpoint,
					  HPDF_Point3D    textanchorpoint
					  )
{
	HPDF_3DMeasure measure;
	HPDF_STATUS ret = HPDF_OK;

	HPDF_PTRACE((" HPDF_3DC3DMeasure_New\n"));

	measure = HPDF_Dict_New (mmgr);
	if (!measure)
		return NULL;

	if (HPDF_Xref_Add (xref, measure) != HPDF_OK)
		return NULL;

	ret += HPDF_Dict_AddPoint3D(measure, "A1", firstanchorpoint);
	ret += HPDF_Dict_AddPoint3D(measure, "TP", textanchorpoint);

	ret += HPDF_Dict_AddName (measure, "Type", "3DMeasure");
	ret += HPDF_Dict_AddName (measure, "Subtype", "3DC");

	if (ret != HPDF_OK)
		return NULL;

	return measure;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetColor(HPDF_3DMeasure measure,
						   HPDF_RGBColor color)
{
	HPDF_Array array;
	HPDF_STATUS ret = HPDF_OK;

	array = HPDF_Array_New (measure->mmgr);
	if (!array)
		return HPDF_Error_GetCode (measure->error);

	ret = HPDF_Dict_Add (measure, "C", array);
	if (ret != HPDF_OK)
		return ret;

	ret += HPDF_Array_AddName(array, "DeviceRGB");
	ret += HPDF_Array_AddReal(array, color.r);
	ret += HPDF_Array_AddReal(array, color.g);
	ret += HPDF_Array_AddReal(array, color.b);

	return ret;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetTextSize(HPDF_3DMeasure measure,
						   HPDF_REAL textsize)
{
	HPDF_STATUS ret = HPDF_OK;

	ret = HPDF_Dict_AddReal(measure, "TS", textsize);

	return ret;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DMeasure_SetName(HPDF_3DMeasure measure,
					   const char* name)
{
	HPDF_STATUS ret = HPDF_OK;
	HPDF_String s;

	s = HPDF_String_New (measure->mmgr, name, 0);
	if (!s)
		return HPDF_Error_GetCode ( s->error);

	ret = HPDF_Dict_Add(measure, "TRL", s);

	return ret;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetTextBoxSize(HPDF_3DMeasure measure,
							 HPDF_INT32 x,
							 HPDF_INT32 y)
{
	HPDF_Array array;
	HPDF_STATUS ret = HPDF_OK;

	array = HPDF_Array_New (measure->mmgr);
	if (!array)
		return HPDF_Error_GetCode (measure->error);

	ret = HPDF_Dict_Add (measure, "TB", array);
	if (ret != HPDF_OK)
		return ret;

	ret += HPDF_Array_AddNumber(array, x);
	ret += HPDF_Array_AddNumber(array, y);

	return ret;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetText(HPDF_3DMeasure measure,
						  const char* text,
						  HPDF_Encoder encoder)
{
	HPDF_STATUS ret = HPDF_OK;
	HPDF_String s;

	s = HPDF_String_New (measure->mmgr, text, encoder);
	if (!s)
		return HPDF_Error_GetCode ( s->error);

	ret = HPDF_Dict_Add(measure, "UT", s);

	return ret;
}

HPDF_EXPORT(HPDF_STATUS)
HPDF_3DC3DMeasure_SetProjectionAnotation(HPDF_3DMeasure measure,
						                 HPDF_Annotation projectionanotation)
{
	HPDF_STATUS ret = HPDF_OK;

	ret = HPDF_Dict_Add(measure, "S", projectionanotation);

	return ret;
}

HPDF_3DMeasure
HPDF_PD33DMeasure_New(HPDF_MMgr mmgr,
					  HPDF_Xref xref,
					  HPDF_Point3D    annotationPlaneNormal,
					  HPDF_Point3D    firstAnchorPoint,
					  HPDF_Point3D    secondAnchorPoint,
					  HPDF_Point3D    leaderLinesDirection,
					  HPDF_Point3D    measurementValuePoint,
					  HPDF_Point3D    textYDirection,
					  HPDF_REAL       value,
					  const char*     unitsString
					  )
{
	HPDF_3DMeasure measure;
	HPDF_STATUS ret = HPDF_OK;
	HPDF_String s;

	HPDF_PTRACE((" HPDF_3DC3DMeasure_New\n"));

	measure = HPDF_Dict_New (mmgr);
	if (!measure)
		return NULL;

	if (HPDF_Xref_Add (xref, measure) != HPDF_OK)
		return NULL;

	ret += HPDF_Dict_AddPoint3D(measure, "AP", annotationPlaneNormal);
	ret += HPDF_Dict_AddPoint3D(measure, "A1", firstAnchorPoint);
	ret += HPDF_Dict_AddPoint3D(measure, "A2", secondAnchorPoint);
	ret += HPDF_Dict_AddPoint3D(measure, "D1", leaderLinesDirection);
	ret += HPDF_Dict_AddPoint3D(measure, "TP", measurementValuePoint);
	ret += HPDF_Dict_AddPoint3D(measure, "TY", textYDirection);

	ret += HPDF_Dict_AddReal(measure, "V", value);

	s = HPDF_String_New (measure->mmgr, unitsString, 0);
	if (!s)
		return NULL;

	ret = HPDF_Dict_Add(measure, "U", s);

	ret += HPDF_Dict_AddName (measure, "Type", "3DMeasure");
	ret += HPDF_Dict_AddName (measure, "Subtype", "PD3");

	if (ret != HPDF_OK)
		return NULL;

	return measure;
}


text:
class GURL;

namespace content {

class WebRTCIdentityStore;

// This class is the host for WebRTCIdentityService in the browser process.
// It converts the IPC messages for requesting a WebRTC DTLS identity and
// cancelling a pending request into calls of WebRTCIdentityStore. It also sends
// the request result back to the renderer through IPC.
// Only one outstanding request is allowed per renderer at a time. If a second
// request is made before the first one completes, an IPC with error
// ERR_INSUFFICIENT_RESOURCES will be sent back to the renderer.
class CONTENT_EXPORT WebRTCIdentityServiceHost : public BrowserMessageFilter {
 public:
  WebRTCIdentityServiceHost(int renderer_process_id,
                            scoped_refptr<WebRTCIdentityStore> identity_store);

 protected:
  virtual ~WebRTCIdentityServiceHost();

  // content::BrowserMessageFilter override.
  virtual bool OnMessageReceived(const IPC::Message& message,
                                 bool* message_was_ok) OVERRIDE;

 private:
  // |sequence_number| is the same as in the OnRequestIdentity call.
  // See WebRTCIdentityStore for the meaning of the parameters.
  void OnComplete(int sequence_number,
                  int status,
                  const std::string& certificate,
                  const std::string& private_key);

  // |sequence_number| is a renderer wide unique number for each request and
  // will be echoed in the response to handle the possibility that the renderer
  // cancels the request after the browser sends the response and before it's
  // received by the renderer.
  // See WebRTCIdentityStore for the meaning of the other parameters.
  void OnRequestIdentity(int sequence_number,
                         const GURL& origin,
                         const std::string& identity_name,
                         const std::string& common_name);

  void OnCancelRequest();

  void SendErrorMessage(int sequence_number, int error);

  int renderer_process_id_;
  base::Closure cancel_callback_;
  scoped_refptr<WebRTCIdentityStore> identity_store_;
  base::WeakPtrFactory<WebRTCIdentityServiceHost> weak_factory_;

  DISALLOW_COPY_AND_ASSIGN(WebRTCIdentityServiceHost);
};

}  // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_MEDIA_WEBRTC_IDENTITY_SERVICE_HOST_H_


text:
 String buffers.

 Buffers are mutable by default, but being based on objects, they can
 also be used in a functional style:

    local StrBuf = require "std.strbuf" {}
    local a = StrBuf {"a"}
    local b = a:concat "b"    -- mutate *a*
    print (a, b)              --> ab   ab
    local c = a {} .. "c"     -- copy and append
    print (a, c)              --> ab   abc

 Prototype Chain
 ---------------

      table
       `-> Object
            `-> StrBuf

 @classmod std.strbuf
]]

local base   = require "std.base"
local debug  = require "std.debug"

local Object = require "std.object" {}

local ielems, insert, prototype = base.ielems, base.insert, base.prototype

local M, StrBuf

local function __concat (self, x)
  return insert (self, x)
end

local function __tostring (self)
  local strs = {}
  for e in ielems (self) do strs[#strs + 1] = tostring (e) end
  return table.concat (strs)
end

--[[ ================= ]]--
--[[ Public Interface. ]]--
--[[ ================= ]]--

local function X (decl, fn)
  return debug.argscheck ("std.strbuf." .. decl, fn)
end

M = {
  --- Add a object to a buffer.
  -- Elements are stringified lazily, so if add a table and then change
  -- its contents, the contents of the buffer will be affected too.
  -- @static
  -- @function concat
  -- @param x object to add to buffer
  -- @treturn StrBuf modified buffer
  -- @usage
  -- buf = buf:concat "append this" {" and", " this"}
  concat = X ("concat (StrBuf, any)", __concat),
}

--[[ ============= ]]--
--[[ Deprecations. ]]--
--[[ ============= ]]--

local DEPRECATED = debug.DEPRECATED

M.tostring = DEPRECATED ("41.1", "std.strbuf.tostring",
                         "use 'tostring (strbuf)' instead",
	                 X ("tostring (StrBuf)", __tostring))

--[[ ================== ]]--
--[[ Type Declarations. ]]--
--[[ ================== ]]--

--- StrBuf prototype object.
--
-- Set also inherits all the fields and methods from
-- @{std.object.Object}.
-- @object StrBuf
-- @string[opt="StrBuf"] _type object name
-- @see std.object.__call
-- @usage
-- local std = require "std"
-- local StrBuf = std.strbuf {}
-- local a = {1, 2, 3}
-- local b = {a, "five", "six"}
-- a = a .. 4
-- b = b:concat "seven"
-- print (a, b) --> 1234   1234fivesixseven
-- os.exit (0)
StrBuf = Object {
  _type = "StrBuf",

  __index = M,

  --- Support concatenation to StrBuf objects.
  -- @function __concat
  -- @tparam StrBuf buffer object
  -- @param x a string, or object that can be coerced to a string
  -- @treturn StrBuf modified *buf*
  -- @see concat
  -- @usage
  -- buf = buf .. x
  __concat = __concat,

  --- Support fast conversion to Lua string.
  -- @function __tostring
  -- @tparam StrBuf buffer object
  -- @treturn string concatenation of buffer contents
  -- @see tostring
  -- @usage
  -- str = tostring (buf)
  __tostring = __tostring,
}

return StrBuf


text:
app.controller('LogInController', ['$rootScope', '$scope', '$http', '$location', 'authService',
  function($rootScope, $scope, $http, $location, authService) {
    $scope.username = '';
    $scope.password = '';

    $scope.error = {
      username: false,
      password: false,
    };

    $scope.displayUsername = authService.username();

    $scope.$on('profileChanged', function(event) {
      $scope.displayUsername = authService.username();
    });

    var isWorking = false;

    $scope.logIn = function() {
      if (!isWorking) {
        if (!$scope.username) {
          $scope.error.username = true;
          $rootScope.$broadcast('flashError', 'You must enter your username');
        } else if (!$scope.password) {
          $scope.error.password = true;
          $rootScope.$broadcast('flashError', 'You must enter your password');
        } else if ($scope.username.length > 128) {
          $scope.error.username = true;
          $rootScope.$broadcast('flashError', 'Username is too long');
        } else if ($scope.password.length > 1024) {
          $scope.error.password = true;
          $rootScope.$broadcast('flashError', 'Password is too long');
        } else {
          isWorking = true;
          var postData = {
            username: $scope.username,
            password: $scope.password,
          };
          $http.post('api/log-in', postData).then(function(response) {
            $scope.password = '';
            if (response.data.success) {
              $scope.username = '';
              $scope.error = {
                username: false,
                password: false,
              };
              authService.setProfile(response.data.profile);
              $scope.displayUsername = authService.username();
            } else {
              $scope.error.username = true;
              $scope.error.password = true;
              $rootScope.$broadcast('flashError', response.data.reason);
            }
            isWorking = false;
          }, function(response) {
            $rootScope.$broadcast('flashError', 'Server responded with status code ' + response.status);
            isWorking = false;
          });
        }
      }
    };

    $scope.logOut = function() {
      if (!isWorking) {
        isWorking = true;
        $http.post('api/log-out', {}).then(function(response) {
          if (response.data.success) {
            authService.setProfile(response.data.profile);
          } else {
            $rootScope.$broadcast('flashError', response.data.reason);
          }
          isWorking = false;
        }, function(response) {
          $rootScope.$broadcast('flashError', 'Server responded with status code ' + response.status);
          isWorking = false;
        });
      }
    };

    $scope.signUp = function() {
      if (!isWorking) {
        $location.path('sign-up');
      }
    };
  }
]);


text:
'use strict';

/**
 * @ngdoc filter
 * @name relevancyApp.filter:encodeCleanToken
 * @function
 * @description
 * # encodeCleanToken
 * Filter in the relevancyApp.
 */
angular.module('relevancyApp').filter('encodeCleanToken', function() {
    return function(string) {
        return string ? string.toLowerCase().replace(/-/g, '_').replace(/ /g, '-') : false;
    };
});


text:
function getScrollbarWidth() {
    const outer = document.createElement("div");
    outer.style.visibility = "hidden";
    outer.style.width = "100px";
    outer.style.msOverflowStyle = "scrollbar"; // needed for WinJS apps

    document.body.appendChild(outer);

    const widthNoScroll = outer.offsetWidth;
    // force scrollbars
    outer.style.overflow = "scroll";

    // add innerdiv
    const inner = document.createElement("div");
    inner.style.width = "100%";
    outer.appendChild(inner);

    const widthWithScroll = inner.offsetWidth;

    // remove divs
    outer.parentNode.removeChild(outer);

    return widthNoScroll - widthWithScroll;
}

let sbWidth;

exports.initialize = function () {
// Workaround for browsers with fixed scrollbars
    sbWidth = getScrollbarWidth();

    if (sbWidth > 0) {
        $(".header").css("left", "-" + sbWidth + "px");
        $(".header-main").css("left", sbWidth + "px");
        $(".header-main .column-middle").css("margin-right", 250 + sbWidth + "px");

        $(".fixed-app").css("left", "-" + sbWidth + "px");
        $(".fixed-app .column-middle").css("margin-left", 250 + sbWidth + "px");

        $(".column-right").css("right", sbWidth + "px");
        $(".app-main .right-sidebar").css({"margin-left": sbWidth + "px",
                                           width: 250 - sbWidth + "px"});

        $("#compose").css("left", "-" + sbWidth + "px");
        $(".compose-content").css({left: sbWidth + "px",
                                   "margin-right": 250 + sbWidth + "px"});
        $('#keyboard-icon').css({right: sbWidth + 35 + "px"});

        $("head").append("<style> @media (max-width: 1165px) { .compose-content, .header-main .column-middle { margin-right: " + (7 + sbWidth) + "px !important; } } " +
                         "@media (max-width: 775px) { .fixed-app .column-middle { margin-left: " + (7 + sbWidth) + "px !important; } } " +
                         "</style>");
    }
    exports.set_layout_width();
};

exports.set_layout_width = function () {
    // This logic unfortunately leads to a flash of mispositioned
    // content when reloading a Zulip browser window.  More details
    // are available in the comments on the max-width of 1400px in
    // the .app-main CSS rules.
    if (page_params.fluid_layout_width) {
        $(".header-main").css("max-width", "inherit");
        $(".app .app-main").css("max-width", "inherit");
        $(".fixed-app .app-main").css("max-width", "inherit");
        $("#compose-container").css("max-width", "inherit");
    } else {
        $(".header-main").css("max-width", 1400 + sbWidth + "px");
        $(".app .app-main").css("max-width", 1400 + "px");
        $(".fixed-app .app-main").css("max-width", 1400 + sbWidth + "px");
        $("#compose-container").css("max-width", 1400 + sbWidth + "px");
    }
};

window.scroll_bar = exports;


text:
import Vue from 'vue'
import Router from 'vue-router'
import ComponentEditor from '@/modules/editor/componentEditor/ComponentEditor.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Editor',
      component: ComponentEditor
    }
  ]
})


text:
#ifndef TENSORFLOW_COMPILER_MLIR_TFRT_JIT_TF_JITRT_H_
#define TENSORFLOW_COMPILER_MLIR_TFRT_JIT_TF_JITRT_H_

#include <utility>

#include "mlir/ExecutionEngine/CRunnerUtils.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerUnion.h"
#include "tensorflow/core/framework/allocation_description.pb.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflow/core/runtime_fallback/util/type_util.h"
#include "tensorflow/core/tfrt/utils/fallback_tensor.h"
#include "tfrt/jitrt/jitrt.h"  // from @tf_runtime
#include "tfrt/dtype/dtype.h"  // from @tf_runtime

namespace tensorflow {

// A set of helper classes to convert results returned from the compiled
// functions (memrefs or async memrefs) to the Tensorflow Tensors that can be
// seamlessly passed to the Tensorflow fallback kernels.

// MemrefTensorBuffer wraps a memref returned from the compiled kernel into
// the Tensorflow `TensorBuffer` that can be used to construct a `Tensor`.
class MemrefTensorBuffer : public TensorBuffer {
 public:
  MemrefTensorBuffer(void* base_ptr, void* data, size_t size, bool owner)
      : TensorBuffer(data), base_ptr_(base_ptr), size_(size), owner_(owner) {}

  ~MemrefTensorBuffer() override {
    if (owner_) free(base_ptr_);
  }

  void FillAllocationDescription(AllocationDescription* proto) const override {
    proto->set_requested_bytes(size());
    proto->set_allocator_name("tf_jitrt");
  }

  size_t size() const override { return size_; }
  bool OwnsMemory() const override { return owner_; }
  TensorBuffer* root_buffer() override { return this; }

 private:
  void* base_ptr_;
  size_t size_;
  bool owner_;
};

// Reuse conversion context as a kernel context for convenience, can be a
// separate allocation if needed.
struct TensorflowConversionContext
    : public tfrt::jitrt::Executable::KernelContext {
  // Keep track of compiled kernel operands to detect input to output
  // forwarding, and tensors returned multiple times.
  using TensorOrBuffer = llvm::PointerUnion<const Tensor*, TensorBuffer*>;

  TensorflowConversionContext(size_t num_operands, size_t num_results)
      : num_pending_results(num_results) {
    runtime_tensors.reserve(num_operands + num_results - 1);
  }

  // Ensure that the context is always moved around instead of copying.
  TensorflowConversionContext(const TensorflowConversionContext&) = delete;
  TensorflowConversionContext(TensorflowConversionContext&&) = default;

  void* forward(size_t size, size_t alignment,
                llvm::ArrayRef<unsigned> candidates) override {
    // TODO(ecg): Do the real buffer forwarding here.
    return nullptr;
  }

  // Memrefs that are already materialized as runtime tensors:
  //   1. Tensor operands that we got from the caller.
  //   2. Tensor buffers that we constructed for newly allocated memrefs.
  llvm::SmallDenseMap<const void*, TensorOrBuffer> runtime_tensors;

  // The number of results that are waiting for the conversion.
  size_t num_pending_results;
};

namespace internal {
// The returned memref can point into statically allocated memory that we can't
// pass to `free` (memref.global). The LLVM lowering of `memref.global` sets the
// allocated pointer to the magic value 0xDEADBEEF.
template <typename T, int rank>
inline bool IsStaticStorageDuration(StridedMemRefType<T, rank>* memref) {
  return reinterpret_cast<std::intptr_t>(memref->basePtr) == 0xDEADBEEF;
}
}  // namespace internal

// Converts StridedMemrefType to the Tensor. This struct satisfies
// ReturnStridedMemref's concept (see jitrt.h).
struct ConvertTensor {
  using ResultType = tfrt_stub::FallbackTensor;
  using ConversionContext = TensorflowConversionContext;

  template <typename T, int rank>
  static llvm::ArrayRef<int64_t> Sizes(StridedMemRefType<T, rank>* memref) {
    return memref->sizes;
  }

  template <typename T>
  static llvm::ArrayRef<int64_t> Sizes(StridedMemRefType<T, 0>* memref) {
    return {};
  }

  template <typename T, int rank>
  static Tensor Convert(ConversionContext& ctx, void* memref_ptr) {
    auto* memref = static_cast<StridedMemRefType<T, rank>*>(memref_ptr);
    auto memref_sizes = Sizes(memref);

    // Convert TFRT data type into Tensorflow data type.
    auto dtype = tfd::GetTfDataType(tfrt::GetDType<T>());

    // Build a Tensorflow TensorShape from memref sizes. It should never fail.
    TensorShape shape;
    auto st = TensorShapeUtils::MakeShape(memref_sizes, &shape);
    assert(st.ok() && "failed to build a TensorShape from memref sizes");
    (void)st;

    // Check if returned memref already has corresponding runtime tensor.
    auto it = ctx.runtime_tensors.find(memref->data);
    ConversionContext::TensorOrBuffer runtime_tensor =
        it != ctx.runtime_tensors.end() ? it->second : nullptr;

    // Forward operand tensor to the result.
    if (auto* operand = runtime_tensor.dyn_cast<const Tensor*>()) {
      Tensor result;
      auto st = result.BitcastFrom(*operand, dtype, shape);
      assert(st.ok() && "failed to bitcast from forwarded tensor");
      (void)st;
      return result;
    }

    // The same memref returned multiple times.
    if (auto* buffer = runtime_tensor.dyn_cast<TensorBuffer*>()) {
      buffer->Ref();
      auto ptr = core::RefCountPtr<TensorBuffer>(buffer);
      return Tensor(dtype, std::move(shape), std::move(ptr));
    }

    // This is a newly allocated memref, and we need to wrap it into the runtime
    // tensor buffer to pass it back to the caller as a Tensor.
    size_t size = sizeof(T);
    for (int i = 0; i < rank; ++i) size *= memref_sizes[i];

    // Create a TensorBuffer from the returned memref.
    TF_ANNOTATE_MEMORY_IS_INITIALIZED(memref->data, size);
    auto* buffer = new MemrefTensorBuffer(
        memref->basePtr, memref->data, size,
        /*owner=*/!internal::IsStaticStorageDuration(memref));

    // Construct a tensor from the memory buffer.
    auto ptr = core::RefCountPtr<MemrefTensorBuffer>(buffer);
    Tensor tensor(dtype, std::move(shape), std::move(ptr));

    // Keep track of memrefs already used to construct runtime tensors.
    if (--ctx.num_pending_results > 0)
      ctx.runtime_tensors.insert({memref->data, buffer});

    // Incorrect alignment will lead to a segfault in the downstream Tensorflow
    // kernels, check it before returning to the runtime.
    if (internal::IsStaticStorageDuration(memref)) {
      CHECK(tensor.IsAligned()) << "global memref is not aligned";
    } else {
      CHECK(tensor.IsAligned()) << "allocated memref is not aligned";
    }

    return tensor;
  }
};

}  // namespace tensorflow

#endif  // TENSORFLOW_COMPILER_MLIR_TFRT_JIT_TF_JITRT_H_


text:
package com.speedment.runtime.typemapper.time;

import com.speedment.runtime.typemapper.AbstractTypeMapperTest;
import com.speedment.runtime.typemapper.TypeMapper;

import java.sql.Time;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.Map;

final class TimestampToIntMapperTest extends AbstractTypeMapperTest<Timestamp, Integer, TimestampToIntMapper> {

    TimestampToIntMapperTest() {
        super(Timestamp.class,
            Integer.class,
            TypeMapper.Category.COMPARABLE,
            TypeMapper.Ordering.RETAIN,
            TimestampToIntMapper::new);
    }

    @Override
    protected Map<Timestamp, Integer> testVector() {
        Map<Timestamp, Integer> map = new HashMap<>();
        map.put(new Timestamp(0L), 0);
        map.put(new Timestamp(788918400000L), 788918400);
        map.put(null, null);
        return map;
    }
}


text:
package example.service;

import example.repo.Customer1513Repository;

import org.springframework.stereotype.Service;

@Service
public class Customer1513Service {
	public Customer1513Service(Customer1513Repository repo) {}
}