text:
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Google.Protobuf.WellKnownTypes {

  /// Holder for reflection information generated from google/protobuf/timestamp.proto
  public static partial class TimestampReflection {

    #region Descriptor
    /// File descriptor for google/protobuf/timestamp.proto
    public static pbr::FileDescriptor Descriptor {
      get { return descriptor; }
    }
    private static pbr::FileDescriptor descriptor;

    static TimestampReflection() {
      byte[] descriptorData = global::System.Convert.FromBase64String(
          string.Concat(
            "Ch9nb29nbGUvcHJvdG9idWYvdGltZXN0YW1wLnByb3RvEg9nb29nbGUucHJv",
            "dG9idWYiKwoJVGltZXN0YW1wEg8KB3NlY29uZHMYASABKAMSDQoFbmFub3MY",
            "AiABKAVChQEKE2NvbS5nb29nbGUucHJvdG9idWZCDlRpbWVzdGFtcFByb3Rv",
            "UAFaMmdvb2dsZS5nb2xhbmcub3JnL3Byb3RvYnVmL3R5cGVzL2tub3duL3Rp",
            "bWVzdGFtcHBi+AEBogIDR1BCqgIeR29vZ2xlLlByb3RvYnVmLldlbGxLbm93",
            "blR5cGVzYgZwcm90bzM="));
      descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
          new pbr::FileDescriptor[] { },
          new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
            new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.Timestamp), global::Google.Protobuf.WellKnownTypes.Timestamp.Parser, new[]{ "Seconds", "Nanos" }, null, null, null, null)
          }));
    }
    #endregion

  }
  #region Messages
  ///
  /// A Timestamp represents a point in time independent of any time zone or local
  /// calendar, encoded as a count of seconds and fractions of seconds at
  /// nanosecond resolution. The count is relative to an epoch at UTC midnight on
  /// January 1, 1970, in the proleptic Gregorian calendar which extends the
  /// Gregorian calendar backwards to year one.
  ///
  /// All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
  /// second table is needed for interpretation, using a [24-hour linear
  /// smear](https://developers.google.com/time/smear).
  ///
  /// The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
  /// restricting to that range, we ensure that we can convert to and from [RFC
  /// 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
  ///
  /// # Examples
  ///
  /// Example 1: Compute Timestamp from POSIX `time()`.
  ///
  ///     Timestamp timestamp;
  ///     timestamp.set_seconds(time(NULL));
  ///     timestamp.set_nanos(0);
  ///
  /// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
  ///
  ///     struct timeval tv;
  ///     gettimeofday(&tv, NULL);
  ///
  ///     Timestamp timestamp;
  ///     timestamp.set_seconds(tv.tv_sec);
  ///     timestamp.set_nanos(tv.tv_usec * 1000);
  ///
  /// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
  ///
  ///     FILETIME ft;
  ///     GetSystemTimeAsFileTime(&ft);
  ///     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
  ///
  ///     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
  ///     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
  ///     Timestamp timestamp;
  ///     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
  ///     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
  ///
  /// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
  ///
  ///     long millis = System.currentTimeMillis();
  ///
  ///     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
  ///         .setNanos((int) ((millis % 1000) * 1000000)).build();
  ///
  /// Example 5: Compute Timestamp from Java `Instant.now()`.
  ///
  ///     Instant now = Instant.now();
  ///
  ///     Timestamp timestamp =
  ///         Timestamp.newBuilder().setSeconds(now.getEpochSecond())
  ///             .setNanos(now.getNano()).build();
  ///
  /// Example 6: Compute Timestamp from current time in Python.
  ///
  ///     timestamp = Timestamp()
  ///     timestamp.GetCurrentTime()
  ///
  /// # JSON Mapping
  ///
  /// In JSON format, the Timestamp type is encoded as a string in the
  /// [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
  /// format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
  /// where {year} is always expressed using four digits while {month}, {day},
  /// {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
  /// seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
  /// are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
  /// is required. A proto3 JSON serializer should always use UTC (as indicated by
  /// "Z") when printing the Timestamp type and a proto3 JSON parser should be
  /// able to accept both UTC and other timezones (as indicated by an offset).
  ///
  /// For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
  /// 01:30 UTC on January 15, 2017.
  ///
  /// In JavaScript, one can convert a Date object to this format using the
  /// standard
  /// [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
  /// method. In Python, a standard `datetime.datetime` object can be converted
  /// to this format using
  /// [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
  /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
  /// the Joda Time's [`ISODateTimeFormat.dateTime()`](
  /// http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime%2D%2D
  /// ) to obtain a formatter capable of generating timestamps in this format.
  ///
  public sealed partial class Timestamp : pb::IMessage<Timestamp>
  #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      , pb::IBufferMessage
  #endif
  {
    private static readonly pb::MessageParser<Timestamp> _parser = new pb::MessageParser<Timestamp>(() => new Timestamp());
    private pb::UnknownFieldSet _unknownFields;
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pb::MessageParser<Timestamp> Parser { get { return _parser; } }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public static pbr::MessageDescriptor Descriptor {
      get { return global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor.MessageTypes[0]; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    pbr::MessageDescriptor pb::IMessage.Descriptor {
      get { return Descriptor; }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Timestamp() {
      OnConstruction();
    }

    partial void OnConstruction();

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Timestamp(Timestamp other) : this() {
      seconds_ = other.seconds_;
      nanos_ = other.nanos_;
      _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public Timestamp Clone() {
      return new Timestamp(this);
    }

    /// Field number for the "seconds" field.
    public const int SecondsFieldNumber = 1;
    private long seconds_;
    ///
    /// Represents seconds of UTC time since Unix epoch
    /// 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
    /// 9999-12-31T23:59:59Z inclusive.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public long Seconds {
      get { return seconds_; }
      set {
        seconds_ = value;
      }
    }

    /// Field number for the "nanos" field.
    public const int NanosFieldNumber = 2;
    private int nanos_;
    ///
    /// Non-negative fractions of a second at nanosecond resolution. Negative
    /// second values with fractions must still have non-negative nanos values
    /// that count forward in time. Must be from 0 to 999,999,999
    /// inclusive.
    ///
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int Nanos {
      get { return nanos_; }
      set {
        nanos_ = value;
      }
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override bool Equals(object other) {
      return Equals(other as Timestamp);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public bool Equals(Timestamp other) {
      if (ReferenceEquals(other, null)) {
        return false;
      }
      if (ReferenceEquals(other, this)) {
        return true;
      }
      if (Seconds != other.Seconds) return false;
      if (Nanos != other.Nanos) return false;
      return Equals(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override int GetHashCode() {
      int hash = 1;
      if (Seconds != 0L) hash ^= Seconds.GetHashCode();
      if (Nanos != 0) hash ^= Nanos.GetHashCode();
      if (_unknownFields != null) {
        hash ^= _unknownFields.GetHashCode();
      }
      return hash;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public override string ToString() {
      return pb::JsonFormatter.ToDiagnosticString(this);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void WriteTo(pb::CodedOutputStream output) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      output.WriteRawMessage(this);
    #else
      if (Seconds != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(Seconds);
      }
      if (Nanos != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Nanos);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(output);
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
      if (Seconds != 0L) {
        output.WriteRawTag(8);
        output.WriteInt64(Seconds);
      }
      if (Nanos != 0) {
        output.WriteRawTag(16);
        output.WriteInt32(Nanos);
      }
      if (_unknownFields != null) {
        _unknownFields.WriteTo(ref output);
      }
    }
    #endif

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public int CalculateSize() {
      int size = 0;
      if (Seconds != 0L) {
        size += 1 + pb::CodedOutputStream.ComputeInt64Size(Seconds);
      }
      if (Nanos != 0) {
        size += 1 + pb::CodedOutputStream.ComputeInt32Size(Nanos);
      }
      if (_unknownFields != null) {
        size += _unknownFields.CalculateSize();
      }
      return size;
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(Timestamp other) {
      if (other == null) {
        return;
      }
      if (other.Seconds != 0L) {
        Seconds = other.Seconds;
      }
      if (other.Nanos != 0) {
        Nanos = other.Nanos;
      }
      _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
    }

    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    public void MergeFrom(pb::CodedInputStream input) {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
      input.ReadRawMessage(this);
    #else
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
            break;
          case 8: {
            Seconds = input.ReadInt64();
            break;
          }
          case 16: {
            Nanos = input.ReadInt32();
            break;
          }
        }
      }
    #endif
    }

    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
    [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
    void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
      uint tag;
      while ((tag = input.ReadTag()) != 0) {
        switch(tag) {
          default:
            _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
            break;
          case 8: {
            Seconds = input.ReadInt64();
            break;
          }
          case 16: {
            Nanos = input.ReadInt32();
            break;
          }
        }
      }
    }
    #endif

  }

  #endregion

}

#endregion Designer generated code


text:
module constants{
    export class Constants{

        public static get ILLEGAL_ARGUMENTS(){
            return "Illegal arguments";}

        public static get INVALID_MATRIX_FOR_OPERATION(){
            return "Invalid matrix for such operation.";}

        public static get SIZE_MISMATCH():string {return "Size mismatch";}

        public static get UNSUPPORTED_OPERATION():string{
            return "Operation unsupported";
        }

    }
}

export = constants;

redpajama_set_name: RedPajamaGithub


text:
<?php

class curl_exception extends Exception
{
  public function __construct($message, $code, $headers, $responseBody, $previous = null )
  {
    parent::__construct( $message , $code , $previous );
    $this->headers = trim($headers);
    $this->responseBody = $responseBody;
  }

  public function getResponseBody()
  {
    return $this->responseBody;
  }

  public function __toString()
  {
    $result = "exception '".get_class($this)."' (".$this->getCode().") with message '".$this->getMessage()."' in ".$this->getFile().":".$this->getLine()."\n";
    $result .= "Response Headers:\n{$this->headers}\n";
    $result .= "Response Body:\n{$this->responseBody}\n";
    $result .= "Stack Trace:\n";
    $result .= $this->getTraceAsString();
    return $result;
  }
};

?>


text:
layout: post
title: "Motivating in a world without WHY"
author: "Marcus Hammarberg"
date: 2015-03-25 10:39:55
tags:
 - Leadership
 - Indonesia
 - Lean
 - Agile
---

I wrote a post about Indonesian culture. In it I wrote about my experiences in Indonesia and how I've interpreted what I've experienced as many people here lives in a world without WHY. Read more in that post.

In this post I wanted to continue my thoughts about this and specifically around what actually motivates Indonesian people. Or how I could motivate someone that lives in a world without WHY. How do you get someone to start thinking in long-term goals in a culture that do not? This is has been my task for the last 1,5 year and I'm still struggling. Sometimes I have, accidentally mostly, succeed too and in this post I wanted to describe HOW I did and why I think that it worked.

As before remember:

* these are my experiences by being here for close to 1,5 years, meeting the people I happened to meet during that time
* Indonesia is a VERY big country with a big, big spread between poor and rich, in education level, geographical and also cultural.

Should I make any generalizations (which I will) it's based on my own experiences. If they are wrong or weak is due to that. If they are good... well I was lucky I guess.

BUT, one thing that I am quite sure of is that I've learned a lot about my own culture by studying the Indonesian culture. All the phenomenas that I've observed here can be seen in Sweden as well, but in lesser extension maybe.

Basically - I've learned a lot. I hope you learn something too

# An example
I thought that I'll run you through one example (although I have many) and then tell you the parts that made this work. If only we were so smart that we thought about all of this before we created them... We did not. Instead this is how it came to be, trial and error.

At one of our hospital we did this; we had a hard time reaching through to them about focusing on running self-sustaining. In fact, when we first started to talk with them they didn't really know how they were doing in terms of making or loosing money. At least, in regards to the last post, they didn't show much attention to that. It ended up as it ended up.

We wanted to change this and asked them to break the costs and incomes down to months. No change. Even on a daily level we saw little attention being given to this.

Me and my colleague Anton came up with a long-shot idea; let's turn our sights away from Rupiahs and instead break it down to number of patients. And make it even smaller and simpler by expressing the hospital target, with profit, in number of patient services / day. That was 134 as it turned out.

If you wonder about the "patient services", so did the hospital, but it's basically just means that each patients can use one or more of our services, for example the poly clinic, the lab and the pharmacy - that would be 1 patient but 3 services "sold" to him. More about this under "Make it simple.

Great! We created a really big diagram where we plotted the number of patients needed per day and the target line.
You can see the first version of our board to the right here.

Reaction: not much...

People looked generally uninterested or concerned. Even though the numbers we drew was ca 50-90 patient served per day. Half of what our goal was!

Then after a few days, just on a hunch, I asked my colleague Anton again: "134 is their goal, but that was including profit, right? How much was the profit?" 10%. So I did some math and came up with 120 as the break-even point.

I added that on the board and explained what was to the staff: "If we have fewer patients than this - we lost money by running the hospital that day. This is the 'loose money'-line". You can see that diagram to the left.

That was the most profound message I've ever delivered. I could literally see jaws dropped. A few people looked like they were about to cry. Heads were shaken in disbelief.

From that day on - we never looked back. We had their attention and I'm happy to say that we have now turned the hospital around. In February we broke the "not loosing money"-line for our average. Meaning: On average we make money everyday.

Ok - that's amazing to me - and I'm thinking about documenting this better in another media. But why did it work?

Well... since it was trial-and-error (I'm proud to say) I can only comment on the things we did. This worked for us - let it inspire you.

# Break it down
The first thing I found very useful when it comes to reach and get the attention of Indonesian people is to break long-term goals down to short-term goals. I'm talking really short term here. Daily goals, like we did above, for example. I've found this very useful, even if you have to make approximations.

"This is what we have to reach each day" - seemed to be much easier to grasp and act on than yearly or even monthly goals.

# Point to the goal
However... with the daily goals it's very easy to loose track about the long-term goal. That's why I tried to sneak in many reminders or questions per day about WHY we did things. Always trying to bring it back to our overarching goals.

A few examples on how we did this:

* We created a board with activities that we were working on. For each of these we had a WHY state. It's not "allowed" to put an item up without stating the WHY. Even the WHY that everyone knows. So "fix the leaking roof in the operating room"... WHY? According to our vision - why is this a big problem? "Because we are a hospital that want to improve quality and a leaking roof is simply not acceptable". Restating the goal.
* We also introduce a column for definition of done for each item, that further aimed to clarified our expectations about this item and the outcome of doing it.
* For all numbers, good or bad, we ask ourselves "Kenapa", why did this happen? In discussing this we further reminded ourselves about the goal and talked about how we could learn from what happened yesterday to amplify or hinder it from happening again

All in all we talked a lot about the vision but tracked the daily achievements. It took ca 4-6 months before I heard the first comments from the group (not from me) about if we doing the right things according to the vision.

# Make is simple... no simpler still
We made a lot of simplifications that seemed to catch their attention. First we talked about monthly goal. Then daily but in monetary terms. Then we counted the number of patients served and averaged out the income per patient.

It turns out that to was a little bit too complicated: we could just count the number of patients in the hospital and average out their rate and get very close to the real life outcome per day.

It's easy to think about 126 patients than about 8.034.034 Rp. per day. It's easier to think about how many patients that walks through our door than how many services we have sold to them (and easier to count too). By continuously challenge and try to simplify our ways we got and kept the attention of the entire staff.

Yes - there might have been counting errors. But by following up the "actual" outcome in our books we could verify that it was not drifting too far from reality. It never did.

# Involve at every levels
We showed the data in front of the staff everyday. The real day. Even the bad one. This is NOT the Indonesian way and even the staff was uncomfortable with that.

But as we started improve something cool happened. When the number for yesterday was revealed people started to cheer and applaud for good number and ... well be silent ... for bad. They cared!

# Build team
By doing this transparent together we created a stronger "we"-feeling in the group. One great (although cheesy) suggestion came from the hospital: "Let's do a yell-yell". Here's how it works for us:

Every morning there's a morning prayer. Right after that the director goes through and plot the numbers from yesterday (and the cheering). Then just before we leave, someone is appointed to come forward to lead the yell-yell.

This person, hugely embarrassed but laughing (remember the group / individual culture from the last  post) shouts:

Rumah Sakit XXX - apa kabar?

(The hospital - how are you?)

And everyone answers:

Luar biasa!

(Awesome!)

Told you. A little cheesy. But it means that we end each morning briefing with a laugh and everyone walks to their work in a good mood.

# Trust in the little things ... at first
In the beginning I was more or less telling the director what to say, word by word. I told her to promise things about the salary for the staff. I told her to do the numbers and what to say about them. Etc.

After a while I stepped back and let her run the morning briefing by herself: "You are in charge now". She was very nervous for that in the beginning. I trying to help her improve and after just 1 week she did it without any problems. And came up with improvements and variants.

For 4 months I did the daily stand-up meeting with the management group that talked about our improvements per day. Then I handed it over to the director: "You are in charge now". She was very nervous for that in the beginning. After each meeting I talked with her and suggested improvements. After a few weeks I stopped doing that. Because she was now in control.

I realize that I entrusted very small areas of trust to her (regarding THIS mind you. A director of a hospital has HUGE responsibilities that I didn't touch). Little by little I stepped back and she stepped forward.

That worked really well.

# Imagine me
The last thing I want to point out is something for just me. When we implement any change a good way to understand the people you are trying to change is to put yourself in their shoes. Now this is easier said than done since the changed behavior you want might be obvious for you but totally outrageous for them.

For example plotting the "real" number of patients we drew yesterday, good or bad, in front of the entire staff. I think that's a great idea. Indonesian people think ... you should not do that.

I try to play a jedi-mind-trick on myself, based on the title of an beautiful song: Imagine me, by Kirk Franklin.

What would be hard for me to change? Use that as your example when you meet confusion and resistance. If someone told me... "that I should **not** question the status quo. That would improve our outcome", for example. That would be very hard to swallow. I would fight it. I would say they were wrong. I would expect that the showed me some kind of proof. I would be grumpy....

In short - I would resist the change. Imagine me.

# Conclusion
There we go. A few items that we tried to motivate Indonesian people. It worked for us. Your mileage may vary.


text:
package eu.smartenit.sbox.db.dao.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.skife.jdbi.v2.StatementContext;
import org.skife.jdbi.v2.tweak.ResultSetMapper;

import eu.smartenit.sbox.db.dto.TimeScheduleParameters;

/**
 * The TimeScheduleParametersMapper class.
 *
 * @authors George Petropoulos
 * @version 1.1
 *
 */
public class TimeScheduleParametersMapper implements
		ResultSetMapper<TimeScheduleParameters> {

	/**
	 * The method that translates a received resultset into a TimeScheduleParameters object.
	 *
	 * @param index The index.
	 * @param r The received resultset.
	 * @param ctx The statement context.
	 *
	 * @return The TimeScheduleParameters object.
	 *
	 * @throws SQLException
	 *
	 */
	public TimeScheduleParameters map(int index, ResultSet r,
			StatementContext ctx) throws SQLException {
		TimeScheduleParameters t = new TimeScheduleParameters();
		t.setAccountingPeriod(r.getLong("accountingPeriod"));
		t.setCompensationPeriod(r.getLong("compensationPeriod"));
		t.setReportingPeriod(r.getLong("reportingPeriod"));
		t.setReportPeriodDTM(r.getLong("reportPeriodDTM"));
		t.setReportPeriodEA(r.getLong("reportPeriodEA"));
		t.setSamplingPeriod(r.getLong("samplingPeriod"));
		t.setStartDate(r.getDate("startDate"));
		t.setTol1(r.getDouble("tol1"));
		t.setTol2(r.getDouble("tol2"));
		return t;
	}
}


text:
using Neutronium.Core.Binding.Builder.Packer;
using Neutronium.Core.Binding.GlueObject;
using Neutronium.Core.WebBrowserEngine.JavascriptObject;
using System;
using System.Collections.Generic;
using System.Linq;
using Neutronium.Core.Extension;
using Neutronium.Core.Infra.Reflection;

namespace Neutronium.Core.Binding.Builder
{
    internal class JavascriptObjectBulkBuilderStrategy : IJavascriptObjectBuilderStrategy, IBulkUpdater
    {
        public IJavascriptObject CommandConstructor => _Factory.Value.CommandConstructor;
        public IJavascriptObject ExecutableConstructor => _Factory.Value.ExecutableConstructor;

        private readonly IWebView _WebView;
        private readonly ISessionCache _Cache;
        private readonly Lazy<BulkJsHelper> _Factory;
        private readonly bool _Mapping;
        private IJavascriptObject BulkObjectsUpdater => _Factory.Value.BulkObjectsUpdater;
        private IJavascriptObject BulkArraysUpdater => _Factory.Value.BulkArraysUpdater;

        public JavascriptObjectBulkBuilderStrategy(IWebView webView, ISessionCache cache, bool mapping)
        {
            _Mapping = mapping;
            _WebView = webView;
            _Cache = cache;
            _Factory = new Lazy<BulkJsHelper>(FactoryBuilder);
        }

        public void UpdateJavascriptValue(IJsCsGlue root)
        {
            var builder = new JavascriptObjectBulkBuilder(_WebView.Factory, _Cache, this, root, _Mapping);
            builder.UpdateJavascriptValue();
        }

        private BulkJsHelper FactoryBuilder()
        {
            var script =
                 @"(function(){
                    function Command(id, canExecute){
                        Object.defineProperty(this, '{{NeutroniumConstants.ObjectId}}', {value: id});
                        Object.defineProperty(this, '{{NeutroniumConstants.ReadOnlyFlag}}', {value: {{ReadOnlyObservable}}});
                        this.CanExecuteCount = 1;
                        this.CanExecuteValue = canExecute;
                    }
                    Command.prototype.Execute = function() {
                        this.privateExecute(this.{{NeutroniumConstants.ObjectId}}, ...arguments)
                    }
                    Command.prototype.CanExecute = function() {
                        this.privateCanExecute(this.{{NeutroniumConstants.ObjectId}}, ...arguments)
                    }
                    function Executable(id){
                        Object.defineProperty(this, '{{NeutroniumConstants.ObjectId}}', {value: id});
                        Object.defineProperty(this, '{{NeutroniumConstants.ReadOnlyFlag}}', {value: {{ReadOnly}}});
                    }
                    Executable.prototype.Execute = function() {
                        this.privateExecute(this.{{NeutroniumConstants.ObjectId}}, ...arguments)
                    }
                    function bulkUpdateObjects(prop){
						const propsArrays = eval( prop )
						var objectCount = 1
						var propsArrayLength = propsArrays.length;
						var propIndex = 0

						while(propsArrayLength--){
							const propArray = propsArrays[propIndex++]
							var repetition = propArray.c
							var properties = propArray.a
							while(repetition--){
								const objectToUpdate = arguments[objectCount++]
								var propertiesLength = properties.length
								var index = 0
								while(propertiesLength--){
									objectToUpdate[properties[index++]] = arguments[objectCount++]
								}
							}
						}
                    }
                    function bulkUpdateArrays(prop){
						const propsArrays = eval( prop )
						var objectCount = 1
						var propsArrayLength = propsArrays.length;
						var propIndex = 0

						while(propsArrayLength--){
							const propArray = propsArrays[propIndex++]
							var repetition = propArray.c
                            var description = propArray.a
							var arrayStart = description.b
                            var arrayEnd = description.e
							while(repetition--){
                                const objectToUpdate = arguments[objectCount++]
                                for(var index = arrayStart; index< arrayEnd; index++){
                                    objectToUpdate[index] = arguments[objectCount++]
                                }
							}
						}
                    }
                    return {
                        bulkUpdateArrays,
                        bulkUpdateObjects,
                        Command,
                        Executable
                    }
                })()";

            script = script.Replace(NeutroniumConstants.ObjectIdTemplate, NeutroniumConstants.ObjectId)
                            .Replace(NeutroniumConstants.ReadOnlyFlagTemplate, NeutroniumConstants.ReadOnlyFlag)
                            .Replace("{{ReadOnly}}", ((int)ObjectObservability.ReadOnly).ToString())
                            .Replace("{{ReadOnlyObservable}}", ((int)ObjectObservability.ReadOnlyObservable).ToString());
            _WebView.Eval(script, out var helper);
            return new BulkJsHelper(_Cache, _WebView, helper);
        }

        void IBulkUpdater.BulkUpdateProperty(IEnumerable<ObjectDescriptor> updates)
        {
            var orderedUpdates = updates.GroupBy(up => up.Father.CValue.GetType()).SelectMany(grouped => grouped);
            BulkUpdate(orderedUpdates);
        }

        void IBulkUpdater.BulkUpdateArray(IEnumerable<ArrayDescriptor> updates)
        {
            BulkUpdate(updates);
        }

        private void BulkUpdate(IEnumerable<ObjectDescriptor> updates)
        {
            var spliter = new EntityDescriptorSpliter { MaxCount = _WebView.GetMaxAcceptableArguments() - 1 };

            var packer = new ObjectChildrenDescriptionPacker();
            foreach (var entityDescriptor in spliter.SplitParameters(updates))
            {
                var arguments = GetUpdateParameters(entityDescriptor, packer);
                BulkObjectsUpdater.ExecuteFunctionNoResult(_WebView, null, arguments);
            }
        }

        private void BulkUpdate(IEnumerable<ArrayDescriptor> updates)
        {
            var spliter = new EntityArraySpliter { MaxCount = _WebView.GetMaxAcceptableArguments() - 1 };

            var packer = new ArrayChildrenDescriptionPacker();
            foreach (var entityDescriptor in spliter.SplitParameters(updates))
            {
                var arguments = GetUpdateParameters(entityDescriptor, packer);
                BulkArraysUpdater.ExecuteFunctionNoResult(_WebView, null, arguments);
            }
        }

        private IJavascriptObject[] GetUpdateParameters(Parameters updates, ObjectChildrenDescriptionPacker packer)
        {
            var sizes = packer.Pack(updates.ObjectDescriptors);
            var res = new IJavascriptObject[updates.Count + 1];
            res[0] = _WebView.Factory.CreateString(sizes);
            var count = 1;
            foreach (var father in updates.ObjectDescriptors)
            {
                res[count++] = father.Father.JsValue;
                foreach (var attribute in father.AttributeValues)
                {
                    res[count++] = attribute.JsValue;
                }
            }
            return res;
        }

        private IJavascriptObject[] GetUpdateParameters(List<ArrayDescriptor> updates, ArrayChildrenDescriptionPacker packer)
        {
            var sizes = packer.Pack(updates);
            var res = new IJavascriptObject[updates.Select(up => up.OrdenedChildren.Count + 1).Sum() + 1];
            res[0] = _WebView.Factory.CreateString(sizes);
            var count = 1;
            foreach (var father in updates)
            {
                res[count++] = father.Father.JsValue;
                foreach (var attribute in father.OrdenedChildren)
                {
                    res[count++] = attribute.JsValue;
                }
            }
            return res;
        }

        public void Dispose()
        {
            if (!_Factory.IsValueCreated)
                return;

            _Factory.Value.Dispose();
        }
    }
}


text:
Template.login.events({
  'submit #login-form' : function(e, t){
    e.preventDefault();
    // retrieve the input field values
    var email = t.find('#login-email').value,
        password = t.find('#login-password').value;

    email = Forms.trimInput(email);
    password = Forms.trimInput(password);

    // If validation passes, supply the appropriate fields to the
    // Meteor.loginWithPassword() function.
    Meteor.loginWithPassword(email, password, function(err){
      if (err) {
        // The user might not have been found, or their passwword
        // could be incorrect. Inform the user that their
        // login attempt has failed.
        Session.set("displayMessage", {title: "Error", body: "Invalid username, email, or password"});
			}
      else {
        // The user has been logged in.
				Router.go("/user");
			}
    });
    return false;
    }
});


text:
module Spree
  module Taxons
    class Find
      def initialize(scope:, params:)
        @scope = scope
        @ids      = String(params.dig(:filter, :ids)).split(',')
        @parent   = params.dig(:filter, :parent_id)
        @taxonomy = params.dig(:filter, :taxonomy_id)
        @name     = params.dig(:filter, :name)
        @roots    = params.dig(:filter, :roots)
      end

      def execute
        taxons = by_ids(scope)
        taxons = by_parent(taxons)
        taxons = by_taxonomy(taxons)
        taxons = by_roots(taxons)
        taxons = by_name(taxons)

        taxons
      end

      private

      attr_reader :ids, :parent, :taxonomy, :roots, :name, :scope

      def ids?
        ids.present?
      end

      def parent?
        parent.present?
      end

      def taxonomy?
        taxonomy.present?
      end

      def roots?
        roots.present?
      end

      def name?
        name.present?
      end

      def name_matcher
        Spree::Taxon.arel_table[:name].matches("%#{name}%")
      end

      def by_ids(taxons)
        return taxons unless ids?

        taxons.where(id: ids)
      end

      def by_parent(taxons)
        return taxons unless parent?

        taxons.where(parent_id: parent)
      end

      def by_taxonomy(taxons)
        return taxons unless taxonomy?

        taxons.where(taxonomy_id: taxonomy)
      end

      def by_roots(taxons)
        return taxons unless roots?

        taxons.roots
      end

      def by_name(taxons)
        return taxons unless name?

        taxons.where(name_matcher)
      end
    end
  end
end


text:
\textbf{Входные параметры:}

 Left --- начало интервала поиска;

Right --- конец интервала поиска;

Function --- унимодальная функция, минимум которой ищется;

Interval --- длина шага, с которым будет проводится поиск;

VHML\_Result\_X --- вычисленная точка минимума (сюда записывается результат);

VHML\_Result\_Y --- значение функции в точке минимума (сюда записывается результат).

\textbf{Возвращаемое значение:}

 Отсутствует.

\begin{lstlisting}[caption=Оптимизируемая функция]
double Func4(double x)
{
return (x-1)*(x-1);
}
//---------------------------------------------------------------------------
\end{lstlisting}


text:
import {
  Component, Input, TemplateRef, ViewChild, ViewContainerRef, ChangeDetectionStrategy, OnInit
} from '@angular/core';
import { TreeNodeModel } from './tree-node.model';

@Component({
  selector: 'sky-contrib-tree-view-renderer',
  template: '<ng-template #container></ng-template>',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class SkyContribTreeViewRendererComponent implements OnInit {
  @Input() public item: TreeNodeModel;
  @Input() public template: TemplateRef<any>;
  @ViewChild('container', { read: ViewContainerRef }) public container: ViewContainerRef;

  public ngOnInit() {
    if (this.template !== undefined) {
      this.container.createEmbeddedView(this.template, this);
    }
  }
}


text:
require 'rails_helper'

RSpec.describe BirstProcessGroupCollectionAssociation, :type => :model do
  pending "add some examples to (or delete) #{__FILE__}"
end


text:
# grunt-react

[![Build Status](https://travis-ci.org/ericclemmons/grunt-react.png?branch=master)](https://travis-ci.org/ericclemmons/grunt-react)
[![Dependencies](https://david-dm.org/ericclemmons/grunt-react.png)](https://david-dm.org/ericclemmons/grunt-react)
[![devDependencies](https://david-dm.org/ericclemmons/grunt-react/dev-status.png)](https://david-dm.org/ericclemmons/grunt-react#info=devDependencies&view=table)

> Grunt task for compiling [Facebook React](http://facebook.github.io/react/)'s JSX templates into JavaScript.

It also works great with `grunt-browserify`!

## Getting Started
This plugin requires Grunt `~0.4.0`

If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

```shell
npm install grunt-react --save-dev
```

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

```js
grunt.loadNpmTasks('grunt-react');
```

## The "react" task

### Overview
In your project's Gruntfile, add a section named `react` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  react: {
    single_file_output: {
      files: {
        'path/to/output/dir/output.js': 'path/to/jsx/templates/dir/input.jsx'
      }
    },
    combined_file_output: {
      files: {
        'path/to/output/dir/combined.js': [
          'path/to/jsx/templates/dir/input1.jsx',
          'path/to/jsx/templates/dir/input2.jsx'
        ]
      }
    },
    dynamic_mappings: {
      files: [
        {
          expand: true,
          cwd: 'path/to/jsx/templates/dir',
          src: ['**/*.jsx'],
          dest: 'path/to/output/dir',
          ext: '.js'
        }
      ]
    }
  },
})
```

- - -

### Recommended Usage
Writing your applications in CommonJS format will allow you to use [Browserify](http://browserify.org/) to
concatenate your files.  Plus, with `grunt-react`, your templates will be converted from JSX to JS *automatically*!

First, install `grunt-browserify` to your project:

```shell
npm install grunt-browserify --save-dev
```

Second, register `grunt-browserify` in your Gruntfile:

```js
grunt.loadNpmTasks('grunt-browserify')
```

Finally, add the following task to your Gruntfile:

```js
browserify:     {
  options:      {
    transform:  [ require('grunt-react').browserify ]
  },
  app:          {
    src:        'path/to/source/main.js',
    dest:       'path/to/target/output.js'
  }
}
```

You've successfully concatenated your JSX & JS files into one file!

### Options

#### options.extension
Type: `String`
Default value: `js`

Extension of files to search for JSX-syntax & convert to JS.

#### options.ignoreMTime
Type: `Boolean`
Default value: `false`

Speed up compilation of JSX files by skipping files not modified since last pass.

#### options.harmony
Type: `Boolean`
Default value: `false`

#### options.sourceMap
Type: `Boolean`
Default value: `false`

Append inline source map at the end of the transformed source

Turns on JS transformations such as ES6 Classes.

- - -

### Usage Examples

#### Recommended Options

I recommend naming your React Components with the `.jsx` extension:

```js
/**
 * @jsx React.DOM
 */

var MyComponent = React.createClass({
  ...
  render: function() {
    return (
      <p>Howdy</p>
    );
  }
});
```

Then, set your Gruntfile to use:

```js
grunt.initConfig({
  react: {
    files: {
      expand: true,
      cwd: 'path/to/jsx/templates/dir',
      src: ['**/*.jsx'],
      dest: 'path/to/output/dir',
      ext: '.js'
    }
  },
})
```

This will output the following:

```js
/**
 * @jsx React.DOM
 */

var MyComponent = React.createClass({displayName: 'MyComponent',
  render: function() {
    return (
      React.DOM.p(null, "Howdy")
    );
  }
});
```

## Troubleshooting

If you encounter a file compilation error, you can run `grunt --verbose` to see specifics about each file being transformed.

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).

## Release History

- v0.12.2
  + Move verbose logging to `grunt --verbose` ([#53](https://github.com/ericclemmons/grunt-react/pull/53))

- v0.12.1
  + Fix issue with Browserify ([#46](https://github.com/ericclemmons/grunt-react/pull/49))

- v0.12.0
  + Update all `dependencies` & `devDependencies`

- v0.11.0
  + Update `react-tools` to `v0.13.0` ([#45](https://github.com/ericclemmons/grunt-react/pull/45))

- v0.10.0
  + Update `react-tools` to `v0.12.0` ([#40](https://github.com/ericclemmons/grunt-react/pull/40)).
    (See release notes: http://facebook.github.io/react/blog/2014/10/28/react-v0.12.html)

- v0.9.0
  + Continue compilation despite error. ([#31](https://github.com/ericclemmons/grunt-react/pull/31))
- v0.8.4
  + Add support for `harmony` via additional options. ([#32](https://github.com/ericclemmons/grunt-react/pull/32))
- v0.8.3
  + Update to `react-tools` at `^v0.11.0` ([#33](https://github.com/ericclemmons/grunt-react/pull/33))
- v0.8.2
  - Emit `react.error` for Growl & other notifications ([#23](https://github.com/ericclemmons/grunt-react/pull/23))
- v0.8.1
  - Throw a proper error when React fails ([#25](https://github.com/ericclemmons/grunt-react/pull/25))
- v0.8.0
  - Update to React v0.10.0 ([#27](https://github.com/ericclemmons/grunt-react/pull/27))
- v0.7.0
  - Update to React v0.9.0 ([#24](https://github.com/ericclemmons/grunt-react/pull/24))
- v0.6.0
  - Task changes to allow for flexible file options as found in the `grunt-contrib-*` projects.
  - Taking hints from `grunt-contrib-less` to allow for compiling single files separately, dynamic mappings and combining.
  - Removed `extension` option as this is determined by flexible file matching now.
  - Removed MT time ignoring, this can be easily done with the `grunt-newer` plugin.
  - Errors are ignored and skipped by default to match how other grunt plugins work.
- v0.5.2
  - `grunt.fail` instead of throwing an error ([#11](https://github.com/ericclemmons/grunt-react/pull/11))
- v0.5.1
  - Add file name to errors ([#15](https://github.com/ericclemmons/grunt-react/pull/15))
- v0.5.0
  - Update to `react-tools` `~v0.5.0`
- v0.4.1
  - Add logging to make it easier catch errors, thanks to @lorefnon ([#5](https://github.com/ericclemmons/grunt-react/pull/5))
- v0.4.0
  - Update to react-tools ~0.4.0, thanks to @Agent-H ([#3](https://github.com/ericclemmons/grunt-react/pull/3))
- v0.3.0
  - No longer uses `bin/jsx`, thanks to @petehunt ([#2](https://github.com/ericclemmons/grunt-react/pull/2))
- Add `ignoreMTime` option
- v0.2.0
  - Add `require('grunt-react').browserify()` and `require('grunt-react').source()` for compiling within Node
- v0.1.0
  - Initial release

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ericclemmons/grunt-react/trend.png)](https://bitdeli.com/free "Bitdeli Badge")


text:
[![Test Coverage](https://codeclimate.com/github/ameyms/react-seed/badges/coverage.svg)](https://codeclimate.com/github/ameyms/react-seed/coverage) [![Code Climate](https://codeclimate.com/github/ameyms/react-seed/badges/gpa.svg)](https://codeclimate.com/github/ameyms/react-seed) [![Dependency Status](https://david-dm.org/ameyms/react-seed.svg)](https://david-dm.org/ameyms/react-seed) [![devDependency Status](https://david-dm.org/ameyms/react-seed/dev-status.svg)](https://david-dm.org/ameyms/react-seed#info=devDependencies)

An opinionated starter kit for ReactJS.
_Batteries included_.

## What is this?
The project contains basic boilerplate for projects using [ReactJS](http://facebook.github.io/react), [Flux](http://facebook.github.io/flux) with [Webpack](http://webpack.github.io/) for packaging & [Less](http://lesscss.org/) for styles.

## Getting started
### Prerequisites
Needless to say, you will need [Git](http://git-scm.com) and [NodeJS](http://nodejs.org) to clone and setup the environment. Additionally, you will also need [Grunt](http://gruntjs.com/) build tool. Once you have installed Node, you can install Grunt using:

```shell
npm install -g grunt-cli
```

### Getting the code
To download the code, you can clone the repo using git:
```shell
git clone https://github.com/ameyms/react-seed.git
cd react-seed
```

### Setting up the environment
The project uses [npm](https://www.npmjs.com) to manage not just the dev dependencies, but also front-end libraries. Do download and install libraries and dev tools, run:
```shell
npm install
```

### Running the dev server
This project uses [react-hot-loader](http://gaearon.github.io/react-hot-loader) and hence has the awesomeness of webpack's [hot module replacement](http://webpack.github.io/docs/hot-module-replacement.html) provided by it.
Start the dev server by running
```shell
grunt serve
```
The dev server would by default start on [localhost:9000](http://localhost:9000).
You can open your favorite IDE and make changes to any file **that exports a module** and see the changes being reflected on browser without refresh!

## Contributing
Found a bug? Notice an anti-pattern? PRs are most welcome! Or you can always [submit a bug](https://github.com/ameyms/react-seed/issues/new "Create new issue").
<br/>
However, if you do submit a PR, don't forget to conform to the style. To lint code, check for stylistic issues and run tests run:

```shell
grunt test
```

## Roadmap
- [ ] Adding sample routing logic
- [x] Add sample code for XHR along with response mocking in `grunt serve`
- [ ] Add animation samples

## License
This project and code is available under [MIT license](https://github.com/ameyms/react-seed/blob/master/LICENSE)


text:
@implementation OGREWebServer

- (BOOL)addEnvironmentVariable:(const char *)name toDictionary:(NSMutableDictionary *)dict
{
    NSString *envName;
    envName = [NSString stringWithFormat:@"%s", name];
    NSString *envVariable;
    envVariable = [NSString stringWithFormat:@"%s", getenv(name)];

    // make sure the envVariable is not NULL
    if ([envVariable caseInsensitiveCompare:@"(null)"] != NSOrderedSame)
    {
        [dict setObject:envVariable forKey:envName];
        return YES;
    }

    return NO;
}

- (id)init
{
    self = [super init];
    if (self != nil)
    {
        NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];

        // DOCUMENT_ROOT	The root directory of your server
        [self addEnvironmentVariable:"DOCUMENT_ROOT" toDictionary:dict];

        // HTTP_COOKIE	The visitor's cookie, if one is set
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("HTTP_COOKIE")]
                 forKey:@"HTTP_COOKIE"];

        //NSString *cookie = [NSString stringWithFormat:@"%s", getenv("HTTP_COOKIE")];
        //NSLog(@"Cookies: %@", cookie);

        // parse the cookies into something usable.  Cookies are 'key/value/expiration/domain'

        // HTTP_HOST	The hostname of the page being attempted
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("HTTP_HOST")]
                 forKey:@"HTTP_HOST"];
        // HTTP_REFERER	The URL of the page that called your program
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("HTTP_REFERER")]
                 forKey:@"HTTP_REFERER"];
        // HTTP_USER_AGENT	The browser type of the visitor
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("HTTP_USER_AGENT")]
                 forKey:@"HTTP_USER_AGENT"];
        // HTTPS	"on" if the program is being called through a secure server
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("HTTPS")]
                 forKey:@"HTTPS"];
        // PATH	The system path your server is running under
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("PATH")]
                 forKey:@"PATH"];
        // QUERY_STRING	The query string (see GET, below)
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("QUERY_STRING")]
                 forKey:@"QUERY_STRING"];
        // REMOTE_ADDR	The IP address of the visitor
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("REMOTE_ADDR")]
                 forKey:@"REMOTE_ADDR"];
        // REMOTE_HOST	The hostname of the visitor (if your server has reverse-name-lookups on; otherwise this is the IP address again)
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("REMOTE_HOST")]
                 forKey:@"REMOTE_HOST"];
        // REMOTE_PORT	The port the visitor is connected to on the web server
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("REMOTE_PORT")]
                 forKey:@"REMOTE_PORT"];
        // REMOTE_USER	The visitor's username (for .htaccess-protected pages)
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("REMOTE_USER")]
                 forKey:@"REMOTE_USER"];
        // REQUEST_METHOD	GET or POST
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("REQUEST_METHOD")]
                 forKey:@"REQUEST_METHOD"];
        // REQUEST_URI	The interpreted pathname of the requested document or CGI (relative to the document root)
        [self addEnvironmentVariable:"REQUEST_URI" toDictionary:dict];

        // SCRIPT_FILENAME	The full pathname of the current CGI
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("SCRIPT_FILENAME")]
                 forKey:@"SCRIPT_FILENAME"];
        // SCRIPT_NAME	The interpreted pathname of the current CGI (relative to the document root)
        [self addEnvironmentVariable:"SCRIPT_NAME" toDictionary:dict];

        // SERVER_ADMIN	The email address for your server's webmaster
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("SERVER_ADMIN")]
                 forKey:@"SERVER_ADMIN"];
        // SERVER_NAME	Your server's fully qualified domain name (e.g. www.cgi101.com)
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("SERVER_NAME")]
                 forKey:@"SERVER_NAME"];
        // SERVER_PORT	The port number your server is listening on
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("SERVER_PORT")]
                 forKey:@"SERVER_PORT"];
        // SERVER_SOFTWARE	The server software you're using (e.g. Apache 1.3)
        [dict setObject:[NSString stringWithFormat:@"%s", getenv("SERVER_SOFTWARE")]
                 forKey:@"SERVER_SOFTWARE"];

        _environment = [[NSMutableDictionary alloc] initWithDictionary:dict];

        // if the file exists, load it and go.
#ifdef DEBUG
        NSLog(@"Looking for preferences file");
#endif
        if ([[NSFileManager defaultManager] fileExistsAtPath:@"/Library/Preferences/com.ogre.server.preferences.plist"])
        {
#ifdef DEBUG
            NSLog(@"Found for preferences file at /Library/Preferences/com.ogre.server.preferences.plist");
#endif
            NSDictionary *prefs;
            prefs = [[NSDictionary alloc] initWithContentsOfFile:@"/Library/Preferences/com.ogre.server.preferences.plist"];

            // look for a dictionary corresponding to the host name,
            // if it is not found, then move to the 'default' record

            // get the 'hosts' array
            // enumerate the hosts array looking for the dictionary for the
            // passed in host name ( from the server object itself )
            NSArray *allHosts = [prefs objectForKey:@"hosts"];
            NSDictionary *defaultDict = nil;
            _preferences = nil;

            NSLog(@"All Hosts: %@", allHosts);
            NSLog(@"Host Count: %ld", [allHosts count]);
            for (int i =0; i < [allHosts count]; i++)
            {
                NSDictionary *currentHost = [allHosts objectAtIndex:i];

                NSLog(@"This hostName: %@", [currentHost objectForKey:@"hostName"]);

                if ([[currentHost objectForKey:@"hostName"] isEqualToString:@"(default)"])
                {
#ifdef DEBUG
                    NSLog(@"Using default preferences");
#endif
                    defaultDict = [allHosts objectAtIndex:i];
                }

                if ([[currentHost objectForKey:@"hostName"] isEqualToString:[_environment objectForKey:@"HTTP_HOST"]])
                {
#ifdef DEBUG
                    NSLog(@"Using preferences for %@", [_environment objectForKey:@"HTTP_HOST"]);
#endif
                    _preferences = [allHosts objectAtIndex:i];
                }
            }

            if (_preferences == nil) { _preferences = [[NSDictionary alloc] initWithDictionary:defaultDict]; }
        }
        NSLog(@"Server OBject Created");
    }
    return self;
}

#pragma mark -
#pragma mark accessors

- (NSDictionary *)environment
{
    return [[NSDictionary alloc] initWithDictionary:_environment];
}

- (NSString *)scriptName
{
    return [_environment objectForKey:@"SCRIPT_NAME"];
}

- (NSString *)requestUri
{
    return [_environment objectForKey:@"REQUEST_URI"];
}

// prefences

- (NSDictionary *)preferences
{
    if (_preferences != nil)
    {
        return _preferences;
    } else {
        return nil;
    }
}

@end


text:
Open Getting Started Guide
-----------------------------------------
Congratulations on your new Mobile Backend!

To use the Mobile Backend template as a starting point, and if you already have a development environment set up, get started with these simple steps:

1. [download the starter application package](https://console-monolith-20151201-160525.ng.bluemix.net:443/rest/../rest/apps/1af99675-89fa-48aa-b10c-30b1b287f003/starter-download)
2. Download the [SDKs](https://www.ng.bluemix.net/docs/#starters/mobile/sdk.html)
3. Modify the starter application package as needed
4. Using [cf Command Line Interface](https://github.com/cloudfoundry/cli) to push back your updated application


text:
// This file was auto-generated. Please do not edit it.

import * as p5 from "../../index";

declare module "../../index" {
  interface p5InstanceExtensions {
    /**
     *   Load a 3d model from an OBJ file.  One of the
     *   limitations of the OBJ format is that it doesn't
     *   have a built-in sense of scale. This means that
     *   models exported from different programs might be
     *   very different sizes. If your model isn't
     *   displaying, try calling loadModel() with the
     *   normalized parameter set to true. This will resize
     *   the model to a scale appropriate for p5. You can
     *   also make additional changes to the final size of
     *   your model with the scale() function.
     *   @param path Path of the model to be loaded
     *   @param normalize If true, scale the model to a
     *   standardized size when loading
     *   @param [successCallback] Function to be called
     *   once the model is loaded. Will be passed the 3D
     *   model object.
     *   @param [failureCallback] called with event error
     *   if the image fails to load.
     *   @return the p5.Geometry object
     */
    loadModel(
      path?: string,
      normalize?: boolean,
      successCallback?: (
        p1: Geometry
      ) => any,
      failureCallback?: (
        p1: Event
      ) => any
    ): Geometry;

    /**
     *   Load a 3d model from an OBJ file.  One of the
     *   limitations of the OBJ format is that it doesn't
     *   have a built-in sense of scale. This means that
     *   models exported from different programs might be
     *   very different sizes. If your model isn't
     *   displaying, try calling loadModel() with the
     *   normalized parameter set to true. This will resize
     *   the model to a scale appropriate for p5. You can
     *   also make additional changes to the final size of
     *   your model with the scale() function.
     *   @param path Path of the model to be loaded
     *   @param [successCallback] Function to be called
     *   once the model is loaded. Will be passed the 3D
     *   model object.
     *   @param [failureCallback] called with event error
     *   if the image fails to load.
     *   @return the p5.Geometry object
     */
    loadModel(
      path?: string,
      successCallback?: (
        p1: Geometry
      ) => any,
      failureCallback?: (
        p1: Event
      ) => any
    ): Geometry;

    /**
     *   Render a 3d model to the screen.
     *   @param model Loaded 3d model to be rendered
     */
    model(
      model?: Geometry
    ): void;
  }
}


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

class Notepad extends CI_Controller {

	public function index(){
		$data['title'] = "Smart Fridge - Notepad";
		$data['page'] = "Notepad";

		$this->load->view('Temp/header', $data);
		$this->load->view('Temp/title');
		$this->load->view('NotePad/notepadNav');
		$this->load->view('NotePad/notepadAdd');
		$this->load->view('Temp/footer');
	}

}


text:
<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table(name="videos")
 * @ORM\Entity()
 */
class Video {

    /**
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id()
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $link;

    /**
     * @ORM\ManyToOne(targetEntity="Accommodation", inversedBy="videos")
     */
    private $accommodation;

    /**
     * Get id
     *
     * @return integer
     */
    public function getId() {
        return $this->id;
    }

    /**
     * Set accommodation
     *
     * @param \AppBundle\Entity\Accommodation $accommodation
     * @return Video
     */
    public function setAccommodation(\AppBundle\Entity\Accommodation $accommodation = null) {
        $this->accommodation = $accommodation;

        return $this;
    }

    /**
     * Get accommodation
     *
     * @return \AppBundle\Entity\Accommodation
     */
    public function getAccommodation() {
        return $this->accommodation;
    }

    /**
     * Set link
     *
     * @param string $link
     * @return Video
     */
    public function setLink($link) {
        $this->link = $link;

        return $this;
    }

    /**
     * Get link
     *
     * @return string
     */
    public function getLink() {
        return $this->link;
    }
}


text:
$packageName = '{{PackageName}}'
$installerType = 'exe'
$url = '{{DownloadUrl}}'
$checksum = '{{Checksum}}'
$checksumType = 'sha1'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$validExitCodes = @(0)

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


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

<title>Serialized Form (ARX API Documentation)</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Serialized Form

Package org.deidentifier.arx

Class org.deidentifier.arx.ARXConfiguration extends java.lang.Object implements Serializable

serialVersionUID:

-6713510386735241964L

Serialized Fields

absMaxOutliers

int absMaxOutliers

Absolute tuple outliers.

aCriteria

PrivacyCriterion[] aCriteria

Criteria.

bCriteria

SampleBasedCriterion[] bCriteria

Criteria.

attributeWeights

java.util.Map<K,V> attributeWeights

A map of weights per attribute.

criteria

java.util.Set<E> criteria

The criteria.

metric

Metric<T extends InformationLoss<?>> metric

The metric.

practicalMonotonicity

boolean practicalMonotonicity

Do we assume practical monotonicity.

protectSensitiveAssociations

boolean protectSensitiveAssociations

Make sure that no information can be derived from associations between
 sensitive attributes.

relMaxOutliers

double relMaxOutliers

Relative tuple outliers.

requirements

int requirements

The requirements per equivalence class.

snapshotLength

int snapshotLength

The snapshot length.

suppressedAttributeTypes

java.lang.Integer suppressedAttributeTypes

Defines values of which attribute type are to be replaced by the
 suppression string in suppressed tuples.

suppressionString

java.lang.String suppressionString

The string with which suppressed values are to be replaced.

suppressionAlwaysEnabled

java.lang.Boolean suppressionAlwaysEnabled

Determines whether suppression is applied to the output of anonymous as
 well as non-anonymous transformations.

heuristicSearchForSampleBasedCriteria

boolean heuristicSearchForSampleBasedCriteria

Are we performing optimal anonymization for sample-based criteria?

Class org.deidentifier.arx.ARXLattice extends java.lang.Object implements Serializable

serialVersionUID:

-8790104959905019184L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream aInputStream)
                 throws java.lang.ClassNotFoundException,
                        java.io.IOException

De-serialization.

Throws:

java.lang.ClassNotFoundException

java.io.IOException

Serialized Fields

access

ARXLattice.Access access

The accessor.

metric

Metric<T extends InformationLoss<?>> metric

Metric.

size

int size

The number of nodes.

uncertainty

boolean uncertainty

Is practical monotonicity being assumed.

monotonicAnonymous

boolean monotonicAnonymous

Monotonicity of information loss.

monotonicNonAnonymous

boolean monotonicNonAnonymous

Monotonicity of information loss.

minimumInformationLoss

InformationLoss<T> minimumInformationLoss

Minimum loss in the lattice.

maximumInformationLoss

InformationLoss<T> maximumInformationLoss

Maximum loss in the lattice.

Class org.deidentifier.arx.ARXLattice.Access extends java.lang.Object implements Serializable

serialVersionUID:

6654627605797832468L

Serialized Fields

lattice

ARXLattice lattice

TODO

Class org.deidentifier.arx.ARXPopulationModel extends java.lang.Object implements Serializable

serialVersionUID:

6331644478717881214L

Serialized Fields

region

ARXPopulationModel.Region region

The region

sampleFraction

double sampleFraction

The sample fraction

Class org.deidentifier.arx.ARXSolverConfiguration extends de.linearbits.newtonraphson.NewtonRaphsonConfiguration<ARXSolverConfiguration> implements Serializable

serialVersionUID:

-7122709349147064168L

Serialized Fields

modified

boolean modified

Modified

Class org.deidentifier.arx.AttributeType extends java.lang.Object implements Serializable

serialVersionUID:

-7358540408016873823L

Serialized Fields

type

int type

The type.

Class org.deidentifier.arx.AttributeType.Hierarchy extends AttributeType implements Serializable

serialVersionUID:

-4721439386792383385L

Class org.deidentifier.arx.AttributeType.Hierarchy.DefaultHierarchy extends AttributeType.Hierarchy implements Serializable

serialVersionUID:

7493568420925738049L

Serialized Fields

hierarchy

java.util.List<E> hierarchy

The raw data.

array

java.lang.String[][] array

The array.

Class org.deidentifier.arx.DataSubset extends java.lang.Object implements Serializable

serialVersionUID:

3945730896172205344L

Serialized Fields

set

RowSet set

The subset as a bitset.

array

int[] array

The subset as a sorted array of indices.

Class org.deidentifier.arx.DataType extends java.lang.Object implements Serializable

serialVersionUID:

-4380267779210935078L

Class org.deidentifier.arx.DataType.ARXDate extends DataType<java.util.Date> implements Serializable

serialVersionUID:

-1658470914184442833L

Serialized Fields

format

java.text.SimpleDateFormat format

Format.

string

java.lang.String string

Format string.

locale

java.util.Locale locale

Locale.

Class org.deidentifier.arx.DataType.ARXDecimal extends DataType<java.lang.Double> implements Serializable

serialVersionUID:

7293446977526103610L

Serialized Fields

format

java.text.DecimalFormat format

Format.

string

java.lang.String string

Format string.

locale

java.util.Locale locale

Locale.

Class org.deidentifier.arx.DataType.ARXInteger extends DataType<java.lang.Long> implements Serializable

serialVersionUID:

-631163546929231044L

Serialized Fields

format

java.text.DecimalFormat format

Format.

string

java.lang.String string

Format string.

locale

java.util.Locale locale

Locale.

Class org.deidentifier.arx.DataType.ARXOrderedString extends DataType<java.lang.String> implements Serializable

serialVersionUID:

-830897705078418835L

Serialized Fields

order

java.util.Map<K,V> order

The defined order

Class org.deidentifier.arx.DataType.ARXString extends DataType<java.lang.String> implements Serializable

serialVersionUID:

903334212175979691L

Class org.deidentifier.arx.DataType.DataTypeDescription extends java.lang.Object implements Serializable

serialVersionUID:

6369986224526795419L

Serialized Fields

clazz

java.lang.Class<T> clazz

The wrapped java class.

exampleFormats

java.util.List<E> exampleFormats

If yes, a list of available formats.

hasFormat

boolean hasFormat

Can the type be parameterized with a format string.

label

java.lang.String label

A human readable label.

Class org.deidentifier.arx.RowSet extends java.lang.Object implements Serializable

serialVersionUID:

1492499772279795327L

Serialized Fields

array

long[] array

TODO

length

int length

TODO

size

int size

TODO

Package org.deidentifier.arx.aggregates

Class org.deidentifier.arx.aggregates.AggregateFunction extends java.lang.Object implements Serializable

serialVersionUID:

3803318906010996154L

Serialized Fields

type

DataType<T> type

The data type.

Class org.deidentifier.arx.aggregates.AggregateFunction.AggregateFunctionWithParameter extends AggregateFunction<T> implements Serializable

serialVersionUID:

1L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericArithmeticMean extends AggregateFunction<T> implements Serializable

serialVersionUID:

-901667129625212217L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericArithmeticMeanOfBounds extends AggregateFunction<T> implements Serializable

serialVersionUID:

5067728720270473715L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericBounds extends AggregateFunction<T> implements Serializable

serialVersionUID:

-8884657842545379206L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericCommonPrefix extends AggregateFunction.AggregateFunctionWithParameter<T> implements Serializable

serialVersionUID:

526809670467390820L

Serialized Fields

redaction

java.lang.Character redaction

SVUID

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericConstant extends AggregateFunction.AggregateFunctionWithParameter<T> implements Serializable

serialVersionUID:

-8995068916108125096L

Serialized Fields

value

java.lang.String value

SVUID

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericGeometricMean extends AggregateFunction<T> implements Serializable

serialVersionUID:

-1756610766270481335L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericGeometricMeanOfBounds extends AggregateFunction<T> implements Serializable

serialVersionUID:

8155390779775522723L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericInterval extends AggregateFunction<T> implements Serializable

serialVersionUID:

-5182521036467379023L

Serialized Fields

lowerIncluded

boolean lowerIncluded

SVUID

upperIncluded

boolean upperIncluded

SVUID

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericSet extends AggregateFunction<T> implements Serializable

serialVersionUID:

-4029191421720743653L

Class org.deidentifier.arx.aggregates.AggregateFunction.GenericSetOfPrefixes extends AggregateFunction.AggregateFunctionWithParameter<T> implements Serializable

serialVersionUID:

-4164142474804296433L

Serialized Fields

length

int length

SVUID

Class org.deidentifier.arx.aggregates.HierarchyBuilder extends java.lang.Object implements Serializable

serialVersionUID:

-4182364711973630816L

Serialized Fields

type

HierarchyBuilder.Type type

The type.

Class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased extends HierarchyBuilder<T> implements Serializable

serialVersionUID:

3208791665131141362L

Serialized Fields

groups

java.util.Map<K,V> groups

All fanouts for each level.

datatype

DataType<T> datatype

The data type.

function

AggregateFunction<T> function

The default aggregate function, might be null.

Class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.AbstractGroup extends java.lang.Object implements Serializable

serialVersionUID:

-7657969446040078411L

Serialized Fields

label

java.lang.String label

TODO

Class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.Group extends java.lang.Object implements Serializable

serialVersionUID:

-5767501048737045793L

Serialized Fields

size

int size

Fanout.

function

AggregateFunction<T> function

Aggregate function.

Class org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.Level extends java.lang.Object implements Serializable

serialVersionUID:

1410005675926162598L

Serialized Fields

level

int level

Level.

list

java.util.List<E> list

List of groups.

builder

HierarchyBuilderGroupingBased<T> builder

Builder.

Class org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased extends HierarchyBuilderGroupingBased<T> implements Serializable

serialVersionUID:

3663874945543082808L

Serialized Fields

lowerRange

HierarchyBuilderIntervalBased.Range<U> lowerRange

Adjustment.

upperRange

HierarchyBuilderIntervalBased.Range<U> upperRange

Adjustment.

intervals

java.util.List<E> intervals

Defined intervals.

Class org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased.IndexNode extends java.lang.Object implements Serializable

serialVersionUID:

5985820929677249525L

Serialized Fields

children

HierarchyBuilderIntervalBased.IndexNode[] children

Children.

isLeaf

boolean isLeaf

IsLeaf.

leafs

HierarchyBuilderIntervalBased.Interval<T>[] leafs

Leafs.

max

java.lang.Object max

Max is exclusive.

min

java.lang.Object min

Min is inclusive.

Class org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased.Interval extends org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.AbstractGroup implements Serializable

serialVersionUID:

5985820929677249525L

Serialized Fields

function

AggregateFunction<T> function

The function.

max

java.lang.Object max

Max is exclusive.

min

java.lang.Object min

Min is inclusive.

builder

HierarchyBuilderGroupingBased<T> builder

The builder.

lower

java.lang.Boolean lower

Null for normal intervals, true if <min, false if >max.

Class org.deidentifier.arx.aggregates.HierarchyBuilderIntervalBased.Range extends java.lang.Object implements Serializable

serialVersionUID:

-5385139177770612960L

Serialized Fields

repeatBound

java.lang.Object repeatBound

Bound.

snapBound

java.lang.Object snapBound

Bound.

labelBound

java.lang.Object labelBound

Bound.

Class org.deidentifier.arx.aggregates.HierarchyBuilderOrderBased extends HierarchyBuilderGroupingBased<T> implements Serializable

serialVersionUID:

-2749758635401073668L

Serialized Fields

comparator

java.util.Comparator<T> comparator

TODO

Class org.deidentifier.arx.aggregates.HierarchyBuilderOrderBased.CloseElements extends org.deidentifier.arx.aggregates.HierarchyBuilderGroupingBased.AbstractGroup implements Serializable

serialVersionUID:

7224062023293601561L

Serialized Fields

values

java.lang.String[] values

TODO

Class org.deidentifier.arx.aggregates.HierarchyBuilderOrderBased.SerializableComparator extends java.lang.Object implements Serializable

serialVersionUID:

3851134667082727602L

Class org.deidentifier.arx.aggregates.HierarchyBuilderRedactionBased extends HierarchyBuilder<T> implements Serializable

serialVersionUID:

3625654600380531803L

Serialized Fields

aligmentOrder

HierarchyBuilderRedactionBased.Order aligmentOrder

Alignment order.

paddingCharacter

char paddingCharacter

Padding character.

redactionCharacter

char redactionCharacter

Redaction character.

redactionOrder

HierarchyBuilderRedactionBased.Order redactionOrder

Redaction order.

maxValueLength

java.lang.Double maxValueLength

Meta-data about the nature of the domain of the attribute. Modeled as Double
 for backwards compatibility

domainSize

java.lang.Double domainSize

Meta-data about the nature of the domain of the attribute. Modeled as Double
 for backwards compatibility

alphabetSize

java.lang.Double alphabetSize

Meta-data about the nature of the domain of the attribute. Modeled as Double
 for backwards compatibility

Package org.deidentifier.arx.criteria

Class org.deidentifier.arx.criteria.AverageReidentificationRisk extends RiskBasedCriterion implements Serializable

serialVersionUID:

-2953252206954936045L

Class org.deidentifier.arx.criteria.DistinctLDiversity extends LDiversity implements Serializable

serialVersionUID:

-7973221140269608088L

Class org.deidentifier.arx.criteria.DPresence extends ImplicitPrivacyCriterion implements Serializable

serialVersionUID:

8534004943055128797L

Serialized Fields

dMin

double dMin

Delta min.

dMax

double dMax

Delta max.

subset

DataSubset subset

A compressed representation of the research subset.

Class org.deidentifier.arx.criteria.EntropyLDiversity extends LDiversity implements Serializable

serialVersionUID:

-354688551915634000L

Serialized Fields

logL

double logL

Helper.

Class org.deidentifier.arx.criteria.EqualDistanceTCloseness extends TCloseness implements Serializable

serialVersionUID:

-1383357036299011323L

Serialized Fields

distribution

double[] distribution

The original distribution.

Class org.deidentifier.arx.criteria.ExplicitPrivacyCriterion extends PrivacyCriterion implements Serializable

serialVersionUID:

-6467044039242481225L

Serialized Fields

attribute

java.lang.String attribute

Attribute

index

int index

Attribute index

Class org.deidentifier.arx.criteria.HierarchicalDistanceTCloseness extends TCloseness implements Serializable

serialVersionUID:

-2142590190479670706L

Serialized Fields

hierarchy

AttributeType.Hierarchy hierarchy

The hierarchy used for the EMD.

tree

int[] tree

Internal tree.

start

int start

Internal offset.

empty

int[] empty

Internal empty tree.

Class org.deidentifier.arx.criteria.ImplicitPrivacyCriterion extends PrivacyCriterion implements Serializable

serialVersionUID:

-6467044039242481225L

Class org.deidentifier.arx.criteria.Inclusion extends DPresence implements Serializable

serialVersionUID:

-3984193225980793775L

Class org.deidentifier.arx.criteria.KAnonymity extends ImplicitPrivacyCriterion implements Serializable

serialVersionUID:

-8370928677928140572L

Serialized Fields

k

int k

The parameter k.

Class org.deidentifier.arx.criteria.LDiversity extends ExplicitPrivacyCriterion implements Serializable

serialVersionUID:

6429149925699964530L

Serialized Fields

l

double l

The parameter l.

minSize

int minSize

The derived minimal size of a class

Class org.deidentifier.arx.criteria.PopulationUniqueness extends RiskBasedCriterion implements Serializable

serialVersionUID:

618039085843721351L

Serialized Fields

statisticalModel

RiskModelPopulationUniqueness.PopulationUniquenessModel statisticalModel

The statistical model

populationModel

ARXPopulationModel populationModel

The population model

solverConfig

ARXSolverConfiguration solverConfig

The solver config

Class org.deidentifier.arx.criteria.PrivacyCriterion extends java.lang.Object implements Serializable

serialVersionUID:

-8460571120677880409L

Serialized Fields

monotonic

boolean monotonic

Is the criterion monotonic when allowing for tuple suppression.

Class org.deidentifier.arx.criteria.RecursiveCLDiversity extends LDiversity implements Serializable

serialVersionUID:

-5893481096346270328L

Serialized Fields

c

double c

The parameter c.

Class org.deidentifier.arx.criteria.RiskBasedCriterion extends SampleBasedCriterion implements Serializable

serialVersionUID:

-2711630526630937284L

Serialized Fields

threshold

double threshold

The threshold

Class org.deidentifier.arx.criteria.SampleBasedCriterion extends PrivacyCriterion implements Serializable

serialVersionUID:

5687067920181297803L

Class org.deidentifier.arx.criteria.SampleUniqueness extends RiskBasedCriterion implements Serializable

serialVersionUID:

-4528395062333281525L

Class org.deidentifier.arx.criteria.TCloseness extends ExplicitPrivacyCriterion implements Serializable

serialVersionUID:

-139670758266526116L

Serialized Fields

t

double t

The param t.

Package org.deidentifier.arx.io

Class org.deidentifier.arx.io.CSVSyntax extends java.lang.Object implements Serializable

serialVersionUID:

-3978502790060734961L

Serialized Fields

delimiter

char delimiter

The delimiter.

quote

char quote

The quote.

escape

char escape

The escape.

linebreak

char[] linebreak

The linebreak.

Package org.deidentifier.arx.metric

Class org.deidentifier.arx.metric.InformationLoss extends java.lang.Object implements Serializable

serialVersionUID:

-5347658129539223333L

Class org.deidentifier.arx.metric.Metric extends java.lang.Object implements Serializable

serialVersionUID:

-2657745103125430229L

Serialized Fields

independent

boolean independent

Is the metric independent?.

monotonic

boolean monotonic

Is the metric monotonic?.

Class org.deidentifier.arx.metric.MetricAECS extends MetricDefault implements Serializable

serialVersionUID:

-532478849890959974L

Serialized Fields

rowCount

double rowCount

Number of tuples.

Class org.deidentifier.arx.metric.MetricConfiguration extends java.lang.Object implements Serializable

serialVersionUID:

871854276489749340L

Serialized Fields

monotonic

boolean monotonic

Monotonic variant.

gsFactor

double gsFactor

Coding model.

precomputed

boolean precomputed

Precomputed.

precomputationThreshold

double precomputationThreshold

Precomputation threshold.

aggregateFunction

Metric.AggregateFunction aggregateFunction

Aggregate function.

Class org.deidentifier.arx.metric.MetricDefault extends Metric<org.deidentifier.arx.metric.InformationLossDefault> implements Serializable

serialVersionUID:

2672819203235170632L

Class org.deidentifier.arx.metric.MetricDescription extends java.lang.Object implements Serializable

serialVersionUID:

-2774981286637344244L

Serialized Fields

name

java.lang.String name

Name.

monotonicVariantSupported

boolean monotonicVariantSupported

Monotonic variant supported.

attributeWeightsSupported

boolean attributeWeightsSupported

Attribute weights supported.

configurableCodingModelSupported

boolean configurableCodingModelSupported

Configurable coding model supported.

precomputationSupported

boolean precomputationSupported

Pre-computation supported.

aggregateFunctionSupported

boolean aggregateFunctionSupported

Aggregate functions supported.

Class org.deidentifier.arx.metric.MetricDM extends MetricDefault implements Serializable

serialVersionUID:

4886262855672670521L

Serialized Fields

rowCount

int rowCount

Number of tuples.

Class org.deidentifier.arx.metric.MetricDMStar extends MetricDefault implements Serializable

serialVersionUID:

-3324788439890959974L

Serialized Fields

rowCount

double rowCount

Number of tuples.

Class org.deidentifier.arx.metric.MetricEntropy extends MetricDefault implements Serializable

serialVersionUID:

-8618697919821588987L

Serialized Fields

cache

double[][] cache

Column -> Level -> Value.

cardinalities

int[][][] cardinalities

Column -> Id -> Level -> Count.

hierarchies

int[][][] hierarchies

Column -> Id -> Level -> Output.

Class org.deidentifier.arx.metric.MetricHeight extends MetricDefault implements Serializable

serialVersionUID:

5911337622032778562L

Serialized Fields

minHeight

int minHeight

The minimum height.

maxHeight

int maxHeight

The maximum height.

Class org.deidentifier.arx.metric.MetricNMEntropy extends MetricEntropy implements Serializable

serialVersionUID:

5789738609326541247L

Class org.deidentifier.arx.metric.MetricNMPrecision extends MetricWeighted<org.deidentifier.arx.metric.InformationLossDefault> implements Serializable

serialVersionUID:

-218192738838711533L

Serialized Fields

height

int[] height

Height.

cells

double cells

Number of cells.

Class org.deidentifier.arx.metric.MetricPrecision extends MetricWeighted<org.deidentifier.arx.metric.InformationLossDefault> implements Serializable

serialVersionUID:

-7612335677779934529L

Serialized Fields

maxLevels

int[] maxLevels

Height.

Class org.deidentifier.arx.metric.MetricStatic extends MetricWeighted<org.deidentifier.arx.metric.InformationLossDefault> implements Serializable

serialVersionUID:

3778891174824606177L

Serialized Fields

_infoloss

java.util.Map<K,V> _infoloss

The user defined information loss per level, indexed by column name.

infoloss

double[][] infoloss

The pre-calculated information loss.

Class org.deidentifier.arx.metric.MetricWeighted extends Metric<T extends InformationLoss<?>> implements Serializable

serialVersionUID:

6508220940790010968L

Serialized Fields

weights

double[] weights

The weights.

Package org.deidentifier.arx.metric.v2

Class org.deidentifier.arx.metric.v2.AbstractILMultiDimensional extends InformationLoss<double[]> implements Serializable

serialVersionUID:

4600789773980813693L

Serialized Fields

values

double[] values

Values.

weights

double[] weights

Weights.

Class org.deidentifier.arx.metric.v2.AbstractILMultiDimensionalReduced extends AbstractILMultiDimensional implements Serializable

serialVersionUID:

7228258212711188233L

Serialized Fields

aggregate

double aggregate

Aggregate.

Class org.deidentifier.arx.metric.v2.AbstractMetricMultiDimensional extends Metric<AbstractILMultiDimensional> implements Serializable

serialVersionUID:

3909752748519119689L

Serialized Fields

weights

double[] weights

The weights.

dimensions

int dimensions

Number of dimensions.

min

double[] min

Min.

max

double[] max

Max.

function

Metric.AggregateFunction function

The aggregate function.

Class org.deidentifier.arx.metric.v2.AbstractMetricMultiDimensionalPotentiallyPrecomputed extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

7278544218893194559L

Serialized Fields

precomputed

boolean precomputed

Is this instance precomputed.

threshold

double threshold

The threshold.

defaultMetric

AbstractMetricMultiDimensional defaultMetric

The default metric.

precomputedMetric

AbstractMetricMultiDimensional precomputedMetric

The precomputed variant.

Class org.deidentifier.arx.metric.v2.AbstractMetricSingleDimensional extends Metric<ILSingleDimensional> implements Serializable

serialVersionUID:

-1082954137578580790L

Serialized Fields

tuples

java.lang.Double tuples

Row count.

Class org.deidentifier.arx.metric.v2.Cardinalities extends java.lang.Object implements Serializable

serialVersionUID:

6164578830669365810L

Serialized Fields

cardinalities

int[][][] cardinalities

Cardinalities: Column -> Id -> Level -> Count.

Class org.deidentifier.arx.metric.v2.DomainShareInterval extends HierarchyBuilderIntervalBased<T> implements Serializable

serialVersionUID:

3430961217394466615L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream aInputStream)
                 throws java.lang.ClassNotFoundException,
                        java.io.IOException

De-serialization.

Throws:

java.lang.ClassNotFoundException

java.io.IOException

writeObject

private void writeObject(java.io.ObjectOutputStream aOutputStream)
                  throws java.io.IOException

Serialization.

Throws:

java.io.IOException

Serialized Fields

domainSize

double domainSize

The domain size.

dataType

DataType.DataTypeWithRatioScale<T> dataType

Data type.

shares

double[] shares

One share per attribute.

Class org.deidentifier.arx.metric.v2.DomainShareMaterialized extends java.lang.Object implements Serializable

serialVersionUID:

-8981924690395236648L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream aInputStream)
                 throws java.lang.ClassNotFoundException,
                        java.io.IOException

De-serialization.

Throws:

java.lang.ClassNotFoundException

java.io.IOException

writeObject

private void writeObject(java.io.ObjectOutputStream aOutputStream)
                  throws java.io.IOException

Serialization.

Throws:

java.io.IOException

Serialized Fields

size

double size

The size of the domain.

shares

double[] shares

One share per attribute.

Class org.deidentifier.arx.metric.v2.DomainShareRedaction extends java.lang.Object implements Serializable

serialVersionUID:

2015677962393713964L

Serialized Fields

maxValueLength

double maxValueLength

Meta-data about the nature of the domain of the attribute.

domainSize

double domainSize

Meta-data about the nature of the domain of the attribute.

alphabetSize

double alphabetSize

Meta-data about the nature of the domain of the attribute.

minInput

double minInput

For interpolating linearly from input to output range.

maxInput

double maxInput

For interpolating linearly from input to output range.

minOutput

double minOutput

For interpolating linearly from input to output range.

maxOutput

double maxOutput

For interpolating linearly from input to output range.

Class org.deidentifier.arx.metric.v2.ILMultiDimensionalArithmeticMean extends AbstractILMultiDimensionalReduced implements Serializable

serialVersionUID:

5142553922311764185L

Class org.deidentifier.arx.metric.v2.ILMultiDimensionalGeometricMean extends AbstractILMultiDimensionalReduced implements Serializable

serialVersionUID:

621501985571033348L

Class org.deidentifier.arx.metric.v2.ILMultiDimensionalMax extends AbstractILMultiDimensionalReduced implements Serializable

serialVersionUID:

-3373577899437514858L

Class org.deidentifier.arx.metric.v2.ILMultiDimensionalRank extends AbstractILMultiDimensional implements Serializable

serialVersionUID:

591145071792293317L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream stream)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException

Overwritten to handle changes in how the mean is computed.

Throws:

java.io.IOException

java.lang.ClassNotFoundException

Serialized Fields

aggregate

double[] aggregate

Aggregate.

mean

double mean

Geometric mean.

Class org.deidentifier.arx.metric.v2.ILMultiDimensionalSum extends AbstractILMultiDimensionalReduced implements Serializable

serialVersionUID:

6456243227046629659L

Class org.deidentifier.arx.metric.v2.ILSingleDimensional extends InformationLoss<java.lang.Double> implements Serializable

serialVersionUID:

8045076435539841773L

Serialized Fields

value

double value

Values.

Class org.deidentifier.arx.metric.v2.MetricMDHeight extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

-4720395539299677086L

Class org.deidentifier.arx.metric.v2.MetricMDNMLoss extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

-573670902335136600L

Serialized Fields

tuples

double tuples

Total number of tuples, depends on existence of research subset.

shares

DomainShare[] shares

Domain shares for each dimension.

gFactor

double gFactor

Configuration factor.

gsFactor

double gsFactor

Configuration factor.

sFactor

double sFactor

Configuration factor.

Class org.deidentifier.arx.metric.v2.MetricMDNMLossPotentiallyPrecomputed extends AbstractMetricMultiDimensionalPotentiallyPrecomputed implements Serializable

serialVersionUID:

-409964525491865637L

Class org.deidentifier.arx.metric.v2.MetricMDNMLossPrecomputed extends MetricMDNMLoss implements Serializable

serialVersionUID:

-7505441444551612996L

Serialized Fields

cardinalities

Cardinalities cardinalities

Cardinalities.

values

int[][][] values

Distinct values: attribute -> level -> values.

Class org.deidentifier.arx.metric.v2.MetricMDNMPrecision extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

7972929684708525849L

Serialized Fields

rowCount

double rowCount

Row count.

heights

int[] heights

Hierarchy heights.

Class org.deidentifier.arx.metric.v2.MetricMDNUEntropy extends MetricMDNUEntropyPrecomputed implements Serializable

serialVersionUID:

-8114158144622853288L

Class org.deidentifier.arx.metric.v2.MetricMDNUEntropyPotentiallyPrecomputed extends AbstractMetricMultiDimensionalPotentiallyPrecomputed implements Serializable

serialVersionUID:

7044684079235440871L

Class org.deidentifier.arx.metric.v2.MetricMDNUEntropyPrecomputed extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

8053878428909814308L

Serialized Fields

cardinalities

Cardinalities cardinalities

Cardinalities.

cache

double[][] cache

Column -> Level -> Value.

hierarchies

int[][][] hierarchies

Column -> Id -> Level -> Output.

Class org.deidentifier.arx.metric.v2.MetricMDNUNMEntropy extends MetricMDNUNMEntropyPrecomputed implements Serializable

serialVersionUID:

-7428794463838685004L

Class org.deidentifier.arx.metric.v2.MetricMDNUNMEntropyPotentiallyPrecomputed extends AbstractMetricMultiDimensionalPotentiallyPrecomputed implements Serializable

serialVersionUID:

-3213516677340712914L

Class org.deidentifier.arx.metric.v2.MetricMDNUNMEntropyPrecomputed extends MetricMDNUEntropyPrecomputed implements Serializable

serialVersionUID:

-7428794463838685004L

Class org.deidentifier.arx.metric.v2.MetricMDPrecision extends MetricMDNMPrecision implements Serializable

serialVersionUID:

8514706682676049814L

Class org.deidentifier.arx.metric.v2.MetricMDStatic extends AbstractMetricMultiDimensional implements Serializable

serialVersionUID:

-1436611621616365335L

Serialized Fields

_infoloss

java.util.Map<K,V> _infoloss

The user defined information loss per level, indexed by column name.

infoloss

double[][] infoloss

The pre-calculated information loss.

Class org.deidentifier.arx.metric.v2.MetricSDAECS extends AbstractMetricSingleDimensional implements Serializable

serialVersionUID:

8076459507565472479L

Class org.deidentifier.arx.metric.v2.MetricSDDiscernability extends MetricSDNMDiscernability implements Serializable

serialVersionUID:

-9156839234909657895L

Class org.deidentifier.arx.metric.v2.MetricSDNMDiscernability extends AbstractMetricSingleDimensional implements Serializable

serialVersionUID:

-8573084860566655278L

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
DismalTony.create_handler do
  def handler_start
    @handler_name = 'say-hello'
    @patterns = ['hello']
  end

  def get_name(query, user)
    @data['name'] = query
    user['first_name'] = query
    @vi.say("~e:thumbsup Awesome! Okay, here's what you can do")
    @vi.say('~e:ticket You can say something like "Give Beth 10 points" and it will give them to her')
    DismalTony::HandledResponse.finish("~e:think You can say something like \"How many points does Beth have?\" and I'll tell you!")
  end

  def message
    "Hello, I'm #{@vi.name}. In this demo, I keep track of points in a simple multi-user game. " \
    "Let's start simple: What's your first name?"
  end

  def activate_handler(_query, _user)
    "I'll greet you!"
  end

  def activate_handler!(_query, _user)
    DismalTony::HandledResponse.then_do(self, 'get_name', message)
  end
end