text:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { Ng2PageScrollModule } from 'ng2-page-scroll/ng2-page-scroll';
import { AppComponent } from './app.component';
import { routes } from './app.routing';
import { GettingStartedComponent } from './getting-started/getting-started.component';
import { MainMenuComponent } from './common/main-menu/main-menu.component';
import { TopMenuComponent } from './common/top-menu/top-menu.component';
import { SearchFilterPipe } from './common/main-menu/search-filter.pipe';
import { AppFooterComponent } from './common/app-footer/app-footer.component';
// will be lazy loaded later
import { DemoAccordionModule } from './components/accordion';
import { DemoAlertsModule } from './components/alerts';
import { DemoButtonsModule } from './components/buttons';
import { DemoCarouselModule } from './components/carousel';
import { DemoCollapseModule } from './components/collapse';
import { DemoDatepickerModule } from './components/datepicker';
import { DemoDropdownModule } from './components/dropdown';
import { DemoModalModule } from './components/modal';
import { DemoPaginationModule } from './components/pagination';
import { DemoPopoverModule } from './components/popover/index';
import { DemoProgressbarModule } from './components/progressbar';
import { DemoRatingModule } from './components/rating';
import { DemoSortableModule } from './components/sortable';
import { DemoTabsModule } from './components/tabs';
import { DemoTimepickerModule } from './components/timepicker/index';
import { DemoTooltipModule } from './components/tooltip/index';
import { DemoTypeaheadModule } from './components/typeahead/index';
import { NgApiDocModule } from './api-docs/index';
import { NgApiDoc } from './api-docs/api-docs.model';
import { ngdoc } from '../ng-api-doc';

@NgModule({
  declarations: [
    AppComponent,
    GettingStartedComponent,
    TopMenuComponent,
    MainMenuComponent,
    SearchFilterPipe,
    AppFooterComponent
  ],
  imports: [
    NgApiDocModule,
    BrowserModule,
    FormsModule,
    RouterModule.forRoot(routes, {useHash: true}),
    Ng2PageScrollModule.forRoot(),
    // will be lazy loaded later on
    DemoAccordionModule,
    DemoAlertsModule,
    DemoButtonsModule,
    DemoCarouselModule,
    DemoCollapseModule,
    DemoDatepickerModule,
    DemoDropdownModule,
    DemoModalModule,
    DemoPaginationModule,
    DemoPopoverModule,
    DemoProgressbarModule,
    DemoRatingModule,
    DemoSortableModule,
    DemoTabsModule,
    DemoTimepickerModule,
    DemoTooltipModule,
    DemoTypeaheadModule
  ],
  providers: [
    {provide: NgApiDoc, useValue: ngdoc}
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
}


text:
#ifndef _IDENTT_QUERY_JSONELEM_HPP_
#define _IDENTT_QUERY_JSONELEM_HPP_

#include <string>

namespace identt {
namespace query {

struct JsonElem {
	const std::string nam;
	const std::string val;
	const enum JsonElemE {
		IDENTT_JE_STRING = 0,
		IDENTT_JE_DOUBLE = 1,
		IDENTT_JE_INT64 = 2,
		IDENTT_JE_BOOL = 3
	} typ;

	/**
	* Constructor : string
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   std::string value to populate
	*
	*/
	JsonElem(std::string name, std::string value);

	/**
	* Constructor : float
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   float value to populate
	*
	*/
	explicit JsonElem(std::string name, float value);

	/**
	* Constructor : float
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   float value to populate
	*
	*/
	explicit JsonElem(const char* name, float value);

	/**
	* Constructor : double
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   double value to populate
	*
	*/
	explicit JsonElem(std::string name, double value);

	/**
	* Constructor : double
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   double value to populate
	*
	*/
	explicit JsonElem(const char* name, double value);

	/**
	* Constructor : int32_t
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   int32_t value to populate
	*
	*/
	explicit JsonElem(std::string name, int32_t value);

	/**
	* Constructor : int32_t
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   int32_t value to populate
	*
	*/
	explicit JsonElem(const char* name, int32_t value);

	/**
	* Constructor : uint32_t
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   std::string value to populate
	*
	*/
	explicit JsonElem(std::string name, uint32_t value);

	/**
	* Constructor : uint32_t
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   const char* value to populate
	*
	*/
	explicit JsonElem(const char* name, uint32_t value);

	/**
	* Constructor : int64_t
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   int64_t value to populate
	*
	*/
	explicit JsonElem(std::string name, int64_t value);

	/**
	* Constructor : int64_t
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   int64_t value to populate
	*
	*/
	explicit JsonElem(const char* name, int64_t value);

	/**
	* Constructor : uint64_t
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   std::string value to populate
	*
	*/
	explicit JsonElem(std::string name, uint64_t value);

	/**
	* Constructor : uint64_t
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   const char* value to populate
	*
	*/
	explicit JsonElem(const char* name, uint64_t value);

	/**
	* Constructor : bool
	*
	* @param name
	*   std::string name
	*
	* @param value
	*   bool value to populate
	*
	*/
	explicit JsonElem(std::string name, bool value);

	/**
	* Constructor : bool
	*
	* @param name
	*   const char* name
	*
	* @param value
	*   bool value to populate
	*
	*/
	explicit JsonElem(const char* name, bool value);

	/**
	* Constructor deleted
	*
	*/
	explicit JsonElem() = delete;
	explicit JsonElem(std::string , std::string , JsonElemE) = delete;

	virtual ~JsonElem();

};

}
}

#endif

redpajama_set_name: RedPajamaGithub


text:
// Scintilla source code edit control
/** @file LineMarker.h
 ** Defines the look of a line marker in the margin .
 **/
// Copyright 1998-2011 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

#ifndef LINEMARKER_H
#define LINEMARKER_H

#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif

typedef void (*DrawLineMarkerFn)(Surface *surface, PRectangle &rcWhole, Font &fontForCharacter, int tFold, int marginStyle, const void *lineMarker);

/**
 */
class LineMarker {
public:
	enum typeOfFold { undefined, head, body, tail, headWithTail };

	int markType;
	ColourDesired fore;
	ColourDesired back;
	ColourDesired backSelected;
	int alpha;
	XPM *pxpm;
	RGBAImage *image;
	/** Some platforms, notably PLAT_CURSES, do not support Scintilla's native
	 * Draw function for drawing line markers. Allow those platforms to override
	 * it instead of creating a new method(s) in the Surface class that existing
	 * platforms must implement as empty. */
	DrawLineMarkerFn customDraw;
	LineMarker() {
		markType = SC_MARK_CIRCLE;
		fore = ColourDesired(0,0,0);
		back = ColourDesired(0xff,0xff,0xff);
		backSelected = ColourDesired(0xff,0x00,0x00);
		alpha = SC_ALPHA_NOALPHA;
		pxpm = NULL;
		image = NULL;
		customDraw = NULL;
	}
	LineMarker(const LineMarker &) {
		// Defined to avoid pxpm being blindly copied, not as a complete copy constructor
		markType = SC_MARK_CIRCLE;
		fore = ColourDesired(0,0,0);
		back = ColourDesired(0xff,0xff,0xff);
		backSelected = ColourDesired(0xff,0x00,0x00);
		alpha = SC_ALPHA_NOALPHA;
		pxpm = NULL;
		image = NULL;
		customDraw = NULL;
	}
	~LineMarker() {
		delete pxpm;
		delete image;
	}
	LineMarker &operator=(const LineMarker &other) {
		// Defined to avoid pxpm being blindly copied, not as a complete assignment operator
		if (this != &other) {
			markType = SC_MARK_CIRCLE;
			fore = ColourDesired(0,0,0);
			back = ColourDesired(0xff,0xff,0xff);
			backSelected = ColourDesired(0xff,0x00,0x00);
			alpha = SC_ALPHA_NOALPHA;
			delete pxpm;
			pxpm = NULL;
			delete image;
			image = NULL;
			customDraw = NULL;
		}
		return *this;
	}
	void SetXPM(const char *textForm);
	void SetXPM(const char *const *linesForm);
	void SetRGBAImage(Point sizeRGBAImage, float scale, const unsigned char *pixelsRGBAImage);
	void Draw(Surface *surface, PRectangle &rc, Font &fontForCharacter, typeOfFold tFold, int marginStyle) const;
};

#ifdef SCI_NAMESPACE
}
#endif

#endif


text:
FILE(REMOVE_RECURSE
  "CMakeFiles/hmm_vector_test.dir/hmm_vector_test.cpp.o"
  "hmm_vector_test.pdb"
  "hmm_vector_test"
)

# Per-language clean rules from dependency scanning.
FOREACH(lang CXX)
  INCLUDE(CMakeFiles/hmm_vector_test.dir/cmake_clean_${lang}.cmake OPTIONAL)
ENDFOREACH(lang)


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="css/main.css">
    <title>cutting board</title>

        <input id="url" type="text">
        </input><button id="add" type="button">add</button>
        default</>

        <svg id="overlay"></svg>
        <canvas id="viewport" width="512" height="512"></canvas>


text:
package com.github.kospiotr.spring;

public class BillingService {

    private CreditCardProcessor creditCardProcessor;
    private TransactionLogger transactionLogger;

    public BillingService() {
        System.out.println("Constructed BillingService");
    }

    public BillingService(CreditCardProcessor creditCardProcessor, TransactionLogger transactionLogger) {
        this.creditCardProcessor = creditCardProcessor;
        this.transactionLogger = transactionLogger;
        System.out.println("Constructed BillingService, and injected CreditCardProcessor and TransactionLogger");
    }

    public void processPayment(Payment payment) {
        creditCardProcessor.processPayment(payment);
        transactionLogger.logTransaction(payment);
    }

    public void setCreditCardProcessor(CreditCardProcessor creditCardProcessor) {
        System.out.println("Injected CreditCardProcessor to BillingService");
        this.creditCardProcessor = creditCardProcessor;
    }

    public void setTransactionLogger(TransactionLogger transactionLogger) {
        System.out.println("Injected TransactionLogger to BillingService");
        this.transactionLogger = transactionLogger;
    }

}


text:
class RolifyCreateRoles < ActiveRecord::Migration
  def change
    create_table(:roles) do |t|
      t.string :name, limit: 255, null: false
      t.integer :resource_id
      t.string :resource_type, limit: 255

      t.timestamps null: false
    end

    create_table(:users_roles, :id => false) do |t|
      t.integer :user_id, null: false
      t.integer :role_id, null: false
    end

    add_index(:roles, :name)
    add_index(:roles, [:name, :resource_type, :resource_id])
    add_index(:users_roles, [:user_id, :role_id])
  end
end


text:
require 'test_helper'

class BarksHelperTest < ActionView::TestCase
end


text:
namespace Domain.Validators
{
    public interface IValidator<T>
    {
        /// <summary>
        /// Validates this domain object.
        /// </summary>
        /// <param name="objectUnderValidation">The Izichizit system domain object to validate.</param>
        /// <returns>A collection of ValidationErrors. Empty if no errors found.</returns>
        ValidationError[] Validate(T objectUnderValidation);
    }
}


text:
    <title>gadgets.rpc Performance Tests: Container</title>

gadgets.rpc Performance: Container Page (method: )

Initial gadget render console: Gadget hasn't commented yet.

Child gadget ping count: 0

Test

Number of messages to send:
          <select name="num_msgs" id="num_msgs">
            <option value="1" selected>1</option>
            <option value="10">10</option>
            <option value="100">100</option>
            <option value="1000">1000</option>
          </select>

Message size:
          <select name="msg_size" id="msg_size">
            <option value="10">10 B</option>
            <option value="100">100 B</option>
            <option value="1024" selected>1 kB</option>
            <option value="10240">10 kB</option>
            <option value="102400">100 kB</option>
            <option value="1048576">1 MB</option>
          </select>

          <input type="button" value="Start The Test!" onclick="runPerfTest('gadget');" />

      Running test...

      Results: Gadget-to-Container

      Messages: , Bytes:

      Time elapsed for test run:

      Messages/second:

      Bytes/second:

Callback

Input: <input type="text" value="test-value" size="20" id="echo_test_input"/> <input type="button" value="Sync Callback Test" onclick="runCallbackTest('gadget',true);"/> <input type="button" value="Async Callback Test" onclick="runCallbackTest('gadget',false);"/>

Result:

Gadget: <input type="button" onclick="appendGadget(); this.style.display='none';" value="Append Gadget Now (for delayed load testing)"/>


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>pylab_examples example code: shared_axis_across_figures.py — Matplotlib 1.3.1 documentation</title>
    <link rel="stylesheet" href="../../_static/pythonista.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />

    <link rel="search" type="application/opensearchdescription+xml"
          title="Search within Matplotlib 1.3.1 documentation"
          href="../../_static/opensearch.xml"/>
    <link rel="top" title="Matplotlib 1.3.1 documentation" href="../../index.html" />
    <link rel="shortcut icon" type="image/png" href="../../_static/py.png" />
    <link rel="stylesheet" href="../_static/pythonista.css" type="text/css" />
    <meta name = "viewport" content = "width=device-width,initial-scale=1.0,user-scalable=no;">

Navigation

          index

          modules |

Matplotlib 1.3.1 documentation »

pylab_examples example code: shared_axis_across_figures.py¶

[source code]

"""
connect the data limits on the axes in one figure with the axes in
another.  This is not the right way to do this for two axes in the
same figure -- use the sharex and sharey property in that case
"""
# -*- noplot -*-
import numpy
from pylab import figure, show

fig1 = figure()
fig2 = figure()

ax1 = fig1.add_subplot(111)
ax2 = fig2.add_subplot(111, sharex=ax1, sharey=ax1)

ax1.plot(numpy.random.rand(100), 'o')
ax2.plot(numpy.random.rand(100), 'o')

# In the latest release, it is no longer necessary to do anything
# special to share axes across figures:

# ax1.sharex_foreign(ax2)
# ax2.sharex_foreign(ax1)

# ax1.sharey_foreign(ax2)
# ax2.sharey_foreign(ax1)

show()

Keywords: python, matplotlib, pylab, example, codex (see Search examples)

    © Copyright 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2013 The matplotlib development team.

    The Python Software Foundation is a non-profit corporation.
    Please donate.

    Last updated on May 03, 2016.
    Found a bug?

    Created using Sphinx 1.2.1.


text:
    // RandactHandler * myhandler =
    //     dynamic_cast<RandactHandler *>(pHandler);
    // myhandler->myMemoryRead(iid, addr);
//}

//void myMemoryWrite(int iid, void * addr) {
    // RandactHandler * myhandler =
    //     dynamic_cast<RandactHandler *>(pHandler);
    // myhandler->myMemoryWrite(iid, addr);
//}


text:
import * as React from 'react';

// Libs
import styled from 'styled-components';
import { Col, Container, Row } from 'react-bootstrap';

// Components
import {
  Arrow,
  Button,
  ProjectTopics,
  ProjectWrapper,
  ProjectYear,
  Quote,
  ResponsiveFrame,
  Spacer,
  Text,
  Title,
  UploadcareImage,
} from '../components';

const StyledText = styled(Text)``;

const Hydra: React.FC = (): JSX.Element => (
  <ProjectWrapper>
    <Container>
      <Row>
        <Col lg={{ span: 2 }} xs={{ span: 2 }}>
          <UploadcareImage src="https://ucarecdn.com/f62ca405-42ce-495d-a39a-31d5215bdbc6/" />
        </Col>

        <Col lg={{ span: 10 }} xs={{ span: 10 }}>
          <ResponsiveFrame
            src="https://www.youtube.com/embed/C0yOCYfNZgI"
            title="Hydra"
          />
        </Col>

        <Col lg={{ offset: 2, span: 10 }}>
          <Title>Hydra</Title>

          <StyledText>
            Hydra's representation of head regeneration through
            UI
            <Arrow>↑</Arrow>
          </StyledText>

          <Quote link="https://en.wikipedia.org/wiki/Lernaean_Hydra">
            ...for every head chopped off, the Hydra would regrow two
            heads...
          </Quote>

          <a href="/static/hydra.zip">
            <Button>Download script (zip 2.9 KB)</Button>
          </a>

          <Spacer size={6} />

          <ProjectTopics topics={['Interface', 'Mythology']} />
          <ProjectYear>2021</ProjectYear>
        </Col>
      </Row>
    </Container>
  </ProjectWrapper>
);

export default Hydra;


text:
<!DOCTYPE html>

    <title>Deferred Objects</title>
    <link rel="stylesheet" type="text/css" href="stylesheet.css">
    <link href='http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,200italic' rel='stylesheet' type='text/css'>

What are blogs?

A Mystical Adventure

Home

Technical Blog

Cultural Blog

Projects

Technical Post 9.0

Deferred Objects

by Joan Torres

          Welcome to another entry of this simple mystical tech blog. Today, I feel like talking about asynchronicity, specifically using Deferred Objects.

Deferred Objects?

          As we learned from a previous entry, in web development, we can use javascript when we want a more dynamic response on the client-side of our application. One common way to implement this is through AJAX. The JavaScript library jQuery provides a simple interface for performing asynchronous requests with AJAX:

          $.ajax({
            url: "/resources",
            type: "post",
            data: { foo: "bar" }
          })

          However, this function is actually a wrapper for the jQuery Deferred Interface. A Deferred Object in jQuery is an object whose execution gets put off till later. Understanding this interface can actually help us understand asynchronicity (and thus AJAX) even more.

A Simple Implementation (Status)

          There are quite a few functions within jQuery's deferred object. However, I will stick to only a few basic ones which should be enough to understand how it works. We'll use plain vanilla JavaScript to implement a minimal Deferred object.

The first thing we need to consider about the deferred objects is their status. Once a deferred object is initialized it is set to pending until some other action changes it to resolved if it can be successfully executed or rejected if for some reason it shouldn't run at this time. This means we can begin writing our implementation with this:

          var Deferred = function(){
             this.status = "pending"
          }

We've written a simple constructor function that will initialize an instance of Deferred with the status of "pending". Now let's expand its prototype with resolve and reject functions which can change the status of our Deferred object:

          Deferred.prototype = {
            resolve: function(){
              this.status = "resolved"
            },
            reject: function(){
              this.status = "rejected"
            }
          }

A Simple Implementation (Callbacks)

          Now our Deferred object can be initialized, resolved or rejected. However, there's another really important functionality that we should include, the callbacks. Since we can have our Deferred object be resolved or rejected we probably want to provide a way to set callback functions for a successful execution as well as for an unsuccessful one. In jQuery, this is implemented using a done and a fail function. These functions can take any number of functions as arguments and work as callback setters for our Deferred object. One simple way we could implement each of these is this way:

          Deferred.prototype = {
            done: function(){
              this.callbacks = arguments;
              return this;
            },
            fail: function(){
              this.failCallbacks = arguments;
              return this;
            }
          }

          There's a couple of concepts that are worth noting on those few lines of code. The first one is the use of the JavaScript object arguments which holds every single argument that the function receives. Since JavaScript already allows the programmer to pass in none or more than the required arguments for any function when invoking it, then we want to take advantage of that. Therefore we use the arguments object which is an array-like object of whatever it is that the function got when invoked.

The other thing worth nothing is the use of return this; at the end of both functions. This was deliberately included in order to provide the object with the ability to chain its functions. Since the function returns the object itself, then other functions from the prototype can be chained to it. Therefore we can have this:

          bob = new Deferred();

          bob.done(function(){
            console.log("success");
          }).fail(function(){
            console.log("fail");
          });

This chaining is similar to jQuery's. This capability is really useful which is why we should include it in this simplified version.

A Simple Implementation (All Together)

Now we actually have enough to bring it all together. All we're missing is the actually execution of our callbacks. We should include the execution of them in the resolve and reject functions. In this first example, I will only execute the first of each list of callbacks to illustrate one way it could be done:

          var Deferred = function(){
             this.status = "pending"
          }

          Deferred.prototype = {
            done: function(){
              this.callbacks = arguments;
              return this;
            },
            fail: function(){
              this.failCallbacks = arguments;
              return this;
            },
            resolve: function(){
              this.status = "resolved"
              this.callbacks[0]();
            },
            reject: function(){
              this.status = "rejected"
              this.failCallbacks[0]();
            }
          }

This implementation should be enough for a simple example such as:

          bob = new Deferred()

          bob.done(function(){
            console.log("success");
          }).fail(function(){
            console.log("fail");
          });

          //After some time, some other code execution, or a server response
          bob.resolve()

The output of running bob.resolve() should be a "success" message being printed in the console. That is because the resolve method will change the bob Deferred object to "resolved" and execute the first callback function which is this case only contains console.log("success"). Notice I didn't return the object at the end of these functions because it didn't seem necessary or intuitive to chain a resolve or reject with any of the other functions.

          A more complete implementation of Deferred will have a loop that runs each callback in the resolve and reject functions:

          for(var i = 0; i < this.callbacks.length; i++)
            this.callbacks[i]();

Something along those lines should be enough. So our final, simple and minimal implementation should be something such as this:

          var Deferred = function(){
             this.status = "pending";
          }

          Deferred.prototype = {
            done: function(){
              this.callbacks = arguments;
              return this;
            },
            fail: function(){
              this.failCallbacks = arguments;
              return this;
            },
            resolve: function(){
              this.status = "resolved";
              for(var i = 0; i < this.callbacks.length; i++)
                this.callbacks[i]();
            },
            reject: function(){
              this.status = "rejected";
              for(var i = 0; i < this.failCallbacks.length; i++)
                this.failCallbacks[i]();
            }
          }

References

Here's a list of useful resources:

                Deferred Object

                The Arguments Object

                First-class functions

                Method Chaining

Thanks for dropping by!

This footer is brought to you in part by HTML, CSS, ALMONDS, NUTELLA, DBC & Joan Torres


text:
import xml.etree.ElementTree as etree
import cgi
import shutil
import os
import html2text
import sys

class Comment:
	def __init__(self):
		self.date = ""
		self.author = ""
		self.authorEmail = ""
		self.text = ""
		self.filename = ""

class Post:
	def __init__(self):
		self.title = ""
		self.name = ""
		self.date = ""
		self.link = ""
		self.text = ""
		self.filename = ""
		self.author = ""
		self.id = ""
		self.tags = []
		self.comments = []

def load(file):
	xml = etree.parse(file)
	root = xml.getroot()
	return root.find("channel").findall("item")

outputPath = "./md"
inputPath = "./source.xml"

if os.path.exists(outputPath):
	shutil.rmtree(outputPath)

os.makedirs(outputPath)

items = load(inputPath)

for item in items:

	if item.find("{http://wordpress.org/export/1.2/}post_type").text != "post":
		continue

	if item.find("{http://wordpress.org/export/1.2/}status").text != "publish":
		continue

	post = Post()

	post.id = item.find("{http://wordpress.org/export/1.2/}post_id").text
	post.name = item.find("{http://wordpress.org/export/1.2/}post_name").text
	post.title = item.find("title").text
	post.link = item.find("link").text
	post.date = item.find("{http://wordpress.org/export/1.2/}post_date_gmt").text
	post.text = item.find("{http://purl.org/rss/1.0/modules/content/}encoded").text
	post.filename = post.date.replace(' ', '_').replace(':', '-')

	# Only run the post through the HTML to Markdown parser if it contains HTML
	# tags.
	if ">" in post.text:
		try:
			post.text = html2text.html2text(post.text)
		except:

			# Sometimes we get malformed HTML (or just tags that the parser
			# can't handle).  We just print the name of the file so that it
			# can be fixed manually.
			print(post.filename)

	for category in item.findall("category"):
		if category.attrib["domain"] != "post_tag":
			continue

		post.tags.append(category.text)

	for xmlComment in item.findall("{http://wordpress.org/export/1.2/}comment"):
		comment = Comment()

		comment.author = xmlComment.find("{http://wordpress.org/export/1.2/}comment_author").text
		comment.authorEmail = xmlComment.find("{http://wordpress.org/export/1.2/}comment_author_email").text
		comment.date = xmlComment.find("{http://wordpress.org/export/1.2/}comment_date_gmt").text
		comment.text = xmlComment.find("{http://wordpress.org/export/1.2/}comment_content").text
		comment.filename = comment.date.replace(' ', '_').replace(':', '-')

		post.comments.append(comment)

	if os.path.exists(os.path.join(outputPath, post.name + ".md")):
		sys.exit("Duplicate post name")

	output = open(os.path.join(outputPath, post.name + ".md"), 'wt')
	output.write("Title: " + post.title + "\n")
	output.write("Date: " + post.date + "\n")
	output.write("ID: " + post.id + "\n")

	if len(post.tags) > 0:
		output.write("Tags: " + ", ".join(post.tags) + "\n")

	output.write("\n")
	output.write(post.text)
	output.close()

	if len(post.comments) > 0:

		postPath = os.path.join(outputPath, post.name)

		if os.path.exists(postPath):
			shutil.rmtree(postPath)

		os.makedirs(postPath)

		commentPath = os.path.join(postPath, "comments")

		if os.path.exists(commentPath):
			shutil.rmtree(commentPath)

		os.makedirs(commentPath)

		for comment in post.comments:

			if os.path.exists(os.path.join(commentPath, comment.filename + ".md")):
				sys.exit("Duplicate comment name")

			output = open(os.path.join(commentPath, comment.filename + ".md"), 'wt')
			output.write("Author: " + comment.author + "\n")

			if (comment.authorEmail):
				output.write("Email: " + comment.authorEmail + "\n")

			output.write("Date: " + comment.date + "\n")
			output.write("\n\n")
			output.write(comment.text)
			output.close()


text:
<?php
/**
 *
 * The template part for displaying results in search pages
 *
 * Learn more: {@link https://codex.wordpress.org/Template_Hierarchy}
 *
 */

?>
<section id="post-<?php the_ID() ?>" <?php post_class(array('blog-post-area')) ?>>

		<?php majale_home_thumbnail() ?>

			<?php majale_date_author() ?>

		<?php
			if ( is_single() ) :
				the_title( '
', '
' );
			else :
				the_title( sprintf( '
', esc_url( get_permalink() ) ), '
' );
			endif;
		?>

		<?php the_excerpt(); ?>

		<?php wp_link_pages( array(
			'before'      => '
' . __( 'Pages:', 'majale' ) . '',
			'after'       => '
',
			'link_before' => '',
			'link_after'  => '',
			) );
		?>


text:
namespace OpenSubdiv {
namespace OPENSUBDIV_VERSION {

namespace Far {

//------------------------------------------------------------------------------

void
StencilTablesFactory::generateControlVertStencils(
    int numControlVerts, Stencil & dst) {

    // Control vertices contribute a single index with a weight of 1.0
    for (int i=0; i<numControlVerts; ++i) {
        *dst._size = 1;
        *dst._indices = i;
        *dst._weights = 1.0f;
        dst.Next();
    }
}

//
// StencilTables factory
//
StencilTables const *
StencilTablesFactory::Create(TopologyRefiner const & refiner,
    Options options) {

    StencilTables * result = new StencilTables;

    int maxlevel = std::min(int(options.maxLevel), refiner.GetMaxLevel());
    if (maxlevel==0 and (not options.generateControlVerts)) {
        return result;
    }

    // 'maxsize' reflects the size of the default supporting basis factorized
    // in the stencils, with a little bit of head-room. Each subdivision scheme
    // has a set valence for 'regular' vertices, which drives the size of the
    // supporting basis of control-vertices. The goal is to reduce the number
    // of incidences where the pool allocator has to switch to dynamically
    // allocated heap memory when encountering extraordinary vertices that
    // require a larger supporting basis.
    //
    // The maxsize settings we use follow the assumption that the vast
    // majority of the vertices in a mesh are regular, and that the valence
    // of the extraordinary vertices is only higher by 1 edge.
    int maxsize = 0;
    bool interpolateVarying = false;
    switch (options.interpolationMode) {
        case INTERPOLATE_VERTEX: {
                Sdc::SchemeType type = refiner.GetSchemeType();
                switch (type) {
                    case Sdc::SCHEME_BILINEAR : maxsize = 5; break;
                    case Sdc::SCHEME_CATMARK  : maxsize = 17; break;
                    case Sdc::SCHEME_LOOP     : maxsize = 10; break;
                    default:
                        assert(0);
                }
            } break;
        case INTERPOLATE_VARYING: maxsize = 5; interpolateVarying=true; break;
        default:
            assert(0);
    }

    std::vector<StencilAllocator> allocators(
        options.generateIntermediateLevels ? maxlevel+1 : 2,
            StencilAllocator(maxsize, interpolateVarying));

    StencilAllocator * srcAlloc = &allocators[0],
                     * dstAlloc = &allocators[1];

    //
    // Interpolate stencils for each refinement level using
    // TopologyRefiner::InterpolateLevel<>()
    //
    for (int level=1;level<=maxlevel; ++level) {

        dstAlloc->Resize(refiner.GetNumVertices(level));

        if (options.interpolationMode==INTERPOLATE_VERTEX) {
            refiner.Interpolate(level, *srcAlloc, *dstAlloc);
        } else {
            refiner.InterpolateVarying(level, *srcAlloc, *dstAlloc);
        }

        if (options.generateIntermediateLevels) {
            if (level<maxlevel) {
                if (options.factorizeIntermediateLevels) {
                    srcAlloc = &allocators[level];
                } else {
                    // if the stencils are dependent on the previous level of
                    // subdivision, pass an empty allocator to treat all parent
                    // vertices as control vertices
                    assert(allocators[0].GetNumStencils()==0);
                }
                dstAlloc = &allocators[level+1];
            }
        } else {
            std::swap(srcAlloc, dstAlloc);
        }
    }

    // Copy stencils from the pool allocator into the tables
    {
        // Add total number of stencils, weights & indices
        int nelems = 0, nstencils=0;
        if (options.generateIntermediateLevels) {
            for (int level=0; level<=maxlevel; ++level) {
                nstencils += allocators[level].GetNumStencils();
                nelems += allocators[level].GetNumVerticesTotal();
            }
        } else {
            nstencils = (int)srcAlloc->GetNumStencils();
            nelems = srcAlloc->GetNumVerticesTotal();
        }

        // Allocate
        result->_numControlVertices = refiner.GetNumVertices(0);

        if (options.generateControlVerts) {
            nstencils += result->_numControlVertices;
            nelems += result->_numControlVertices;
        }
        result->resize(nstencils, nelems);

        // Copy stencils
        Stencil dst(&result->_sizes.at(0),
            &result->_indices.at(0), &result->_weights.at(0));

        if (options.generateControlVerts) {
            generateControlVertStencils(result->_numControlVertices, dst);
        }

        if (options.generateIntermediateLevels) {
            for (int level=1; level<=maxlevel; ++level) {
                for (int i=0; i<allocators[level].GetNumStencils(); ++i) {
                    *dst._size = allocators[level].CopyStencil(i, dst._indices, dst._weights);
                    dst.Next();
                }
            }
        } else {
            for (int i=0; i<srcAlloc->GetNumStencils(); ++i) {
                *dst._size = srcAlloc->CopyStencil(i, dst._indices, dst._weights);
                dst.Next();
            }
        }

        if (options.generateOffsets) {
            result->generateOffsets();
        }
    }

    return result;
}

//------------------------------------------------------------------------------

StencilTables const *
StencilTablesFactory::Create(int numTables, StencilTables const ** tables) {

    StencilTables * result = new StencilTables;

    if ( (numTables<=0) or (not tables)) {
        return result;
    }

    int ncvs = tables[0]->GetNumControlVertices(),
        nstencils = 0,
        nelems = 0;

    for (int i=0; i<numTables; ++i) {

        StencilTables const & st = *tables[i];

        if (st.GetNumControlVertices()!=ncvs) {
            return result;
        }
        nstencils += st.GetNumStencils();
        nelems += (int)st.GetControlIndices().size();
    }

    result->resize(nstencils, nelems);

    unsigned char * sizes = &result->_sizes[0];
    Index * indices = &result->_indices[0];
    float * weights = &result->_weights[0];
    for (int i=0; i<numTables; ++i) {
        StencilTables const & st = *tables[i];

        int st_nstencils = st.GetNumStencils(),
            st_nelems = (int)st._indices.size();
        memcpy(sizes, &st._sizes[0], st_nstencils*sizeof(unsigned char));
        memcpy(indices, &st._indices[0], st_nelems*sizeof(Index));
        memcpy(weights, &st._weights[0], st_nelems*sizeof(float));

        sizes += st_nstencils;
        indices += st_nelems;
        weights += st_nelems;
    }

    result->_numControlVertices = ncvs;

    // have to re-generate offsets from scratch
    result->generateOffsets();

    return result;
}

//------------------------------------------------------------------------------

LimitStencilTables const *
LimitStencilTablesFactory::Create(TopologyRefiner const & refiner,
    LocationArrayVec const & locationArrays, StencilTables const * cvStencils,
        PatchTables const * patchTables) {

    // Compute the total number of stencils to generate
    int numStencils=0, numLimitStencils=0;
    for (int i=0; i<(int)locationArrays.size(); ++i) {
        assert(locationArrays[i].numLocations>=0);
        numStencils += locationArrays[i].numLocations;
    }
    if (numStencils<=0) {
        return 0;
    }

    bool uniform = refiner.IsUniform();

    int maxlevel = refiner.GetMaxLevel(), maxsize=17;

    StencilTables const * cvstencils = cvStencils;
    if (not cvstencils) {
        // Generate stencils for the control vertices - this is necessary to
        // properly factorize patches with control vertices at level 0 (natural
        // regular patches, such as in a torus)
        // note: the control vertices of the mesh are added as single-index
        //       stencils of weight 1.0f
        StencilTablesFactory::Options options;
        options.generateIntermediateLevels = uniform ? false :true;
        options.generateControlVerts = true;
        options.generateOffsets = true;

        // XXXX (manuelk) We could potentially save some mem-copies by not
        // instanciating the stencil tables and work directly off the pool
        // allocators.
        cvstencils = StencilTablesFactory::Create(refiner, options);
    } else {
        // Sanity checks
        if (cvstencils->GetNumStencils() != (uniform ?
            refiner.GetNumVertices(maxlevel) :
                refiner.GetNumVerticesTotal())) {
                return 0;
        }
    }

    // If a stencil table was given, use it, otherwise, create a new one
    PatchTables const * patchtables = patchTables;
    if (not patchTables) {
        // XXXX (manuelk) If no patch-tables was passed, we should be able to
        // infer the patches fairly easily from the refiner. Once more tags
        // have been added to the refiner, maybe we can remove the need for the
        // patch tables.

        OpenSubdiv::Far::PatchTablesFactory::Options options;
        options.adaptiveStencilTables = cvstencils;

        patchtables = PatchTablesFactory::Create(refiner, options);
    } else {
        // Sanity checks
        if (patchTables->IsFeatureAdaptive()==uniform) {
            if (not cvStencils) {
                assert(cvstencils and cvstencils!=cvStencils);
                delete cvstencils;
            }
            return 0;
        }
    }

    assert(patchtables and cvstencils);

    // Create a patch-map to locate sub-patches faster
    PatchMap patchmap( *patchtables );

    //
    // Generate limit stencils for locations
    //

    // Create a pool allocator to accumulate ProtoLimitStencils
    LimitStencilAllocator alloc(maxsize);
    alloc.Resize(numStencils);

    // XXXX (manuelk) we can make uniform (bilinear) stencils faster with a
    //       dedicated code path that does not use PatchTables or the PatchMap
    for (int i=0, currentStencil=0; i<(int)locationArrays.size(); ++i) {

        LocationArray const & array = locationArrays[i];

        assert(array.ptexIdx>=0);

        for (int j=0; j<array.numLocations; ++j, ++currentStencil) {

            float s = array.s[j],
                  t = array.t[j];

            PatchMap::Handle const * handle =
                patchmap.FindPatch(array.ptexIdx, s, t);

            if (handle) {
                ProtoLimitStencil dst = alloc[currentStencil];
                if (uniform) {
                    patchtables->Interpolate(*handle, s, t, *cvstencils, dst);
                } else {
                    patchtables->Limit(*handle, s, t, *cvstencils, dst);
                }
                ++numLimitStencils;
            }
        }
    }

    if (not cvStencils) {
        delete cvstencils;
    }

    //
    // Copy the proto-stencils into the limit stencil tables
    //
    LimitStencilTables * result = new LimitStencilTables;

    int nelems = alloc.GetNumVerticesTotal();
    if (nelems>0) {

        // Allocate
        result->resize(numLimitStencils, nelems);

        // Copy stencils
        LimitStencil dst(&result->_sizes.at(0), &result->_indices.at(0),
            &result->_weights.at(0), &result->_duWeights.at(0),
                &result->_dvWeights.at(0));

        for (int i=0; i<alloc.GetNumStencils(); ++i) {
            *dst._size = alloc.CopyLimitStencil(i, dst._indices, dst._weights,
                dst._duWeights, dst._dvWeights);
            dst.Next();
        }

        // XXXX manuelk should offset creation be optional ?
        result->generateOffsets();
    }
    result->_numControlVertices = refiner.GetNumVertices(0);

    return result;
}

//------------------------------------------------------------------------------

KernelBatch
StencilTablesFactory::Create(StencilTables const &stencilTables) {

    return KernelBatch( KernelBatch::KERNEL_STENCIL_TABLE,
        -1, 0, stencilTables.GetNumStencils());
}

} // end namespace Far

} // end namespace OPENSUBDIV_VERSION
} // end namespace OpenSubdiv


text:
namespace Microsoft.Azure.Management.DataShare
{
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using System.Linq;
    using System.Net;
    using System.Net.Http;
    using System.Threading;
    using System.Threading.Tasks;

    /// <summary>
    /// EmailRegistrationsOperations operations.
    /// </summary>
    internal partial class EmailRegistrationsOperations : IServiceOperations<DataShareManagementClient>, IEmailRegistrationsOperations
    {
        /// <summary>
        /// Initializes a new instance of the EmailRegistrationsOperations class.
        /// </summary>
        /// <param name='client'>
        /// Reference to the service client.
        /// </param>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        internal EmailRegistrationsOperations(DataShareManagementClient client)
        {
            if (client == null)
            {
                throw new System.ArgumentNullException("client");
            }
            Client = client;
        }

        /// <summary>
        /// Gets a reference to the DataShareManagementClient
        /// </summary>
        public DataShareManagementClient Client { get; private set; }

        /// <summary>
        /// Activates the tenant and email combination using email code received.
        /// </summary>
        /// <remarks>
        /// Activate the email registration for the current tenant
        /// </remarks>
        /// <param name='location'>
        /// Location of the activation.
        /// </param>
        /// <param name='emailRegistration'>
        /// The payload for tenant domain activation.
        /// </param>
        /// <param name='customHeaders'>
        /// Headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="DataShareErrorException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <return>
        /// A response object containing the response body and response headers.
        /// </return>
        public async Task<AzureOperationResponse<EmailRegistration>> ActivateEmailWithHttpMessagesAsync(string location, EmailRegistration emailRegistration, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (location == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "location");
            }
            if (emailRegistration == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "emailRegistration");
            }
            if (Client.ApiVersion == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
            }
            // Tracing
            bool _shouldTrace = ServiceClientTracing.IsEnabled;
            string _invocationId = null;
            if (_shouldTrace)
            {
                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
                tracingParameters.Add("location", location);
                tracingParameters.Add("emailRegistration", emailRegistration);
                tracingParameters.Add("cancellationToken", cancellationToken);
                ServiceClientTracing.Enter(_invocationId, this, "ActivateEmail", tracingParameters);
            }
            // Construct URL
            var _baseUrl = Client.BaseUri.AbsoluteUri;
            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/locations/{location}/activateEmail").ToString();
            _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
            List<string> _queryParameters = new List<string>();
            if (Client.ApiVersion != null)
            {
                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
            }
            if (_queryParameters.Count > 0)
            {
                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
            }
            // Create HTTP transport objects
            var _httpRequest = new HttpRequestMessage();
            HttpResponseMessage _httpResponse = null;
            _httpRequest.Method = new HttpMethod("POST");
            _httpRequest.RequestUri = new System.Uri(_url);
            // Set Headers
            if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
            {
                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
            }
            if (Client.AcceptLanguage != null)
            {
                if (_httpRequest.Headers.Contains("accept-language"))
                {
                    _httpRequest.Headers.Remove("accept-language");
                }
                _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
            }

            if (customHeaders != null)
            {
                foreach(var _header in customHeaders)
                {
                    if (_httpRequest.Headers.Contains(_header.Key))
                    {
                        _httpRequest.Headers.Remove(_header.Key);
                    }
                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
                }
            }

            // Serialize Request
            string _requestContent = null;
            if(emailRegistration != null)
            {
                _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(emailRegistration, Client.SerializationSettings);
                _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8);
                _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8");
            }
            // Set Credentials
            if (Client.Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            }
            // Send Request
            if (_shouldTrace)
            {
                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            if (_shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
            }
            HttpStatusCode _statusCode = _httpResponse.StatusCode;
            cancellationToken.ThrowIfCancellationRequested();
            string _responseContent = null;
            if ((int)_statusCode != 200)
            {
                var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
                try
                {
                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                    DataShareError _errorBody =  Rest.Serialization.SafeJsonConvert.DeserializeObject<DataShareError>(_responseContent, Client.DeserializationSettings);
                    if (_errorBody != null)
                    {
                        ex.Body = _errorBody;
                    }
                }
                catch (JsonException)
                {
                    // Ignore the exception
                }
                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
                if (_shouldTrace)
                {
                    ServiceClientTracing.Error(_invocationId, ex);
                }
                _httpRequest.Dispose();
                if (_httpResponse != null)
                {
                    _httpResponse.Dispose();
                }
                throw ex;
            }
            // Create Result
            var _result = new AzureOperationResponse<EmailRegistration>();
            _result.Request = _httpRequest;
            _result.Response = _httpResponse;
            if (_httpResponse.Headers.Contains("x-ms-request-id"))
            {
                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
            }
            // Deserialize Response
            if ((int)_statusCode == 200)
            {
                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                try
                {
                    _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<EmailRegistration>(_responseContent, Client.DeserializationSettings);
                }
                catch (JsonException ex)
                {
                    _httpRequest.Dispose();
                    if (_httpResponse != null)
                    {
                        _httpResponse.Dispose();
                    }
                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
                }
            }
            if (_shouldTrace)
            {
                ServiceClientTracing.Exit(_invocationId, _result);
            }
            return _result;
        }

        /// <summary>
        /// Registers the tenant and email combination for verification.
        /// </summary>
        /// <remarks>
        /// Register an email for the current tenant
        /// </remarks>
        /// <param name='location'>
        /// Location of the registration
        /// </param>
        /// <param name='customHeaders'>
        /// Headers that will be added to request.
        /// </param>
        /// <param name='cancellationToken'>
        /// The cancellation token.
        /// </param>
        /// <exception cref="DataShareErrorException">
        /// Thrown when the operation returned an invalid status code
        /// </exception>
        /// <exception cref="SerializationException">
        /// Thrown when unable to deserialize the response
        /// </exception>
        /// <exception cref="ValidationException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        /// Thrown when a required parameter is null
        /// </exception>
        /// <return>
        /// A response object containing the response body and response headers.
        /// </return>
        public async Task<AzureOperationResponse<EmailRegistration>> RegisterEmailWithHttpMessagesAsync(string location, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken))
        {
            if (location == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "location");
            }
            if (Client.ApiVersion == null)
            {
                throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion");
            }
            // Tracing
            bool _shouldTrace = ServiceClientTracing.IsEnabled;
            string _invocationId = null;
            if (_shouldTrace)
            {
                _invocationId = ServiceClientTracing.NextInvocationId.ToString();
                Dictionary<string, object> tracingParameters = new Dictionary<string, object>();
                tracingParameters.Add("location", location);
                tracingParameters.Add("cancellationToken", cancellationToken);
                ServiceClientTracing.Enter(_invocationId, this, "RegisterEmail", tracingParameters);
            }
            // Construct URL
            var _baseUrl = Client.BaseUri.AbsoluteUri;
            var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DataShare/locations/{location}/registerEmail").ToString();
            _url = _url.Replace("{location}", System.Uri.EscapeDataString(location));
            List<string> _queryParameters = new List<string>();
            if (Client.ApiVersion != null)
            {
                _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion)));
            }
            if (_queryParameters.Count > 0)
            {
                _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters);
            }
            // Create HTTP transport objects
            var _httpRequest = new HttpRequestMessage();
            HttpResponseMessage _httpResponse = null;
            _httpRequest.Method = new HttpMethod("POST");
            _httpRequest.RequestUri = new System.Uri(_url);
            // Set Headers
            if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value)
            {
                _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString());
            }
            if (Client.AcceptLanguage != null)
            {
                if (_httpRequest.Headers.Contains("accept-language"))
                {
                    _httpRequest.Headers.Remove("accept-language");
                }
                _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage);
            }

            if (customHeaders != null)
            {
                foreach(var _header in customHeaders)
                {
                    if (_httpRequest.Headers.Contains(_header.Key))
                    {
                        _httpRequest.Headers.Remove(_header.Key);
                    }
                    _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value);
                }
            }

            // Serialize Request
            string _requestContent = null;
            // Set Credentials
            if (Client.Credentials != null)
            {
                cancellationToken.ThrowIfCancellationRequested();
                await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            }
            // Send Request
            if (_shouldTrace)
            {
                ServiceClientTracing.SendRequest(_invocationId, _httpRequest);
            }
            cancellationToken.ThrowIfCancellationRequested();
            _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false);
            if (_shouldTrace)
            {
                ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse);
            }
            HttpStatusCode _statusCode = _httpResponse.StatusCode;
            cancellationToken.ThrowIfCancellationRequested();
            string _responseContent = null;
            if ((int)_statusCode != 200)
            {
                var ex = new DataShareErrorException(string.Format("Operation returned an invalid status code '{0}'", _statusCode));
                try
                {
                    _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                    DataShareError _errorBody =  Rest.Serialization.SafeJsonConvert.DeserializeObject<DataShareError>(_responseContent, Client.DeserializationSettings);
                    if (_errorBody != null)
                    {
                        ex.Body = _errorBody;
                    }
                }
                catch (JsonException)
                {
                    // Ignore the exception
                }
                ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent);
                ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent);
                if (_shouldTrace)
                {
                    ServiceClientTracing.Error(_invocationId, ex);
                }
                _httpRequest.Dispose();
                if (_httpResponse != null)
                {
                    _httpResponse.Dispose();
                }
                throw ex;
            }
            // Create Result
            var _result = new AzureOperationResponse<EmailRegistration>();
            _result.Request = _httpRequest;
            _result.Response = _httpResponse;
            if (_httpResponse.Headers.Contains("x-ms-request-id"))
            {
                _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault();
            }
            // Deserialize Response
            if ((int)_statusCode == 200)
            {
                _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false);
                try
                {
                    _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject<EmailRegistration>(_responseContent, Client.DeserializationSettings);
                }
                catch (JsonException ex)
                {
                    _httpRequest.Dispose();
                    if (_httpResponse != null)
                    {
                        _httpResponse.Dispose();
                    }
                    throw new SerializationException("Unable to deserialize the response.", _responseContent, ex);
                }
            }
            if (_shouldTrace)
            {
                ServiceClientTracing.Exit(_invocationId, _result);
            }
            return _result;
        }

    }
}


text:
#ifndef INDEX_H
#define INDEX_H

/** \file
 *  \brief A non-code file to organize the Doxygen documentation.
 *
 * This file exists only to organize the documentation, including
 * defining the document's modules, and also adding in details of the
 * design.
 */

/** \mainpage The service mock application fidi (φίδι)
 * φίδι(fidi) n (plural φίδια) -- snake, serpent
 *
 * The common problem where mocking is used is when the user has a bit of
 * software under test, and wants to simulate or mock away everything that is
 * not the system under test (including the infrastructure pieces). The inverse
 * problem, where infrastructure is what is being tested (say, like your
 * monitoring, logging, or alerting system) and you want to mock away the
 * software that is running on the infrastructure? φίδι (fidi) is designed to
 * operate in that space.
 *
 * \section obj Objectives
 *
 * The goal for fidi (φίδι) is to model some aspects of arbitrarily
 * complex distributed client-server services, and simulate the
 * behaviour of the service's business logic in presence of external
 * stimuli (without actually containing any real business logic or
 * complexity). The behaviour that is mocked by fidi (φίδι) is remote
 * calls, return codes, response size, and latency. This way fidi can
 * model the availability and performance profiles of the server,
 * without needing to recreate the business logic.  The behaviour of
 * each instance of fidi (φίδι) is determined by the request it
 * receives. Each instance of the fidi (φίδι) application can mock a
 * node (process) in the complex, client server service that it is
 * mocking. Different instances of fidi (φίδι) talk to other instances
 * of themselves, like a snake (φίδι) eating its tail.
 *
 * fidi (φίδι) also simulates fault injection symptoms, which allows
 * the simulation of normal behaviour as well as incidents and
 * recovery. The motivation is to test the behaviour of the
 * infrastructure, monitoring, alerting and logging systems, while
 * mocking an actual service.
 *
 * \section reqs Requirements and Design
 *
 * There are two non-code pages of interest:
 * - \subpage requirements
 * - \subpage design
 *
 * \section cdoc Code Documentation
 *
 * The code for fidi is divided into three components
 * - \ref inputhandling
 * - \ref lint
 * - \ref app
 */

/** \page requirements Requirements and Scale
 *
 * fidi (φίδι) must:
 *
 * + Not contain any business logic or sensitive data.
 * + Be able to model complex data flows that change over time.
 * + Be able to model arbitrarily complex interconnections between nodes in the
 * service.
 *     - Be able to simulate interconnects that happen in any combination, in
 * sequence and/or in parallel.
 * + Be able to massage the latency and error profile of any interconnection at
 * will.
 * + Enable all interconnections and fault injections to be specified on the
 * fly.
 * + Validate the input client request for correctness (independent validation,
 *   prior to run time).
 * + Have multiple instances able to coexist on a machine (to simulate complex
 *   apps on only a single machine, or a complex service that feels multiple
 *   boundaries with independent connections on a single instance).
 *
 * \section  userstories User Stories
 *
 * 1.  As an experiment runner, I want to be able to model different calling
 *     patterns and interactions between components of the service at will, or
 *      at least by each request to the system.
 *     1.  A corollary is that as an experimenter I want to be able to
 *         reconfigure the interconnections between components (request/data
 *         flow) at each request, simulating how a service may behave
 *          differently based on inputs/external stimuli.
 * 1.  As an experiment runner, I want to simulate the behaviour of the business
 *     logic of the service in response to stimuli and error conditions.
 *     1.  As an experiment runner, I want to be able to inject faults into the
 *         simulated service components. This includes, but is not limited to
 *         specifying the return code and injecting latency increases for any
 *         interaction in the request flow.
 *     1.  As an experiment runner, I should be able to specify the response
 *         code, latency, response size, and memory consumed by any component
           for each interaction in the flow.
 * 1.  As an evaluator, I want to model the business logic behaviour of a
 *     complex, multi-level service.
 *     1.  As an evaluator, I should be able to specify a series of interactions
 *         between the components of the system for each request, including
 *         serial or parallel interactions between components, and the
 *         performance characteristics of each of the interactions.
 * 1.  As an evaluator looking at gap analysis for the solutions deployed around
 *     the simulated service, I want to be able to script normal behaviour of
 *     the service, simulate an incident that affects one or all components of
 *     the service, and recovery, and set up any number of diverse incidents
 *     over time.
 *     1.  As an evaluator, I want to be able to simulate changing behaviour of
 *         the service over time, to reflect the real service changes of
 *         behaviour. This means that I should be able to specify, at an
 *         abstract level, the performance of each component of the simulated
 *         service (for example, performance, load on the machine, size of the
 *         responses, etc.)
 *
 * \section cache Exemplar Service
 *
 * fidi (φίδι) should be able to mock this caching service
 *
 * \startuml "An example caching service"
 *    autonumber
 *    actor Client
 *    boundary Frontend
 *    entity Cache
 *    database Backend
 *
 *    Client -> Frontend: Flow A
 *    Client -> Frontend: Flow B
 *    Client -> Frontend: Flow C
 *
 *    Frontend -> Cache: Flow A
 *    Frontend -> Cache: Flow B
 *    Cache -> Frontend: Flow A
 *    Frontend -> Cache: Flow C
 *
 *    Frontend -> Client: Flow A
 *    Cache -> Frontend: Flow B
 *    Frontend -> Client: Flow B
 *
 *    Cache -> Frontend: Flow C
 *    Frontend -> Backend: Flow C
 *    Backend -> Frontend: Flow C
 *    Frontend -> Client: Flow C
 * \enduml
 */

/** \page design The design document for fidi (φίδι)
 *
 * At the simplest level: this is a simple HTTP application that talks
 * to other instances of itself. The number and targets of these calls
 * are defined by the input request. Indeed, all aspects of the
 * applications behaviour are controlled by the input request, so the
 * behaviour modeled by the mocked service maybe changed by each
 * successive request.  The request can also specify the
 * return code, and optionally the delay before and after making the calls, and
 * the size of random text returned as a response.
 *
 * Each downstream call specification has an integer sequence number,
 * and a repetition count. Downstream calls section of the request
 * contains the full flow of calls further downstream, to whatever
 * depth necessary, nested within the payload. While parsing the
 * request, fidi (φίδι) need only parse only the parts of the request
 * that instance itself needs to make calls to the next level, the
 * details of the nested calls can be passed as a blob in the request
 * made to the next level downstream service mock application.
 *
 * Calls are made by fidi (φίδι) in sequence order, with a sequence
 * point in between successive sequence numbers (so strictly
 * serially). Calls with the same sequence number are made in
 * parallel, with a synchronization mechanism to complete all calls
 * before the calls with the next sequence number are made. If a call
 * has a repetition count, **repetition count** number of calls are
 * made in parallel.
 *
 * To recap, fidi (φίδι) needs to:
 * 1. parse the request.
 * 1. Handle the request response.
 *     1. Set the response code.
 *     2. Modify the response it sends back.
 *     3. Mock memory utilization.
 * 1. make one or more calls in a specified sequence, to other fidi (φίδι)
 *    instances, passing through the (nested) unpacked request content.
 *
 * Stated visually:
 *
 * \startuml "Sequence diagram for fidi"
 * actor Client #green
 * boundary Server #green
 * control Request
 * entity Parser
 * entity Call
 *
 * Client -> Server : Request
 * activate Server
 *
 * loop Over Requests
 *    Server -> Request: Add <<createReq>>
 *    activate Request #FFBBBB
 *
 *    create Parser
 *    Request -> Parser : Parse Request
 *    activate Parser
 *
 *    Parser -> Request : Done
 *    deactivate Parser
 *
 *    Request -> Request : Add Latency
 *    Request -> Request : Create Response
 *    activate Request #DarkSalmon
 *
 *    create Call
 *    loop Over Sequences
 *       loop Over Calls
 *          Request -> Call : Add Call
 *          activate Call #FFBBBB
 *
 *          Call -> Call : Make Call
 *          Call -> Request : done
 *          deactivate Call
 *       end
 *       Request -> Request : Synchronize
 *    end
 *    deactivate Request
 *
 *    Request -> Server : Request Finished
 *    deactivate Request
 *    destroy Parser
 *    destroy Call
 *
 *    destroy Request
 *
 *    Server -> Client
 * end
 * deactivate Server
 * \enduml
 *
 * And here is a flow chart
 *
 * \image html activity.png "Activity diagram for fidi"
 */

/** \defgroup fidi The service mock application fidi (φίδι)
 *
 * This is the top level for all the components of fidi (φίδι).
 */

/** \defgroup inputhandling The request parser for fidi (φίδι)
 *  \ingroup fidi
 *
 * The input language parser is the core of fidi (φίδι). It consists
 * of a simple scanner and a parser, and is used by both the lint and
 * HTTP application components. It implements a simple language parser
 * that is specific to fidi (φίδι). Writing a full grammar allows for
 * adjustments to the language to be easier, it isolates the input
 * request parsing from the rest of the application, and adding in
 * error recovery rules to the grammar allows the error diagnostics
 * for the parsing to be more thorough. The latter would be harder to
 * implement were a general purpose markup language used for the
 * requests. Most of the input handling code is shared between the
 * linter and the HTTP application (all except the execute method).
 *
 * Each instance of fidi_app mocks the behaviour of a single server in
 * the service being mocked by fidi (φίδι); The number and targets of
 * these calls are defined by the input request. Indeed, all aspects
 * of the application's behaviour are controlled by the input request,
 * so the behaviour modeled by the mocked service maybe changed by each
 * successive request.
 *
 * \section nodes Hosts/Nodes
 *
 * The request must specify the attributes of every instance of the
 * fidi_app that is involved in the interaction defined in the
 * request, either a source node or a destination node for HTTP
 * requests. The host/node specification has a name, followed by
 * square brackets containing a list of comma separated attribute
 * key-value pairs
 * \code
 *        .client    [ hostname = "127.0.0.1", port = 8001, ]
 * \endcode
 * At a minimum, the node attributes must contain either a URL
 * key-value pair, or both host and port definitions, so that the HTTP
 * client request can be made to the host/node.
 *
 * \section edges Calls/Edges
 *
 * Each call is enclosed by square brackets, and differs from the node
 * definition in that the requests are not named.
 *
 * \subsection parameter Request Parameters
 *
 * The request contains request parameters, which are comma separated
 * key value pairs.  The following keys have significance:
 *
 * \subsubsection k1 predelay
 *
 * The value should be an unsigned integer that represents the number
 * of milliseconds the fidi_app shall sleep on handling the request
 * before taking any other action.
 *
 * \subsubsection k2 postdelay
 *
 * The value should be an unsigned integer that represents the number
 * of milliseconds the fidi_app shall sleep after all other actions
 * for the request have been performed, and just before the call
 * returns.
 *
 * \subsubsection k3 response
 *
 * The value should be a legal HTTP response code (sanity checked to
 * be a small integer less than 600).
 *
 * \subsubsection k4 size
 *
 * The value should be an unsigned integer that represents the number
 * of bytes in the returned response.
 *
 * \subsubsection k5 memory
 *
 * The value should be an unsigned integer that represents the number
 * of bytes of memory the fidi_app shall allocate during handling of
 * the request.
 *
 * \subsubsection k6 log_trace
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι) as a trace log.  By default these messages are ignored.
 *
 * \subsubsection k7 log_debug
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι) as a debug log.
 *
 * \subsubsection k8 log_information
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι) as a information log.
 *
 * \subsubsection k9 log_notice
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι).
 *
 * \subsubsection k10 log_warning
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι).
 *
 * \subsubsection k11 log_error
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι).
 *
 * \subsubsection k12 log_critical
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι).
 *
 * \subsubsection k13 log_fatal
 *
 * A string (preferably single line) to be (possibly) logged to the log file by
 * fidi (φίδι).
 *
 * \subsubsection k14 timeout_sec
 *
 * This represents the number of whole seconds of time to set as a timeout on
 * downstream HTTP requests.
 *
 * \subsubsection k15 timeout_usec
 *
 * This is the rest of the timeout time (a fraction of a second), represented as
   the number of microseconds.  It is always less than one million.
 *
 * \subsubsection k16 healthy
 *
 * The value is a boolean instructing the application to be healthy, or not,
 * when responding to future /healthz requests. This only applies to health
 * checks, and does not affect the respnse to requests.
 *
 * \subsubsection k17  unresponsive_for_sec
 *
 * The value is a the number in whole seconds that the application node should
 * be unresponsive for (as in drop all requests, including health checks (in
 * this context drop means sending no respnse back; there is still something
 * listening on the port and handling requests. The request will eventually time
 * out with an empty server response)). This can be used, for instance, to
 * simulate a restart.
 *
 * \subsubsection k18  unresponsive_for_usec
 *
 * The value is a the number of fractional microseconds (less than a million)
 * that the application node should be unresponsive for, in addioton to the
 * unresponsive_for_sec value above.
 *
 * \subsection calledge Calls
 *
 * Interspersed in these attributes can be specifications for calls
 * the fidi_app should make
 * \code
 *         -> frontend repeat = 2 sequence = 1 [...]
 * \endcode
 *
 * Each downstream call is defined by the arrow symbol "->", followed
 * by the destination name (the name should already have been defined
 * as detailed in the nodes section above), and optionally a repeat
 * count, and/or a sequence number.  The default repeat count is 1,
 * and the default sequence number is 1 as well. This is followed by
 * unparsed text in square brackets; those are instructions for the
 * destination host to process. In fact, the content within the square
 * brackets are identical to the call/edge format we have defined
 * here.
 *
 * Any number of calls can be defined. Calls with the same sequence
 * number shall be made in parallel; repeated calls are always made in
 * parallel.
 */

/** \defgroup lint The linter for the input request for  fidi (φίδι)
 *  \ingroup fidi
 *
 * The lint application serves as a convenience tool to validate the
 * initial input request sent to the set of service mock application
 * instances. It also serves an an integration test of the parsing component,
 * which is most of the complexity of the web application as well.
 */

/** \defgroup app The HTTP application that does the heavy lifting for fidi
 * (φίδι) \ingroup fidi
 *
 * This is the core component for fidi (φίδι). This module contains
 * a radically simple web server, which uses a new parser to parse
 * each new request. It then uses a priority queue and a thread-pool to
 * make downstream HTTP calls, in series or in parallel, as requested.
 */

/* index.h ends here */

#endif /* INDEX_H */


text:
package util

import (
	"testing"

	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/kubernetes/pkg/api"
)

func TestShouldSkipService(t *testing.T) {
	testCases := []struct {
		service    *api.Service
		svcName    types.NamespacedName
		shouldSkip bool
	}{
		{
			// Cluster IP is None
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: api.ClusterIPNone,
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: true,
		},
		{
			// Cluster IP is empty
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: "",
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: true,
		},
		{
			// ExternalName type service
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: "1.2.3.4",
					Type:      api.ServiceTypeExternalName,
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: true,
		},
		{
			// ClusterIP type service with ClusterIP set
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: "1.2.3.4",
					Type:      api.ServiceTypeClusterIP,
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: false,
		},
		{
			// NodePort type service with ClusterIP set
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: "1.2.3.4",
					Type:      api.ServiceTypeNodePort,
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: false,
		},
		{
			// LoadBalancer type service with ClusterIP set
			service: &api.Service{
				ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "bar"},
				Spec: api.ServiceSpec{
					ClusterIP: "1.2.3.4",
					Type:      api.ServiceTypeLoadBalancer,
				},
			},
			svcName:    types.NamespacedName{Namespace: "foo", Name: "bar"},
			shouldSkip: false,
		},
	}

	for i := range testCases {
		skip := ShouldSkipService(testCases[i].svcName, testCases[i].service)
		if skip != testCases[i].shouldSkip {
			t.Errorf("case %d: expect %v, got %v", i, testCases[i].shouldSkip, skip)
		}
	}
}


text:
import nose.tools as nt
import numpy as np
import theano
import theano.tensor as T

import treeano
import treeano.nodes as tn

fX = theano.config.floatX

def test_tied_init():
    network = tn.SequentialNode(
        "s",
        [tn.InputNode("i", shape=()),
         tn.AddBiasNode("b1", inits=[treeano.inits.ConstantInit(42)]),
         tn.AddBiasNode("b2", inits=[treeano.inits.TiedInit("b2", "b1")])]
    ).network()
    fn = network.function(["i"], ["s"])
    np.testing.assert_equal(84, fn(0)[0])
    network["b1"].get_vw("bias").variable.set_value(43)
    np.testing.assert_equal(86, fn(0)[0])


text:
package org.gluu.oxtrust.model.fido;

import org.gluu.persist.model.base.Entry;
import org.gluu.site.ldap.persistence.annotation.LdapAttribute;
import org.gluu.site.ldap.persistence.annotation.LdapEntry;
import org.gluu.site.ldap.persistence.annotation.LdapObjectClass;

/**
 * @author Val Pecaoco
 */
@LdapEntry(sortBy = { "id" })
@LdapObjectClass(values = { "top", "oxDeviceRegistration" })
public class GluuCustomFidoDevice extends Entry {

	@LdapAttribute(name = "oxId", ignoreDuringUpdate = true)
	private String id;

	@LdapAttribute(name = "creationDate", ignoreDuringUpdate = true)
	private String creationDate;

	@LdapAttribute(name = "oxApplication", ignoreDuringUpdate = true)
	private String application;

	@LdapAttribute(name = "oxCounter", ignoreDuringUpdate = true)
	private String counter;

	@LdapAttribute(name = "oxDeviceData", ignoreDuringUpdate = true)
	private String deviceData;

	@LdapAttribute(name = "oxDeviceHashCode", ignoreDuringUpdate = true)
	private String deviceHashCode;

	@LdapAttribute(name = "oxDeviceKeyHandle", ignoreDuringUpdate = true)
	private String deviceKeyHandle;

	@LdapAttribute(name = "oxDeviceRegistrationConf", ignoreDuringUpdate = true)
	private String deviceRegistrationConf;

	@LdapAttribute(name = "oxLastAccessTime", ignoreDuringUpdate = true)
	private String lastAccessTime;

	@LdapAttribute(name = "oxStatus")
	private String status;

	@LdapAttribute(name = "displayName")
	private String displayName;

	@LdapAttribute(name = "description")
	private String description;

	@LdapAttribute(name = "oxNickName")
	private String nickname;

	@LdapAttribute(name = "oxTrustMetaLastModified")
	private String metaLastModified;

	@LdapAttribute(name = "oxTrustMetaLocation")
	private String metaLocation;

	@LdapAttribute(name = "oxTrustMetaVersion")
	private String metaVersion;

	/*
	 *
	@LdapAttributesList(name = "name", value = "values", sortByName = true, attributesConfiguration =
		{@LdapAttribute(name = "creationDate", ignoreDuringUpdate = true), @LdapAttribute(name = "oxId", ignoreDuringUpdate = true)}
	)
	private List<GluuCustomAttribute> customAttributes = new ArrayList<GluuCustomAttribute>();
	*/

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(String creationDate) {
		this.creationDate = creationDate;
	}

	public String getApplication() {
		return application;
	}

	public void setApplication(String application) {
		this.application = application;
	}

	public String getCounter() {
		return counter;
	}

	public void setCounter(String counter) {
		this.counter = counter;
	}

	public String getDeviceData() {
		return deviceData;
	}

	public void setDeviceData(String deviceData) {
		this.deviceData = deviceData;
	}

	public String getDeviceHashCode() {
		return deviceHashCode;
	}

	public void setDeviceHashCode(String deviceHashCode) {
		this.deviceHashCode = deviceHashCode;
	}

	public String getDeviceKeyHandle() {
		return deviceKeyHandle;
	}

	public void setDeviceKeyHandle(String deviceKeyHandle) {
		this.deviceKeyHandle = deviceKeyHandle;
	}

	public String getDeviceRegistrationConf() {
		return deviceRegistrationConf;
	}

	public void setDeviceRegistrationConf(String deviceRegistrationConf) {
		this.deviceRegistrationConf = deviceRegistrationConf;
	}

	public String getLastAccessTime() {
		return lastAccessTime;
	}

	public void setLastAccessTime(String lastAccessTime) {
		this.lastAccessTime = lastAccessTime;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getNickname() {
		return nickname;
	}

	public void setNickname(String nickname) {
		this.nickname = nickname;
	}

	public String getMetaLastModified() {
		return metaLastModified;
	}

	public void setMetaLastModified(String metaLastModified) {
		this.metaLastModified = metaLastModified;
	}

	public String getMetaLocation() {
		return metaLocation;
	}

	public void setMetaLocation(String metaLocation) {
		this.metaLocation = metaLocation;
	}

	public String getMetaVersion() {
		return metaVersion;
	}

	public void setMetaVersion(String metaVersion) {
		this.metaVersion = metaVersion;
	}
}