text:
require 'git-process/pull_request'
require 'GitRepoHelper'
require 'github_test_helper'
require 'json'
require 'octokit'
require 'tempfile'

describe GitHub::PullRequest, :git_repo_helper do
  include GitHubTestHelper

  def test_token
    'hfgkdjfgksjhdfkls'
  end

  def pull_request
    @pr ||= GitHub::PullRequest.new(gitlib, 'test_remote', 'test_repo', :user => 'test_user')
  end

  before(:each) do
    gitlib.config['gitProcess.github.authToken'] = test_token
    gitlib.remote.add('test_remote', 'git@github.com:test_repo.git')
  end

  describe '#create' do

    it 'should return a pull request for a good request' do
      stub_post('https://api.github.com/repos/test_repo/pulls', :body => {:number => 1, :state => 'open'})

      pull_request.create('test_base', 'test_head', 'test title', 'test body')[:state].should == 'open'
    end

    it 'should handle asking for a duplicate pull request' do
      # trying to create the request should return "HTTP 422: Unprocessable Entity" because it already exists
      stub_post('https://api.github.com/repos/test_repo/pulls', :status => 422)

      # listing all existing pull requests should contain the current branch
      stub_get('https://api.github.com/repos/test_repo/pulls?state=open', :status => 200,
               :body => [{:html_url => 'test_url', :head => {:ref => 'test_head'}, :base => {:ref => 'test_base'}}])

      pull_request.create('test_base', 'test_head', 'test title', 'test body')[:html_url].should == 'test_url'
    end

  end

  describe 'get' do

    it 'should return a pull request for a good request' do
      stub_get('https://api.github.com/repos/test_repo/pulls/1', :body => {:number => 1, :state => 'open'})

      pull_request.pull_request(1)[:state].should == 'open'
    end

  end

  describe '#close' do

    it 'should close a good current pull request' do
      stub_get('https://api.github.com/repos/test_repo/pulls?state=open', :body => [
          {:number => 1, :state => 'open', :html_url => 'test_url', :head => {:ref => 'test_head'},
           :base => {:ref => 'test_base'}}])
      stub_patch('https://api.github.com/repos/test_repo/pulls/1', :send => JSON({:state => 'closed'}),
                 :body => {:number => 1, :state => 'closed', :html_url => 'test_url', :head => {:ref => 'test_head'},
                           :base => {:ref => 'test_base'}})

      pull_request.close('test_base', 'test_head')[:state].should == 'closed'
    end

    it 'should close a good current pull request using the pull request number' do
      stub_patch('https://api.github.com/repos/test_repo/pulls/1', :send => JSON({:state => 'closed'}),
                 :body => {:number => 1, :state => 'closed', :html_url => 'test_url',
                           :head => {:ref => 'test_head'}, :base => {:ref => 'test_base'}})

      pull_request.close(1)[:state].should == 'closed'
    end

    it 'should retry closing a good current pull request when getting a 422' do
      stub = stub_request(:patch, 'https://api.github.com/repos/test_repo/pulls/1')

      stub.with(:body => JSON({:state => 'closed'}))

      stub.to_raise(Octokit::UnprocessableEntity.new).then.
          to_raise(Octokit::UnprocessableEntity.new).then.
          to_raise(Octokit::UnprocessableEntity.new).then.
          to_raise(Octokit::UnprocessableEntity.new).then.
          to_return(:status => 200, :body => {:number => 1, :state => 'closed', :html_url => 'test_url',
                           :head => {:ref => 'test_head'}, :base => {:ref => 'test_base'}})

      pull_request.close(1)[:state].should == 'closed'
    end

    it 'should complain about a missing pull request' do
      stub_get('https://api.github.com/repos/test_repo/pulls?state=open', :body => [
          {:number => 1, :state => 'open', :html_url => 'test_url', :head => {:ref => 'test_head'},
           :base => {:ref => 'test_base'}}])

      expect { pull_request.close('test_base', 'missing_head') }.to raise_error GitHub::PullRequest::NotFoundError
    end

    it 'should complain about wrong number of arguments' do
      expect { pull_request.close() }.to raise_error ::ArgumentError
      expect { pull_request.close('1', '2', '3') }.to raise_error ::ArgumentError
    end

  end

end


text:
namespace EnhancedScrollerDemos.CellEvents
{
    public class Data
    {
        public int hour;
    }
}

redpajama_set_name: RedPajamaGithub


text:
import viewModule = require("ui/core/view");

import listViewModule = require("ui/list-view");
import gesturesModule = require("ui/gestures");

import viewProjectViewModel = require("./view-project-view-model");
import viewTaskViewModelModule = require("../view-task/view-task-view-model");

var viewModel: viewProjectViewModel.ViewProjectViewModel;
export function navigatingTo(args) {
    var page = args.object;
    viewModel = page.navigationContext;
    page.bindingContext = null;
    page.bindingContext = viewModel;

    viewModel.refresh();
}

export function editProjectButtonTap() {
    viewModel.editProject();
}

export function addTaskButtonTap() {
    viewModel.addTask();
}


text:
<?php

namespace Drupal\Tests\aggregator\Unit\Menu;

use Drupal\Tests\Core\Menu\LocalTaskIntegrationTestBase;

/**
 * Tests existence of aggregator local tasks.
 *
 * @group aggregator
 */
class AggregatorLocalTasksTest extends LocalTaskIntegrationTestBase {

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    $this->directoryList = array('aggregator' => 'core/modules/aggregator');
    parent::setUp();
  }

  /**
   * Tests local task existence.
   *
   * @dataProvider getAggregatorAdminRoutes
   */
  public function testAggregatorAdminLocalTasks($route) {
    $this->assertLocalTasks($route, array(
      0 => array('aggregator.admin_overview', 'aggregator.admin_settings'),
    ));
  }

  /**
   * Provides a list of routes to test.
   */
  public function getAggregatorAdminRoutes() {
    return array(
      array('aggregator.admin_overview'),
      array('aggregator.admin_settings'),
    );
  }

  /**
   * Checks aggregator source tasks.
   *
   * @dataProvider getAggregatorSourceRoutes
   */
  public function testAggregatorSourceLocalTasks($route) {
    $this->assertLocalTasks($route, array(
      0 => array('entity.aggregator_feed.canonical', 'entity.aggregator_feed.edit_form', 'entity.aggregator_feed.delete_form'),
    ));
    ;
  }

  /**
   * Provides a list of source routes to test.
   */
  public function getAggregatorSourceRoutes() {
    return array(
      array('entity.aggregator_feed.canonical'),
      array('entity.aggregator_feed.edit_form'),
    );
  }

}


text:
package com.pcloud.networking.serialization;

import java.lang.reflect.Type;

/**
 * A contract for a factory able to create {@linkplain TypeAdapter} objects
 */
@SuppressWarnings({"WeakerAccess", "unused"})
public interface TypeAdapterFactory {

    /**
     * Creates an instance of a {@linkplain TypeAdapter} object
     *
     * @param type        The data type that the {@linkplain TypeAdapter} will work with
     * @param transformer The {@linkplain Transformer} to create the {@linkplain TypeAdapter}
     * @return A {@linkplain TypeAdapter} that works with the {@linkplain Type} argument
     */
    TypeAdapter<?> create(Type type, Transformer transformer);
}


text:
package com.aafr.alfonso.sunshine.app.data;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

import com.aafr.alfonso.sunshine.app.data.WeatherContract.LocationEntry;
import com.aafr.alfonso.sunshine.app.data.WeatherContract.WeatherEntry;

/**
 * Created by alfonso on 29/12/14.
 */
public class WeatherDbHelper extends SQLiteOpenHelper {

    public static final String DATABASE_NAME = "weather.db";
    // If you change the database schema, you must increment the database version.
    private static final int DATABASE_VERSION = 1;

    /**
     * @param context
     * @param name
     * @param factory
     * @param version
     */
    public WeatherDbHelper(Context context, String name, SQLiteDatabase.CursorFactory factory,
                           int version) {
        super(context, DATABASE_NAME, null, DATABASE_VERSION);

    }

    @Override
    public void onCreate(SQLiteDatabase db) {

        final String SQL_CREATE_LOCATION_TABLE = "CREATE TABLE " + LocationEntry.TABLE_NAME + " (" +
                LocationEntry._ID + " INTEGER PRIMARY KEY," +
                LocationEntry.COLUMN_LOCATION_SETTING + " TEXT UNIQUE NOT NULL, " +
                LocationEntry.COLUMN_CITY_NAME + " TEXT NOT NULL, " +
                LocationEntry.COLUMN_COORD_LAT + " REAL NOT NULL, " +
                LocationEntry.COLUMN_COORD_LONG + " REAL NOT NULL, " +
                "UNIQUE (" + LocationEntry.COLUMN_LOCATION_SETTING + ") ON CONFLICT IGNORE" +
                " );";

        final String SQL_CREATE_WEATHER_TABLE = "CREATE TABLE " + WeatherEntry.TABLE_NAME + " (" +
                // Why AutoIncrement here, and not above?
                // Unique keys will be auto-generated in either case.  But for weather
                // forecasting, it's reasonable to assume the user will want information
                // for a certain date and all dates *following*, so the forecast data
                // should be sorted accordingly.
                WeatherEntry._ID + " INTEGER PRIMARY KEY AUTOINCREMENT," +

                // the ID of the location entry associated with this weather data
                WeatherEntry.COLUMN_LOC_KEY + " INTEGER NOT NULL, " +
                WeatherEntry.COLUMN_DATETEXT + " TEXT NOT NULL, " +
                WeatherEntry.COLUMN_SHORT_DESC + " TEXT NOT NULL, " +
                WeatherEntry.COLUMN_WEATHER_ID + " INTEGER NOT NULL," +

                WeatherEntry.COLUMN_MIN_TEMP + " REAL NOT NULL, " +
                WeatherEntry.COLUMN_MAX_TEMP + " REAL NOT NULL, " +

                WeatherEntry.COLUMN_HUMIDITY + " REAL NOT NULL, " +
                WeatherEntry.COLUMN_PRESSURE + " REAL NOT NULL, " +
                WeatherEntry.COLUMN_WIND_SPEED + " REAL NOT NULL, " +
                WeatherEntry.COLUMN_DEGREES + " REAL NOT NULL, " +

                // Set up the location column as a foreign key to location table.
                " FOREIGN KEY (" + WeatherEntry.COLUMN_LOC_KEY + ") REFERENCES " +
                LocationEntry.TABLE_NAME + " (" + LocationEntry._ID + "), " +

                // To assure the application have just one weather entry per day
                // per location, it's created a UNIQUE constraint with REPLACE strategy
                " UNIQUE (" + WeatherEntry.COLUMN_DATETEXT + ", " +
                WeatherEntry.COLUMN_LOC_KEY + ") ON CONFLICT REPLACE);";

        db.execSQL(SQL_CREATE_LOCATION_TABLE);
        db.execSQL(SQL_CREATE_WEATHER_TABLE);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        // This database is only a cache for online data, so its upgrade policy is
        // to simply to discard the data and start over
        // Note that this only fires if you change the version number for your database.
        // It does NOT depend on the version number for your application.
        // If you want to update the schema without wiping data, commenting out the next 2 lines
        // should be your top priority before modifying this method.
        db.execSQL("DROP TABLE IF EXISTS " + LocationEntry.TABLE_NAME);
        db.execSQL("DROP TABLE IF EXISTS " + WeatherEntry.TABLE_NAME);
        onCreate(db);
    }
}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Aquilegia depauperata M.E.Jones

### Remarks
null


text:
/* ***********************************************************
 * This file was automatically generated on 2014-12-10.      *
 *                                                           *
 * Bindings Version 2.0.4                                    *
 *                                                           *
 * If you have a bugfix for this file and want to commit it, *
 * please fix the bug in the generator. You can find a link  *
 * to the generator git on tinkerforge.com                   *
 *************************************************************/

var Device = require('./Device');

BrickletDualButton.DEVICE_IDENTIFIER = 230;
BrickletDualButton.CALLBACK_STATE_CHANGED = 4;
BrickletDualButton.FUNCTION_SET_LED_STATE = 1;
BrickletDualButton.FUNCTION_GET_LED_STATE = 2;
BrickletDualButton.FUNCTION_GET_BUTTON_STATE = 3;
BrickletDualButton.FUNCTION_SET_SELECTED_LED_STATE = 5;
BrickletDualButton.FUNCTION_GET_IDENTITY = 255;
BrickletDualButton.LED_STATE_AUTO_TOGGLE_ON = 0;
BrickletDualButton.LED_STATE_AUTO_TOGGLE_OFF = 1;
BrickletDualButton.LED_STATE_ON = 2;
BrickletDualButton.LED_STATE_OFF = 3;
BrickletDualButton.BUTTON_STATE_PRESSED = 0;
BrickletDualButton.BUTTON_STATE_RELEASED = 1;
BrickletDualButton.LED_LEFT = 0;
BrickletDualButton.LED_RIGHT = 1;

function BrickletDualButton(uid, ipcon) {
	//Device with two buttons and two LEDs

	/*
	Creates an object with the unique device ID *uid* and adds it to
	the IP Connection *ipcon*.
	*/
	Device.call(this, this, uid, ipcon);
	BrickletDualButton.prototype = Object.create(Device);
	this.responseExpected = {};
	this.callbackFormats = {};
	this.APIVersion = [2, 0, 0];
	this.responseExpected[BrickletDualButton.FUNCTION_SET_LED_STATE] = Device.RESPONSE_EXPECTED_FALSE;
	this.responseExpected[BrickletDualButton.FUNCTION_GET_LED_STATE] = Device.RESPONSE_EXPECTED_ALWAYS_TRUE;
	this.responseExpected[BrickletDualButton.FUNCTION_GET_BUTTON_STATE] = Device.RESPONSE_EXPECTED_ALWAYS_TRUE;
	this.responseExpected[BrickletDualButton.CALLBACK_STATE_CHANGED] = Device.RESPONSE_EXPECTED_ALWAYS_FALSE;
	this.responseExpected[BrickletDualButton.FUNCTION_SET_SELECTED_LED_STATE] = Device.RESPONSE_EXPECTED_FALSE;
	this.responseExpected[BrickletDualButton.FUNCTION_GET_IDENTITY] = Device.RESPONSE_EXPECTED_ALWAYS_TRUE;
	this.callbackFormats[BrickletDualButton.CALLBACK_STATE_CHANGED] = 'B B B B';

	this.setLEDState = function(ledL, ledR, returnCallback, errorCallback) {
		/*
		Sets the state of the LEDs. Possible states are:

		* 0 = AutoToggleOn: Enables auto toggle with initially enabled LED.
		* 1 = AutoToggleOff: Activates auto toggle with initially disabled LED.
		* 2 = On: Enables LED (auto toggle is disabled).
		* 3 = Off: Disables LED (auto toggle is disabled).

		In auto toggle mode the LED is toggled automatically at each press of a button.

		If you just want to set one of the LEDs and don't know the current state
		of the other LED, you can get the state with :func:`GetLEDState` or you
		can use :func:`SetSelectedLEDState`.

		The default value is (1, 1).
		*/
		this.ipcon.sendRequest(this, BrickletDualButton.FUNCTION_SET_LED_STATE, [ledL, ledR], 'B B', '', returnCallback, errorCallback);
	};
	this.getLEDState = function(returnCallback, errorCallback) {
		/*
		Returns the current state of the LEDs, as set by :func:`SetLEDState`.
		*/
		this.ipcon.sendRequest(this, BrickletDualButton.FUNCTION_GET_LED_STATE, [], '', 'B B', returnCallback, errorCallback);
	};
	this.getButtonState = function(returnCallback, errorCallback) {
		/*
		Returns the current state for both buttons. Possible states are:

		* 0 = pressed
		* 1 = released
		*/
		this.ipcon.sendRequest(this, BrickletDualButton.FUNCTION_GET_BUTTON_STATE, [], '', 'B B', returnCallback, errorCallback);
	};
	this.setSelectedLEDState = function(led, state, returnCallback, errorCallback) {
		/*
		Sets the state of the selected LED (0 or 1).

		The other LED remains untouched.
		*/
		this.ipcon.sendRequest(this, BrickletDualButton.FUNCTION_SET_SELECTED_LED_STATE, [led, state], 'B B', '', returnCallback, errorCallback);
	};
	this.getIdentity = function(returnCallback, errorCallback) {
		/*
		Returns the UID, the UID where the Bricklet is connected to,
		the position, the hardware and firmware version as well as the
		device identifier.

		The position can be 'a', 'b', 'c' or 'd'.

		The device identifier numbers can be found :ref:`here <device_identifier>`.
		|device_identifier_constant|
		*/
		this.ipcon.sendRequest(this, BrickletDualButton.FUNCTION_GET_IDENTITY, [], '', 's8 s8 c B3 B3 H', returnCallback, errorCallback);
	};
}

module.exports = BrickletDualButton;


text:
package b

func BNop() {}


text:
#ifndef QTESTLITEMIME_H
#define QTESTLITEMIME_H

#include <private/qdnd_p.h>

#include <QtGui/QClipboard>

#include "qxlibintegration.h"
#include "qxlibclipboard.h"

class QXlibMime : public QInternalMimeData {
    Q_OBJECT
public:
    QXlibMime();
    ~QXlibMime();

    static QList<Atom> mimeAtomsForFormat(Display *display, const QString &format);
    static QString mimeAtomToString(Display *display, Atom a);
    static bool mimeDataForAtom(Display *display, Atom a, QMimeData *mimeData, QByteArray *data, Atom *atomFormat, int *dataFormat);
    static QStringList mimeFormatsForAtom(Display *display, Atom a);
    static Atom mimeStringToAtom(Display *display, const QString &mimeType);
    static QVariant mimeConvertToFormat(Display *display, Atom a, const QByteArray &data, const QString &format, QVariant::Type requestedType, const QByteArray &encoding);
    static Atom mimeAtomForFormat(Display *display, const QString &format, QVariant::Type requestedType, const QList<Atom> &atoms, QByteArray *requestedEncoding);
};

#endif // QTESTLITEMIME_H


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

## Info
This is a bit of an odd duck. Apparently, if talent nodes steps have this data, the game will go through on step activation and alter the first Socket it finds on the item that has a type matching the given socket type, inserting the indicated plug item.

## Schema
* **Schema Type:** Definition
* **Type:** object

## Properties
Name | Type | Description
---- | ---- | -----------
socketTypeHash | [[Destiny.Definitions.Sockets.DestinySocketTypeDefinition|Destiny-Definitions-Sockets-DestinySocketTypeDefinition]]:integer:uint32 | The hash identifier of the socket type to find amidst the item's sockets (the item to which this talent grid is attached). See DestinyInventoryItemDefinition.sockets.socketEntries to find the socket type of sockets on the item in question.
plugItemHash | [[Destiny.Definitions.DestinyInventoryItemDefinition|Destiny-Definitions-DestinyInventoryItemDefinition]]:integer:uint32 | The hash identifier of the plug item that will be inserted into the socket found.

## Example
```javascript
{
    // Type: [[Destiny.Definitions.Sockets.DestinySocketTypeDefinition|Destiny-Definitions-Sockets-DestinySocketTypeDefinition]]:integer:uint32
    "socketTypeHash": 0,
    // Type: [[Destiny.Definitions.DestinyInventoryItemDefinition|Destiny-Definitions-DestinyInventoryItemDefinition]]:integer:uint32
    "plugItemHash": 0
}

```

## References
1. https://bungie-net.github.io/multi/schema_Destiny-Definitions-DestinyNodeSocketReplaceResponse.html#schema_Destiny-Definitions-DestinyNodeSocketReplaceResponse


text:
<?php

namespace Google\Service\CloudResourceManager;

class CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation extends \Google\Model
{
  /**
   * @var string
   */
  public $destinationParent;
  /**
   * @var string
   */
  public $displayName;
  /**
   * @var string
   */
  public $operationType;
  /**
   * @var string
   */
  public $sourceParent;

  /**
   * @param string
   */
  public function setDestinationParent($destinationParent)
  {
    $this->destinationParent = $destinationParent;
  }
  /**
   * @return string
   */
  public function getDestinationParent()
  {
    return $this->destinationParent;
  }
  /**
   * @param string
   */
  public function setDisplayName($displayName)
  {
    $this->displayName = $displayName;
  }
  /**
   * @return string
   */
  public function getDisplayName()
  {
    return $this->displayName;
  }
  /**
   * @param string
   */
  public function setOperationType($operationType)
  {
    $this->operationType = $operationType;
  }
  /**
   * @return string
   */
  public function getOperationType()
  {
    return $this->operationType;
  }
  /**
   * @param string
   */
  public function setSourceParent($sourceParent)
  {
    $this->sourceParent = $sourceParent;
  }
  /**
   * @return string
   */
  public function getSourceParent()
  {
    return $this->sourceParent;
  }
}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation::class, 'Google_Service_CloudResourceManager_CloudresourcemanagerGoogleCloudResourcemanagerV2beta1FolderOperation');


text:
@class Message;

NS_ASSUME_NONNULL_BEGIN

@interface Conversation (CoreDataProperties)

@property (nullable, nonatomic, retain) NSDate *createdAt;
@property (nullable, nonatomic, retain) NSString *objId;
@property (nullable, nonatomic, retain) NSString *url;
@property (nullable, nonatomic, retain) id participants;
@property (nullable, nonatomic, retain) NSSet<Message *> *messages;

@end

@interface Conversation (CoreDataGeneratedAccessors)

- (void)addMessagesObject:(Message *)value;
- (void)removeMessagesObject:(Message *)value;
- (void)addMessages:(NSSet<Message *> *)values;
- (void)removeMessages:(NSSet<Message *> *)values;

@end

NS_ASSUME_NONNULL_END


text:
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using System.Xml.Linq;

using RimTrans.Builder.Xml;
using RimTrans.Builder.Crawler;

namespace RimTrans.Builder.Wiki {
    public class SetDict {
        private static readonly UTF8Encoding utf8 = new UTF8Encoding(false);

        private string defType;
        public string DefType { get { return this.defType; } }

        private string defName;
        public string DefName { get { return this.defName; } }

        private Dictionary<string, string> dict;
        public Dictionary<string, string> Dict { get { return this.dict; } }

        #region Init

        ///
        /// Create SetDict frome def element and def info.
        ///
        /// <param name="defElement"></param>
        /// <param name="defInfo"></param>
        public SetDict(XElement defElement, DefInfo defInfo) {
            if (defElement == null)
                throw new ArgumentNullException("defElement");

            if (defInfo == null)
                throw new ArgumentNullException("defInfo");

            this.defType = defElement.Name.ToString();
            this.defName =
                defElement.Element("defName") == null ?
                "UnnamedDef" :
                defElement.Element("defName").Value;
            this.dict = new Dictionary<string, string>();

            LinkedList<XElement> linkedElements = new LinkedList<XElement>();
            linkedElements.AddLast(defElement);

            foreach (TagInfo curTagInfo in defInfo.Tags) {
                string curName = curTagInfo.Name;
                string curClassName = curTagInfo.ClassName;
                bool isMatched = false;
                foreach (XElement curTagElement in defElement.Elements()) {
                    if (curTagElement.Name.ToString() == curName &&
                        curTagElement.GetClassName() == curClassName) {
                        isMatched = true;
                        linkedElements.AddLast(curTagElement);
                        this.AddMatched(linkedElements, curTagInfo);
                        linkedElements.RemoveLast();
                    }
                }
                if (!isMatched) {
                    this.AddNonMatched(curTagInfo);
                }
            }
        }

        ///
        /// Add key value pair to dict.
        ///
        /// <param name="key"></param>
        /// <param name="value"></param>
        public void Add(string key, string value) {
            value = value.Replace("\r\n", "
").Replace("\n", "
").Replace("\\n", "
").Replace("|", "{{!}}");
            if (this.dict.ContainsKey(key)) {
                this.dict[key] = value;
                Log.Warning();
                Log.WriteLine($"Duplicated key: key='{key}', value='{value}'.");
            } else {
                this.dict.Add(key, value);
            }
        }

        public void AddClass(LinkedList<XElement> linkedElements) {
            string className = linkedElements.Last.Value.GetClassName();
            if (className != null) {
                this.Add(LinkedToKey(linkedElements) + ".Class", className);
            }
        }

        private void AddNonMatched(TagInfo tagInfo) {

        }

        private void AddMatched(LinkedList<XElement> linkedElements, TagInfo tagInfo) {
            switch (tagInfo.Category) {
            case TagCategory.Unkown:
                Log.Error();
                Log.WriteLine($"Unkown tag '{linkedElements.Last.Value.Name.ToString()}'");
                break;
            case TagCategory.Standard:
            case TagCategory.ListComplexItem: {
                    XElement tagElement = linkedElements.Last.Value;
                    if (tagElement.HasElements) {
                        if (tagInfo.HasTags) {
                            if (this.CanBeRange(linkedElements, tagInfo)) {

                            } else {
                                this.Add(LinkedToKey(linkedElements), "Exist");
                                this.AddClass(linkedElements);
                                foreach (TagInfo curSubTagInfo in tagInfo.Tags) {
                                    string curSubName = curSubTagInfo.Name;
                                    string curSubClassName = curSubTagInfo.ClassName;
                                    bool isMatched = false;
                                    foreach (XElement curSubTagElement in tagElement.Elements()) {
                                        if (curSubTagElement.Name.ToString() == curSubName &&
                                            curSubTagElement.GetClassName() == curSubClassName) {
                                            isMatched = true;
                                            linkedElements.AddLast(curSubTagElement);
                                            this.AddMatched(linkedElements, curSubTagInfo);
                                            linkedElements.RemoveLast();
                                        }
                                    }
                                    if (!isMatched) {
                                        this.AddNonMatched(curSubTagInfo);
                                    }
                                }
                            }
                        } else {
                            Log.Warning();
                            Log.WriteLine($"Tag '{LinkedToKey(linkedElements)}' has sub-elements, but matched TagInfo that has no sub-tags.");
                        }
                    } else {
                        if (tagInfo.Category == TagCategory.Standard) {
                            this.Add(LinkedToKey(linkedElements), linkedElements.Last.Value.Value);
                        } else if (tagInfo.Category == TagCategory.ListComplexItem) {
                            this.Add(LinkedToKey(linkedElements), "Exist");
                            this.AddClass(linkedElements);
                        }
                    }
                }
                break;
            case TagCategory.ListComplex: {
                    if (this.CanBeListRef(linkedElements, tagInfo)) {

                    } else if (this.CanBeListRefRange(linkedElements, tagInfo)) {

                    } else {
                        XElement tagElement = linkedElements.Last.Value;
                        this.Add(LinkedToKey(linkedElements), "Exist");
                        this.AddClass(linkedElements);
                        if (tagElement.HasElements) {
                            this.Add(LinkedToKey(linkedElements, true), tagElement.Elements().Count().ToString());
                            if (tagInfo.HasTags) {
                                foreach (XElement curItemElement in tagElement.Elements()) {
                                    foreach (TagInfo curSubTagInfo in tagInfo.Tags) {
                                        if (curItemElement.GetClassName() == curSubTagInfo.ClassName) {
                                            linkedElements.AddLast(curItemElement);
                                            this.AddMatched(linkedElements, curSubTagInfo);
                                            linkedElements.RemoveLast();
                                            break;
                                        }
                                    }
                                }
                            } else {
                                Log.Warning();
                                Log.WriteLine($"Tag '{LinkedToKey(linkedElements)}' has sub-elements, but matched TagInfo that has no sub-tags.");
                            }
                        } else {
                            this.Add(LinkedToKey(linkedElements, true), "0");
                        }
                    }
                }
                break;
            case TagCategory.Def:
            case TagCategory.Enum: {
                    this.Add(LinkedToKey(linkedElements), linkedElements.Last.Value.Value);
                }
                break;
            case TagCategory.Flag:
            case TagCategory.ListSimple:
            case TagCategory.ListDef: {
                    StringBuilder sb = new StringBuilder();
                    foreach (XElement itemElement in linkedElements.Last.Value.Elements()) {
                        sb.Append($"\"{itemElement.Value}\",");
                    }
                    if (sb.Length > 0)
                        sb.Remove(sb.Length - 1, 1);
                    this.Add(LinkedToKey(linkedElements), sb.ToString());
                }
                break;
            case TagCategory.FlagItem:
            case TagCategory.ListSimpleItem:
            case TagCategory.ListDefItem:
            case TagCategory.ListRefItem:
            case TagCategory.DictItem: {
                    Log.Warning();
                    Log.WriteLine(@"Entered invalid tag accidentally: {LinkedToKey(linkedElements)}");
                }
                break;
            case TagCategory.ListRef: {
                    StringBuilder sb = new StringBuilder();
                    foreach (XElement itemElement in linkedElements.Last.Value.Elements()) {
                        sb.Append($"\"{itemElement.Name.ToString()}\",\"{itemElement.Value}\";");
                    }
                    if (sb.Length > 0)
                        sb.Remove(sb.Length - 1, 1);
                    this.Add(LinkedToKey(linkedElements), sb.ToString());
                }
                break;
            case TagCategory.Dict: {
                    StringBuilder sb = new StringBuilder();
                    foreach (XElement itemElement in linkedElements.Last.Value.Elements()) {
                        sb.Append($"\"{itemElement.Element("key").Value}\",\"{itemElement.Element("value").Value}\";");
                    }
                    if (sb.Length > 0)
                        sb.Remove(sb.Length - 1, 1);
                    this.Add(LinkedToKey(linkedElements), sb.ToString());
                }
                break;
            default:
                break;
            }
        }

        private static string LinkedToKey(LinkedList<XElement> linkedElements, bool isCount = false) {
            StringBuilder sb = new StringBuilder();
            foreach (XElement element in linkedElements) {
                string name = element.Name.ToString();
                if (name == "li") {
                    sb.Append(element.Attribute("ListIndex").Value);
                } else {
                    sb.Append(name);
                }
                //string className = element.GetClassName();
                //if (className != null)
                //{
                //    sb.Append($"({className})");
                //}
                sb.Append('.');
            }
            XAttribute lang = linkedElements.Last.Value.Attribute("lang");
            if (lang == null) {
                sb.Remove(sb.Length - 1, 1);
            } else {
                sb.Append(lang.Value);
            }
            if (isCount) {
                sb.Append(".Count");
            }
            return sb.ToString();
        }

        #endregion

        #region Helper

        public bool CanBeRange(LinkedList<XElement> linkedElements, TagInfo tagInfo) {
            XElement tagElement = linkedElements.Last.Value;
            if (tagInfo.HasTags && tagInfo.Tags.Count() == 2 && tagElement.Elements().Count() == 2) {
                XElement minElement = tagElement.Element("min");
                XElement maxElement = tagElement.Element("max");
                if (minElement != null && maxElement != null) {
                    this.Add(LinkedToKey(linkedElements), $"{minElement.Value} ~ {maxElement.Value}");
                    return true;
                }
            }
            return false;
        }

        public bool CanBeListRef(LinkedList<XElement> linkedElements, TagInfo tagInfo) {
            XElement tagElement = linkedElements.Last.Value;
            if (tagInfo.HasTags && tagInfo.Tags.Count() == 1) {
                TagInfo item = tagInfo.Tags.First();
                if (item.HasTags && item.Tags.Count() == 2) {
                    TagInfo def = null;
                    foreach (TagInfo curSubTagInfo in item.Tags) {
                        if (curSubTagInfo.TagType.IsSubclassOf(Helper.ClassDef)) {
                            def = curSubTagInfo;
                            break;
                        }
                    }
                    TagInfo value = null;
                    foreach (TagInfo curSubTagInfo in item.Tags) {
                        if (!curSubTagInfo.TagType.IsSubclassOf(Helper.ClassDef)) {
                            value = curSubTagInfo;
                            break;
                        }
                    }
                    if (def != null && value != null) {
                        foreach (XElement curItemElement in tagElement.Elements()) {
                            XElement defElement = curItemElement.Element(def.Name);
                            XElement valueElemnt = curItemElement.Element(value.Name);
                            if (defElement == null || value == null) {
                                return false;
                            }
                        }
                        StringBuilder sb = new StringBuilder();
                        foreach (XElement curItemElement in tagElement.Elements()) {
                            XElement defElement = curItemElement.Element(def.Name);
                            XElement valueElemnt = curItemElement.Element(value.Name);
                            sb.Append($"\"{defElement.Value}\",\"{valueElemnt.Value}\";");
                        }
                        sb.Remove(sb.Length - 1, 1);
                        this.Add(LinkedToKey(linkedElements), sb.ToString());
                        return true;
                    }
                }
            }
            return false;
        }

        public bool CanBeListRefRange(LinkedList<XElement> linkedElements, TagInfo tagInfo) {
            XElement tagElement = linkedElements.Last.Value;
            if (tagInfo.HasTags && tagInfo.Tags.Count() == 1) {
                TagInfo item = tagInfo.Tags.First();
                if (item.HasTags && item.Tags.Count() == 3) {
                    TagInfo def = null;
                    foreach (TagInfo curSubTagInfo in item.Tags) {
                        if (curSubTagInfo.TagType.IsSubclassOf(Helper.ClassDef)) {
                            def = curSubTagInfo;
                            break;
                        }
                    }
                    TagInfo min = null;
                    foreach (TagInfo curSubTagInfo in item.Tags) {
                        if (curSubTagInfo.Name == "min") {
                            min = curSubTagInfo;
                            break;
                        }
                    }
                    TagInfo max = null;
                    foreach (TagInfo curSubTagInfo in item.Tags) {
                        if (curSubTagInfo.Name == "max") {
                            max = curSubTagInfo;
                            break;
                        }
                    }
                    if (def != null && min != null && max != null) {
                        foreach (XElement curItemElement in tagElement.Elements()) {
                            XElement defElement = curItemElement.Element(def.Name);
                            XElement minElemnet = curItemElement.Element("min");
                            XElement maxElement = curItemElement.Element("max");
                            if (defElement == null || minElemnet == null || maxElement == null) {
                                return false;
                            }
                        }
                        StringBuilder sb = new StringBuilder();
                        foreach (XElement curItemElement in tagElement.Elements()) {
                            XElement defElement = curItemElement.Element(def.Name);
                            XElement minElemnet = curItemElement.Element("min");
                            XElement maxElement = curItemElement.Element("max");
                            sb.Append($"\"{defElement.Value}\",\"{minElemnet.Value} ~ {maxElement.Value}\";");
                        }
                        sb.Remove(sb.Length - 1, 1);
                        this.Add(LinkedToKey(linkedElements), sb.ToString());
                        return true;
                    }
                }
            }
            return false;
        }

        #endregion

        #region ToString and Save

        public override string ToString() {
            StringBuilder sb = new StringBuilder();
            sb.AppendLine("{{#set:");
            sb.AppendLine("|dataType=Def");
            sb.Append("|defType=");
            sb.AppendLine(this.defType);
            sb.Append("|defName=");
            sb.AppendLine(this.defName);
            foreach (var kvp in this.dict) {
                sb.Append('|');
                sb.Append(kvp.Key);
                sb.Append('=');
                sb.AppendLine(kvp.Value);
            }
            sb.Append("}}");
            return sb.ToString();
        }

        ///
        /// Save this set dict to a file.
        ///
        /// <param name="path"></param>
        public void Save(string path) {
            File.WriteAllText(path, this.ToString(), utf8);
        }

        #endregion
    }
}


text:
package net.daw.service.implementation;

import com.google.gson.Gson;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import net.daw.bean.implementation.UsuarioBean;
import net.daw.bean.implementation.UsuariocursoBean;
import net.daw.connection.publicinterface.ConnectionInterface;
import net.daw.dao.implementation.UsuarioDao;

import net.daw.helper.statics.AppConfigurationHelper;
import static net.daw.helper.statics.AppConfigurationHelper.getSourceConnection;
import net.daw.helper.statics.EncodingUtilHelper;
import net.daw.helper.statics.ExceptionBooster;
import net.daw.helper.statics.FilterBeanHelper;
import net.daw.helper.statics.JsonMessage;
import net.daw.helper.statics.ParameterCook;

import net.daw.service.publicinterface.TableServiceInterface;
import net.daw.service.publicinterface.ViewServiceInterface;

public class UsuarioService implements TableServiceInterface, ViewServiceInterface {

    protected HttpServletRequest oRequest = null;

    public UsuarioService(HttpServletRequest request) {
        oRequest = request;
    }

    private Boolean checkpermission() throws Exception {
        UsuarioBean oUserBean = (UsuarioBean) oRequest.getSession().getAttribute("userBean");
        if (oUserBean != null) {
            return true;
        } else {
            return false;
        }
    }

    private Boolean isProfesor() throws Exception {
        UsuarioBean oUserBean = (UsuarioBean) oRequest.getSession().getAttribute("userBean");
        if (oUserBean.getObj_tipousuario().getId() == 2) {
            return true;
        } else {
            return false;
        }
    }

    public String getenvironment() throws Exception {
        String data = "";
        if (this.checkpermission()) {
            data = "{"
                    + "\"OPENSHIFT_APP_DNS\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_APP_DNS"))
                    + ",\"OPENSHIFT_APP_NAME\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_APP_NAME"))
                    + ",\"OPENSHIFT_APP_UUID\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_APP_UUID"))
                    + ",\"OPENSHIFT_JBOSSEWS_IP\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_JBOSSEWS_IP"))
                    + ",\"OPENSHIFT_JBOSSEWS_PORT\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_JBOSSEWS_PORT"))
                    + ",\"OPENSHIFT_SECRET_TOKEN\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_SECRET_TOKEN"))
                    + ",\"OPENSHIFT_HOMEDIR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_HOMEDIR"))
                    + ",\"OPENSHIFT_DATA_DIR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_DATA_DIR"))
                    + ",\"OPENSHIFT_REPO_DIR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_REPO_DIR"))
                    + ",\"OPENSHIFT_TMP_DIR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_TMP_DIR"))
                    + ",\"OPENSHIFT_LOG_DIR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_LOG_DIR"))
                    + ",\"LOGSHIFTER_JBOSSEWS_MAX_FILESIZE\":" + EncodingUtilHelper.quotate(System.getenv("LOGSHIFTER_JBOSSEWS_MAX_FILESIZE"))
                    + ",\"LOGSHIFTER_JBOSSEWS_MAX_FILES\":" + EncodingUtilHelper.quotate(System.getenv("LOGSHIFTER_JBOSSEWS_MAX_FILES"))
                    + ",\"OPENSHIFT_MYSQL_DB_HOST\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_HOST"))
                    + ",\"OPENSHIFT_MYSQL_DB_PORT\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_PORT"))
                    + ",\"OPENSHIFT_MYSQL_DB_USERNAME\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_USERNAME"))
                    + ",\"OPENSHIFT_MYSQL_DB_PASSWORD\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_PASSWORD"))
                    + ",\"OPENSHIFT_MYSQL_DB_SOCKET\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_SOCKET"))
                    + ",\"OPENSHIFT_MYSQL_DB_URL\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MYSQL_DB_URL"))
                    + ",\"OPENSHIFT_MAX_SESSIONS_PER_GEAR\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_MAX_SESSIONS_PER_GEAR"))
                    + ",\"OPENSHIFT_JBOSSEWS_LD_LIBRARY_PATH_ELEMENT\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_JBOSSEWS_LD_LIBRARY_PATH_ELEMENT"))
                    + ",\"JENKINS_USERNAME\":" + EncodingUtilHelper.quotate(System.getenv("JENKINS_USERNAME"))
                    + ",\"JENKINS_PASSWORD\":" + EncodingUtilHelper.quotate(System.getenv("JENKINS_PASSWORD"))
                    + ",\"JENKINS_URL\":" + EncodingUtilHelper.quotate(System.getenv("JENKINS_URL"))
                    + ",\"JAVA_OPTS_EXT\":" + EncodingUtilHelper.quotate(System.getenv("JAVA_OPTS_EXT"))
                    + ",\"OPENSHIFT_GEAR_DNS\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_GEAR_DNS"))
                    + ",\"OPENSHIFT_GEAR_NAME\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_GEAR_NAME"))
                    + ",\"OPENSHIFT_GEAR_UUID\":" + EncodingUtilHelper.quotate(System.getenv("OPENSHIFT_GEAR_UUID"))
                    + "}";
            data = JsonMessage.getJson("200", data);

            return data;

        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }

    }

    @Override
    public String getcount() throws Exception {
        if (this.checkpermission()) {
            String data = null;
            ArrayList<FilterBeanHelper> alFilter = ParameterCook.prepareFilter(oRequest);
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                data = JsonMessage.getJson("200", Integer.toString(oUsuarioDao.getCount(alFilter)));
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":getCount ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return data;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String get() throws Exception {
        if (this.checkpermission()) {
            int id = ParameterCook.prepareId(oRequest);
            String data = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                UsuarioBean oUsuarioBean = new UsuarioBean(id);
                oUsuarioBean = oUsuarioDao.get(oUsuarioBean, AppConfigurationHelper.getJsonDepth());
                Gson gson = AppConfigurationHelper.getGson();
                data = JsonMessage.getJson("200", AppConfigurationHelper.getGson().toJson(oUsuarioBean));
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":get ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return data;

        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String getall() throws Exception {
        if (this.checkpermission()) {
            ArrayList<FilterBeanHelper> alFilter = ParameterCook.prepareFilter(oRequest);
            HashMap<String, String> hmOrder = ParameterCook.prepareOrder(oRequest);
            String data = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;

            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                ArrayList<UsuarioBean> arrBeans = oUsuarioDao.getAll(alFilter, hmOrder, 1);
                data = JsonMessage.getJson("200", AppConfigurationHelper.getGson().toJson(arrBeans));
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":getAll ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }

            return data;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    @SuppressWarnings("empty-statement")
    public String getpage() throws Exception {
        if (this.checkpermission()) {
            int intRegsPerPag = ParameterCook.prepareRpp(oRequest);;
            int intPage = ParameterCook.preparePage(oRequest);
            ArrayList<FilterBeanHelper> alFilter = ParameterCook.prepareFilter(oRequest);
            HashMap<String, String> hmOrder = ParameterCook.prepareOrder(oRequest);
            String data = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                List<UsuarioBean> arrBeans = oUsuarioDao.getPage(intRegsPerPag, intPage, alFilter, hmOrder, AppConfigurationHelper.getJsonDepth());
                data = JsonMessage.getJson("200", AppConfigurationHelper.getGson().toJson(arrBeans));
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":getPage ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return data;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String getpages() throws Exception {
        if (this.checkpermission()) {
            int intRegsPerPag = ParameterCook.prepareRpp(oRequest);
            ArrayList<FilterBeanHelper> alFilter = ParameterCook.prepareFilter(oRequest);
            String data = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                data = JsonMessage.getJson("200", Integer.toString(oUsuarioDao.getPages(intRegsPerPag, alFilter)));
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":getPages ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return data;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String getaggregateviewsome() throws Exception {
        if (this.checkpermission()) {
            String data = null;
            try {
                String page = this.getpage();
                String pages = this.getpages();
                String registers = this.getcount();
                data = "{"
                        + "\"page\":" + page
                        + ",\"pages\":" + pages
                        + ",\"registers\":" + registers
                        + "}";
                data = JsonMessage.getJson("200", data);
            } catch (Exception ex) {
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":getAggregateViewSome ERROR: " + ex.getMessage()));
            }
            return data;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String remove() throws Exception {
        if (this.checkpermission()) {
            Integer id = ParameterCook.prepareId(oRequest);
            String resultado = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                oConnection.setAutoCommit(false);
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                resultado = JsonMessage.getJson("200", (String) oUsuarioDao.remove(id).toString());
                oConnection.commit();
            } catch (Exception ex) {
                oConnection.rollback();
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":remove ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return resultado;
        } else {
            return JsonMessage.getJsonMsg("401", "Unauthorized");
        }
    }

    @Override
    public String set() throws Exception {
            String jason = ParameterCook.prepareJson(oRequest);
            String resultado = null;
            Connection oConnection = null;
            ConnectionInterface oDataConnectionSource = null;
            try {
                oDataConnectionSource = getSourceConnection();
                oConnection = oDataConnectionSource.newConnection();
                oConnection.setAutoCommit(false);
                UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                UsuarioBean oUsuarioBean = new UsuarioBean();
                oUsuarioBean = AppConfigurationHelper.getGson().fromJson(jason, oUsuarioBean.getClass());
                if (oUsuarioBean != null) {
                    Integer iResult = oUsuarioDao.set(oUsuarioBean);
                    if (iResult >= 1) {
                        resultado = JsonMessage.getJson("200", iResult.toString());
                    } else {
                        resultado = JsonMessage.getJson("500", "Error during registry set");
                    }
                } else {
                    resultado = JsonMessage.getJson("500", "Error during registry set");
                }
                oConnection.commit();
            } catch (Exception ex) {
                oConnection.rollback();
                ExceptionBooster.boost(new Exception(this.getClass().getName() + ":set ERROR: " + ex.getMessage()));
            } finally {
                if (oConnection != null) {
                    oConnection.close();
                }
                if (oDataConnectionSource != null) {
                    oDataConnectionSource.disposeConnection();
                }
            }
            return resultado;
    }

    public String login() throws SQLException, Exception {
        UsuarioBean oUserBean = (UsuarioBean) oRequest.getSession().getAttribute("userBean");
        String strAnswer = null;
        String strCode = "200";
        if (oUserBean == null) {
            String login = oRequest.getParameter("login");
            String pass = oRequest.getParameter("password");
            if (!login.equals("") && !pass.equals("")) {
                ConnectionInterface oDataConnectionSource = null;
                Connection oConnection = null;
                try {
                    oDataConnectionSource = getSourceConnection();
                    oConnection = oDataConnectionSource.newConnection();
                    UsuarioBean oUsuario = new UsuarioBean();
                    oUsuario.setLogin(login);
                    oUsuario.setPassword(pass);
                    UsuarioDao oUsuarioDao = new UsuarioDao(oConnection);
                    oUsuario = oUsuarioDao.getFromLogin(oUsuario);
                    if (oUsuario.getId() != 0) {
                        oRequest.getSession().setAttribute("userBean", oUsuario);
                        Gson gson = new Gson();
                        strAnswer = "{\"login\":\""+oUsuario.getLogin()+"\",\"objTipousuario\":"+gson.toJson(oUsuario.getObj_tipousuario())+"}";
                    } else {
                        strCode = "403";
                        strAnswer = "User or password incorrect";
                    }
                } catch (Exception ex) {
                    ExceptionBooster.boost(new Exception(this.getClass().getName() + ":login ERROR " + ex.toString()));
                } finally {
                    if (oConnection != null) {
                        oConnection.close();
                    }
                    if (oDataConnectionSource != null) {
                        oDataConnectionSource.disposeConnection();
                    }
                }
            }
        } else {
            strAnswer = "Already logged in";
        }
        return "{\"status\":"+strCode+",\"message\":" + strAnswer + "}";
    }

    public String logout() {
        oRequest.getSession().invalidate();
        return JsonMessage.getJsonMsg("200", "Bye");
    }

    public String getsessionstatus() {
        String strAnswer = null;
        UsuarioBean oUserBean = (UsuarioBean) oRequest.getSession().getAttribute("userBean");
        if (oUserBean == null) {
            return JsonMessage.getJsonMsg("401", "ERROR: You don't have permission to perform this operation");
        } else {
            Gson gson = new Gson();
            return "{\"status\":200,\"message\":{\"login\":\""+oUserBean.getLogin()+"\",\"objTipousuario\":"+gson.toJson(oUserBean.getObj_tipousuario())+"}}";
        }
    }

    public int sessionuserlevel() {
        String strAnswer = null;
        UsuarioBean oUserBean = (UsuarioBean) oRequest.getSession().getAttribute("userBean");
        if (oUserBean == null) {
            return 0;
        } else {
            return oUserBean.getId_estado();
        }
    }

}


text:
package com.javathinking.samples.jpa;

public enum Role {
    User, Manager, Admin
}


text:
This folder contains the Dockerfile and associated files for the ```griff/crowd``` docker image which aims to make it a breeze getting an Atlassian Crowd instance up and running.

If you just want a test setup to try out Crowd just do:
```
docker run -p 8095:8095 griff/crowd
```
And point your browser to [http://localhost:8095](http://localhost:8095) for the welcome screen.

## Database connection

The connection to the database can be specified with an URL of the format:
```
[database type]://[username]:[password]@[host]:[port]/[database name]
```
Where ```database type``` is either ```mysql``` or ```postgresql``` and the full URL might look like this:
```
postgresql://crowd:jellyfish@172.17.0.2/crowddb
```

The URL can be used to fully configure the database for CrowdID but for Crowd you still have to manually go through the database setup step and specify the following:

* For type select: JNDI Datasource
* Select either PostgreSQL or MySQL depending on your configuration as the Database preconfiguration in the dropdown
* Specify ```java:comp/env/jdbc/CrowdDS``` as the JNDI Name
* Leave the other fields to their defaults.

## Configuration & Components

The docker image is based on the standalone install of Crowd and as such consists of several independent components that each have several configurable options and that can also be entirely disabled. The configuration options themselves are set by setting environment variables when running the image

What follows is a short description of each component and the configuration options that affect that component. For all other aspects about configuring, using and administering Crowd please see [The Official Crowd Documentation](https://confluence.atlassian.com/display/CROWD/Crowd+Documentation)

### Crowd

The main component included and really the only component that you truly need. This component needs a database but can use an embedded HSQLDB for testing purposes and so the database related variables are not mandatory.

Variable      | Function
--------------|------------------------------
CROWD_URL     | URL used by the console to talk to itself.
CROWD_CONTEXT | Context path of the crowd webapp. Set this to ```ROOT``` to make this component have no context path. Set to blank string to not load the Crowd component. Please note that the context path for each component must be unique. Defaults to ```crowd```
CROWDDB_URL   | Connection URL specifying where and how to connect to a database dedicated to crowd.
DATABASE_URL  | If only Crowd and not CrowdID is set to load you can use this variable as an alternative to the ```CROWDDB_URL``` variable.

### CrowdID

The bundled OpenID server. Like the Crowd component this also needs a database and it is imperative that this be independent of the Crowd database.

Variable          | Function
------------------|------------------------------
CROWD_URL         | URL of the crowd server that the webapp talks to. This need not be on the same machine that is running the CrowdID component.
CROWDID_CONTEXT   | Context path of the CrowdID webapp. Defaults to ```openidserver```
CROWDIDDB_URL     | Connection URL specifying where and how to connect to a database dedicated to CrowdID. This database must be separate from the one used by Crowd
DATABASE_URL      | If only CrowdID and not Crowd is set to load you can use this variable as an alternative to the ```CROWDIDDB_URL``` variable.
LOGIN_BASE_URL    | Combined with ```CROWDID_CONTEXT``` to set the ```CROWDID_LOGIN_URL``` value if that variable is unset.
CROWDID_LOGIN_URL | The URL that crowd will redirect the user to this URL if their authentication token expires or is invalid due to security restrictions.

### OpenID client

An OpenID client that can be used to test the CrowdID integration.

Variable              | Function
----------------------|------------------------------
OPENID_CLIENT_CONTEXT | Context path of the client. Defaults to ```openidclient```.

### Demo webapp

A demonstration webapp that shows how Crowd integration works.

Variable       | Function
---------------|------------------------------
CROWD_URL      | URL of the crowd server that the webapp talks to.
DEMO_CONTEXT   | Context path of the crowd webapp. Set to blank string to not load the Crowd component. Please note that the context path for each component must be unique. Defaults to ```demo```
LOGIN_BASE_URL | Combined with ```DEMO_CONTEXT``` to set the ```DEMO_LOGIN_URL``` value if that variable is unset.
DEMO_LOGIN_URL | The URL that crowd will redirect the user to this URL if their authentication token expires or is invalid due to security restrictions.

### Default welcome splash pages

This component serves just as a welcome page and since it is by default loaded as the root context will be the first thing you see when going to http://localhost:8095. As such it has links to the other components but keep in mind that these links will not be updated should you change the context path of any of the components.

For anything but a default install it is recommended that you disable this component by setting its context path to the empty string.

Variable       | Function
---------------|------------------------------
SPLASH_CONTEXT | Context path of the splash pages. Defaults to ```ROOT``` as this webapp serves as a welcome page and you will usually just want to set this to blank to not load this component.

## Examples

To start Crowd with the context path removed. Basically having the startup script perform the steps from the [Crowd FAQ](https://confluence.atlassian.com/display/CROWD/Removing+the+'crowd'+Context+from+the+Application+URL). Simply run:

```
docker run -e CROWD_CONTEXT=ROOT -e CROWD_URL=http://localhost:8095 -e SPLASH_CONTEXT= -p 8095:8095 griff/crowd
```

To only run CrowdID, pointing it at a Crowd at http://crowd.example.local:8095/crowd and with a postgresql database at db.example.local:
```
docker run -e CROWD_URL=http://crowd.example.local:8095/crowd -e DATABASE_URL=postgresql://crowdid:jellyfish@db.example.local/crowdiddb -e CROWDID_CONTEXT=ROOT -e CROWD_CONTEXT= -e SPLASH_CONTEXT= -e DEMO_CONTEXT= -e OPENID_CLIENT_CONTEXT= -p 8095:8095 griff/crowd
```


text:
package org.kuali.kra.external.unit;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Data Transfer Object for Institutional Units stored in the Kuali Coeus system.
 *
 * @author Kuali Coeus Development Team
 */
public class UnitDTO implements Serializable {

    private static final long serialVersionUID = 7517946137745989736L;

    private String unitNumber;
    private String parentUnitNumber;
    private String unitName;
    private String organizationId;

    /* List of principalIds */
    private List<String> unitAdministrators;

    public UnitDTO() {
        unitAdministrators = new ArrayList<String>();
    }

    public String getUnitNumber() {
        return unitNumber;
    }

    public void setUnitNumber(String unitNumber) {
        this.unitNumber = unitNumber;
    }

    public String getParentUnitNumber() {
        return parentUnitNumber;
    }

    public void setParentUnitNumber(String parentUnitNumber) {
        this.parentUnitNumber = parentUnitNumber;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(String organizationId) {
        this.organizationId = organizationId;
    }

    public List<String> getUnitAdministrators() {
        return unitAdministrators;
    }

    public void setUnitAdministrators(List<String> unitAdministrators) {
        this.unitAdministrators = unitAdministrators;
    }

}


text:
from django.contrib import admin
from . import models

admin.site.register(models.CoastalChangeTask)
admin.site.register(models.UserHistory)
admin.site.register(models.ToolInfo)
admin.site.register(models.AnimationType)


text:
layout: post
title: First Time Lesbian Anal Slut
titleinfo: pornvd
desc: Watch First Time Lesbian Anal Slut. Pornhub is the ultimate xxx porn and sex site.
---

First Time Lesbian Anal Slut

Watch First Time Lesbian Anal Slut. Pornhub is the ultimate xxx porn and sex site.


text:
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reactive.Linq;

using FluentValidation;

using Naru.Core;
using Naru.WPF.Scheduler;
using Naru.WPF.Validation;

namespace Naru.WPF.ViewModel
{
    public static class ObservablePropertyEx
    {
        public static TValue RaiseAndSetIfChanged<TValue>(this ObservableProperty<TValue> observableProperty,
                                                          TValue newValue)
        {
            // Inspired by ReactiveUI

            if (EqualityComparer<TValue>.Default.Equals(observableProperty.Value, newValue))
            {
                return newValue;
            }

            observableProperty.Value = newValue;

            return newValue;
        }

        public static IDisposable ConnectINPCProperty<T>(this ObservableProperty<T> observableProperty,
                                                         INotifyPropertyChangedEx viewModel,
                                                         Expression<Func<T>> propertyExpression,
                                                         IDispatcherSchedulerProvider scheduler)
        {
            var propertyName = PropertyExtensions.ExtractPropertyName(propertyExpression);
            return observableProperty.ValueChanged
                                     .ObserveOn(scheduler.Dispatcher.RX)
                                     .Subscribe(x => viewModel.ConnectINPC(propertyName));
        }

        public static IDisposable AddValidation<T, TModel, TValidation, TProperty>(this ObservableProperty<T> observableProperty,
                                                                                IValidationAsync<TModel, TValidation> validation,
                                                                                IDispatcherSchedulerProvider scheduler,
                                                                                Expression<Func<TProperty>> propertyExpression)
            where TModel : ISupportValidationAsync<TModel, TValidation>
            where TValidation : AbstractValidator<TModel>, new()
        {
            return observableProperty.ValueChanged
                                     .ObserveOn(scheduler.Dispatcher.RX)
                                     .Subscribe(_ => validation.ValidateProperty(propertyExpression));
        }
    }
}


text:
from . import *

from vee.requirements import Requirements
from vee.packageset import PackageSet

class TestPackageSets(TestCase):

    def test_prefix_function(self):

        home = self.home()

        reqs = Requirements()
        reqs.parse_file('''

            first --revision 1.0
            second -e "FIRST=$(prefix first)"

        '''.strip().splitlines())

        pkgs = PackageSet(home=home)
        pkgs.resolve_set(reqs)

        first = pkgs['first']
        first.install_path = '/path/to/first'

        second = pkgs['second']
        env = second.fresh_environ()

        self.assertEqual(env['FIRST'], '/path/to/first')


text:
This example shows how to use projection interfaces in combination with JSON Path or XPath expressions to bind payload data to an object instance.

The most interesting bit is the following projection interface declared in `UserController`:

```java
@ProjectedPayload
public interface UserPayload {

	@XBRead("//firstname")
	@JsonPath("$..firstname")
	String getFirstname();

	@XBRead("//lastname")
	@JsonPath("$..lastname")
	String getLastname();
}
```

This type is used in `UserController.index(…)` and basically combines two modes of operation.

## Binding request data via JSON Path expression

The `@JsonPath` annotations bind the values obtained by evaluating the expressions from the request. The sample is using a recursive property lookup for `firstname` and `lastname`. Using those expressions allows the payload thats received to slightly changed and the code dealing with not having to be changed.

As an example using that on the server side can be found in `UserControllerIntegrationTests`. The tests sends two different flavors of JSON to simulate a change in behavior of the client and the server can handle both representation formats without the need for a change.

This is also very useful on the client side which is simulated in `UserControllerClientTests` setting up a `RestTemplate` with the newly introduced `HttpMessageConverters` so that the projection interface can be used to access the payload. See how the test case accesses different HTTP resources, that simulate a change in the representation on the server side.

## Support for XPath expressions

The JSON Path support is automatically activated on the server side if the Jayway JSON Path library is on the classpath. Support for XPath is activated if XMLBeam is on the classpath, generally works the same and actually offers quite some more sophisticated features.


text:
var events = require('events');

var emitter = new events.EventEmitter();
emitter.on('log', function(str) {
	console.log(str);
});

exports.log = function(obj, topic, detail) {
	var str = '<' + obj.toString() + '> ' + topic;
	if (typeof detail !== 'undefined')
	{
		str += ' : ' + detail;
	}
	str += ' [' + getNowDateStr() + ']';
	emitter.emit('log', str);
}

function getNowDateStr()
{
    var date = new Date();

	var strization = function(num) {
		return (num < 10 ? '0' : '') + num;
	};

    return date.getFullYear()
		+ '-' + strization(date.getMonth() + 1)
		+ '-' + strization(date.getDate())
		+ ' ' + strization(date.getHours())
		+ ':' + strization(date.getMinutes())
		+ ':' + strization(date.getSeconds());
}


text:
Panorama des services

exposés via la plateforme Open API du Groupe La Poste


text:
package troy.tutils

sealed trait TOption[+T]
sealed trait TSome[+T] extends TOption[T]
sealed trait TNone extends TOption[Nothing]

sealed trait TBoolean
sealed trait TTrue extends TBoolean
sealed trait TFalse extends TBoolean

sealed trait TEither[+A, +B]
sealed trait TLeft[+A] extends TEither[A, Nothing]
sealed trait TRight[+B] extends TEither[Nothing, B]


text:
<?php

namespace DynamicFormBundle\Entity\DynamicForm\ConfigValue;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 *
 * @ORM\Table(name="dynamic_form_option_integer_value")
 *
 * @package DynamicFormBundle\Entity\Value
 */
class IntegerValue extends BaseValue
{
    /**
     * @var integer
     *
     * @ORM\Column(name="integer_content", type="integer", nullable=true)
     */
    private $integerContent;

    /**
     * @return float
     */
    public function getContent()
    {
        return $this->integerContent;
    }

    /**
     * @param integer $content
     */
    public function setContent($content)
    {
        $this->integerContent = $content;
    }
}


text:
package ch.sourcepond.maven.plugin.jenkins.config.download;

import static org.junit.Assert.assertTrue;

import org.junit.Test;

/**
 *
 */
public class TrustAllHostnameVerifierTest {

	/**
	 *
	 */
	@Test
	public void verifyHostname() {
		assertTrue(new TrustAllHostnameVerifier().verify(null, null));
	}
}


text:
layout: post
title: 'No more harddrives'

---

With SSD taking off and cpu integrated memory management I believe we are on the cusp of having systems with only 1 type of memory.

Can you imagine a system where all of the memory is ram?  Some systems already function this way (phones, calculators, realtime systems)


text:
<!doctype html>

<meta charset="utf-8">
<title>To Jekyll or Not – Dana Lee Gibson</title>
<meta name="description" content="Is a static site, like the ones you can build using Jekyll right for your website? Chances are it is and it can save you lots of time and money!">
<meta name="keywords" content="help, jekyll">

<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://localhost:4000/images/">
<meta name="twitter:title" content="To Jekyll or Not">
<meta name="twitter:description" content="Is a static site, like the ones you can build using Jekyll right for your website? Chances are it is and it can save you lots of time and money!">
<meta name="twitter:creator" content="@DanaLeeGibson">

<link rel="canonical" href="http://localhost:4000/jekyll-not-jekyll-static-site/">
<link href="http://localhost:4000/feed.xml" type="application/atom+xml" rel="alternate" title="Dana Lee Gibson Feed">

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="http://localhost:4000/assets/css/main.css">

<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">

<meta http-equiv="cleartype" content="on">

<link rel="shortcut icon" href="http://localhost:4000/favicon.ico">

<link rel="shortcut icon" href="http://localhost:4000/favicon.png">

<link rel="apple-touch-icon-precomposed" href="http://localhost:4000/images/apple-touch-icon-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://localhost:4000/images/apple-touch-icon-72x72-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://localhost:4000/images/apple-touch-icon-114x114-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://localhost:4000/images/apple-touch-icon-144x144-precomposed.png">

<meta property="fb:app_id" content="1546131965405688"
<meta property="og:locale" content="en_US">
<meta property="og:type" content="article">
<meta property="og:title" content="To Jekyll or Not">
<meta property="og:description" content="Is a static site, like the ones you can build using Jekyll right for your website? Chances are it is and it can save you lots of time and money!">
<meta property="og:url" content="http://localhost:4000/jekyll-not-jekyll-static-site/">
<meta property="og:site_name" content="Dana Lee Gibson">
<meta property="og:image:width" content="637">
<meta property="og:image:height" content="403">

  <meta content="http://localhost:4000/images/to-jekyll-or-not-static-site.jpg" property="og:image">

	<button class="dl-trigger">Open Menu</button>

Home

			About

Dana Lee Gibson

I made my life about creating and designing, it might be a logo, a magazine, a website, setting up a server, or turning an old school bus into a home on wheels.

Learn More

					 Email

					 Twitter

					 Google+

					 LinkedIn

			Posts

All Posts

All Tags

Contact Me

I.T. Services

Portfolio

References

What is Dudeism?

To Jekyll or Not

<time datetime="2016-09-16T18:45:41-04:00">September 16, 2016</time>

Reading time ~4 minutes

Lets all do the Peppermint Twist, for real! All old things are new again. Todays technology has advanced enough to let you take advantage of a static site again. Even though we have been working to make all websites dynamic, its time to reap the benefits of some old school strategies.

Back in the beginning the very first website was static. Meaning, it was a folder with some HTML documents in it. The user would navigate between the documents pages with hyperlinks. As websites grew it was necessary and popular to use SQL-based relational databases to keep the content separate from the design.

Websites eventually moved towards using what is called a LAMP stack and CMS's like WordPress, Joomla, and Drupal. These are dynamic, database driven sites. Although they solved a lot of problems at the time and moved the internet forward, they are not without their own problems.

These CMS's are very vulnerable to known exploits. Beyond security, scaling a database driven site is a problem. The complexity of these sites running dynamic code is huge. It can be very costly to get the needed performance out of a hosting account.

Hosting companies like GoDaddy will entice you with a $3.99 per month hosting account. They will have one click, CMS of your choice, installation. It all looks grand. The reality is, once your website is up it will soon run out of resources. It will be slow, it will stall, it will hang.

When you call to get the problem solved they will immediately tell you that you need to move to a higher, more powerful hosting plan. Next thing you know, to get your "simple" blog running you are now paying $7.99 per month or a LOT more.

Then there is security. To keep the site current and safe from exploits takes a lot of man hours. You can not let you WordPress site sit. The site and the plugins must be kept updated. Remember the Panama Pagers information leak? That all started with an out of date version of WordPress.

It is not uncommon for people to expect to be able to maintain the CMS themselves. This notion quickly fades as other demands keep people from learning all the ins-and-outs. Consequently they never pick up the skills needed and end up paying someone else to keep things current and secure.

Static sites avoid a lot of the pitfalls of a dynamic driven site. They have no database to drive them. Static sites do not need the resource heavy, expensive, powerful web hosting for them to perform well. Because they are static there is nothing to maintain and nothing to exploit.

Why haven't you been using a static site all along?

Web browsers are very powerful today compared to just 5 years ago. Many things that once needed to be run on a web server can now be taken care of within the browser. Advancements in internet speeds as well as the incredible advancements in electronic devices has shifted the playing field.

Basically, this is not your father's tech world. Well, to be more accurate, this is not your tech world from 8 years ago. Things have changed and the older model of a static website can now have all the features of a dynamic driven site, without the pitfalls.

So, What the Hell is Jekyll?

My pick for a static site builders is something called Jekyll. To over simplify it, you build the site locally. As you build it, using templates, includes, and MarkDown it compiles all the static files in one folder for you. Then you can just upload the content of that folder to your web hosting service and you have a static site.

Now, that is a massive over simplification but still true to the facts. It is more work to setup, initially, as a standard CMS bight be. However you get back all that time in the form of much easier maintaining and updating.

I have been working with Jekyll for some time and I appreciate what it can do. It is not for every site but I have found it could be useful to a lot. Many people start off with grand ideas of using every resource a WordPress driven site can offer. Only to find out a year on that they are not using a tenth of what they had envisioned.

Is a Static Site Right For You?

It comes down to having a realistic view of what your website will do. Once you realize your website is not going to be as fancy as Tesla's or Facebook. You may come to the conclusion that a static site might be the right fit for you. A static site is also very flexible and expandable which makes it a great choice if you are starting a new site.

Should you Jekyll? I would bet a lot of sites would benefit greatly from switching to a static format. I also believe you will see more and more static sites in the future. We are coming around full circle. A modern static site is a far cry from the very first website. But in spirit, it has a connection to the very beginning of the web.

        helpjekyll

 Like

 Tweet

 +1

      Read More

Do Not Lock Clients Out!

Never lock clients out from their own services, it is bad for everyone! Continue reading

Location, A Flasher Story

        Published on February 04, 2018

Too Much Choice?!

        Published on December 23, 2017

    © 2019 Dana Lee Gibson. Powered by: Jekyll.


text:
/**
 * AST Transformation for {@code @PropertyEditorFor}
 *
 * @since 2.0.0
 * @see griffon.metadata.PropertyEditorFor
 */

package org.codehaus.griffon.compile.core.ast.editor;


text:
dotfiles [![Build Status](https://travis-ci.org/matthiasvegh/dotfiles.png?branch=master)](https://travis-ci.org/matthiasvegh/dotfiles)
========
My .files. Managed with homesick


text:
class Fail2ban < Formula
  desc "Scan log files and ban IPs showing malicious signs"
  homepage "https://www.fail2ban.org/"
  url "https://github.com/fail2ban/fail2ban/archive/0.11.2.tar.gz"
  sha256 "383108e5f8644cefb288537950923b7520f642e7e114efb843f6e7ea9268b1e0"
  license "GPL-2.0"

  livecheck do
    url :stable
    strategy :github_latest
  end

  bottle do
    sha256 cellar: :any_skip_relocation, big_sur:      "dccbafae1bda5f12ef0ba27f74069fb179376e9a50adf0a597ff7d6d978c12f1"
    sha256 cellar: :any_skip_relocation, catalina:     "dc4e847cf92ddfbd7e70647f671de4e5f64a7752b7d9334455b528e0fc9318d9"
    sha256 cellar: :any_skip_relocation, mojave:       "eb5646fd06a94a1638b44fc0afd4406bf88dc3bb4672ae68e264dc5455f10d05"
    sha256 cellar: :any_skip_relocation, x86_64_linux: "d2d8049b6513801a4b0706354b1165fd25a52f52d246e251af5cff8c46768d09"
  end

  depends_on "help2man" => :build
  depends_on "sphinx-doc" => :build
  depends_on "python@3.9"

  def install
    ENV.prepend_create_path "PYTHONPATH", libexec/"lib/python3.9/site-packages"
    ENV["PYTHON"] = Formula["python@3.9"].opt_bin/"python3"

    rm "setup.cfg"
    Dir["config/paths-*.conf"].each do |r|
      next if /paths-common\.conf|paths-osx\.conf/.match?(File.basename(r))

      rm r
    end

    # Replace paths in config
    inreplace "config/jail.conf", "before = paths-debian.conf", "before = paths-osx.conf"

    # Replace hardcoded paths
    inreplace "setup.py" do |s|
      s.gsub! %r{/etc}, etc
      s.gsub! %r{/var}, var
    end

    inreplace Dir["config/{action,filter}.d/**/*"].select { |ff| File.file?(ff) }.each do |s|
      s.gsub! %r{/etc}, etc, false
      s.gsub! %r{/var}, var, false
    end

    inreplace ["config/fail2ban.conf", "config/paths-common.conf", "doc/run-rootless.txt"].each do |s|
      s.gsub! %r{/etc}, etc
      s.gsub! %r{/var}, var
    end

    inreplace Dir["fail2ban/client/*"].each do |s|
      s.gsub! %r{/etc}, etc, false
      s.gsub! %r{/var}, var, false
    end

    inreplace "fail2ban/server/asyncserver.py", "/var/run/fail2ban/fail2ban.sock",
              var/"run/fail2ban/fail2ban.sock"

    inreplace Dir["fail2ban/tests/**/*"].select { |ff| File.file?(ff) }.each do |s|
      s.gsub! %r{/etc}, etc, false
      s.gsub! %r{/var}, var, false
    end

    inreplace Dir["man/*"].each do |s|
      s.gsub! %r{/etc}, etc, false
      s.gsub! %r{/var}, var, false
    end

    # Fix doc compilation
    inreplace "setup.py", "/usr/share/doc/fail2ban", (share/"doc")
    inreplace "setup.py", "if os.path.exists('#{var}/run')", "if True"
    inreplace "setup.py", "platform_system in ('linux',", "platform_system in ('linux', 'darwin',"

    system "./fail2ban-2to3"
    system "python3", "setup.py", "install", "--prefix=#{libexec}"

    cd "doc" do
      system "make", "dirhtml", "SPHINXBUILD=sphinx-build"
      (share/"doc").install "build/dirhtml"
    end

    bin.install Dir[libexec/"bin/*"]
    bin.env_script_all_files(libexec/"bin", PYTHONPATH: ENV["PYTHONPATH"])
    man1.install Dir["man/*.1"]
    man5.install "man/jail.conf.5"
  end

  def post_install
    (etc/"fail2ban").mkpath
    (var/"run/fail2ban").mkpath
  end

  def caveats
    <<~EOS
      Before using Fail2Ban for the first time you should edit the jail
      configuration and enable the jails that you want to use, for instance
      ssh-ipfw. Also, make sure that they point to the correct configuration
      path. I.e. on Mountain Lion the sshd logfile should point to
      /var/log/system.log.

        * #{etc}/fail2ban/jail.conf

      The Fail2Ban wiki has two pages with instructions for macOS Server that
      describes how to set up the Jails for the standard macOS Server
      services for the respective releases.

        10.4: https://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.4)
        10.5: https://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.5)

      Please do not forget to update your configuration files.
      They are in #{etc}/fail2ban.
    EOS
  end

  plist_options startup: true

  service do
    run [opt_bin/"fail2ban-client", "-x", "start"]
  end

  test do
    system "#{bin}/fail2ban-client", "--test"
  end
end


text:
<!DOCTYPE html>

    <meta charset="UTF-8">

    <title>A Pen by  Sanal Mandghiev</title>

Hello world !

In this short note I going to try to explain that I got from stage "0".
 As you noticed my English pretty far from good but I do my best to describe my first experience here.

So briefly speaking I am so excited and ready to learn.
 In my opinion the course is very interesting and teachers are good. So far I haven't some problems or gaps with course's material.
 Thanks to all udacity community !


text:
package com.miscitems.MiscItemsAndBlocks.Gui.Electric;

import MiscUtils.Network.PacketHandler;
import com.miscitems.MiscItemsAndBlocks.Container.Electric.ContainerMetalPress;
import com.miscitems.MiscItemsAndBlocks.Main.Main;
import com.miscitems.MiscItemsAndBlocks.Network.Server.ServerButtonPacket;
import com.miscitems.MiscItemsAndBlocks.TileEntity.Electric.TileEntityMetalPress;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StatCollector;
import org.lwjgl.opengl.GL11;

public class GuiMetalPress extends GuiContainer{

	private final ResourceLocation Texture = new ResourceLocation("miscitems" , "textures/gui/MetalPressGui.png");

	TileEntityMetalPress tile;

	public GuiMetalPress(InventoryPlayer InvPlayer, TileEntityMetalPress tile) {
		super(new ContainerMetalPress(InvPlayer, tile));
		this.tile = tile;
	}

  @Override
  protected void drawGuiContainerForegroundLayer(int param1, int param2) {

          fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 96 + 2, 4210752);

  }

	@Override
	protected void drawGuiContainerBackgroundLayer(float f, int X, int Y)
	{
	    GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);

	    Minecraft.getMinecraft().renderEngine.bindTexture(Texture);
	         drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

	         int x = (this.width - this.xSize) / 2;
	         int y = (this.height - this.ySize) / 2;

	         int Mode = tile.GetMode();

	         if(Mode == 1){
	        	 this.drawTexturedModalRect(x + 9, y + 9, 179, 1, 18, 18);

	        	 this.drawTexturedModalRect(x + 51, y + 9, 179, 1, 18, 18);

	        	 this.drawTexturedModalRect(x + 9, y + 51, 179, 1, 18, 18);

	        	 this.drawTexturedModalRect(x + 51, y + 51, 179, 1, 18, 18);
	         }else if (Mode == 2){

	        	 this.drawTexturedModalRect(x + 30, y + 30, 179, 1, 18, 18);
	         }

	         this.drawTexturedModalRect(x + 87, y + 29, 179, 20, tile.GetWorkTime() / 2, 16);

	         this.drawCenteredString(fontRendererObj, "Power: " + tile.GetPower() + "/" + (int)tile.GetMaxPower(), x + 120, y + 10, 0x666666);

	}

	@Override
	public void initGui(){
		super.initGui();
		buttonList.clear();

		buttonList.add(new GuiButton(1, guiLeft + 73, guiTop + 56, 66, 20, "Change Mode"));

	}

	@Override
	protected void actionPerformed(GuiButton button){
		PacketHandler.sendToServer(new ServerButtonPacket((byte) button.id), Main.Utils.channels);

	}

    public boolean isMouseOverSlot(Slot par1Slot, int par2, int par3)
    {
    	if(par1Slot.inventory == tile && tile.GetMode() == 2 && par1Slot.getSlotIndex() == 1){
    		return false;

    	}else if (par1Slot.inventory == tile && tile.GetMode() == 1 && par1Slot.getSlotIndex() == 2
    			|| par1Slot.inventory == tile && tile.GetMode() == 1 && par1Slot.getSlotIndex() == 3
    			||par1Slot.inventory == tile && tile.GetMode() == 1 && par1Slot.getSlotIndex() == 4
    			|| par1Slot.inventory == tile && tile.GetMode() == 1 && par1Slot.getSlotIndex() == 5
    			){
    		return false;

    	}else{

        return this.func_146978_c(par1Slot.xDisplayPosition, par1Slot.yDisplayPosition, 16, 16, par2, par3);
    	}
    }

}


text:
<?php

use Symfony\Component\ClassLoader\DebugUniversalClassLoader;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
use Sylius\Bundle\CoreBundle\Kernel\SyliusKernel;

class AppKernel extends SyliusKernel
{
    public function registerBundles()
    {
        $bundles = array(

            // CMF bundles.

            new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(),
            new \Ibillmaker\Hub\CoreBundle\IbillmakerHubCoreBundle(),
        );

        return array_merge(parent::registerBundles(),$bundles);
    }
}


text:
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.restapi.flags;

import com.yahoo.container.jdisc.HttpRequest;
import com.yahoo.container.jdisc.HttpResponse;
import com.yahoo.vespa.configserver.flags.FlagsDb;
import com.yahoo.vespa.configserver.flags.http.FlagsHandler;
import com.yahoo.vespa.hosted.controller.Controller;
import com.yahoo.vespa.hosted.controller.auditlog.AuditLogger;

/**
 * An extension of {@link FlagsHandler} which logs requests to the audit log.
 *
 * @author mpolden
 */
public class AuditedFlagsHandler extends FlagsHandler {

    private final AuditLogger auditLogger;

    public AuditedFlagsHandler(Context context, Controller controller, FlagsDb flagsDb) {
        super(context, flagsDb);
        auditLogger = controller.auditLogger();
    }

    @Override
    public HttpResponse handle(HttpRequest request) {
        return super.handle(auditLogger.log(request));
    }

}


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

	<string name="app_name">カレンダーウォッチフェイス</string>
	<string name="analog_name">カレンダー</string>
    <string name="digital_background_color">Background color</string>
	<string name="next_schedule_title_start">\"%1$S\"開始まで</string>
    <string name="next_schedule_title_end">\"%1$S\"終了まで</string>
	<string name="color_black">Black</string>
	<string name="color_blue">Blue</string>
	<string name="color_gray">Gray</string>
	<string name="color_green">Green</string>
	<string name="color_navy">Navy</string>
	<string name="color_red">Red</string>
	<string name="color_white">White</string>

</resources>


text:
<?xml version="1.0" encoding="UTF-8"?>
<METS:mets EXT_VERSION="1.1"
  LABEL="Service Definition Object for Document Transform Demo" OBJID="demo:12"
  xmlns:METS="http://www.loc.gov/METS/"
  xmlns:xlink="http://www.w3.org/1999/xlink"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/METS/ http://www.fedora.info/definitions/1/0/mets-fedora-ext1-1.xsd">
  <METS:metsHdr CREATEDATE="2008-07-02T05:09:42.015Z"
    LASTMODDATE="2008-07-02T05:09:42.015Z" RECORDSTATUS="Active">
    <METS:agent ROLE="IPOWNER">
      <METS:name>fedoraAdmin</METS:name>
    </METS:agent>
  </METS:metsHdr>
  <METS:amdSec ID="DC" STATUS="A" VERSIONABLE="true">
    <METS:techMD CREATED="2008-07-02T05:09:42.515Z" ID="DC1.0">
      <METS:mdWrap FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
        LABEL="Dublin Core Record for this object" MDTYPE="OTHER"
        MIMETYPE="text/xml" OTHERMDTYPE="UNSPECIFIED">
        <METS:xmlData>
          <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/">
            <dc:title>Service Definition Object for Document Transform Demo</dc:title>
            <dc:identifier>demo:12</dc:identifier>
          </oai_dc:dc>
        </METS:xmlData>
      </METS:mdWrap>
    </METS:techMD>
  </METS:amdSec>
  <METS:amdSec ID="RELS-EXT" STATUS="A" VERSIONABLE="true">
    <METS:techMD CREATED="2008-07-02T05:09:42.578Z" ID="RELS-EXT1.0">
      <METS:mdWrap FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
        LABEL="RDF Statements about this object" MDTYPE="OTHER"
        MIMETYPE="application/rdf+xml" OTHERMDTYPE="UNSPECIFIED">
        <METS:xmlData>
          <rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
            <rdf:Description rdf:about="info:fedora/demo:12">
              <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
            </rdf:Description>
          </rdf:RDF>
        </METS:xmlData>
      </METS:mdWrap>
    </METS:techMD>
  </METS:amdSec>
  <METS:amdSec ID="METHODMAP" STATUS="A" VERSIONABLE="true">
    <METS:techMD CREATED="2008-07-02T05:09:42.515Z" ID="METHODMAP1.0">
      <METS:mdWrap
        FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0"
        LABEL="Abstract Method Map" MDTYPE="OTHER" MIMETYPE="text/xml" OTHERMDTYPE="UNSPECIFIED">
        <METS:xmlData>
          <fmm:MethodMap name="Fedora MethodMap for NSDL Exhibit (Style 1)" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
            <fmm:Method operationName="getDocument"/>
            <fmm:Method operationName="getDocumentStyle1"/>
            <fmm:Method operationName="getDocumentStyle2"/>
          </fmm:MethodMap>
        </METS:xmlData>
      </METS:mdWrap>
    </METS:techMD>
  </METS:amdSec>
</METS:mets>