text:
#ifndef __client1__GameOver__
#define __client1__GameOver__

#include <iostream>
#include "cocos2d.h"
#include "SimpleAudioEngine.h"

#include "zhuangtaiLoad.h"
#include "message.h"
#include "SocketClient.h"
#include "LayerLogin.h"
#include "CData.h"
#include "LodingLayer.h"
//#include "scrollViewTest.h"
#include "homePage.h"

using namespace cocos2d;
using namespace CocosDenshion;
using namespace std;

class GameOver:public cocos2d::CCLayer{
public:

    //    GameOver();
    ~GameOver();
    //    static GameOver * gameover();
    virtual bool init();
    void goBackToHome();//返回主界面
    void win();//胜利
    void faild();//失败
    void shake();//震屏
    void star1();//1X
    void star2();//2X
    void star3();//3X
    void gasRun();//活力减少动画
    void zhaomuwujiang();
    void checkoutkapai();
    int coin;//货币
    int exp;//经验值
    int star;//星级
    int _power;//能量
    CCSize size;
    CCSprite * qs;
    int kpcount;
    int icon;
    Loading * load;
    CCSprite * huoli;
    int itemcount;
    int huoli1;
    CCSprite * faguang;
    CCSprite * gm;
    CCSprite * gm2;
    void guangmang(char * kapainame);
    void receiveGoHomeBack();
    void zhenping();
    void  repateFire(CCNode * sender);
    CREATE_FUNC(GameOver);
};
#endif /* defined(__client1__GameOver__) */


text:
package org.openestate.io.openimmo.xml;

import java.io.Serializable;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.CopyStrategy2;
import org.jvnet.jaxb2_commons.lang.CopyTo2;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;

/**
 * Java class for <nutzungsart> element.
 *
 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "nutzungsart")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
public class Nutzungsart implements Serializable, Cloneable, CopyTo2, Equals2, ToString2
{

    @XmlAttribute(name = "WOHNEN", required = true)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    protected boolean wohnen;
    @XmlAttribute(name = "GEWERBE", required = true)
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    protected boolean gewerbe;
    @XmlAttribute(name = "ANLAGE")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    protected Boolean anlage;
    @XmlAttribute(name = "WAZ")
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    protected Boolean waz;

    /**
     * Gets the value of the wohnen property.
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public boolean isWOHNEN() {
        return wohnen;
    }

    /**
     * Sets the value of the wohnen property.
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public void setWOHNEN(boolean value) {
        this.wohnen = value;
    }

    /**
     * Gets the value of the gewerbe property.
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public boolean isGEWERBE() {
        return gewerbe;
    }

    /**
     * Sets the value of the gewerbe property.
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public void setGEWERBE(boolean value) {
        this.gewerbe = value;
    }

    /**
     * Gets the value of the anlage property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Boolean getANLAGE() {
        return anlage;
    }

    /**
     * Sets the value of the anlage property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public void setANLAGE(Boolean value) {
        this.anlage = value;
    }

    /**
     * Gets the value of the waz property.
     *
     * @return
     *     possible object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Boolean getWAZ() {
        return waz;
    }

    /**
     * Sets the value of the waz property.
     *
     * @param value
     *     allowed object is
     *     {@link Boolean }
     *
     */
    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public void setWAZ(Boolean value) {
        this.waz = value;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public String toString() {
        final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE2;
        final StringBuilder buffer = new StringBuilder();
        append(null, buffer, strategy);
        return buffer.toString();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        strategy.appendStart(locator, this, buffer);
        appendFields(locator, buffer, strategy);
        strategy.appendEnd(locator, this, buffer);
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
        {
            boolean theWOHNEN;
            theWOHNEN = this.isWOHNEN();
            strategy.appendField(locator, this, "wohnen", buffer, theWOHNEN, true);
        }
        {
            boolean theGEWERBE;
            theGEWERBE = this.isGEWERBE();
            strategy.appendField(locator, this, "gewerbe", buffer, theGEWERBE, true);
        }
        {
            Boolean theANLAGE;
            theANLAGE = this.getANLAGE();
            strategy.appendField(locator, this, "anlage", buffer, theANLAGE, (this.anlage!= null));
        }
        {
            Boolean theWAZ;
            theWAZ = this.getWAZ();
            strategy.appendField(locator, this, "waz", buffer, theWAZ, (this.waz!= null));
        }
        return buffer;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Object clone() {
        return copyTo(createNewInstance());
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(Object target) {
        final CopyStrategy2 strategy = JAXBCopyStrategy.INSTANCE2;
        return copyTo(null, target, strategy);
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Object copyTo(ObjectLocator locator, Object target, CopyStrategy2 strategy) {
        final Object draftCopy = ((target == null)?createNewInstance():target);
        if (draftCopy instanceof Nutzungsart) {
            final Nutzungsart copy = ((Nutzungsart) draftCopy);
            {
                Boolean wohnenShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true);
                if (wohnenShouldBeCopiedAndSet == Boolean.TRUE) {
                    boolean sourceWOHNEN;
                    sourceWOHNEN = this.isWOHNEN();
                    boolean copyWOHNEN = strategy.copy(LocatorUtils.property(locator, "wohnen", sourceWOHNEN), sourceWOHNEN, true);
                    copy.setWOHNEN(copyWOHNEN);
                } else {
                    if (wohnenShouldBeCopiedAndSet == Boolean.FALSE) {
                    }
                }
            }
            {
                Boolean gewerbeShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, true);
                if (gewerbeShouldBeCopiedAndSet == Boolean.TRUE) {
                    boolean sourceGEWERBE;
                    sourceGEWERBE = this.isGEWERBE();
                    boolean copyGEWERBE = strategy.copy(LocatorUtils.property(locator, "gewerbe", sourceGEWERBE), sourceGEWERBE, true);
                    copy.setGEWERBE(copyGEWERBE);
                } else {
                    if (gewerbeShouldBeCopiedAndSet == Boolean.FALSE) {
                    }
                }
            }
            {
                Boolean anlageShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.anlage!= null));
                if (anlageShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceANLAGE;
                    sourceANLAGE = this.getANLAGE();
                    Boolean copyANLAGE = ((Boolean) strategy.copy(LocatorUtils.property(locator, "anlage", sourceANLAGE), sourceANLAGE, (this.anlage!= null)));
                    copy.setANLAGE(copyANLAGE);
                } else {
                    if (anlageShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.anlage = null;
                    }
                }
            }
            {
                Boolean wazShouldBeCopiedAndSet = strategy.shouldBeCopiedAndSet(locator, (this.waz!= null));
                if (wazShouldBeCopiedAndSet == Boolean.TRUE) {
                    Boolean sourceWAZ;
                    sourceWAZ = this.getWAZ();
                    Boolean copyWAZ = ((Boolean) strategy.copy(LocatorUtils.property(locator, "waz", sourceWAZ), sourceWAZ, (this.waz!= null)));
                    copy.setWAZ(copyWAZ);
                } else {
                    if (wazShouldBeCopiedAndSet == Boolean.FALSE) {
                        copy.waz = null;
                    }
                }
            }
        }
        return draftCopy;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public Object createNewInstance() {
        return new Nutzungsart();
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
        if ((object == null)||(this.getClass()!= object.getClass())) {
            return false;
        }
        if (this == object) {
            return true;
        }
        final Nutzungsart that = ((Nutzungsart) object);
        {
            boolean lhsWOHNEN;
            lhsWOHNEN = this.isWOHNEN();
            boolean rhsWOHNEN;
            rhsWOHNEN = that.isWOHNEN();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "wohnen", lhsWOHNEN), LocatorUtils.property(thatLocator, "wohnen", rhsWOHNEN), lhsWOHNEN, rhsWOHNEN, true, true)) {
                return false;
            }
        }
        {
            boolean lhsGEWERBE;
            lhsGEWERBE = this.isGEWERBE();
            boolean rhsGEWERBE;
            rhsGEWERBE = that.isGEWERBE();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "gewerbe", lhsGEWERBE), LocatorUtils.property(thatLocator, "gewerbe", rhsGEWERBE), lhsGEWERBE, rhsGEWERBE, true, true)) {
                return false;
            }
        }
        {
            Boolean lhsANLAGE;
            lhsANLAGE = this.getANLAGE();
            Boolean rhsANLAGE;
            rhsANLAGE = that.getANLAGE();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "anlage", lhsANLAGE), LocatorUtils.property(thatLocator, "anlage", rhsANLAGE), lhsANLAGE, rhsANLAGE, (this.anlage!= null), (that.anlage!= null))) {
                return false;
            }
        }
        {
            Boolean lhsWAZ;
            lhsWAZ = this.getWAZ();
            Boolean rhsWAZ;
            rhsWAZ = that.getWAZ();
            if (!strategy.equals(LocatorUtils.property(thisLocator, "waz", lhsWAZ), LocatorUtils.property(thatLocator, "waz", rhsWAZ), lhsWAZ, rhsWAZ, (this.waz!= null), (that.waz!= null))) {
                return false;
            }
        }
        return true;
    }

    @Generated(value = "com.sun.tools.xjc.Driver", date = "2021-08-07T06:31:15+02:00", comments = "JAXB RI v2.3.0")
    public boolean equals(Object object) {
        final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE2;
        return equals(null, null, object, strategy);
    }

}

redpajama_set_name: RedPajamaGithub


text:
package com.sun.syndication.io.impl;

import com.sun.syndication.feed.rss.Description;
import com.sun.syndication.feed.rss.Item;
import org.jdom2.Attribute;
import org.jdom2.Element;

/**
 * Feed Generator for RSS 0.94
 * <p/>
 *
 * @author Elaine Chien
 *
 */

public class RSS094Generator extends RSS093Generator {

    public RSS094Generator() {
        this("rss_0.94","0.94");
    }

    protected RSS094Generator(String feedType,String version) {
        super(feedType,version);
    }

    protected void populateItem(Item item, Element eItem, int index) {
        super.populateItem(item,eItem, index);

        Description description = item.getDescription();
        if (description!=null && description.getType()!=null) {
            Element eDescription = eItem.getChild("description",getFeedNamespace());
            eDescription.setAttribute(new Attribute("type",description.getType()));
        }
        eItem.removeChild("expirationDate",getFeedNamespace());
    }

}


text:
<?php
/******************************************************************************
Plugin Name: Tag Pages
Plugin URI: http://burobjorn.nl
Description: Add tags to Pages, just as you would do with Posts
Version: 1.0.1
Author: Bjorn Wijers <burobjorn at burobjorn dot nl>
Author URI: http://burobjorn.nl
License: GPLv2 or later
******************************************************************************/

/*  Copyright 2012
Tag Pages is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

Tag Pages is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

/**
 * Add the 'post_tag' taxonomy, which is the name of the existing taxonomy
 * used for tags to the Post type page. Normally in WordPress Pages cannot
 * be tagged, but this let's WordPress treat Pages just like Posts
 * and enables the tags metabox so you can add tags to a Page.
 * NB: This uses the register_taxonomy_for_object_type() function which is only
 * in WordPress 3 and higher!
 */
if( ! function_exists('tagpages_register_taxonomy') ){
    function tagpages_register_taxonomy()
    {
        register_taxonomy_for_object_type('post_tag', 'page');
    }
    add_action('admin_init', 'tagpages_register_taxonomy');
}

/**
 * Display all post_types on the tags archive page. This forces WordPress to
 * show tagged Pages together with tagged Posts. Thanks to Page Tagger by
 * Ramesh Nair: http://wordpress.org/extend/plugins/page-tagger/
 */
if( ! function_exists('tagpages_display_tagged_pages_archive') ){
    function tagpages_display_tagged_pages_archive(&$query)
    {
        if ( !is_admin() && $query->is_archive && $query->is_tag ) {
            $q = &$query->query_vars;
            $q['post_type'] = 'any';
        }
    }
    add_action('pre_get_posts', 'tagpages_display_tagged_pages_archive');
}
?>


text:
cdb.admin.carto = cdb.admin.carto || {};

cdb.admin.carto.category = {
  max_values: 10,
  others_value: "Others",

  /**
   *  New category generator. It replaces Color wizard
   */
  category_generator: function(table, props, changed, callback) {

    var self = this;

    var type = table.geomColumnTypes() && table.geomColumnTypes()[0] || "polygon";

    // Get fill cartocss parameter
    var fill = 'polygon-fill';
    switch (type) {
      case 'polygon': fill = 'polygon-fill'; break;
      case 'line':    fill = 'line-color'; break;
      default:        fill = 'marker-fill';
    }

    // Generate default styles
    var table_name = table.getUnqualifiedName();
    var css = '#' + table_name + " {\n";

    var cartocss_props = manage_carto_properies(props);

    for (var i in cartocss_props) {
      if (i !== "categories" && i !=="colors" &&  i !== "property") {
        css +=  "   " + i + ": " + props[i] + ";\n";
      }
    }

    // Close defaults
    css += "}\n";

    if (props.colors && !props.categories) {
      colors_to_categories();
    } else if (changed.property || !props.categories || props.categories.length === 0) {
      this.get_categories(props.property, table, function(colors) {
        callback(css + self.generate_categories(props, table, colors), colors);
      });
    } else {
      callback(css + this.generate_categories(props, table, props.categories), props.categories);
    }

    // Transform colors values to categories array
    function colors_to_categories() {
      var colors = [];

      // Generate categories metadata
      for (var i in props.colors) {
        var obj = {};
        var color = props.colors[i];

        obj.title = (i < this.max_values) ? color[0] : this.others_value;
        obj.title_type = color[2];
        obj.color = color[1];
        obj.value_type = 'color';

        if (i >= this.max_values) {
          obj["default"] = true;
        }

        colors.push(obj);
      }

      callback(css + self.generate_categories(props, table, colors), colors);
    }

  },

  // Get values with default colors from the sql
  get_categories: function(property, table, callback) {

    var self = this;
    table.data().categoriesForColumn(this.max_values, property, function(cat) {
      var column_type = cat.type;
      var categories = cat.categories;
      var colors = [];

      // Generate categories metadata
      for (var i in categories) {
        var obj = {};
        obj.title = (i < self.max_values) ? categories[i]: self.others_value;
        obj.title_type = column_type;
        obj.color = cdb.admin.color_brewer[i];
        obj.value_type = 'color';

        if (i >= self.max_values) {
          obj["default"] = true;
        }
        colors.push(obj);
      }
      callback(colors);
    });
  },

  // Generate categories css
  generate_categories: function(props, table, metadata, property_name) {
    property_name = property_name || props['property'];

    function _normalizeValue(v) {
      return v.replace(/\n/g,'\\n')
              // .replace(/\'/g, "\\'") // Not necessary right now becuase tiler does it itself.
              .replace(/\"/g, "\\\"");
    }

    var table_name = table.getUnqualifiedName();
    var css = '';
    var type = table.geomColumnTypes() && table.geomColumnTypes()[0] || "polygon";
    var categories = metadata || props.categories;
    if (categories) {
      // type of the column, number -> no quotes, string -> quotes, boolean -> no quotes
      for (var i in categories) {

        var category = categories[i][categories[i].value_type];
        var fill = 'polygon-fill';

        switch (type) {
          case 'polygon': fill = (categories[i].value_type == "file") ? 'polygon-pattern-file' : 'polygon-fill'; break;
          case 'line':    fill = (categories[i].value_type == "file") ? 'line-pattern-file' : 'line-color'; break;
          default:        fill = (categories[i].value_type == "file") ? 'marker-file' : 'marker-fill';
        }

        if (categories[i]["default"]) {
          // Default category
          css += "\n#" + table_name + " {\n   " + fill + ": " + category + ";\n}";
        } else {
          // Set correct value type
          var value = '';
          if (categories[i].title_type != "string" || categories[i].title === null) {
            value = categories[i].title;
          } else {
            value = "\"" + _normalizeValue(categories[i].title) + "\"";
          }

          // Custom category
          css += "\n#" + table_name + "[" + property_name + "=" + value + "] {\n   " + fill + ": " + category + ";\n";

          // Trick!
          // When polygon-pattern-file is applied, we have to
          // remove the polygon fill opacity and apply polygon-pattern-opacity (-:(·):-)
          if (type === "polygon" && fill === "polygon-pattern-file") {
            css += "   polygon-opacity:0;\n";
            css += "   polygon-pattern-opacity:" + (props['polygon-opacity'] || 1) + ";\n";
          }

          css += "}";
        }
      }
    }

    return css;
  }

}


text:
package net.uchoice.exf.core.matcher.provider;

import java.util.Map;

import net.uchoice.exf.client.exception.ErrorMessage;
import net.uchoice.exf.core.expression.ognl.OgnlExpression;
import net.uchoice.exf.core.matcher.Matcher;
import net.uchoice.exf.core.matcher.exception.MatchException;
import net.uchoice.exf.core.trace.ExfTracker;
import net.uchoice.exf.core.trace.Record;
import net.uchoice.exf.core.trace.RecordType;
import org.apache.commons.lang.StringUtils;

/**
 * OGNL 表达式匹配处理器
 */
public class ExpressionMatcherProvider implements MatchProvider {

	@Override
	public boolean match(Matcher matcher, Map<String, Object> context) throws MatchException {
		ExfTracker.start(Record.create(RecordType.MATCH, getClass().getName()).addInput(matcher).addInput(context));
		if (null == matcher || StringUtils.isBlank(matcher.getTest())) {
			ExfTracker.success(false);
			ExfTracker.stop();
			return false;
		}
		OgnlExpression expression = new OgnlExpression(context);
		try {
			boolean result = expression.evaluate(matcher.getTest(), Boolean.class);
			ExfTracker.stop(result);
			return result;
		} catch (Throwable e) {
			ErrorMessage error = ErrorMessage.code("C-EXF-02-01-001", matcher.getTest());
			ExfTracker.success(false, error.getErrorMessage());
			ExfTracker.stop();
			throw new MatchException(error, e);
		}
	}

}


text:
test_description="test how the unix files api interacts with the gc"

. lib/test-lib.sh

test_init_ipfs

test_expect_success "object not removed after gc" '
  echo "hello world" > hello.txt &&
  cat hello.txt | ipfs files write --create /hello.txt &&
  ipfs repo gc &&
  ipfs cat QmVib14uvPnCP73XaCDpwugRuwfTsVbGyWbatHAmLSdZUS
'

test_expect_success "/hello.txt still accessible after gc" '
  ipfs files read /hello.txt > hello-actual &&
  test_cmp hello.txt hello-actual
'

ADIR_HASH=QmbCgoMYVuZq8m1vK31JQx9DorwQdLMF1M3sJ7kygLLqnW
FILE1_HASH=QmX4eaSJz39mNhdu5ACUwTDpyA6y24HmrQNnAape6u3buS

test_expect_success "gc okay after adding incomplete node -- prep" '
  ipfs files mkdir /adir &&
  echo "file1" |  ipfs files write --create /adir/file1 &&
  echo "file2" |  ipfs files write --create /adir/file2 &&
  ipfs pin add --recursive=false $ADIR_HASH &&
  ipfs files rm -r /adir &&
  ipfs repo gc && # will remove /adir/file1 and /adir/file2 but not /adir
  test_must_fail ipfs cat $FILE1_HASH &&
  ipfs files cp /ipfs/$ADIR_HASH /adir &&
  ipfs pin rm $ADIR_HASH
'

test_expect_success "gc okay after adding incomplete node" '
  ipfs refs $ADIR_HASH &&
  ipfs repo gc &&
  ipfs refs $ADIR_HASH
'

test_expect_success "add directory with direct pin" '
  mkdir mydir/ &&
  echo "hello world!" > mydir/hello.txt &&
  FILE_UNPINNED=$(ipfs add --pin=false -q -r mydir/hello.txt) &&
  DIR_PINNED=$(ipfs add --pin=false -q -r mydir | tail -n1) &&
  ipfs add --pin=false -r mydir &&
  ipfs pin add --recursive=false $DIR_PINNED &&
  ipfs cat $FILE_UNPINNED
'

test_expect_success "run gc and make sure directory contents are removed" '
  ipfs repo gc &&
  test_must_fail ipfs cat $FILE_UNPINNED
'

test_expect_success "add incomplete directory and make sure gc is okay" '
  ipfs files cp /ipfs/$DIR_PINNED /mydir &&
  ipfs repo gc &&
  test_must_fail ipfs cat $FILE_UNPINNED
'

test_expect_success "add back directory contents and run gc" '
  ipfs add --pin=false mydir/hello.txt &&
  ipfs repo gc
'

test_expect_success "make sure directory contents are not removed" '
  ipfs cat $FILE_UNPINNED
'

test_done


text:
package oss

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"time"

	. "gopkg.in/check.v1"
)

type OssUploadSuite struct {
	cloudBoxControlClient *Client
	client                *Client
	bucket                *Bucket
}

var _ = Suite(&OssUploadSuite{})

// SetUpSuite runs once when the suite starts running
func (s *OssUploadSuite) SetUpSuite(c *C) {
	bucketName := bucketNamePrefix + RandLowStr(6)
	if cloudboxControlEndpoint == "" {
		client, err := New(endpoint, accessID, accessKey)
		c.Assert(err, IsNil)
		s.client = client

		s.client.CreateBucket(bucketName)

		bucket, err := s.client.Bucket(bucketName)
		c.Assert(err, IsNil)
		s.bucket = bucket
	} else {
		client, err := New(cloudboxEndpoint, accessID, accessKey)
		c.Assert(err, IsNil)
		s.client = client

		controlClient, err := New(cloudboxControlEndpoint, accessID, accessKey)
		c.Assert(err, IsNil)
		s.cloudBoxControlClient = controlClient
		controlClient.CreateBucket(bucketName)

		bucket, err := s.client.Bucket(bucketName)
		c.Assert(err, IsNil)
		s.bucket = bucket
	}

	testLogger.Println("test upload started")
}

// TearDownSuite runs before each test or benchmark starts running
func (s *OssUploadSuite) TearDownSuite(c *C) {
	// Delete part
	keyMarker := KeyMarker("")
	uploadIDMarker := UploadIDMarker("")
	for {
		lmur, err := s.bucket.ListMultipartUploads(keyMarker, uploadIDMarker)
		c.Assert(err, IsNil)
		for _, upload := range lmur.Uploads {
			var imur = InitiateMultipartUploadResult{Bucket: s.bucket.BucketName,
				Key: upload.Key, UploadID: upload.UploadID}
			err = s.bucket.AbortMultipartUpload(imur)
			c.Assert(err, IsNil)
		}
		keyMarker = KeyMarker(lmur.NextKeyMarker)
		uploadIDMarker = UploadIDMarker(lmur.NextUploadIDMarker)
		if !lmur.IsTruncated {
			break
		}
	}

	// Delete objects
	marker := Marker("")
	for {
		lor, err := s.bucket.ListObjects(marker)
		c.Assert(err, IsNil)
		for _, object := range lor.Objects {
			err = s.bucket.DeleteObject(object.Key)
			c.Assert(err, IsNil)
		}
		marker = Marker(lor.NextMarker)
		if !lor.IsTruncated {
			break
		}
	}

	// Delete bucket
	if s.cloudBoxControlClient != nil {
		err := s.cloudBoxControlClient.DeleteBucket(s.bucket.BucketName)
		c.Assert(err, IsNil)
	} else {
		err := s.client.DeleteBucket(s.bucket.BucketName)
		c.Assert(err, IsNil)
	}

	testLogger.Println("test upload completed")
}

// SetUpTest runs after each test or benchmark runs
func (s *OssUploadSuite) SetUpTest(c *C) {
	err := removeTempFiles("../oss", ".jpg")
	c.Assert(err, IsNil)
}

// TearDownTest runs once after all tests or benchmarks have finished running
func (s *OssUploadSuite) TearDownTest(c *C) {
	err := removeTempFiles("../oss", ".jpg")
	c.Assert(err, IsNil)
}

// TestUploadRoutineWithoutRecovery tests multiroutineed upload without checkpoint
func (s *OssUploadSuite) TestUploadRoutineWithoutRecovery(c *C) {
	objectName := objectNamePrefix + RandStr(8)
	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	newFile := RandStr(8) + ".jpg"

	// Routines is not specified, by default single routine
	err := s.bucket.UploadFile(objectName, fileName, 100*1024)
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err := compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Specify routine count as 1
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(1))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Specify routine count as 3, which is smaller than parts count 5
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Specify routine count as 5, which is same as the part count 5
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(5))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Specify routine count as 10, which is bigger than the part count 5.
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(10))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Invalid routine count, it will use 1 automatically.
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(0))
	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Invalid routine count, it will use 1 automatically
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(-1))
	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Option
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), Meta("myprop", "mypropval"))

	meta, err := s.bucket.GetObjectDetailedMeta(objectName)
	c.Assert(err, IsNil)
	c.Assert(meta.Get("X-Oss-Meta-Myprop"), Equals, "mypropval")

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)
}

// ErrorHooker is a UploadPart hook---it will fail the 5th part's upload.
func ErrorHooker(id int, chunk FileChunk) error {
	if chunk.Number == 5 {
		time.Sleep(time.Second)
		return fmt.Errorf("ErrorHooker")
	}
	return nil
}

// TestUploadRoutineWithoutRecoveryNegative is multiroutineed upload without checkpoint
func (s *OssUploadSuite) TestUploadRoutineWithoutRecoveryNegative(c *C) {
	objectName := objectNamePrefix + RandStr(8)
	fileName := "../sample/BingWallpaper-2015-11-07.jpg"

	uploadPartHooker = ErrorHooker
	// Worker routine error
	err := s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(2))
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	uploadPartHooker = defaultUploadPart

	// Local file does not exist
	err = s.bucket.UploadFile(objectName, "NotExist", 100*1024, Routines(2))
	c.Assert(err, NotNil)

	// The part size is invalid
	err = s.bucket.UploadFile(objectName, fileName, 1024, Routines(2))
	c.Assert(err, NotNil)

	err = s.bucket.UploadFile(objectName, fileName, 1024*1024*1024*100, Routines(2))
	c.Assert(err, NotNil)
}

// TestUploadRoutineWithRecovery is multi-routine upload with resumable recovery
func (s *OssUploadSuite) TestUploadRoutineWithRecovery(c *C) {
	objectName := objectNamePrefix + RandStr(8)
	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	newFile := "upload-new-file-2.jpg"

	// Use default routines and default CP file path (fileName+.cp)
	// First upload for 4 parts
	uploadPartHooker = ErrorHooker
	err := s.bucket.UploadFile(objectName, fileName, 100*1024, Checkpoint(true, fileName+".cp"))
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	uploadPartHooker = defaultUploadPart

	// Check CP
	ucp := uploadCheckpoint{}
	err = ucp.load(fileName + ".cp")
	c.Assert(err, IsNil)
	c.Assert(ucp.Magic, Equals, uploadCpMagic)
	c.Assert(len(ucp.MD5), Equals, len("LC34jZU5xK4hlxi3Qn3XGQ=="))
	c.Assert(ucp.FilePath, Equals, fileName)
	c.Assert(ucp.FileStat.Size, Equals, int64(482048))
	c.Assert(len(ucp.FileStat.LastModified.String()) > 0, Equals, true)
	c.Assert(ucp.FileStat.MD5, Equals, "")
	c.Assert(ucp.ObjectKey, Equals, objectName)
	c.Assert(len(ucp.UploadID), Equals, len("3F79722737D1469980DACEDCA325BB52"))
	c.Assert(len(ucp.Parts), Equals, 5)
	c.Assert(len(ucp.todoParts()), Equals, 1)
	c.Assert(len(ucp.allParts()), Equals, 5)

	// Second upload, finish the remaining part
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Checkpoint(true, fileName+".cp"))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err := compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	err = ucp.load(fileName + ".cp")
	c.Assert(err, NotNil)

	// Resumable upload with empty checkpoint path
	uploadPartHooker = ErrorHooker
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), CheckpointDir(true, ""))
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	uploadPartHooker = defaultUploadPart
	ucp = uploadCheckpoint{}
	err = ucp.load(fileName + ".cp")
	c.Assert(err, NotNil)

	// Resumable upload with checkpoint dir
	uploadPartHooker = ErrorHooker
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), CheckpointDir(true, "./"))
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	uploadPartHooker = defaultUploadPart

	// Check CP
	ucp = uploadCheckpoint{}
	cpConf := cpConfig{IsEnable: true, DirPath: "./"}
	cpFilePath := getUploadCpFilePath(&cpConf, fileName, s.bucket.BucketName, objectName)
	err = ucp.load(cpFilePath)
	c.Assert(err, IsNil)
	c.Assert(ucp.Magic, Equals, uploadCpMagic)
	c.Assert(len(ucp.MD5), Equals, len("LC34jZU5xK4hlxi3Qn3XGQ=="))
	c.Assert(ucp.FilePath, Equals, fileName)
	c.Assert(ucp.FileStat.Size, Equals, int64(482048))
	c.Assert(len(ucp.FileStat.LastModified.String()) > 0, Equals, true)
	c.Assert(ucp.FileStat.MD5, Equals, "")
	c.Assert(ucp.ObjectKey, Equals, objectName)
	c.Assert(len(ucp.UploadID), Equals, len("3F79722737D1469980DACEDCA325BB52"))
	c.Assert(len(ucp.Parts), Equals, 5)
	c.Assert(len(ucp.todoParts()), Equals, 1)
	c.Assert(len(ucp.allParts()), Equals, 5)

	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), CheckpointDir(true, "./"))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	err = ucp.load(cpFilePath)
	c.Assert(err, NotNil)

	// Upload all 5 parts without error
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), Checkpoint(true, objectName+".cp"))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Upload all 5 parts with 10 routines without error
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(10), Checkpoint(true, objectName+".cp"))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)

	// Option
	err = s.bucket.UploadFile(objectName, fileName, 100*1024, Routines(3), Checkpoint(true, objectName+".cp"), Meta("myprop", "mypropval"))

	meta, err := s.bucket.GetObjectDetailedMeta(objectName)
	c.Assert(err, IsNil)
	c.Assert(meta.Get("X-Oss-Meta-Myprop"), Equals, "mypropval")

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err = compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)
}

// TestUploadRoutineWithRecoveryNegative is multiroutineed upload without checkpoint
func (s *OssUploadSuite) TestUploadRoutineWithRecoveryNegative(c *C) {
	objectName := objectNamePrefix + RandStr(8)
	fileName := "../sample/BingWallpaper-2015-11-07.jpg"

	// The local file does not exist
	err := s.bucket.UploadFile(objectName, "NotExist", 100*1024, Checkpoint(true, "NotExist.cp"))
	c.Assert(err, NotNil)

	err = s.bucket.UploadFile(objectName, "NotExist", 100*1024, Routines(2), Checkpoint(true, "NotExist.cp"))
	c.Assert(err, NotNil)

	// Specified part size is invalid
	err = s.bucket.UploadFile(objectName, fileName, 1024, Checkpoint(true, fileName+".cp"))
	c.Assert(err, NotNil)

	err = s.bucket.UploadFile(objectName, fileName, 1024, Routines(2), Checkpoint(true, fileName+".cp"))
	c.Assert(err, NotNil)

	err = s.bucket.UploadFile(objectName, fileName, 1024*1024*1024*100, Checkpoint(true, fileName+".cp"))
	c.Assert(err, NotNil)

	err = s.bucket.UploadFile(objectName, fileName, 1024*1024*1024*100, Routines(2), Checkpoint(true, fileName+".cp"))
	c.Assert(err, NotNil)
}

// TestUploadLocalFileChange tests the file is updated while being uploaded
func (s *OssUploadSuite) TestUploadLocalFileChange(c *C) {
	objectName := objectNamePrefix + RandStr(8)
	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	localFile := RandStr(8) + ".jpg"
	newFile := RandStr(8) + ".jpg"

	os.Remove(localFile)
	err := copyFile(fileName, localFile)
	c.Assert(err, IsNil)

	// First upload for 4 parts
	uploadPartHooker = ErrorHooker
	err = s.bucket.UploadFile(objectName, localFile, 100*1024, Checkpoint(true, localFile+".cp"))
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	uploadPartHooker = defaultUploadPart

	os.Remove(localFile)
	err = copyFile(fileName, localFile)
	c.Assert(err, IsNil)

	// Updating the file. The second upload will re-upload all 5 parts.
	err = s.bucket.UploadFile(objectName, localFile, 100*1024, Checkpoint(true, localFile+".cp"))
	c.Assert(err, IsNil)

	os.Remove(newFile)
	err = s.bucket.GetObjectToFile(objectName, newFile)
	c.Assert(err, IsNil)

	eq, err := compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	err = s.bucket.DeleteObject(objectName)
	c.Assert(err, IsNil)
}

// TestUploadPartArchiveObject
func (s *OssUploadSuite) TestUploadPartArchiveObject(c *C) {
	// create archive bucket
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName, StorageClass(StorageArchive))
	c.Assert(err, IsNil)
	bucket, err := client.Bucket(bucketName)
	objectName := objectNamePrefix + RandStr(8)

	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	fileInfo, err := os.Stat(fileName)
	c.Assert(err, IsNil)

	// Updating the file,archive object
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, ObjectStorageClass(StorageArchive))
	c.Assert(err, IsNil)

	// Updating the file,archive object,checkpoint
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, ObjectStorageClass(StorageArchive), Checkpoint(true, fileName+".cp"))
	c.Assert(err, IsNil)
	ForceDeleteBucket(client, bucketName, c)
}

func copyFile(src, dst string) error {
	srcFile, err := os.Open(src)
	if err != nil {
		return err
	}
	defer srcFile.Close()

	dstFile, err := os.Create(dst)
	if err != nil {
		return err
	}
	defer dstFile.Close()

	_, err = io.Copy(dstFile, srcFile)
	return err
}

func (s *OssUploadSuite) TestVersioningUploadRoutineWithRecovery(c *C) {
	// create a bucket with default proprety
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName)
	c.Assert(err, IsNil)

	bucket, err := client.Bucket(bucketName)

	// put bucket version:enabled
	var versioningConfig VersioningConfig
	versioningConfig.Status = string(VersionEnabled)
	err = client.SetBucketVersioning(bucketName, versioningConfig)
	c.Assert(err, IsNil)

	// begin test
	objectName := objectNamePrefix + RandStr(8)
	fileName := "test-file-" + RandStr(8)
	fileData := RandStr(500 * 1024)
	CreateFile(fileName, fileData, c)
	newFile := "test-file-" + RandStr(8)

	// Use default routines and default CP file path (fileName+.cp)Header
	// First upload for 4 parts
	var respHeader http.Header
	uploadPartHooker = ErrorHooker
	options := []Option{Checkpoint(true, fileName+".cp"), GetResponseHeader(&respHeader)}
	err = bucket.UploadFile(objectName, fileName, 100*1024, options...)
	c.Assert(err, NotNil)
	c.Assert(err.Error(), Equals, "ErrorHooker")
	c.Assert(GetVersionId(respHeader), Equals, "")

	uploadPartHooker = defaultUploadPart

	// Second upload, finish the remaining part
	options = []Option{Checkpoint(true, fileName+".cp"), GetResponseHeader(&respHeader)}
	err = bucket.UploadFile(objectName, fileName, 100*1024, options...)
	c.Assert(err, IsNil)
	versionIdUp := GetVersionId(respHeader)
	c.Assert(len(versionIdUp) > 0, Equals, true)

	os.Remove(newFile)
	var respHeaderDown http.Header
	err = bucket.GetObjectToFile(objectName, newFile, GetResponseHeader(&respHeaderDown))
	versionIdDown := GetVersionId(respHeaderDown)
	c.Assert(err, IsNil)
	c.Assert(versionIdUp, Equals, versionIdDown)

	eq, err := compareFiles(fileName, newFile)
	c.Assert(err, IsNil)
	c.Assert(eq, Equals, true)

	os.Remove(fileName)
	os.Remove(newFile)
	bucket.DeleteObject(objectName)
	ForceDeleteBucket(client, bucketName, c)
}

// TestUploadFileChoiceOptions
func (s *OssUploadSuite) TestUploadFileChoiceOptions(c *C) {
	// create a bucket with default proprety
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName)
	c.Assert(err, IsNil)
	bucket, err := client.Bucket(bucketName)

	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	fileInfo, err := os.Stat(fileName)
	c.Assert(err, IsNil)

	objectName := objectNamePrefix + RandStr(8)

	// UploadFile with properties
	options := []Option{
		ObjectACL(ACLPublicRead),
		RequestPayer(Requester),
		TrafficLimitHeader(1024 * 1024 * 8),
		ServerSideEncryption("AES256"),
		ObjectStorageClass(StorageArchive),
	}

	// Updating the file
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, IsNil)

	// GetMetaDetail
	headerResp, err := bucket.GetObjectDetailedMeta(objectName)
	c.Assert(err, IsNil)

	c.Assert(headerResp.Get("X-Oss-Server-Side-Encryption"), Equals, "AES256")
	aclResult, err := bucket.GetObjectACL(objectName)
	c.Assert(aclResult.ACL, Equals, "public-read")
	c.Assert(err, IsNil)
	ForceDeleteBucket(client, bucketName, c)
}

// TestUploadFileWithCpChoiceOptions
func (s *OssUploadSuite) TestUploadFileWithCpChoiceOptions(c *C) {
	// create a bucket with default proprety
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName)
	c.Assert(err, IsNil)
	bucket, err := client.Bucket(bucketName)

	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	fileInfo, err := os.Stat(fileName)
	c.Assert(err, IsNil)

	objectName := objectNamePrefix + RandStr(8)

	// UploadFile with properties
	options := []Option{
		ObjectACL(ACLPublicRead),
		RequestPayer(Requester),
		TrafficLimitHeader(1024 * 1024 * 8),
		ServerSideEncryption("AES256"),
		ObjectStorageClass(StorageArchive),
		Checkpoint(true, fileName+".cp"), // with checkpoint
	}

	// Updating the file
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, IsNil)

	// GetMetaDetail
	headerResp, err := bucket.GetObjectDetailedMeta(objectName)
	c.Assert(err, IsNil)

	c.Assert(headerResp.Get("X-Oss-Server-Side-Encryption"), Equals, "AES256")
	c.Assert(headerResp.Get("X-Oss-Storage-Class"), Equals, "Archive")

	aclResult, err := bucket.GetObjectACL(objectName)
	c.Assert(aclResult.ACL, Equals, "public-read")
	c.Assert(err, IsNil)

	ForceDeleteBucket(client, bucketName, c)
}

// TestUploadFileWithForbidOverWrite
func (s *OssUploadSuite) TestUploadFileWithForbidOverWrite(c *C) {
	// create a bucket with default proprety
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName)
	c.Assert(err, IsNil)
	bucket, err := client.Bucket(bucketName)

	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	fileInfo, err := os.Stat(fileName)
	c.Assert(err, IsNil)

	objectName := objectNamePrefix + RandStr(8)

	// UploadFile with properties
	options := []Option{
		ObjectACL(ACLPublicRead),
		RequestPayer(Requester),
		TrafficLimitHeader(1024 * 1024 * 8),
		ServerSideEncryption("AES256"),
		ObjectStorageClass(StorageArchive),
		ForbidOverWrite(true),
		Checkpoint(true, fileName+".cp"),
	}

	// Updating the file
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, IsNil)

	// Updating the file with ForbidOverWrite(true)
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, NotNil)

	// without Checkpoint
	options = []Option{
		ObjectACL(ACLPublicRead),
		RequestPayer(Requester),
		TrafficLimitHeader(1024 * 1024 * 8),
		ServerSideEncryption("AES256"),
		ObjectStorageClass(StorageArchive),
		ForbidOverWrite(true),
	}

	// Updating the file with ForbidOverWrite(true)
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, NotNil)

	ForceDeleteBucket(client, bucketName, c)
}

// TestUploadFileWithSequential
func (s *OssUploadSuite) TestUploadFileWithSequential(c *C) {
	// create a bucket with default proprety
	client, err := New(endpoint, accessID, accessKey)
	c.Assert(err, IsNil)

	bucketName := bucketNamePrefix + RandLowStr(6)
	err = client.CreateBucket(bucketName)
	c.Assert(err, IsNil)
	bucket, err := client.Bucket(bucketName)

	fileName := "../sample/BingWallpaper-2015-11-07.jpg"
	fileInfo, err := os.Stat(fileName)
	c.Assert(err, IsNil)

	objectName := objectNamePrefix + RandStr(8)

	var respHeader http.Header

	// UploadFile with properties
	options := []Option{
		Sequential(),
		GetResponseHeader(&respHeader),
		Checkpoint(true, fileName+".cp"),
	}

	// Updating the file
	err = bucket.UploadFile(objectName, fileName, fileInfo.Size()/2, options...)
	c.Assert(err, IsNil)

	respHeader, err = bucket.GetObjectDetailedMeta(objectName)
	c.Assert(err, IsNil)

	strMD5 := respHeader.Get("Content-MD5")
	c.Assert(len(strMD5) > 0, Equals, true)

	ForceDeleteBucket(client, bucketName, c)
}


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ru.lizaalert.hotline"
    xmlns:tools="http://schemas.android.com/tools"
    android:versionCode="1"
    android:versionName="1.0">

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="21" />

    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:name="ru.lizaalert.hotline.SandboxApp"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name="ru.lizaalert.hotline.ui.MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name="ru.lizaalert.hotline.ui.SettingsActivity"
            android:label="@string/action_settings" />

        <activity android:name="com.vk.sdk.VKOpenAuthActivity" />
        <activity android:name="ru.lizaalert.hotline.auth.Auth" />

        <receiver android:name="ru.lizaalert.hotline.sms.SmsReceiver">
            <intent-filter android:priority="999">
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>

        <!-- Yandex Metrica required manifest entries START -->
        <service
            android:name="com.yandex.metrica.MetricaService"
            android:enabled="true"
            android:exported="true"
            android:process=":Metrica"
            tools:ignore="ExportedService">

            <intent-filter>
                <category android:name="android.intent.category.DEFAULT"/>
                <action android:name="com.yandex.metrica.IMetricaService"/>
                <data android:scheme="metrica"/>
            </intent-filter>

            <meta-data android:name="metrica:api:level" android:value="16"/>
        </service>

        <receiver
            android:name="com.yandex.metrica.MetricaEventHandler"
            android:enabled="true"
            android:exported="true"
            tools:ignore="ExportedReceiver">

            <intent-filter>
                <action android:name="com.yandex.metrica.intent.action.SYNC"/>
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.PACKAGE_ADDED"/>
                <action android:name="android.intent.action.PACKAGE_DATA_CLEARED"/>
                <data android:scheme="package"/>
            </intent-filter>

            <intent-filter>
                <action android:name="com.android.vending.INSTALL_REFERRER"/>
            </intent-filter>
        </receiver>

        <provider
            android:name="ru.lizaalert.hotline.MetricaContentProvider"
            android:authorities="ru.lizaalert.hotline.MetricaContentProvider"
            android:enabled="true"
            android:exported="true"
            tools:ignore="ExportedContentProvider"/>
    </application>

</manifest>


text:
using System;

namespace The_Shoulder_Log.Models
{
    internal class keyAttribute : Attribute
    {
    }
}


text:
namespace Dropbox.Api.Team
{
    using sys = System;
    using col = System.Collections.Generic;
    using re = System.Text.RegularExpressions;

    using enc = Dropbox.Api.Stone;

    /// <summary>
    /// <para>The group members set access type arg object</para>
    /// </summary>
    /// <seealso cref="Global::Dropbox.Api.Team.GroupMemberSelector" />
    public class GroupMembersSetAccessTypeArg : GroupMemberSelector
    {
        #pragma warning disable 108

        /// <summary>
        /// <para>The encoder instance.</para>
        /// </summary>
        internal static enc.StructEncoder<GroupMembersSetAccessTypeArg> Encoder = new GroupMembersSetAccessTypeArgEncoder();

        /// <summary>
        /// <para>The decoder instance.</para>
        /// </summary>
        internal static enc.StructDecoder<GroupMembersSetAccessTypeArg> Decoder = new GroupMembersSetAccessTypeArgDecoder();

        /// <summary>
        /// <para>Initializes a new instance of the <see cref="GroupMembersSetAccessTypeArg" />
        /// class.</para>
        /// </summary>
        /// <param name="group">Specify a group.</param>
        /// <param name="user">Identity of a user that is a member of <paramref name="group"
        /// />.</param>
        /// <param name="accessType">New group access type the user will have.</param>
        /// <param name="returnMembers">Whether to return the list of members in the group.
        /// Note that the default value will cause all the group members  to be returned in the
        /// response. This may take a long time for large groups.</param>
        public GroupMembersSetAccessTypeArg(GroupSelector @group,
                                            UserSelectorArg user,
                                            GroupAccessType accessType,
                                            bool returnMembers = true)
            : base(@group, user)
        {
            if (accessType == null)
            {
                throw new sys.ArgumentNullException("accessType");
            }

            this.AccessType = accessType;
            this.ReturnMembers = returnMembers;
        }

        /// <summary>
        /// <para>Initializes a new instance of the <see cref="GroupMembersSetAccessTypeArg" />
        /// class.</para>
        /// </summary>
        /// <remarks>This is to construct an instance of the object when
        /// deserializing.</remarks>
        [sys.ComponentModel.EditorBrowsable(sys.ComponentModel.EditorBrowsableState.Never)]
        public GroupMembersSetAccessTypeArg()
        {
            this.ReturnMembers = true;
        }

        /// <summary>
        /// <para>New group access type the user will have.</para>
        /// </summary>
        public GroupAccessType AccessType { get; protected set; }

        /// <summary>
        /// <para>Whether to return the list of members in the group.  Note that the default
        /// value will cause all the group members  to be returned in the response. This may
        /// take a long time for large groups.</para>
        /// </summary>
        public bool ReturnMembers { get; protected set; }

        #region Encoder class

        /// <summary>
        /// <para>Encoder for  <see cref="GroupMembersSetAccessTypeArg" />.</para>
        /// </summary>
        private class GroupMembersSetAccessTypeArgEncoder : enc.StructEncoder<GroupMembersSetAccessTypeArg>
        {
            /// <summary>
            /// <para>Encode fields of given value.</para>
            /// </summary>
            /// <param name="value">The value.</param>
            /// <param name="writer">The writer.</param>
            public override void EncodeFields(GroupMembersSetAccessTypeArg value, enc.IJsonWriter writer)
            {
                WriteProperty("group", value.Group, writer, global::Dropbox.Api.Team.GroupSelector.Encoder);
                WriteProperty("user", value.User, writer, global::Dropbox.Api.Team.UserSelectorArg.Encoder);
                WriteProperty("access_type", value.AccessType, writer, global::Dropbox.Api.Team.GroupAccessType.Encoder);
                WriteProperty("return_members", value.ReturnMembers, writer, enc.BooleanEncoder.Instance);
            }
        }

        #endregion

        #region Decoder class

        /// <summary>
        /// <para>Decoder for  <see cref="GroupMembersSetAccessTypeArg" />.</para>
        /// </summary>
        private class GroupMembersSetAccessTypeArgDecoder : enc.StructDecoder<GroupMembersSetAccessTypeArg>
        {
            /// <summary>
            /// <para>Create a new instance of type <see cref="GroupMembersSetAccessTypeArg"
            /// />.</para>
            /// </summary>
            /// <returns>The struct instance.</returns>
            protected override GroupMembersSetAccessTypeArg Create()
            {
                return new GroupMembersSetAccessTypeArg();
            }

            /// <summary>
            /// <para>Set given field.</para>
            /// </summary>
            /// <param name="value">The field value.</param>
            /// <param name="fieldName">The field name.</param>
            /// <param name="reader">The json reader.</param>
            protected override void SetField(GroupMembersSetAccessTypeArg value, string fieldName, enc.IJsonReader reader)
            {
                switch (fieldName)
                {
                    case "group":
                        value.Group = global::Dropbox.Api.Team.GroupSelector.Decoder.Decode(reader);
                        break;
                    case "user":
                        value.User = global::Dropbox.Api.Team.UserSelectorArg.Decoder.Decode(reader);
                        break;
                    case "access_type":
                        value.AccessType = global::Dropbox.Api.Team.GroupAccessType.Decoder.Decode(reader);
                        break;
                    case "return_members":
                        value.ReturnMembers = enc.BooleanDecoder.Instance.Decode(reader);
                        break;
                    default:
                        reader.Skip();
                        break;
                }
            }
        }

        #endregion
    }
}


text:
namespace ManagedX.Graphics
{
	using Win32;

	/// Enumerates state flags used by <see cref="DisplayDevice"/> structures related to output/target devices (ie: monitors).
	/// <para>This enumeration is equivalent to the native DISPLAY_DEVICE_ constants (defined in WinGDI.h).</para>
	///
	/// <remarks>https://msdn.microsoft.com/en-us/library/dd183569%28v=vs.85%29.aspx</remarks>
	[System.Flags]
	public enum DisplayMonitorStateIndicators : int
	{

		/// No indicators specified.
		None = 0x00000000,

		/// The monitor is presented as being "on" by the respective GDI view.
		[Source( "WinGDI.h", "DISPLAY_DEVICE_ACTIVE" )]
		Active = 0x00000001,

		/// The monitor is attached to the desktop.
		[Source( "WinGDI.h", "DISPLAY_DEVICE_ATTACHED" )]
		Attached = 0x00000002,

	}

}


text:
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//

#import "CDCommon.h"

__CD_VISIBLE_EXTERNALLY

/**
 * @brief A protocol for returning OAuth information.
 */
@protocol CDOAuthCodeProviderDelegate

/**
 * @brief Asynchronously obtains a new OAuth access code.
 * @signInUrl The URI which should be shown in a WebView.
 * @completion Callback which should be invoked when the OAuth access code is obtained or an error occurs.
 * @return An error if there was a failure preparing the async request.
 */
-(nullable NSError*)getAccessCode:(nonnull NSString*) signInUri completion:(nullable void (^)(NSError* _Nullable error, NSString* _Nullable accessCode))completion;

/**
 * @brief The OAuth app id code.
 */
@property (nonatomic, readonly, copy, nonnull) NSString* appId;

@end


text:
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
import { bindActionCreators, dispatch } from 'redux';
import { Link } from 'react-router';
import { Tab, Tabs } from 'react-bootstrap';
import _ from 'lodash';
import {
  actionExportXlsx,
  actionExportRulesXlsx,
  actionFetchReportChangeHistory
} from '../../actions/MaintainReportRuleAction';
import {
  //actionFetchDates,
  actionFetchReportCatalog,
  //actionFetchReportLinkage,
  //actionFetchDataChangeHistory,
  actionExportCSV,
  actionGenerateReport,
} from '../../actions/ViewDataAction';
import {
  actionCreateTransReport,
  actionFetchTransReportData
} from '../../actions/TransactionReportAction';
import {
  actionFetchReportData,
  actionDrillDown
} from '../../actions/CaptureReportAction';
import {
  actionLeftMenuClick,
} from '../../actions/LeftMenuAction';
import {
  actionFetchOperationLog
} from '../../actions/OperationLogAction';
import DatePicker from 'react-datepicker';
import moment from 'moment';
import RegOpzReportGrid from '../RegOpzDataGrid/RegOpzReportGrid';
import RegOpzFlatGridActionButtons from '../RegOpzFlatGrid/RegOpzFlatGridActionButtons';
import ReportCatalogList from './ReportCatalogList';
import ReportVersionsList from './ReportVersionsList';
import AuditModal from '../AuditModal/AuditModal';
import ModalAlert from '../ModalAlert/ModalAlert';
import DataReportLinkage from '../ViewData/DataReportLinkage';
import DefAuditHistory from '../AuditModal/DefAuditHistory';
import DrillDownRules from '../DrillDown/DrillDownRules';
import AddReportAggRules from '../MaintainFixedFormatReport/AddReportAggRules';
import ViewData from '../ViewData/ViewDataComponentV2';
import ViewBusinessRules from '../MaintainBusinessRules/MaintainBusinessRules';
import CreateReport from '../CreateReport/CreateReport';
import OperationLogList from '../OperationLog/OperationLogList';
import ReportBusinessRules from '../MaintainReportRules/ReportBusinessRules';
require('react-datepicker/dist/react-datepicker.css');

class ViewReport extends Component {
  constructor(props){
    super(props)
    this.state = {
      startDate:moment().subtract(1,'months').format("YYYYMMDD"),
      endDate:moment().format('YYYYMMDD'),
      sources:null,
      itemEditable: true,
      reportId: null,
      reportingDate: null,
      businessDate: null,
      selectedAuditSheet: 0,

      showDrillDownData: false,
      showAggRuleDetails: false,
      showDrillDownCalcBusinessRules: false,
      showCellChangeHistory: false,

      display: false,
      selectedRecord: null,
      renderStyle: false,
    }

    this.pages=0;
    this.currentPage=0;
    this.dataSource = null;
    this.gridDataViewReport=undefined;
    this.changeHistory=undefined;
    this.reportBusinessRules=undefined;
    this.operationLogs=undefined;
    this.gridData=undefined;
    this.calcRuleFilter = {};
    this.businessRuleFilterParam = {};
    this.selectedCell={};
    this.selectedItems = [];
    this.selectedIndexOfGrid = 0;
    this.form_data={};
    this.selectedViewColumns=[];
    this.operationName=null;
    this.flatGrid = null;
    this.aggRuleData = null;
    this.reportVersions = undefined;
    this.buttons=[
      { title: 'Refresh', iconClass: 'fa-refresh', checkDisabled: 'No', className: "btn-primary", onClick: this.handleRefreshGrid.bind(this) },
      { title: 'Details', iconClass: 'fa-cog', checkDisabled: 'No', className: "btn-success", onClick: this.handleDetails.bind(this) },
      { title: 'History', iconClass: 'fa-history', checkDisabled: 'No', className: "btn-primary", onClick: this.handleHistoryClick.bind(this) },
      { title: 'Business Rules', iconClass: 'fa-link', checkDisabled: 'No', className: "btn-primary", onClick: this.handleReportBusinessRulesClick.bind(this) },
      { title: 'Save Report Rules', iconClass: 'fa-puzzle-piece', checkDisabled: 'No', className: "btn-info", onClick: this.handleExportRules.bind(this) },
      { title: 'Export', iconClass: 'fa-table', checkDisabled: 'No', className: "btn-success", onClick: this.handleExportReport.bind(this) },
    ];
    this.buttonClassOverride = "None";

    this.renderDynamic = this.renderDynamic.bind(this);

    this.handleReportClick = this.handleReportClick.bind(this);
    this.handleEditParameterClick = this.handleEditParameterClick.bind(this);
    this.viewReportVersions = this.viewReportVersions.bind(this);
    this.handleDateFilter = this.handleDateFilter.bind(this);
    this.fetchDataToGrid = this.fetchDataToGrid.bind(this);
    this.checkDisabled = this.checkDisabled.bind(this);
    this.handleCalcRuleClicked = this.handleCalcRuleClicked.bind(this);
    this.handleBusinessRuleClicked = this.handleBusinessRuleClicked.bind(this);
    this.handleAggeRuleClicked = this.handleAggeRuleClicked.bind(this);
    this.handleCellHistoryClicked = this.handleCellHistoryClicked.bind(this);
    this.submitGenerateReport = this.submitGenerateReport.bind(this);
    this.viewOperationLog = this.viewOperationLog.bind(this);
    this.refreshOperationLog = this.refreshOperationLog.bind(this);
    this.handleReportBusinessRulesClick = this.handleReportBusinessRulesClick.bind(this);

    this.handleSelectCell = this.handleSelectCell.bind(this);
    this.handleModalOkayClick = this.handleModalOkayClick.bind(this);
    this.handleAuditOkayClick = this.handleAuditOkayClick.bind(this);

    this.viewOnly = _.find(this.props.privileges, { permission: "View Report" }) ? true : false;
    this.writeOnly = _.find(this.props.privileges, { permission: "Edit Report" }) ? true : false;
  }

  componentWillMount(){
    //this.props.fetchDates(this.state.startDate ? moment(this.state.startDate).format('YYYYMMDD') : "19000101",this.state.endDate ? moment(this.state.endDate).format('YYYYMMDD') : "30200101", 'data_catalog');
    this.props.fetchReportCatalog(moment(this.state.startDate).format('YYYYMMDD') ,moment(this.state.endDate).format('YYYYMMDD') , 'Data');
  }
  componentDidUpdate(){
    console.log("Dates",this.state.startDate)
    this.props.leftMenuClick(false);
  }
  componentWillReceiveProps(nextProps){
    if (this.state.selectedRecord && this.state.selectedRecord.report_type=="TRANSACTION"){
      console.log("Inside this.state.selectedRecord && this.state.selectedRecord.report_type==TRANSACTION",this.state.selectedRecord)
      this.gridDataViewReport = nextProps.gridDataViewTransReport;
    } else {
      this.gridDataViewReport=nextProps.gridDataViewReport;
    }
    this.gridData=nextProps.gridData;
    this.changeHistory=nextProps.change_history;
    this.operationLogs=nextProps.operation_log;
    this.reportBusinessRules=nextProps.cell_rules;
    console.log("nextProps",this.props.leftmenu);
    if(this.props.leftmenu){
      this.setState({
        display: false,
        showDrillDownData: false,
        showDrillDownCalcBusinessRules: false,
        showAggRuleDetails: false,
        showCellChangeHistory: false,
        renderStyle: false,
      });
    }
  }

  handleReportClick(item) {
    console.log("selected item",item);
    this.currentPage = 0;
    this.selectedViewColumns=[];
    this.gridDataViewReport=undefined;
    this.setState({
        display: "showReportGrid",
        reportId: item.report_id,
        reportingDate: item.reporting_date,
        businessDate: item.as_of_reporting_date,
        selectedRecord: item,
     },
      ()=>{
        if (item.report_type=="TRANSACTION"){
          this.props.fetchTransReportData(this.state.reportId,this.state.reportingDate);
        } else {
          this.props.fetchReportData(this.state.reportId,this.state.reportingDate,
            this.state.selectedRecord.version,this.state.selectedRecord.report_snapshot,
            this.state.selectedRecord.report_parameters
          );
        }

      }
    );
  }

  handleEditParameterClick(item) {
    console.log("selected item",item);
    let isOpen = this.state.display === "editParameter";
    if(isOpen){
      this.setState({
        display: false,
        reportId: null,
        reportingDate: null,
        businessDate: null,
        selectedRecord: null,
      });
    }
    else {
      this.setState({
        display: "editParameter",
        reportId: item.report_id,
        reportingDate: item.reporting_date,
        businessDate: item.as_of_reporting_date,
        selectedRecord: item,
       },
        // Nothing to add at this stage
      );
    }
  }

  viewReportVersions(item) {
    console.log("selected view report versions item",item);
    let isOpen = this.state.display === "viewReportVersions";
    if(isOpen){
      this.reportVersions = undefined;
      this.setState({
        display: false,
        reportId: null,
        reportingDate: null,
        businessDate: null,
        selectedRecord: null,
      },
      // Nothing to add at this stage
      );
    }
    else {
      this.reportVersions = {data_sources: item.versions};
      // console.log("Inside data_sources....", this.reportVersions);
      this.setState({
        display: "viewReportVersions",
        reportId: item.report_id,
        reportingDate: item.reporting_date,
        businessDate: item.as_of_reporting_date,
        selectedRecord: item,
       },
        // Nothing to add at this stage
      );
    }
  }

  viewOperationLog(item) {
    console.log("selected view operation log for item",item);
    let isOpen = this.state.display === "viewOperationLog";
    if(isOpen){
      this.operationLogs = undefined;
      console.log("this.state.selectedRecord..",this.state.selectedRecord)
      this.viewReportVersions(this.state.selectedRecord);
    }
    else {
      this.setState({
        display: "viewOperationLog",
        reportId: item.report_id,
        reportingDate: item.reporting_date,
        businessDate: item.as_of_reporting_date,
        selectedRecord: item,
       },
        // Nothing to add at this stage
        ()=>{this.props.fetchOperationLog("Report",item.id)}
      );
    }
  }

  refreshOperationLog(entity_id){
    // this.operationLogs = undefined;
    this.props.fetchOperationLog("Report",entity_id);
  }

  handleDateFilter(dates) {
    this.setState({
      startDate: dates.startDate,
      endDate: dates.endDate
    },
      //since setState is asynchronus this gurantees that fetch is executed after setState is executed
      ()=>{this.props.fetchReportCatalog(this.state.startDate,this.state.endDate)}
    );
    // console.log("Dates",dates)
    // this.props.fetchSource(dates.startDate,dates.endDate,"Data");
  }
  checkDisabled(item){
    console.log("checkDisabled",item );
    switch (item){
      case "Add":
        return !this.writeOnly;
      case "Copy":
        return !this.writeOnly;
      case "Delete":
        return (!this.writeOnly || !this.state.itemEditable);
      default:
        console.log("No specific checkDisabled has been defined for ",item);
    }

  }

  handleRefreshGrid(event){
    //this.selectedItems = this.flatGrid.deSelectAll();
    //this.currentPage = 0;
    this.gridDataViewReport=undefined;
    this.setState({itemEditable:true});
    this.fetchDataToGrid(event);
  }

  fetchDataToGrid(event){
    if (this.state.selectedRecord.report_type=="TRANSACTION"){
      this.props.fetchTransReportData(this.state.reportId,this.state.reportingDate);
    } else {
      this.props.fetchReportData(this.state.reportId,this.state.reportingDate,
        this.state.selectedRecord.version,this.state.selectedRecord.report_snapshot,
        this.state.selectedRecord.report_parameters
      );
    }
  }

  handleDetails(event){
    //TODO
    let isOpen = this.state.display === "showDrillDownRules";
    if(isOpen){
      this.setState({
        display: "showReportGrid",
        showDrillDownData: false,
        showDrillDownCalcBusinessRules: false,
        showAggRuleDetails: false,
        showCellChangeHistory: false,
      });
    } else {
      //console.log("handleSelectCell",this.selectedCell.cell);
      if(!this.selectedCell.cell){
        this.modalAlert.isDiscardToBeShown = false;
        this.modalAlert.open("Please select a cell for details");
      } else {
        //this.buttons=this.dataButtons;
        this.setState({
          display: "showDrillDownRules",
          showDrillDownData: false,
          showDrillDownCalcBusinessRules: false,
          showAggRuleDetails: false,
          showCellChangeHistory: false,
          },
          this.props.drillDown(this.selectedCell.reportId,this.selectedCell.sheetName,this.selectedCell.cell,
                              this.state.selectedRecord.report_snapshot)
        );
      }
    }

  }

  handleSelectCell(cell){
    console.log("handleSelectCell",cell);
    this.selectedCell = cell;
  }

  handleCalcRuleClicked(event,calcRuleFilter){
    console.log("Clicked calcRuleFilter",calcRuleFilter);
    this.calcRuleFilter = calcRuleFilter;
    this.calcRuleFilter.params.drill_kwargs['version']=this.state.selectedRecord.version;
    this.calcRuleFilter.params.drill_kwargs['filter']='';
    console.log("Clicked calcRuleFilter 2",calcRuleFilter);
    this.setState({
        showDrillDownData : true,
        showDrillDownCalcBusinessRules : false,
        showAggRuleDetails: false,
        showCellChangeHistory: false,
      });

  }

  handleBusinessRuleClicked(event,businessRuleFilterParam){
    console.log("Clicked businessRule ruleFilterParam",businessRuleFilterParam);
    this.businessRuleFilterParam = businessRuleFilterParam;
    this.businessRuleFilterParam['report_snapshot'] = this.state.selectedRecord.report_snapshot;
    this.setState({
        showDrillDownData : false,
        showDrillDownCalcBusinessRules : true,
        showAggRuleDetails: false,
        showCellChangeHistory: false,
      });

  }

  handleAggeRuleClicked(event,item){
    console.log("Clicked aggRuleData ruleFilterParam",item);
    this.aggRuleData = item;
    // TODO AddReportAggRules as form and then pass aggRuleData
    this.setState({
        showDrillDownData : false,
        showDrillDownCalcBusinessRules : false,
        showAggRuleDetails: true,
        showCellChangeHistory: false,
      });

  }

  handleCellHistoryClicked(event,item){
    console.log("Clicked handleCellHistoryClicked",item);
    let isOpen = this.state.showCellChangeHistory;
    this.changeHistory=undefined;
    if(isOpen) {
      this.setState({
        showCellChangeHistory: false
      });
    } else {
      // TODO AddReportAggRules as form and then pass aggRuleData
      this.setState({
          showDrillDownData : false,
          showDrillDownCalcBusinessRules : false,
          showAggRuleDetails: false,
          showCellChangeHistory: true
        },
        ()=>{this.props.fetchReportChangeHistory(item.report_id,item.sheet_name,item.cell_id)}
      );
    }

  }

  handleHistoryClick() {
    let isOpen = this.state.display === "showHistory";
    this.changeHistory=undefined;
    if(isOpen) {
      this.setState({
        display: "showReportGrid"
      });
    } else {
      //this.props.fetchReportChangeHistory(this.state.reportId);
      //console.log("Repot Linkage",this.props.change_history);
      let sheetName = this.props.gridDataViewReport[0].sheet;
      this.setState({
        display: "showHistory"
        },
        ()=>{this.props.fetchReportChangeHistory(this.state.reportId,sheetName)}
      );
    }
  }

  handleReportBusinessRulesClick() {
    let isOpen = this.state.display === "showReportBusinessRules";
    this.reportBusinessRules=undefined;
    if(isOpen) {
      this.setState({
        display: "showReportGrid"
      });
    } else {
      this.setState({
        display: "showReportBusinessRules"
        },
        ()=>{this.props.drillDown(this.state.reportId,undefined,undefined,this.state.selectedRecord.report_snapshot)}
      );
    }
  }

  handleExportCSV(event) {
    let business_ref = "_source_" + this.state.sourceId + "_COB_" + this.state.businessDate + "_";
    this.props.exportCSV(this.props.gridDataViewReport.table_name,business_ref,this.props.gridDataViewReport.sql);
  }

  handleExportRules(event) {
    this.props.exportRulesXlsx(this.state.reportId);
  }

  handleExportReport(event) {
    let reportingDate = this.state.reportingDate ? this.state.reportingDate : "1900010119000101";
    this.props.exportXlsx(this.state.reportId, reportingDate,'Y')
  }

  handleModalOkayClick(event){
    // TODO
  }

  handleAuditOkayClick(auditInfo){
    //TODO
  }

  submitGenerateReport(reportInfo){
    if (reportInfo.report_type=="TRANSACTION"){
      this.props.createTransReport(reportInfo);
    } else {
      this.props.generateReport(reportInfo);
    }
  }

  renderDynamic(displayOption) {
      switch (displayOption) {
          case "showReportGrid":
              if (this.gridDataViewReport) {
                  return(

                          <RegOpzFlatGridActionButtons
                            editable={this.writeOnly}
                            checkDisabled={this.checkDisabled}
                            buttons={this.buttons}
                            dataNavigation={false}
                            pageNo={this.currentPage}
                            buttonClassOverride={this.buttonClassOverride}
                          />
                          <RegOpzReportGrid
                            report_id={this.state.reportId}
                            reporting_date={this.state.reportingDate}
                            gridData={this.gridDataViewReport}
                            handleSelectCell={ this.handleSelectCell.bind(this) }
                            multiSelectAllowed={false}
                            renderStyle={this.state.renderStyle}
                            ref={
                               (flatGrid) => {
                                 this.flatGrid = flatGrid;
                               }
                             }
                          />

                  );
              }
              return(

Loading ....

              );
          case "showDrillDownRules":
              if (this.props.cell_rules) {
                  let content = [
                      <DrillDownRules
                        cellRules = {this.props.cell_rules}
                        readOnly = {this.readOnly}
                        selectedCell = {this.selectedCell}
                        handleClose={ this.handleDetails.bind(this) }
                        reportingDate={this.state.reportingDate}
                        handleAggeRuleClicked={ this.handleAggeRuleClicked.bind(this) }
                        handleCalcRuleClicked={ this.handleCalcRuleClicked.bind(this) }
                        handleBusinessRuleClicked={ this.handleBusinessRuleClicked.bind(this) }
                        handleCellHistoryClicked={ this.handleCellHistoryClicked.bind(this) }
                      />
                  ];
                  if (this.state.showDrillDownData) {
                      content.push(
                          <ViewData
                            showDataGrid={true}
                            flagDataDrillDown={true}
                            sourceId={this.state.sourceId}
                            businessDate={this.state.businessDate}
                            dataFilterParam={this.calcRuleFilter}
                          />
                      );
                  } else if (this.state.showAggRuleDetails) {
                      content.push(
                          <AddReportAggRules
                            writeOnly={false}
                            handleClose={this.handleDetails.bind(this)}
                            aggRuleData = { this.aggRuleData }
                            dml_allowed = { this.aggRuleData.dml_allowed }
                          />
                      );
                  } else if (this.state.showDrillDownCalcBusinessRules) {
                      const permissions=[{"permission": "View Business Rules"}];
                      content.push(
                          <ViewBusinessRules
                            privileges={ permissions }
                            showBusinessRuleGrid={true}
                            flagRuleDrillDown={true}
                            sourceId={this.businessRuleFilterParam.source_id}
                            ruleFilterParam={this.businessRuleFilterParam}
                          />
                      );
                  } else if (this.state.showCellChangeHistory && this.changeHistory) {
                      content.push(
                        <DefAuditHistory
                          data={ this.changeHistory }
                          historyReference={ "" }
                          handleClose={ this.handleCellHistoryClicked.bind(this) }
                         />
                      );
                  }
                  return content;
              }
              break;
          case "showHistory":
              if (this.gridDataViewReport) {
                  return(
                    <Tabs
                      defaultActiveKey={0}
                      activeKey={this.state.selectedAuditSheet}
                      onSelect={(key) => {
                          let sheetName = this.gridDataViewReport[key].sheet;
                          this.setState({selectedAuditSheet:key},
                          ()=>{this.props.fetchReportChangeHistory(this.state.reportId,sheetName)}
                        );
                          //this.renderTabs(key);
                      }}
                      >
                      {
                        this.gridDataViewReport.map((item,index) => {
                          console.log("Inside dridData map");
                          return(
                              <Tab
                                key={index}
                                eventKey={index}
                                title={item['sheet']}
                              >
                                {
                                  (()=>{
                                    if(this.state.selectedAuditSheet == index){
                                      // reseting the selectedCell when chanding the tab of the report
                                      //this.selectedCell = {};
                                      return (
                                          <DefAuditHistory
                                            data={ this.changeHistory }
                                            historyReference={ "" }
                                            handleClose={ this.handleHistoryClick.bind(this) }
                                           />
                                        );
                                    }
                                  })()
                                }
                              </Tab>
                          )
                        })
                      }
                    </Tabs>
                  );
              }
              break;
          case "editParameter":
            return(
                    <CreateReport
                      reportDetails={this.state.selectedRecord}
                      reGenerateReport={true}
                      handleCancel={this.handleEditParameterClick}
                    />
                  );
            break;
          case "viewReportVersions":
            return(
                <ReportVersionsList
                  dataCatalog={this.reportVersions}
                  handleReportClick={this.handleReportClick}
                  editParameter={this.handleEditParameterClick}
                  generateReport={this.submitGenerateReport}
                  handleClose={this.viewReportVersions}
                  viewOperationLog={this.viewOperationLog}
                  />
            );
            break;
          case "viewOperationLog":
            return(
                <OperationLogList
                  data={this.operationLogs}
                  reference={"Report " + this.state.reportId + " version " + this.state.selectedRecord.id}
                  handleClose={this.viewOperationLog}
                  refreshOperationLog={this.refreshOperationLog}
                  />
            );
            break;
          case "showReportBusinessRules":
              return(
                  <ReportBusinessRules
                    data={ this.reportBusinessRules }
                    handleClose={this.handleReportBusinessRulesClick}
                    />
              );
              break;
          default:
              return(
                  <ReportCatalogList
                    dataCatalog={this.props.dataCatalog}
                    navMenu={false}
                    handleReportClick={this.handleReportClick}
                    dateFilter={this.handleDateFilter}
                    editParameter={this.handleEditParameterClick}
                    generateReport={this.submitGenerateReport}
                    viewReportVersions={this.viewReportVersions}
                    viewOperationLog={this.viewOperationLog}
                    />
              );
      }
  }

  render(){
    if (typeof this.props.dataCatalog != 'undefined') {
        //console.log("This grid ref", this.flatGrid);
        return(

                    {
                        ((displayOption) => {
                            if (!displayOption) {
                                return(

View Report Available Reports for
                                      {moment(this.state.startDate).format("DD-MMM-YYYY") + ' - ' + moment(this.state.endDate).format("DD-MMM-YYYY")}

                                );
                            }
                            return(

View Report {' Report '}

                                  {this.state.reportId + ' [Version: ' + this.state.selectedRecord.version + ' @' + this.state.selectedRecord.report_create_date + ']'}
                                  {' as on Business Date: ' + moment(this.state.businessDate).format("DD-MMM-YYYY")}

                            );
                        })(this.state.display)
                    }

                              {' Reports '}

                                <Link to="/dashboard/view-report"
                                  onClick={()=>{ this.setState({ display: false, renderStyle: false, }) }}
                                >
                                    {' All Report List'}
                                </Link>

                                <ReportCatalogList
                                  dataCatalog={this.props.dataCatalog}
                                  navMenu={true}
                                  handleReportClick={this.handleReportClick}
                                  dateFilter={this.handleDateFilter}
                                  />

                        {
                          !this.state.display &&

                               {
                                      this.props.fetchReportCatalog(moment(this.state.startDate).format('YYYYMMDD') ,moment(this.state.endDate).format('YYYYMMDD') , 'Data');
                                    }
                                  }
                                >
                                {' Refresh '}

                        }
                        {
                          this.state.display &&
                          this.state.display != "viewReportVersions" &&

                            <input type="checkbox" onChange={()=>{this.setState({renderStyle: !this.state.renderStyle})}}/>

                        }

                {
                    this.renderDynamic(this.state.display)
                }

          <ModalAlert
            ref={(modalAlert) => {this.modalAlert = modalAlert}}
            onClickOkay={this.handleModalOkayClick}
          />

          < AuditModal showModal={this.state.showAuditModal}
            onClickOkay={this.handleAuditOkayClick}
          />

      );
    } else {
      return(

 Loading.....

      );
    }
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    fetchReportCatalog:(startDate,endDate)=>{
      dispatch(actionFetchReportCatalog(startDate,endDate))
    },
    fetchReportData:(report_id, reporting_date, version, report_snapshot,report_parameters)=>{
      dispatch(actionFetchReportData(report_id, reporting_date, version, report_snapshot,report_parameters))
    },
    fetchTransReportData:(report_id, reporting_date)=>{
      dispatch(actionFetchTransReportData(report_id, reporting_date))
    },
    drillDown:(report_id,sheet,cell,report_snapshot) => {
      dispatch(actionDrillDown(report_id,sheet,cell,report_snapshot));
    },
    fetchReportChangeHistory:(report_id,sheet_id,cell_id) => {
      dispatch(actionFetchReportChangeHistory(report_id,sheet_id,cell_id));
    },
    exportCSV:(table_name,business_ref,sql) => {
      dispatch(actionExportCSV(table_name,business_ref,sql));
    },
    generateReport: (report_info) => {
      dispatch(actionGenerateReport(report_info));
    },
    createTransReport:(reportInfo)=>{
      dispatch(actionCreateTransReport(reportInfo));
    },
    exportXlsx:(report_id,reporting_date,cell_format_yn) => {
      dispatch(actionExportXlsx(report_id,reporting_date,cell_format_yn));
    },
    exportRulesXlsx:(report_id) => {
      dispatch(actionExportRulesXlsx(report_id));
    },
    leftMenuClick:(isLeftMenu) => {
      dispatch(actionLeftMenuClick(isLeftMenu));
    },
    fetchOperationLog:(entity_type,entity_id) => {
      dispatch(actionFetchOperationLog(entity_type,entity_id));
    },
  }
}

function mapStateToProps(state){
  console.log("On mapState ", state, state.view_data_store, state.report_store);
  return {
    //data_date_heads:state.view_data_store.dates,
    dataCatalog: state.report_store.reports,
    gridDataViewReport: state.captured_report,
    gridDataViewTransReport: state.transreport.reportGridData,
    gridData: state.view_data_store.gridData,
    cell_rules: state.report_store.cell_rules,
    change_history:state.maintain_report_rules_store.change_history,
    operation_log: state.operation_log_store.operation_log,
    login_details:state.login_store,
    leftmenu: state.leftmenu_store.leftmenuclick,
  }
}

const VisibleViewReport = connect(
  mapStateToProps,
  mapDispatchToProps
)(ViewReport);

export default VisibleViewReport;


text:
This is a simple skeleton project for Slim 3 that includes Twig, Flash messages and Monolog.

## Create your project:

    $ composer create-project -n -s dev akrabat/slim3-skeleton my-app

### Run it:

1. `$ cd my-app`
2. `$ php -S 0.0.0.0:8888 -t public public/index.php`
3. Browse to http://localhost:8888

## Key directories

* `app`: Application code
* `app/src`: All class files within the `App` namespace
* `app/templates`: Twig template files
* `cache/twig`: Twig's Autocreated cache files
* `log`: Log files
* `public`: Webserver root
* `vendor`: Composer dependencies

## Key files

* `public/index.php`: Entry point to application
* `app/settings.php`: Configuration
* `app/dependencies.php`: Services for Pimple
* `app/middleware.php`: Application middleware
* `app/routes.php`: All application routes are here
* `app/src/Action/HomeAction.php`: Action class for the home page
* `app/templates/home.twig`: Twig template file for the home page

![alt tag](https://github.com/maikenmadsen92/Slimframework3DatabaseConnection/blob/master/Screen.Shot.2016-02-29.at.20.48.56.png)


text:
require 'nyargl_recaptcha/engine'

module NyarglRecaptcha
  ActiveSupport.on_load(:action_controller) do
    include NyarglRecaptcha::Concerns::Checker
    helper NyarglRecaptcha::Engine.helpers
  end
end


text:
/**
 * This class is generated by jOOQ
 */
package de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables;

/**
 * This class is generated by jOOQ.
 */
@javax.annotation.Generated(value    = { "http://www.jooq.org", "3.4.4" },
                            comments = "This class is generated by jOOQ")
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DirectSupporterSnapshot extends org.jooq.impl.TableImpl<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord> {

	private static final long serialVersionUID = 888856161;

	/**
	 * The singleton instance of direct_supporter_snapshot
	 */
	public static final de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot DIRECT_SUPPORTER_SNAPSHOT = new de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot();

	/**
	 * The class holding records for this type
	 */
	@Override
	public java.lang.Class<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord> getRecordType() {
		return de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord.class;
	}

	/**
	 * The column direct_supporter_snapshot.issue_id.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Integer> ISSUE_ID = createField("issue_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column direct_supporter_snapshot.initiative_id.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Integer> INITIATIVE_ID = createField("initiative_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column direct_supporter_snapshot.event.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, de.piratenpartei.berlin.ldadmin.dbaccess.generated.enums.SnapshotEvent> EVENT = createField("event", org.jooq.util.postgres.PostgresDataType.VARCHAR.asEnumDataType(de.piratenpartei.berlin.ldadmin.dbaccess.generated.enums.SnapshotEvent.class), this, "");

	/**
	 * The column direct_supporter_snapshot.member_id.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Integer> MEMBER_ID = createField("member_id", org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, "");

	/**
	 * The column direct_supporter_snapshot.draft_id.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Long> DRAFT_ID = createField("draft_id", org.jooq.impl.SQLDataType.BIGINT.nullable(false), this, "");

	/**
	 * The column direct_supporter_snapshot.informed.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Boolean> INFORMED = createField("informed", org.jooq.impl.SQLDataType.BOOLEAN.nullable(false), this, "");

	/**
	 * The column direct_supporter_snapshot.satisfied.
	 */
	public final org.jooq.TableField<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, java.lang.Boolean> SATISFIED = createField("satisfied", org.jooq.impl.SQLDataType.BOOLEAN.nullable(false), this, "");

	/**
	 * Create a direct_supporter_snapshot table reference
	 */
	public DirectSupporterSnapshot() {
		this("direct_supporter_snapshot", null);
	}

	/**
	 * Create an aliased direct_supporter_snapshot table reference
	 */
	public DirectSupporterSnapshot(java.lang.String alias) {
		this(alias, de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot.DIRECT_SUPPORTER_SNAPSHOT);
	}

	private DirectSupporterSnapshot(java.lang.String alias, org.jooq.Table<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord> aliased) {
		this(alias, aliased, null);
	}

	private DirectSupporterSnapshot(java.lang.String alias, org.jooq.Table<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord> aliased, org.jooq.Field<?>[] parameters) {
		super(alias, de.piratenpartei.berlin.ldadmin.dbaccess.generated.DefaultSchema.DEFAULT_SCHEMA, aliased, parameters, "");
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public org.jooq.UniqueKey<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord> getPrimaryKey() {
		return de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT_PKEY;
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public java.util.List<org.jooq.UniqueKey<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord>> getKeys() {
		return java.util.Arrays.<org.jooq.UniqueKey<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord>>asList(de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT_PKEY);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public java.util.List<org.jooq.ForeignKey<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, ?>> getReferences() {
		return java.util.Arrays.<org.jooq.ForeignKey<de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.records.DirectSupporterSnapshotRecord, ?>>asList(de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT__DIRECT_SUPPORTER_SNAPSHOT_ISSUE_ID_FKEY, de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT__DIRECT_SUPPORTER_SNAPSHOT_ISSUE_ID_FKEY1, de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT__DIRECT_SUPPORTER_SNAPSHOT_INITIATIVE_ID_FKEY, de.piratenpartei.berlin.ldadmin.dbaccess.generated.Keys.DIRECT_SUPPORTER_SNAPSHOT__DIRECT_SUPPORTER_SNAPSHOT_MEMBER_ID_FKEY);
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	public de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot as(java.lang.String alias) {
		return new de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot(alias, this);
	}

	/**
	 * Rename this table
	 */
	public de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot rename(java.lang.String name) {
		return new de.piratenpartei.berlin.ldadmin.dbaccess.generated.tables.DirectSupporterSnapshot(name, null);
	}
}


text:
SudokuBoardControl::SudokuBoardControl(SudokuBoardLinearModel *sudokuBoardLinearModel, QObject *parent) :
    QObject(parent),
    m_sudokuBoardLinearModel(sudokuBoardLinearModel)
{
    // Should this must be done this way?
    connect(m_sudokuBoardLinearModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)),
            this, SLOT(checkForFinished()));
}

void SudokuBoardControl::checkForFinished()
{
    // TODO: Implement
}


text:
hdfs-ingest-weather-archetype-quickstart
===========================

* To install the archetype in a local Maven repository:

```bash
    $ cd hdfs-ingest-weather-archetype
    $ mvn install
    $ cd ..
```

* To create a new quickstart Thrift project:

```bash
    $ mvn archetype:generate \
        -DarchetypeGroupId=com.nardoz \
        -DarchetypeArtifactId=hdfs-ingest-weather-archetype \
        -DarchetypeVersion=1.0.0 \
        -DgroupId=com.mycompany \
        -DartifactId=myapp \
        -Dversion=1.0-SNAPSHOT
    $ cd myapp
    $ mvn test
```