text:
<mat-accordion class="demo-tree-container">

  <mat-expansion-panel>
    <mat-expansion-panel-header>Flattened tree</mat-expansion-panel-header>
    <mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
      <mat-tree-node *matTreeNodeDef="let node" matTreeNodeToggle matTreeNodePadding>
        <button mat-icon-button disabled></button>
        {{node.filename}} : {{node.type}}
      </mat-tree-node>
      <mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
        <button mat-icon-button matTreeNodeToggle
                [attr.aria-label]="'toggle ' + node.filename">
          <mat-icon>
            {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
          </mat-icon>
        </button>
        {{node.filename}} : {{node.type}}
      </mat-tree-node>
    </mat-tree>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>Nested tree</mat-expansion-panel-header>
    <mat-tree [dataSource]="nestedDataSource" [treeControl]="nestedTreeControl">
      <mat-nested-tree-node *matTreeNodeDef="let node" matTreeNodeToggle>

          <button mat-icon-button disabled></button>
          {{node.filename}}:  {{node.type}}

      </mat-nested-tree-node>
      <mat-nested-tree-node *matTreeNodeDef="let node; when: hasNestedChild">

            <button mat-icon-button matTreeNodeToggle
                    [attr.aria-label]="'toggle ' + node.filename">
              <mat-icon>
                {{nestedTreeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
              </mat-icon>
            </button>
            {{node.filename}}

            <ng-container matTreeNodeOutlet></ng-container>

      </mat-nested-tree-node>
    </mat-tree>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>CDK Flattened tree</mat-expansion-panel-header>
    <cdk-tree [dataSource]="dataSource" [treeControl]="treeControl">
      <cdk-tree-node *cdkTreeNodeDef="let node" cdkTreeNodePadding class="demo-tree-node">
        <button mat-icon-button disabled></button>
        {{node.filename}}:  {{node.type}}
      </cdk-tree-node>
      <cdk-tree-node *cdkTreeNodeDef="let node; when: hasChild" cdkTreeNodePadding
                     class="demo-tree-node">
        <button mat-icon-button [attr.aria-label]="'toggle ' + node.filename"
                cdkTreeNodeToggle class="demo-tree-toggle">
          <mat-icon>
            {{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
          </mat-icon>
        </button>
        {{node.filename}}:  {{node.type}}
      </cdk-tree-node>
    </cdk-tree>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>CDK Nested tree</mat-expansion-panel-header>
    <cdk-tree [dataSource]="nestedDataSource" [treeControl]="nestedTreeControl">
      <cdk-nested-tree-node *cdkTreeNodeDef="let node" class="demo-tree-node">
        <button mat-icon-button disabled></button>
        {{node.filename}}:  {{node.type}}
      </cdk-nested-tree-node>
      <cdk-nested-tree-node *cdkTreeNodeDef="let node; when: hasNestedChild" class="demo-tree-node">
        <button mat-icon-button [attr.aria-label]="'toggle ' + node.filename"
                cdkTreeNodeToggle class="demo-tree-toggle">
          <mat-icon>
            {{nestedTreeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
          </mat-icon>
        </button>
        {{node.filename}}:  {{node.type}}

          <ng-container cdkTreeNodeOutlet></ng-container>

      </cdk-nested-tree-node>
    </cdk-tree>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>Todo list Flattened tree</mat-expansion-panel-header>
    <checklist-tree-demo></checklist-tree-demo>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>Todo list Nested tree</mat-expansion-panel-header>
    <checklist-nested-tree-demo></checklist-nested-tree-demo>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>Dynamic flat tree</mat-expansion-panel-header>
    <dynamic-tree-demo></dynamic-tree-demo>
  </mat-expansion-panel>

  <mat-expansion-panel>
    <mat-expansion-panel-header>Loadmore flat tree</mat-expansion-panel-header>
    <loadmore-tree-demo></loadmore-tree-demo>
  </mat-expansion-panel>

</mat-accordion>


text:
HTML5 Boilerplate

and here is the data :
{{data}}

              HTML5 Boilerplate is a professional front-end template for building fast, robust, and adaptable web apps or sites.

Angular

              AngularJS is a toolset for building the framework most suited to your application development.

Karma

Spectacular Test Runner for JavaScript.

redpajama_set_name: RedPajamaGithub


text:
package com.intellij.refactoring.move.moveInstanceMethod;

import com.intellij.lang.java.JavaLanguage;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.actionSystem.DataContext;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.editor.ScrollType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.ui.Messages;
import com.intellij.psi.*;
import com.intellij.psi.codeStyle.JavaCodeStyleManager;
import com.intellij.psi.codeStyle.SuggestedNameInfo;
import com.intellij.psi.codeStyle.VariableKind;
import com.intellij.psi.impl.source.jsp.jspJava.JspClass;
import com.intellij.psi.search.searches.OverridingMethodsSearch;
import com.intellij.psi.util.PsiTypesUtil;
import com.intellij.psi.util.PsiUtil;
import com.intellij.refactoring.HelpID;
import com.intellij.refactoring.RefactoringActionHandler;
import com.intellij.refactoring.RefactoringBundle;
import com.intellij.refactoring.makeStatic.MakeStaticHandler;
import com.intellij.refactoring.move.MoveInstanceMembersUtil;
import com.intellij.refactoring.util.CommonRefactoringUtil;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

/**
 * @author ven
 */
public class MoveInstanceMethodHandler implements RefactoringActionHandler {
  private static final Logger LOG = Logger.getInstance(MoveInstanceMethodHandler.class);

  @Override
  public void invoke(@NotNull Project project, Editor editor, PsiFile file, DataContext dataContext) {
    PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
    editor.getScrollingModel().scrollToCaret(ScrollType.MAKE_VISIBLE);
    if (element == null) {
      element = file.findElementAt(editor.getCaretModel().getOffset());
    }

    if (element == null) return;
    if (element instanceof PsiIdentifier) element = element.getParent();

    if (!(element instanceof PsiMethod)) {
      String message = RefactoringBundle.getCannotRefactorMessage(RefactoringBundle.message("error.wrong.caret.position.method"));
      CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringName(), HelpID.MOVE_INSTANCE_METHOD);
      return;
    }
    if (LOG.isDebugEnabled()) {
      LOG.debug("Move Instance Method invoked");
    }
    invoke(project, new PsiElement[]{element}, dataContext);
  }

  @Override
  public void invoke(@NotNull final Project project, final PsiElement @NotNull [] elements, final DataContext dataContext) {
    if (elements.length != 1 || !(elements[0] instanceof PsiMethod)) return;
    final PsiMethod method = (PsiMethod)elements[0];
    String message = null;
    if (!method.getManager().isInProject(method)) {
      message = RefactoringBundle.message("move.method.is.not.supported.for.non.project.methods");
    } else if (method.isConstructor()) {
      message = RefactoringBundle.message("move.method.is.not.supported.for.constructors");
    } else if (method.getLanguage()!= JavaLanguage.INSTANCE) {
      message = RefactoringBundle.message("move.method.is.not.supported.for.0", method.getLanguage().getDisplayName());
    }
    else {
      final PsiClass containingClass = method.getContainingClass();
      if (containingClass != null && mentionTypeParameters(method)) {
        message = RefactoringBundle.message("move.method.is.not.supported.for.generic.classes");
      }
      else if (method.findSuperMethods().length > 0 ||
               OverridingMethodsSearch.search(method).toArray(PsiMethod.EMPTY_ARRAY).length > 0) {
        message = RefactoringBundle.message("move.method.is.not.supported.when.method.is.part.of.inheritance.hierarchy");
      }
      else {
        final Set<PsiClass> classes = MoveInstanceMembersUtil.getThisClassesToMembers(method).keySet();
        for (PsiClass aClass : classes) {
          if (aClass instanceof JspClass) {
            message = RefactoringBundle.message("synthetic.jsp.class.is.referenced.in.the.method");
            Editor editor = CommonDataKeys.EDITOR.getData(dataContext);
            CommonRefactoringUtil.showErrorHint(project, editor, message, getRefactoringName(), HelpID.MOVE_INSTANCE_METHOD);
            break;
          }
        }
      }
    }
    if (message != null) {
      showErrorHint(project, dataContext, message);
      return;
    }

    final List<PsiVariable> suitableVariables = new ArrayList<>();
    message = collectSuitableVariables(method, suitableVariables);
    if (message != null) {
      final String unableToMakeStaticMessage = MakeStaticHandler.validateTarget(method);
      if (unableToMakeStaticMessage != null) {
        showErrorHint(project, dataContext, message);
      }
      else {
        final String suggestToMakeStaticMessage = "Would you like to make method \'" + method.getName() + "\' static and then move?";
        if (Messages
          .showYesNoCancelDialog(project, message + ". " + suggestToMakeStaticMessage,
                                 getRefactoringName(), Messages.getErrorIcon()) == Messages.YES) {
          MakeStaticHandler.invoke(method);
        }
      }
      return;
    }

    new MoveInstanceMethodDialog(
      method,
      suitableVariables.toArray(new PsiVariable[0])).show();
  }

  private static void showErrorHint(Project project, DataContext dataContext, String message) {
    Editor editor = dataContext == null ? null : CommonDataKeys.EDITOR.getData(dataContext);
    CommonRefactoringUtil.showErrorHint(project, editor, RefactoringBundle.getCannotRefactorMessage(message), getRefactoringName(), HelpID.MOVE_INSTANCE_METHOD);
  }

  @Nullable
  private static String collectSuitableVariables(final PsiMethod method, final List<? super PsiVariable> suitableVariables) {
    final List<PsiVariable> allVariables = new ArrayList<>();
    ContainerUtil.addAll(allVariables, method.getParameterList().getParameters());
    ContainerUtil.addAll(allVariables, method.getContainingClass().getFields());
    boolean classTypesFound = false;
    boolean resolvableClassesFound = false;
    boolean classesInProjectFound = false;
    for (PsiVariable variable : allVariables) {
      final PsiType type = variable.getType();
      if (type instanceof PsiClassType && !((PsiClassType)type).hasParameters()) {
        classTypesFound = true;
        final PsiClass psiClass = ((PsiClassType)type).resolve();
        if (psiClass != null && !(psiClass instanceof PsiTypeParameter)) {
          resolvableClassesFound = true;
          final boolean inProject = method.getManager().isInProject(psiClass);
          if (inProject) {
            classesInProjectFound = true;
            suitableVariables.add(variable);
          }
        }
      }
    }

    if (suitableVariables.isEmpty()) {
      if (!classTypesFound) {
        return RefactoringBundle.message("there.are.no.variables.that.have.reference.type");
      }
      else if (!resolvableClassesFound) {
        return RefactoringBundle.message("all.candidate.variables.have.unknown.types");
      }
      else if (!classesInProjectFound) {
        return RefactoringBundle.message("all.candidate.variables.have.types.not.in.project");
      }
    }
    return null;
  }

  public static String suggestParameterNameForThisClass(final PsiClass thisClass) {
    PsiManager manager = thisClass.getManager();
    PsiType type = JavaPsiFacade.getElementFactory(manager.getProject()).createType(thisClass);
    final SuggestedNameInfo suggestedNameInfo = JavaCodeStyleManager.getInstance(manager.getProject())
      .suggestVariableName(VariableKind.PARAMETER, null, null, type);
    return suggestedNameInfo.names.length > 0 ? suggestedNameInfo.names[0] : "";
  }

  public static Map<PsiClass, String> suggestParameterNames(final PsiMethod method, final PsiVariable targetVariable) {
    final Map<PsiClass, Set<PsiMember>> classesToMembers = MoveInstanceMembersUtil.getThisClassesToMembers(method);
    Map<PsiClass, String> result = new LinkedHashMap<>();
    for (Map.Entry<PsiClass, Set<PsiMember>> entry : classesToMembers.entrySet()) {
      PsiClass aClass = entry.getKey();
      final Set<PsiMember> members = entry.getValue();
      if (members.size() == 1 && members.contains(targetVariable)) continue;
      result.put(aClass, suggestParameterNameForThisClass(aClass));
    }
    return result;
  }

  private static boolean mentionTypeParameters(PsiMethod method) {
    PsiClass containingClass = method.getContainingClass();
    if (containingClass == null) return false;
    Set<PsiTypeParameter> typeParameters = ContainerUtil.newHashSet(PsiUtil.typeParametersIterable(containingClass));
    for (PsiParameter parameter : method.getParameterList().getParameters()) {
      if (PsiTypesUtil.mentionsTypeParameters(parameter.getType(), typeParameters)) return true;
    }
    return PsiTypesUtil.mentionsTypeParameters(method.getReturnType(), typeParameters);
  }

  static String getRefactoringName() {
    return RefactoringBundle.message("move.instance.method.title");
  }
}


text:
#ifndef RSYN_MAIN_FRAME_H
#define RSYN_MAIN_FRAME_H

#include "rsyn/gui/frame/base/MainFrameBase.h"
#include "rsyn/gui/canvas/PhysicalCanvasGL.h"
#include "rsyn/gui/canvas/SchematicCanvasGL.h"
#include "rsyn/gui/Redirector.h"
#include "rsyn/3rdparty/json/json.hpp"
#include "rsyn/io/parser/script/ScriptReader.h"
#include "rsyn/io/parser/bookshelf/BookshelfParser.h"
#include "rsyn/session/Session.h"
#include "rsyn/gui/canvas/Stipple.h"

#include <wx/config.h>
#include <wx/filedlg.h>
#include <wx/wfstream.h>

#include <iostream>
using std::cout;
using std::cerr;
using std::endl;
#include <vector>
using std::vector;
#include <map>
#include <string>
#include <wx-3.0/wx/propgrid/property.h>

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

namespace Rsyn {
class Report;
class Writer;
class RoutingEstimator;
class Timer;
class Graphics;
}

namespace ICCAD15 {
class Infrastructure;
}

class SaveSnapshot;
class AboutDialog;

class MainFrame : public MainFrameBase {
protected:
	CanvasGL *clsCanvasGLPtr = nullptr;
	PhysicalCanvasGL *clsPhysicalCanvasGLPtr = nullptr;
	NewSchematicCanvasGL *clsSchematicCanvasGLPtr = nullptr;
	SchematicCanvasGL *clsSchematicCanvas = nullptr;

private:

	enum View {
		VIEW_PHYSICAL,
		VIEW_SCHEMATIC
	};

	Rsyn::Session clsSession;

	// Physical Design
	Rsyn::PhysicalDesign clsPhysicalDesign;

	// Default Services
	Rsyn::PhysicalService * clsPhysicalPtr = nullptr;
	Rsyn::RoutingEstimator * clsRoutingEstimatorPtr = nullptr;
	Rsyn::Timer * clsTimerPtr = nullptr;
	Rsyn::Report * clsReportPtr = nullptr;
	Rsyn::Writer * clsWriterPtr = nullptr;
	Rsyn::Graphics * clsGraphicsPtr = nullptr;

	SaveSnapshot *clsSaveSnapshot = nullptr;
	AboutDialog * clsAboutDialog = nullptr;

	wxConfig clsConfig;

	static const std::string DEFAULT_STORED_SOLUTION_NAME;

	//Update circuit informations
	void updateCircuitInfo();

	// Shows the properties of an instance.
	void updateInstanceProperties(Rsyn::Instance instance, const bool updateOnlyPropertiesAffectedByPlacementChange = false);

	// Shows the properties of a net.
	void updateNetProperties(Rsyn::Net net);

	// Shows the properties of a pin.
	void updatePinProperties(Rsyn::Pin pin);

	// Update stats.
	void UpdateStats(const bool redraw);

	// Open Configure file for ICCAD 2015 Contest.
	void DoRunScript(const string &filename);

	// Save a snapshot.
	void DoSaveSnapshot(const wxString &filename);

	// Do change view.
	void DoChangeView(const View view);

	// Update schematic properties.
	void UpdateSchematicProperties();

	// When window is closed, call session Session destructor.
	void OnCloseWindow(wxCloseEvent& event) {
		Destroy();
	} // end method

	// Canvas overlay management.
	std::map<std::string, CanvasOverlay *> clsOverlays;
	std::map<wxPGProperty*, int> propToStipple;

	bool startOverlay(const std::string &name, const bool visibility = false);

	void startAllOverlays();

	void deleteAllOverlays() {
		for (std::pair<std::string, CanvasOverlay *> p : clsOverlays) {
			delete p.second;
		} // end for
	} // end method

	void configOverlay(const std::string &name, const nlohmann::json &params) {
		auto it = clsOverlays.find(name);
		if (it == clsOverlays.end()) {
			std::cout << "ERROR: Canvas overlay '" << name << "' does not exists.\n";
		} else {
			CanvasOverlay * overlay = it->second;
			overlay->config(params);
		} // end else
	} // end method

public:
	// Register a process.
	template<typename T>
	static void registerOverlay(const std::string &name, const bool initialVisibility = false) {
		if (!clsRegisteredOverlays) {
			// Try to avoid "static variable initialization fiasco".
			clsRegisteredOverlays = new RegisteredOverlayMap();
		} // end if

		RegisteredOverlayMap &registeredOverlayMap = *clsRegisteredOverlays;

		auto it = registeredOverlayMap.find(name);
		if (it != registeredOverlayMap.end()) {
			std::cout << "ERROR: Process '" << name << "' was already "
					"registered.\n";
			std::exit(1);
		} else {
			//std::cout << "Registering overlay '" << name << "' ...\n";
			registeredOverlayMap[name] = std::make_tuple([]() -> CanvasOverlay *{
				return new T();
			}, initialVisibility);
		} // end else
	} // end method

private:
	// Generic functions used to instantiate overlays.
	typedef std::function<CanvasOverlay *()> OverlayInstantiatonFunction;
	typedef std::unordered_map<std::string, std::tuple<OverlayInstantiatonFunction, bool>> RegisteredOverlayMap;
	static RegisteredOverlayMap *clsRegisteredOverlays;

	// Session events.
	void processGraphicsEventDesignLoaded();
	void processGraphicsEventRefresh();
	void processGraphicsEventUpdateOverlayList();

	// Generate an icon from technology layer pattern.
	wxImage createBitmapFromMask(const unsigned char * mask, wxColor line, wxColor fill);

public:

	MainFrame();
	~MainFrame();

	void openBenchmark(const wxString &filename);

	// Event Handlers.
	virtual void OnQuit(wxCommandEvent &event);

	virtual void OnExecuteCommand(wxCommandEvent& event);
	virtual void OnExecuteCommandChar(wxKeyEvent& event);
	virtual void OnExecuteCommandKeyDown(wxKeyEvent& event);
	virtual void OnExecuteCommandKeyUp(wxKeyEvent& event);

	virtual void OnRunScript(wxCommandEvent &event);

	virtual void OnLoadPlFile(wxCommandEvent &event);
	virtual void OnLoadColorsFile(wxCommandEvent &event);
	virtual void OnLoadPartFile(wxCommandEvent &event);
	virtual void OnLoadFiedlerFile(wxCommandEvent &event);
	virtual void OnLoadLogicalCoreFile(wxCommandEvent &event);

	virtual void OnSavePlFile(wxCommandEvent &event);
	virtual void OnSaveDEF (wxCommandEvent &event);
	virtual void OnSaveSnapshot(wxCommandEvent &event);

	virtual void OnResetCamera(wxCommandEvent& event);
	virtual void OnZoomIn(wxCommandEvent& event);
	virtual void OnZoomOut(wxCommandEvent& event);

	virtual void OnChangeView(wxCommandEvent& event);
	virtual void OnChangeView(wxChoicebookEvent& event);

	virtual void OnColoringColorful(wxCommandEvent &event);
	virtual void OnColoringRandomBlue(wxCommandEvent &event);
	virtual void OnColoringGray(wxCommandEvent &event);
	virtual void OnColoringLateSlack(wxCommandEvent& event);
	virtual void OnColoringEarlySlack(wxCommandEvent& event);
	virtual void OnColoringCriticality(wxCommandEvent& event);
	virtual void OnColoringCentrality(wxCommandEvent& event);
	virtual void OnColoringRelativity(wxCommandEvent& event);

	virtual void OnGenerateColorsFile(wxCommandEvent &event);

	virtual void OnSearch(wxCommandEvent &event);

	virtual void OnCheckCellTimingMode(wxCommandEvent &event);
	virtual void OnOverlayPropertyGridChanged(wxPropertyGridEvent &event);

	virtual void OnKeyDown(wxKeyEvent &event);
	virtual void OnMouseMotion(wxMouseEvent &event);
	virtual void OnLeftUp(wxMouseEvent& event);
	virtual void OnLeftDown(wxMouseEvent& event);
	virtual void OnSelectedCellDrag(wxCommandEvent &event);

	virtual void OnCellSelected(wxCommandEvent &event);
	virtual void OnHoverOverObject(wxCommandEvent &event);

	virtual void OnCheckpoint(wxCommandEvent& event);
	virtual void OnScroll(wxScrollEvent &event);

	virtual void OnUpdateSteinerTrees(wxCommandEvent& event);
	virtual void OnUpdateTiming(wxCommandEvent& event);

	virtual void OnLegalize(wxCommandEvent& event);
	virtual void OnLegalizeSelectedCell(wxCommandEvent& event);

	virtual void OnRun( wxCommandEvent& event );

	// Methods of help menu item

	//! @brief Shows a dialog box presenting data about Rsyn.
	virtual void OnAbout(wxCommandEvent& event) override;

	// Methods for schematic canvas control
	virtual void OnSchematicCellSelected(wxCommandEvent &event);
	virtual void OnSchematicClickView(wxCommandEvent &event) override;
	virtual void OnSchematicNumCriticalPaths(wxCommandEvent & event) override;
}; // end class

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

class SaveSnapshot : public SaveSnapshotBase {
private:
	float ratioWH;
	PhysicalCanvasGL* canvas;
public:

	/* Constructor */
	SaveSnapshot(wxWindow* window, PhysicalCanvasGL* canvas) : canvas(canvas),
	SaveSnapshotBase( window ) {
		m_comboBox1->Append( "Nearest (Suggested)" );
		m_comboBox1->Append( "Bilinear" );
		m_comboBox1->Append( "Bicubic" );
		m_comboBox1->Append( "Box average" );
		m_comboBox1->Append( "Normal" );
		m_comboBox1->Append( "High" );
		m_comboBox1->Select( 0 );
	} // end constructor

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

	/* Change the default dimensions and ratio of the image */
	void setDimensions( const int w, const int h ) {
		m_spinCtrl2->SetValue( w );
		m_spinCtrl3->SetValue( h );
		ratioWH = w / (float) h;
	} // end method

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

	/* Enables the user to save snapshots after the design is loaded */
	void enableWindow() {
		m_spinCtrl2->Enable( true );
		m_spinCtrl3->Enable( true );
		m_textCtrl15->Enable( true );
		m_comboBox1->Enable( true );
		m_checkBox7->Enable( true );
		m_button33->Enable( true );
		m_button34->Enable( true );

		if (canvas) {
			m_spinCtrl2->SetValue(canvas->GetSize().x);
			m_spinCtrl3->SetValue(canvas->GetSize().y);
		}
	} // end method

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

	/* Method to keep the aspect ratio */
	void adjustHeight(wxSpinEvent& event) override {
		if( !m_checkBox7->IsChecked() )
			return;

		const int width = m_spinCtrl2->GetValue();

		 m_spinCtrl3->SetValue( (int) (width / ratioWH) );
	}; // end method

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

	/* Method to keep the aspect ratio */
	void adjustWidth(wxSpinEvent& event) override {
		if( !m_checkBox7->IsChecked() )
			return;

		const int height = m_spinCtrl3->GetValue();

		 m_spinCtrl2->SetValue( (int) (height * ratioWH) );
	}; // end method

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

	/* Select the image file */
	void findPath(wxCommandEvent& event) override {
		wxString filename = wxFileSelector(wxT("Save Snapshot"), wxT(""),
			wxT(""), wxT(""), wxT("*.*"), wxFD_SAVE);

		if (!filename.empty())
			m_textCtrl15->SetValue( filename );
	};

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

	/* Create the snapshot file */
	void saveSnapshot(wxCommandEvent& event) override {
		wxFileName filename( m_textCtrl15->GetValue() );

		if( !filename.IsOk() ) {
			wxMessageBox( "Error writting file" );
			return;
		} // end if

		if( filename.Exists() &&
			wxMessageBox( "Do you want to overwrite the existing file?", "",  wxYES_NO | wxCENTRE ) != wxYES ) {
			return;
		} // end if

		wxImage image;
		canvas->snapshot( image );

		const int width = m_spinCtrl2->GetValue();
		const int height = m_spinCtrl3->GetValue();

		wxImageResizeQuality resizeQuality;

		switch( m_comboBox1->GetSelection() ) {
			case 0:
				resizeQuality = wxImageResizeQuality::wxIMAGE_QUALITY_NEAREST;
				break;
			case 1:
				resizeQuality = wxImageResizeQuality::wxIMAGE_QUALITY_BILINEAR;
				break;
			case 2:
				resizeQuality = wxImageResizeQuality::wxIMAGE_QUALITY_BICUBIC;
				break;
			case 3:
				resizeQuality =
					wxImageResizeQuality::wxIMAGE_QUALITY_BOX_AVERAGE;
				break;
			case 4:
				resizeQuality = wxImageResizeQuality::wxIMAGE_QUALITY_NORMAL;
				break;
			case 5:
				resizeQuality = wxImageResizeQuality::wxIMAGE_QUALITY_HIGH;
				break;
		}

		image.Rescale( width, height, resizeQuality);

		image.SaveFile( filename.GetFullPath(), wxBITMAP_TYPE_PNG );

		this->Hide();
	};
};

class AboutDialog : public AboutDialogBase {
public:

	/* Constructor */
	AboutDialog(wxWindow* window) : AboutDialogBase(window) {
	}

};

#endif


text:
from distutils.core import setup

setup(
        name='django-tumblog',
        version='0.1',
        description='Django Tumblr clonse',
        author='Jon Raphaelson',
        author_email='jonraphaelson@gmail.com',
        url='http://www.github.com/lygaret/django-tumblog',
        packages=[
            'tumblog',
            'tumblog.models',
            'tumblog.templatetags',
            'tumblog.urls',
            'tumblog.views',
            'tumblog.tools',
        ]
)


text:
package io.cattle.platform.configitem.context.impl;

import static io.cattle.platform.core.model.tables.AccountLinkTable.*;
import static io.cattle.platform.core.model.tables.AccountTable.*;
import static io.cattle.platform.core.model.tables.InstanceHostMapTable.*;
import static io.cattle.platform.core.model.tables.ServiceConsumeMapTable.*;
import static io.cattle.platform.core.model.tables.ServiceTable.*;
import static io.cattle.platform.core.model.tables.StackTable.*;
import io.cattle.platform.configitem.context.dao.MetaDataInfoDao;
import io.cattle.platform.configitem.context.dao.MetaDataInfoDao.Version;
import io.cattle.platform.configitem.context.data.metadata.common.ContainerMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.DefaultMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.HostMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.MetaHelperInfo;
import io.cattle.platform.configitem.context.data.metadata.common.NetworkMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.SelfMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.ServiceMetaData;
import io.cattle.platform.configitem.context.data.metadata.common.StackMetaData;
import io.cattle.platform.configitem.context.data.metadata.version1.ServiceMetaDataVersion1;
import io.cattle.platform.configitem.context.data.metadata.version1.StackMetaDataVersion1;
import io.cattle.platform.configitem.context.data.metadata.version2.ContainerMetaDataVersion3;
import io.cattle.platform.configitem.context.data.metadata.version2.ServiceMetaDataVersion2;
import io.cattle.platform.configitem.context.data.metadata.version2.ServiceMetaDataVersion3;
import io.cattle.platform.configitem.context.data.metadata.version2.StackMetaDataVersion2;
import io.cattle.platform.configitem.context.data.metadata.version2.StackMetaDataVersion3;
import io.cattle.platform.configitem.server.model.ConfigItem;
import io.cattle.platform.configitem.server.model.impl.ArchiveContext;
import io.cattle.platform.core.addon.InstanceHealthCheck;
import io.cattle.platform.core.constants.InstanceConstants;
import io.cattle.platform.core.constants.ServiceConstants;
import io.cattle.platform.core.dao.GenericMapDao;
import io.cattle.platform.core.dao.LoadBalancerInfoDao;
import io.cattle.platform.core.dao.NetworkDao;
import io.cattle.platform.core.model.Account;
import io.cattle.platform.core.model.AccountLink;
import io.cattle.platform.core.model.Agent;
import io.cattle.platform.core.model.Instance;
import io.cattle.platform.core.model.InstanceHostMap;
import io.cattle.platform.core.model.Service;
import io.cattle.platform.core.model.ServiceConsumeMap;
import io.cattle.platform.core.model.Stack;
import io.cattle.platform.core.util.LBMetadataUtil.LBConfigMetadataStyle;
import io.cattle.platform.json.JsonMapper;
import io.cattle.platform.object.util.DataAccessor;
import io.cattle.platform.servicediscovery.api.dao.ServiceConsumeMapDao;
import io.cattle.platform.servicediscovery.api.util.ServiceDiscoveryUtil;
import io.cattle.platform.util.exception.ExceptionUtils;
import io.github.ibuildthecloud.gdapi.condition.Condition;
import io.github.ibuildthecloud.gdapi.condition.ConditionType;

import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.inject.Inject;
import javax.inject.Named;

import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.nodes.Tag;
import org.yaml.snakeyaml.representer.Representer;

@Named
public class ServiceMetadataInfoFactory extends AbstractAgentBaseContextFactory {

    private static final ThreadLocal<Yaml> TL = new ThreadLocal<Yaml>(){
        @Override
        protected Yaml initialValue() {
            return getYaml();
        }
    };

    @Inject
    ServiceConsumeMapDao consumeMapDao;

    @Inject
    MetaDataInfoDao metaDataInfoDao;

    @Inject
    GenericMapDao mapDao;

    @Inject
    JsonMapper jsonMapper;

    @Inject
    LoadBalancerInfoDao lbInfoDao;

    @Inject
    NetworkDao networkDao;

    @Override
    protected void populateContext(Agent agent, Instance instance, ConfigItem item, ArchiveContext context) {
        Map<String, Object> dataWithVersionTag = generateData(instance, context.getVersion());
        context.getData().put("data", generateYml(dataWithVersionTag));
    }

    public void writeMetadata(Instance instance, String itemVersion, OutputStream os) {
        Map<String, Object> dataWithVersionTag = generateData(instance, itemVersion);
        try {
            Yaml yaml = TL.get();
            yaml.dump(dataWithVersionTag, new OutputStreamWriter(os));
        } catch (Throwable t) {
            TL.remove();
            ExceptionUtils.rethrowExpectedRuntime(t);
        }
    }

    protected Map<String, Object> generateData(Instance instance, String itemVersion) {
        Map<String, Object> dataWithVersionTag = new HashMap<>();

        if (instance == null) {
            return dataWithVersionTag;
        }

        InstanceHostMap hostMap = objectManager.findAny(InstanceHostMap.class, INSTANCE_HOST_MAP.INSTANCE_ID,
                instance.getId());
        if (hostMap == null) {
            return dataWithVersionTag;
        }

        MetaHelperInfo helperInfo = fetchHelperData(objectManager.loadResource(Account.class, instance.getAccountId()));

        List<ContainerMetaData> containersMD = fetchContainersMetadata(helperInfo);

        Map<String, StackMetaData> stackNameToStack = new HashMap<>();
        Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs = new HashMap<>();

        List<? extends Service> allSvcs = getAllServices(helperInfo);

        Map<Long, Service> svcIdsToSvc = getServiceIdToService(allSvcs);
        Map<Long, List<ServiceConsumeMap>> svcIdToSvcLinks = getServiceIdToServiceLinks(helperInfo);
        populateStacksServicesInfo(helperInfo, stackNameToStack, serviceIdToServiceLaunchConfigs, allSvcs);

        long agentHostId = hostMap.getHostId();
        Map<String, Object> versionToData = new HashMap<>();
        for (MetaDataInfoDao.Version version : MetaDataInfoDao.Version.values()) {
            Object data = versionToData.get(version.getValue());
            if (data == null) {
                data = getFullMetaData(itemVersion, containersMD, stackNameToStack, serviceIdToServiceLaunchConfigs, version,
                        svcIdsToSvc, svcIdToSvcLinks, agentHostId, helperInfo);
                versionToData.put(version.getValue(), data);
            }
            dataWithVersionTag.put(version.getTag(), data);
        }

        return dataWithVersionTag;
    }

    protected List<Service> getAllServices(MetaHelperInfo helperInfo) {
        List<Service> services = objectManager.find(Service.class, SERVICE.ACCOUNT_ID,
                helperInfo.getAccount().getId(), SERVICE.REMOVED, null);
        if (!helperInfo.getOtherAccountsServicesIds().isEmpty()) {
            List<Object> servicesIds = new ArrayList<>();
            servicesIds.addAll(helperInfo.getOtherAccountsServicesIds());
            services.addAll(objectManager.find(Service.class, SERVICE.ID,
                    new Condition(ConditionType.IN, servicesIds), SERVICE.REMOVED, null));
        }
        return services;
    }

    private MetaHelperInfo fetchHelperData(Account account) {
        Map<Long, Account> accounts = new HashMap<>();
        Set<Long> linkedServicesIds = new HashSet<>();
        Set<Long> linkedStackIds = new HashSet<>();
        List<? extends Account> allAccounts = objectManager.find(Account.class, ACCOUNT.REMOVED, new Condition(
                ConditionType.NULL));
        Map<Long, Account> allAccountsMap = new HashMap<>();
        for (Account a : allAccounts) {
            allAccountsMap.put(a.getId(), a);
        }
        // fetch accounts/services that are linked TO your account
        accounts.put(account.getId(), account);
        List<? extends AccountLink> accountLinks = objectManager.find(AccountLink.class, ACCOUNT_LINK.ACCOUNT_ID,
                account.getId(), ACCOUNT_LINK.REMOVED, null);
        for (AccountLink accountLink : accountLinks) {
            Long accountId = accountLink.getLinkedAccountId();
            accounts.put(accountId, allAccountsMap.get(accountId));
        }

        // fetch accounts/services that your account is linked TO
        accountLinks = objectManager.find(AccountLink.class, ACCOUNT_LINK.LINKED_ACCOUNT_ID,
                account.getId(), ACCOUNT_LINK.REMOVED, null);
        for (AccountLink accountLink : accountLinks) {
            Long accountId = accountLink.getAccountId();
            accounts.put(accountId, allAccountsMap.get(accountId));
        }

        // fetch services linked both ways
        Map<Long, Long> map1 = consumeMapDao.findConsumedServicesIdsToStackIdsFromOtherAccounts(account.getId());
        Map<Long, Long> map2 = consumeMapDao.findConsumedByServicesIdsToStackIdsFromOtherAccounts(account.getId());
        linkedServicesIds.addAll(map1.keySet());
        linkedStackIds.addAll(map1.values());
        linkedServicesIds.addAll(map2.keySet());
        linkedStackIds.addAll(map2.values());

        return new MetaHelperInfo(account, accounts, linkedServicesIds, linkedStackIds,
                metaDataInfoDao);
    }

    private List<ContainerMetaData> fetchContainersMetadata(MetaHelperInfo helperInfo) {
        List<ContainerMetaData> containersMD = metaDataInfoDao.getManagedContainersData(helperInfo,
                metaDataInfoDao.getContainerIdToContainerLink(helperInfo.getAccount().getId()));
        Map<Long, String> instanceIdToUuid = new HashMap<>();
        for (ContainerMetaData containerMd : containersMD) {
            instanceIdToUuid.put(containerMd.getInstanceId(), containerMd.getUuid());
        }
        // add networkFrom containers
        containersMD.addAll(metaDataInfoDao.getNetworkFromContainersData(instanceIdToUuid,
                helperInfo));
        // add host level containers
        containersMD.addAll(metaDataInfoDao.getHostContainersData(helperInfo));
        return containersMD;
    }

    protected List<? extends ServiceConsumeMap> getServiceLinks(MetaHelperInfo helperInfo) {
        List<ServiceConsumeMap> allSvcLinks = objectManager.find(ServiceConsumeMap.class,
                SERVICE_CONSUME_MAP.ACCOUNT_ID,
                helperInfo.getAccount().getId(), SERVICE_CONSUME_MAP.REMOVED, null);

        if (!helperInfo.getOtherAccountsServicesIds().isEmpty()) {
            List<Object> servicesIds = new ArrayList<>();
            servicesIds.addAll(helperInfo.getOtherAccountsServicesIds());
            allSvcLinks.addAll(objectManager.find(ServiceConsumeMap.class,
                    SERVICE_CONSUME_MAP.SERVICE_ID,
                    new Condition(ConditionType.IN, servicesIds),
                    SERVICE_CONSUME_MAP.REMOVED, null));
        }

        return allSvcLinks;
    }

    protected Map<Long, List<ServiceConsumeMap>> getServiceIdToServiceLinks(MetaHelperInfo helperInfo) {
        List<? extends ServiceConsumeMap> allSvcLinks = getServiceLinks(helperInfo);
        Map<Long, List<ServiceConsumeMap>> svcIdToconsumedSvcs = new HashMap<>();
        for (ServiceConsumeMap link : allSvcLinks) {
            List<ServiceConsumeMap> links = svcIdToconsumedSvcs.get(link.getServiceId());
            if (links == null) {
                links = new ArrayList<>();
            }
            links.add(link);
            svcIdToconsumedSvcs.put(link.getServiceId(), links);
        }
        return svcIdToconsumedSvcs;
    }

    protected Map<Long, Service> getServiceIdToService(List<? extends Service> allSvcs) {
        Map<Long, Service> svcIdsToSvc = new HashMap<>();
        for (Service svc : allSvcs) {
            svcIdsToSvc.put(svc.getId(), svc);
        }
        return svcIdsToSvc;
    }

    private static Yaml getYaml() {
        DumperOptions options = new DumperOptions();
        options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
        Representer representer = new Representer();
        representer.addClassTag(SelfMetaData.class, Tag.MAP);
        representer.addClassTag(DefaultMetaData.class, Tag.MAP);
        representer.addClassTag(ServiceMetaDataVersion1.class, Tag.MAP);
        representer.addClassTag(ServiceMetaDataVersion2.class, Tag.MAP);
        representer.addClassTag(ServiceMetaDataVersion3.class, Tag.MAP);
        representer.addClassTag(StackMetaDataVersion1.class, Tag.MAP);
        representer.addClassTag(StackMetaDataVersion2.class, Tag.MAP);
        representer.addClassTag(StackMetaDataVersion3.class, Tag.MAP);
        representer.addClassTag(ContainerMetaDataVersion3.class, Tag.MAP);
        Yaml yaml = new Yaml(representer, options);
        return yaml;
    }

    protected String generateYml(Map<String, Object> dataWithVersion) {
        Yaml yaml = getYaml();
        String yamlStr = yaml.dump(dataWithVersion);
        return yamlStr;
    }

    protected Map<String, Object> getFullMetaData(String itemVersion, List<ContainerMetaData> containersMD,
            Map<String, StackMetaData> stackNameToStack, Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs,
            Version version, Map<Long, Service> svcIdsToSvc,
            Map<Long, List<ServiceConsumeMap>> svcIdToSvcLinks, long agentHostId,
            MetaHelperInfo helperInfo) {

        // 1. generate containers metadata
        Map<Long, Map<String, List<ContainerMetaData>>> serviceIdToLaunchConfigToContainer = new HashMap<>();
        containersMD = populateContainersData(containersMD, stackNameToStack,
                serviceIdToServiceLaunchConfigs,
                serviceIdToLaunchConfigToContainer, version);

        // 2. generate service metadata based on version + add generated containers to service
        serviceIdToServiceLaunchConfigs = applyVersionToService(serviceIdToServiceLaunchConfigs,
                serviceIdToLaunchConfigToContainer, version, svcIdsToSvc, svcIdToSvcLinks);

        // 3. generate stack metadata based on version + add services generated on the previous step
        stackNameToStack = applyVersionToStack(stackNameToStack, serviceIdToServiceLaunchConfigs, version);

        // 4. populate self section
        Map<String, SelfMetaData> selfMD = new HashMap<>();
        List<String> ipsOnHost = metaDataInfoDao.getPrimaryIpsOnInstanceHost(agentHostId);
        populateSelfSection(containersMD, stackNameToStack, serviceIdToServiceLaunchConfigs, selfMD, version, ipsOnHost,
                agentHostId);

        // 5. get host meta data
        List<HostMetaData> hostsMD = new ArrayList<>();
        for (HostMetaData data : helperInfo.getHostIdToHostMetadata().values()) {
            hostsMD.add(applyVersionToHost(data, version));
        }

        HostMetaData selfHostMD = helperInfo.getHostIdToHostMetadata().get(agentHostId);
        // 6. get networksMetadata
        List<NetworkMetaData> networks = metaDataInfoDao.getNetworksMetaData(helperInfo);

        // 7. full data combined of (n) self sections and default one
        Map<String, Object> fullData = getFullMetaData(itemVersion, containersMD, stackNameToStack,
                serviceIdToServiceLaunchConfigs, selfMD, hostsMD, selfHostMD, networks);

        return fullData;
    }

    protected HostMetaData applyVersionToHost(HostMetaData data, Version version) {
        return HostMetaData.getHostMetaData(data, version);
    }

    protected Map<String, Object> getFullMetaData(String itemVersion, List<ContainerMetaData> containersMD,
            Map<String, StackMetaData> stackNameToStack,
            Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs, Map<String, SelfMetaData> selfMD,
            List<HostMetaData> hostsMD, HostMetaData selfHostMD, List<NetworkMetaData> networks) {
        List<StackMetaData> stacksMD = new ArrayList<>();
        for (StackMetaData stack : stackNameToStack.values()) {
            stacksMD.add(stack);
        }
        List<ServiceMetaData> servicesMD = new ArrayList<>();
        for (Map<String, ServiceMetaData> svcs : serviceIdToServiceLaunchConfigs.values()) {
            servicesMD.addAll(svcs.values());
        }

        Map<String, Object> fullData = new HashMap<>();
        fullData.putAll(selfMD);
        fullData.put("default", new DefaultMetaData(itemVersion, containersMD, servicesMD,
                stacksMD, hostsMD, selfHostMD, networks));
        return fullData;
    }

    protected void populateSelfSection(List<ContainerMetaData> containersMD, Map<String, StackMetaData> stackNameToStack,
            Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs,
            Map<String, SelfMetaData> selfMD, Version version,
            List<String> ipsOnHost, long hostId) {
        for (ContainerMetaData containerMD : containersMD) {
            if (!ipsOnHost.contains(containerMD.getPrimary_ip())) {
                continue;
            }
            ServiceMetaData svcData = null;
            StackMetaData stackData = null;
            if (containerMD.getServiceId() != null) {
                String configName = containerMD.getDnsPrefix();
                if (configName == null) {
                    configName = ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME;
                }
                Map<String, ServiceMetaData> svcsData = serviceIdToServiceLaunchConfigs.get(containerMD.getServiceId());
                if (svcsData != null) {
                    svcData = svcsData.get(configName);
                    stackData = stackNameToStack.get(svcData.getStack_name());
                }
            }
            addToSelf(selfMD, containerMD, svcData, stackData, hostId, version);
        }
    }

    protected Map<Long, Map<String, ServiceMetaData>> applyVersionToService(Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs,
            Map<Long, Map<String, List<ContainerMetaData>>> serviceIdToLaunchConfigToContainer,
            Version version, Map<Long, Service> svcIdsToSvc, Map<Long, List<ServiceConsumeMap>> svcIdToSvcLinks) {
        Map<Long, Map<String, ServiceMetaData>> newData = new HashMap<>();
        for (Long serviceId : serviceIdToServiceLaunchConfigs.keySet()) {
            Map<String, ServiceMetaData> launchConfigToService = serviceIdToServiceLaunchConfigs.get(serviceId);
            if (launchConfigToService != null) {
                Map<String, ServiceMetaData> launchConfigToServiceModified = new HashMap<>();
                for (String launchConfigName : launchConfigToService.keySet()) {
                    ServiceMetaData svcMDOriginal = launchConfigToService.get(launchConfigName);
                    if (svcMDOriginal != null) {
                        setLinksInfo(serviceIdToServiceLaunchConfigs, svcMDOriginal, svcIdsToSvc, svcIdToSvcLinks);
                        if (serviceIdToLaunchConfigToContainer.get(serviceId) != null) {
                            svcMDOriginal.setContainersObj(serviceIdToLaunchConfigToContainer.get(serviceId)
                                    .get(launchConfigName));
                        }
                        ServiceMetaData serviceMDModified = ServiceMetaData.getServiceMetaData(svcMDOriginal, version);
                        launchConfigToServiceModified.put(launchConfigName, serviceMDModified);
                    }
                }
                newData.put(serviceId, launchConfigToServiceModified);
            }
        }
        return newData;
    }

    protected Map<String, StackMetaData> applyVersionToStack(Map<String, StackMetaData> stackNameToStack,
            Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs,
            Version version) {
        // modify stack data
        Map<String, StackMetaData> newData = new HashMap<>();
        for (String stackName : stackNameToStack.keySet()) {
            StackMetaData original = stackNameToStack.get(stackName);
            // add service to stack
            List<ServiceMetaData> services = new ArrayList<>();
            for (Long serviceId : serviceIdToServiceLaunchConfigs.keySet()) {
                for (ServiceMetaData service : serviceIdToServiceLaunchConfigs.get(serviceId).values()) {
                    if (service.getStackId().equals(original.getId())) {
                        services.add(service);
                    }
                }
            }
            original.setServicesObj(services);
            StackMetaData stackMDModified = StackMetaData.getStackMetaData(original, version);
            newData.put(stackMDModified.getName(), stackMDModified);
        }
        return newData;
    }

    protected List<ContainerMetaData> populateContainersData(List<ContainerMetaData> containersMD, Map<String, StackMetaData> stackNameToStack,
            Map<Long, Map<String, ServiceMetaData>> serviceIdToServiceLaunchConfigs,
            Map<Long, Map<String, List<ContainerMetaData>>> serviceIdToLaunchConfigToContainer, Version version) {
        List<ContainerMetaData> newData = new ArrayList<>();
        for (ContainerMetaData containerMD : containersMD) {
            if (containerMD.getServiceId() != null) {
                String configName = containerMD.getDnsPrefix();
                if (configName == null) {
                    configName = ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME;
                }
                Map<String, ServiceMetaData> svcsData = serviceIdToServiceLaunchConfigs.get(containerMD.getServiceId());
                if (svcsData != null) {
                    ServiceMetaData svcData = svcsData.get(configName);
                    if (svcData == null) {
                        continue;
                    }
                    containerMD.setStack_name(svcData.getStack_name());
                    containerMD.setStack_uuid(svcData.getStack_uuid());
                    containerMD.setService_name(svcData.getName());
                    // apply version to a container (for service containers)
                    containerMD = ContainerMetaData.getContainerMetaData(containerMD, version);

                    Map<String, List<ContainerMetaData>> launchConfigToContainer = serviceIdToLaunchConfigToContainer
                            .get(containerMD.getServiceId());
                    if (launchConfigToContainer == null) {
                        launchConfigToContainer = new HashMap<>();
                    }

                    List<ContainerMetaData> serviceContainers = launchConfigToContainer.get(configName);
                    if (serviceContainers == null) {
                        serviceContainers = new ArrayList<>();
                    }
                    serviceContainers.add(containerMD);
                    launchConfigToContainer.put(configName, serviceContainers);
                    serviceIdToLaunchConfigToContainer.put(containerMD.getServiceId(), launchConfigToContainer);
                }
            } else {
                // apply version to a container for standalone containers
                containerMD = ContainerMetaData.getContainerMetaData(containerMD, version);
            }
            newData.add(containerMD);
        }
        return newData;
    }

    protected List<? extends Stack> getStacks(MetaHelperInfo helperInfo) {
        List<Stack> stacks = objectManager.find(Stack.class, STACK.ACCOUNT_ID,
                helperInfo.getAccount().getId(), STACK.REMOVED, null);
        if (!helperInfo.getOtherAccountsStackIds().isEmpty()) {
            List<Object> stackIds = new ArrayList<>();
            stackIds.addAll(helperInfo.getOtherAccountsStackIds());
            stacks.addAll(objectManager.find(Stack.class, STACK.ID,
                    new Condition(ConditionType.IN, stackIds), STACK.REMOVED, null));
        }

        return stacks;
    }

    protected void populateStacksServicesInfo(MetaHelperInfo helperInfo, Map<String, StackMetaData> stacksMD,
            Map<Long, Map<String, ServiceMetaData>> servicesMD, List<? extends Service> allSvcs) {
        List<? extends Stack> stacks = getStacks(helperInfo);
        Map<Long, List<Service>> envIdToService = new HashMap<>();
        for (Service svc : allSvcs) {
            List<Service> envSvcs = envIdToService.get(svc.getStackId());
            if (envSvcs == null) {
                envSvcs = new ArrayList<>();
            }
            envSvcs.add(svc);
            envIdToService.put(svc.getStackId(), envSvcs);
        }
        for (Stack stack : stacks) {
            StackMetaData stackMetaData = new StackMetaData(stack, helperInfo.getAccounts().get(stack.getAccountId()));
            List<Service> services = envIdToService.get(stack.getId());
            if (services == null) {
                services = new ArrayList<>();
            }
            List<ServiceMetaData> stackServicesMD = getServicesInfo(stack, services, helperInfo.getAccounts());
            stacksMD.put(stackMetaData.getName(), stackMetaData);
            for (ServiceMetaData stackServiceMD : stackServicesMD) {
                Map<String, ServiceMetaData> launchConfigToSvcMap = servicesMD.get(stackServiceMD.getServiceId());
                if (launchConfigToSvcMap == null) {
                    launchConfigToSvcMap = new HashMap<>();
                }
                if (stackServiceMD.isPrimaryConfig()) {
                    launchConfigToSvcMap.put(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME, stackServiceMD);
                } else {
                    launchConfigToSvcMap.put(stackServiceMD.getName(), stackServiceMD);
                }
                servicesMD.put(stackServiceMD.getServiceId(), launchConfigToSvcMap);
            }
        }
    }

    protected void addToSelf(Map<String, SelfMetaData> self, ContainerMetaData containerMD,
            ServiceMetaData serviceMD, StackMetaData stackMD, long hostId, Version version) {
        if (containerMD.getPrimary_ip() == null) {
            return;
        }

        if (containerMD.getHostMetaData() == null) {
            return;
        }

        if (containerMD.getHostMetaData().getHostId().equals(hostId)) {
            self.put(containerMD.getPrimary_ip(), new SelfMetaData(containerMD, serviceMD,
                    stackMD, containerMD.getHostMetaData(), version));
        }
    }

    protected List<ServiceMetaData> getServicesInfo(Stack env, List<Service> services, Map<Long, Account> accounts) {
        List<ServiceMetaData> stackServicesMD = new ArrayList<>();
        Map<Long, Service> idToService = new HashMap<>();
        for (Service service : services) {
            List<ContainerMetaData> serviceContainersMD = new ArrayList<>();
            getServiceInfo(serviceContainersMD, env, stackServicesMD, idToService, service, accounts);
        }
        return stackServicesMD;
    }

    protected void getServiceInfo(List<ContainerMetaData> serviceContainersMD, Stack env,
            List<ServiceMetaData> stackServices, Map<Long, Service> idToService, Service service,
            Map<Long, Account> accounts) {
        idToService.put(service.getId(), service);
        List<String> launchConfigNames = ServiceDiscoveryUtil.getServiceLaunchConfigNames(service);
        if (launchConfigNames.isEmpty()) {
            launchConfigNames.add(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME);
        }
        for (String launchConfigName : launchConfigNames) {
            getLaunchConfigInfo(env, stackServices, idToService, service, launchConfigNames, launchConfigName, accounts);
        }
    }

    protected void getLaunchConfigInfo(Stack env, List<ServiceMetaData> stackServices,
            Map<Long, Service> idToService, Service service, List<String> launchConfigNames,
            String launchConfigName, Map<Long, Account> accounts) {
        boolean isPrimaryConfig = launchConfigName
                .equalsIgnoreCase(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME);
        String serviceName = isPrimaryConfig ? service.getName()
                : launchConfigName;
        List<String> sidekicks = new ArrayList<>();

        if (isPrimaryConfig) {
            getSidekicksInfo(service, sidekicks, launchConfigNames);
        }

        LBConfigMetadataStyle lbConfig = lbInfoDao.generateLBConfigMetadataStyle(service);
        Object hcO = null;
        if (service.getKind().equalsIgnoreCase(ServiceConstants.KIND_EXTERNAL_SERVICE)) {
            hcO = DataAccessor.field(service, InstanceConstants.FIELD_HEALTH_CHECK, Object.class);
        } else {
            hcO = ServiceDiscoveryUtil.getLaunchConfigObject(service, launchConfigName,
                    InstanceConstants.FIELD_HEALTH_CHECK);
        }

        InstanceHealthCheck hc = null;
        if (hcO != null) {
            hc = jsonMapper.convertValue(hcO, InstanceHealthCheck.class);
        }
        ServiceMetaData svcMetaData = new ServiceMetaData(service, serviceName, env, sidekicks, hc, lbConfig,
                accounts.get(env.getAccountId()));
        stackServices.add(svcMetaData);
    }

    protected void getSidekicksInfo(Service service, List<String> sidekicks, List<String> launchConfigNames) {
        for (String launchConfigName : launchConfigNames) {
            if (!launchConfigName.equalsIgnoreCase(ServiceConstants.PRIMARY_LAUNCH_CONFIG_NAME)) {
                sidekicks.add(launchConfigName);
            }
        }
    }

    protected void setLinksInfo(Map<Long, Map<String, ServiceMetaData>> services,
            ServiceMetaData serviceMD, Map<Long, Service> svcIdsToSvc,
            Map<Long, List<ServiceConsumeMap>> svcIdToSvcLinks) {
        Map<String, String> links = new HashMap<>();
        List<? extends ServiceConsumeMap> consumeMaps = svcIdToSvcLinks.get(serviceMD.getServiceId());
        if (consumeMaps != null) {
            for (ServiceConsumeMap consumedMap : consumeMaps) {
                Service service = svcIdsToSvc.get(consumedMap.getConsumedServiceId());
                if (service == null) {
                    continue;
                }
                Map<String, ServiceMetaData> consumedService = services.get(service.getId());
                if (consumedService == null) {
                    continue;
                }
                ServiceMetaData consumedServiceData = consumedService.get(
                        serviceMD.getLaunchConfigName());
                String linkAlias = ServiceDiscoveryUtil.getDnsName(service, consumedMap, null, false);
                if (consumedServiceData != null) {
                    links.put(
                            consumedServiceData.getStack_name() + "/" + consumedServiceData.getName(), linkAlias);
                }
            }
        }

        serviceMD.setLinks(links);
    }

}


text:
package org.jboss.weld.environment.deployment.discovery.jandex;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;

import org.jboss.jandex.Index;
import org.jboss.jandex.Indexer;
import org.jboss.weld.environment.deployment.discovery.BeanArchiveBuilder;
import org.jboss.weld.environment.deployment.discovery.FileSystemBeanArchiveHandler;
import org.jboss.weld.environment.logging.CommonLogger;
import org.jboss.weld.environment.util.Files;

/**
 * Builds and attaches a jandex index to each bean archive.
 *
 * @author Matej Briškár
 * @author Martin Kouba
 */
public class JandexFileSystemBeanArchiveHandler extends FileSystemBeanArchiveHandler {

    private final Indexer indexer = new Indexer();

    @Override
    public BeanArchiveBuilder handle(String path) {
        BeanArchiveBuilder builder = super.handle(path);
        if (builder == null) {
            return null;
        }
        builder.setAttribute(Jandex.INDEX_ATTRIBUTE_NAME, buildIndex());
        return builder;
    }

    @Override
    protected void add(Entry entry, BeanArchiveBuilder builder) throws MalformedURLException {
        super.add(entry, builder);
        if (Files.isClass(entry.getName())) {
            addToIndex(entry.getUrl());
        }
    }

    private void addToIndex(URL url) {
        InputStream fs = null;
        try {
            fs = url.openStream();
            indexer.index(fs);
        } catch (IOException ex) {
            CommonLogger.LOG.couldNotOpenStreamForURL(url, ex);
        } finally {
            try {
                if (fs != null) {
                    fs.close();
                }
            } catch (IOException ex) {
                CommonLogger.LOG.couldNotCloseStreamForURL(url, ex);
            }
        }
    }

    private Index buildIndex() {
        return indexer.complete();
    }
}


text:
TARGET 	 = key
SRC 	 = task.cc

include ../common.mk
include ../avr.mk


text:
package main

import (
	"errors"
	"io"
	"os"
	"os/exec"
	"path"
	"testing"
)

var openapiTests = []struct {
	name      string
	path      string
	protofile string
}{
	{name: "Google Library example", path: "examples/google/example/library/v1/", protofile: "library.proto"},
	{name: "Body mapping", path: "examples/tests/bodymapping/", protofile: "message.proto"},
	{name: "Map fields", path: "examples/tests/mapfields/", protofile: "message.proto"},
	{name: "Path params", path: "examples/tests/pathparams/", protofile: "message.proto"},
	{name: "Protobuf types", path: "examples/tests/protobuftypes/", protofile: "message.proto"},
	{name: "RPC types", path: "examples/tests/rpctypes/", protofile: "message.proto"},
	{name: "JSON options", path: "examples/tests/jsonoptions/", protofile: "message.proto"},
	{name: "Ignore services without annotations", path: "examples/tests/noannotations/", protofile: "message.proto"},
	{name: "Enum Options", path: "examples/tests/enumoptions/", protofile: "message.proto"},
	{name: "OpenAPIv3 Annotations", path: "examples/tests/openapiv3annotations/", protofile: "message.proto"},
	{name: "AllOf Wrap Message", path: "examples/tests/allofwrap/", protofile: "message.proto"},
}

// Set this to true to generate/overwrite the fixtures. Make sure you set it back
// to false before you commit it.
const GENERATE_FIXTURES = false

const TEMP_FILE = "openapi.yaml"

func CopyFixture(result, fixture string) error {
	in, err := os.Open(result)
	if err != nil {
		return err
	}
	defer in.Close()

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

	_, err = io.Copy(out, in)
	if err != nil {
		return err
	}
	return out.Close()
}

func TestGenerateFixturesIsFalse(t *testing.T) {
	// This is here to ensure the PR builds fail if someone
	// accidentally commits GENERATE_FIXTURES = true
	if GENERATE_FIXTURES {
		t.Fatalf("GENERATE_FIXTURES is true")
	}
}

func TestOpenAPIProtobufNaming(t *testing.T) {
	for _, tt := range openapiTests {
		fixture := path.Join(tt.path, "openapi.yaml")
		if _, err := os.Stat(fixture); errors.Is(err, os.ErrNotExist) {
			if !GENERATE_FIXTURES {
				continue
			}
		}
		t.Run(tt.name, func(t *testing.T) {
			// Run protoc and the protoc-gen-openapi plugin to generate an OpenAPI spec.
			err := exec.Command("protoc",
				"-I", "../../",
				"-I", "../../third_party",
				"-I", "examples",
				path.Join(tt.path, tt.protofile),
				"--openapi_out=naming=proto:.").Run()
			if err != nil {
				t.Fatalf("protoc failed: %+v", err)
			}
			if GENERATE_FIXTURES {
				err := CopyFixture(TEMP_FILE, fixture)
				if err != nil {
					t.Fatalf("Can't generate fixture: %+v", err)
				}
			} else {
				// Verify that the generated spec matches our expected version.
				err = exec.Command("diff", TEMP_FILE, fixture).Run()
				if err != nil {
					t.Fatalf("Diff failed: %+v", err)
				}
			}
			// if the test succeeded, clean up
			os.Remove(TEMP_FILE)
		})
	}
}

func TestOpenAPIFQSchemaNaming(t *testing.T) {
	for _, tt := range openapiTests {
		fixture := path.Join(tt.path, "openapi_fq_schema_naming.yaml")
		if _, err := os.Stat(fixture); errors.Is(err, os.ErrNotExist) {
			if !GENERATE_FIXTURES {
				continue
			}
		}
		t.Run(tt.name, func(t *testing.T) {
			// Run protoc and the protoc-gen-openapi plugin to generate an OpenAPI spec.
			err := exec.Command("protoc",
				"-I", "../../",
				"-I", "../../third_party",
				"-I", "examples",
				path.Join(tt.path, tt.protofile),
				"--openapi_out=fq_schema_naming=1:.").Run()
			if err != nil {
				t.Fatalf("protoc failed: %+v", err)
			}
			if GENERATE_FIXTURES {
				err := CopyFixture(TEMP_FILE, fixture)
				if err != nil {
					t.Fatalf("Can't generate fixture: %+v", err)
				}
			} else {
				// Verify that the generated spec matches our expected version.
				err = exec.Command("diff", TEMP_FILE, fixture).Run()
				if err != nil {
					t.Fatalf("Diff failed: %+v", err)
				}
			}
			// if the test succeeded, clean up
			os.Remove(TEMP_FILE)
		})
	}
}

func TestOpenAPIJSONNaming(t *testing.T) {
	for _, tt := range openapiTests {
		fixture := path.Join(tt.path, "openapi_json.yaml")
		if _, err := os.Stat(fixture); errors.Is(err, os.ErrNotExist) {
			if !GENERATE_FIXTURES {
				continue
			}
		}
		t.Run(tt.name, func(t *testing.T) {
			// Run protoc and the protoc-gen-openapi plugin to generate an OpenAPI spec with JSON naming.
			err := exec.Command("protoc",
				"-I", "../../",
				"-I", "../../third_party",
				"-I", "examples",
				path.Join(tt.path, tt.protofile),
				"--openapi_out=version=1.2.3:.").Run()
			if err != nil {
				t.Fatalf("protoc failed: %+v", err)
			}
			if GENERATE_FIXTURES {
				err := CopyFixture(TEMP_FILE, fixture)
				if err != nil {
					t.Fatalf("Can't generate fixture: %+v", err)
				}
			} else {
				// Verify that the generated spec matches our expected version.
				err = exec.Command("diff", TEMP_FILE, fixture).Run()
				if err != nil {
					t.Fatalf("Diff failed: %+v", err)
				}
			}
			// if the test succeeded, clean up
			os.Remove(TEMP_FILE)
		})
	}
}

func TestOpenAPIStringEnums(t *testing.T) {
	for _, tt := range openapiTests {
		fixture := path.Join(tt.path, "openapi_string_enum.yaml")
		if _, err := os.Stat(fixture); errors.Is(err, os.ErrNotExist) {
			if !GENERATE_FIXTURES {
				continue
			}
		}
		t.Run(tt.name, func(t *testing.T) {
			// Run protoc and the protoc-gen-openapi plugin to generate an OpenAPI spec with string Enums.
			err := exec.Command("protoc",
				"-I", "../../",
				"-I", "../../third_party",
				"-I", "examples",
				path.Join(tt.path, tt.protofile),
				"--openapi_out=enum_type=string:.").Run()
			if err != nil {
				t.Fatalf("protoc failed: %+v", err)
			}
			if GENERATE_FIXTURES {
				err := CopyFixture(TEMP_FILE, fixture)
				if err != nil {
					t.Fatalf("Can't generate fixture: %+v", err)
				}
			} else {
				// Verify that the generated spec matches our expected version.
				err = exec.Command("diff", TEMP_FILE, fixture).Run()
				if err != nil {
					t.Fatalf("diff failed: %+v", err)
				}
			}
			// if the test succeeded, clean up
			os.Remove(TEMP_FILE)
		})
	}
}

func TestOpenAPIDefaultResponse(t *testing.T) {
	for _, tt := range openapiTests {
		fixture := path.Join(tt.path, "openapi_default_response.yaml")
		if _, err := os.Stat(fixture); errors.Is(err, os.ErrNotExist) {
			if !GENERATE_FIXTURES {
				continue
			}
		}
		t.Run(tt.name, func(t *testing.T) {
			// Run protoc and the protoc-gen-openapi plugin to generate an OpenAPI spec with string Enums.
			err := exec.Command("protoc",
				"-I", "../../",
				"-I", "../../third_party",
				"-I", "examples",
				path.Join(tt.path, tt.protofile),
				"--openapi_out=default_response=true:.").Run()
			if err != nil {
				t.Fatalf("protoc failed: %+v", err)
			}
			if GENERATE_FIXTURES {
				err := CopyFixture(TEMP_FILE, fixture)
				if err != nil {
					t.Fatalf("Can't generate fixture: %+v", err)
				}
			} else {
				// Verify that the generated spec matches our expected version.
				err = exec.Command("diff", TEMP_FILE, fixture).Run()
				if err != nil {
					t.Fatalf("diff failed: %+v", err)
				}
			}
			// if the test succeeded, clean up
			os.Remove(TEMP_FILE)
		})
	}
}


text:
def findingsfilter_action(action):
    """
    Property: FindingsFilter.Action
    """

    valid_actions = ["ARCHIVE", "NOOP"]

    if action not in valid_actions:
        raise ValueError('Action must be one of: "%s"' % (", ".join(valid_actions)))
    return action

def session_findingpublishingfrequency(frequency):
    """
    Property: Session.FindingPublishingFrequency
    """

    valid_frequencies = ["FIFTEEN_MINUTES", "ONE_HOUR", "SIX_HOURS"]

    if frequency not in valid_frequencies:
        raise ValueError(
            'FindingPublishingFrequency must be one of: "%s"'
            % (", ".join(valid_frequencies))
        )
    return frequency

def session_status(status):
    """
    Property: Session.Status
    """

    valid_status = ["ENABLED", "DISABLED"]

    if status not in valid_status:
        raise ValueError('Status must be one of: "%s"' % (", ".join(valid_status)))
    return status


text:
    do                                      \
    {                                       \
        JsErrorCode errCode = cmd;          \
        if (errCode != JsNoError)           \
        {                                   \
            printf("Error %d at '%s'\n",    \
                errCode, #cmd);             \
            return 1;                       \
        }                                   \
    } while(0)

using namespace std;

int main()
{
    JsRuntimeHandle runtime;
    JsContextRef context;
    JsValueRef result;
    unsigned currentSourceContext = 0;

    const char* script = "(()=>{return \'SUCCESS\';})()";

    // Create a runtime.
    JsCreateRuntime(JsRuntimeAttributeNone, nullptr, &runtime);

    // Create an execution context.
    JsCreateContext(runtime, &context);

    // Now set the current execution context.
    JsSetCurrentContext(context);

    JsValueRef fname;
    FAIL_CHECK(JsCreateString("sample", sizeof("sample") - 1, &fname));

    JsValueRef object;
    FAIL_CHECK(JsCreateObject(&object));

    JsValueRef scriptSource;
    FAIL_CHECK(JsCreateExternalArrayBuffer((void*)script, (unsigned int)strlen(script),
                                           nullptr, nullptr, &scriptSource));

    FAIL_CHECK(JsObjectSetProperty(object, fname, fname, false));

    JsValueRef fname_copy;
    FAIL_CHECK(JsObjectGetProperty(object, fname, &fname_copy));

    bool hasObject = false;
    FAIL_CHECK(JsObjectHasProperty(object, fname, &hasObject));

    bool hasOwn = false;
    FAIL_CHECK(JsObjectHasOwnProperty(object, fname, &hasOwn));

    JsValueRef pdesc;
    FAIL_CHECK(JsObjectGetOwnPropertyDescriptor(object, fname, &pdesc));

    if (!hasOwn || !hasObject || fname_copy != fname || pdesc == nullptr)
    {
        fprintf(stderr, "JsObject Has/Get/Set etc. Property... failed\n");
    }

    JsValueRef deletion_result;
    FAIL_CHECK(JsObjectDeleteProperty(object, fname, false, &deletion_result));

    FAIL_CHECK(JsObjectHasProperty(object, fname, &hasObject));

    bool delete_result = false;
    FAIL_CHECK(JsBooleanToBool(deletion_result, &delete_result));

    if (hasObject || delete_result == false)
    {
        fprintf(stderr, "JsObjectDeleteProperty failed\n");
    }

    // Run the script.
    FAIL_CHECK(JsRun(scriptSource, currentSourceContext++, fname, JsParseScriptAttributeNone, &result));

    // Convert your script result to String in JavaScript; redundant if your script returns a String
    JsValueRef resultJSString;
    FAIL_CHECK(JsConvertValueToString(result, &resultJSString));

    // Project script result back to C++.
    char *resultSTR = nullptr;
    size_t stringLength;
    FAIL_CHECK(JsCopyString(resultJSString, nullptr, 0, &stringLength));
    resultSTR = (char*) malloc(stringLength + 1);
    FAIL_CHECK(JsCopyString(resultJSString, resultSTR, stringLength, nullptr));
    resultSTR[stringLength] = 0;

    printf("Result -> %s \n", resultSTR);
    free(resultSTR);

    // Dispose runtime
    JsSetCurrentContext(JS_INVALID_REFERENCE);
    JsDisposeRuntime(runtime);

    return 0;
}


text:
package org.basex.server;

import static org.junit.Assert.*;
import java.io.*;
import java.util.*;
import java.util.List;
import java.util.concurrent.*;

import org.basex.*;
import org.basex.core.*;
import org.basex.core.cmd.*;
import org.junit.*;
import org.junit.Test;
import org.junit.runner.*;
import org.junit.runners.*;
import org.junit.runners.Parameterized.Parameters;

/**
 * This class tests database locking inside BaseX. For this purpose, two queries are
 * forced to be executed in parallel. If this fails, locking prevents these queries to
 * run in parallel.
 *
 * @author BaseX Team 2005-15, BSD License
 * @author Jens Erat
 */
@RunWith(Parameterized.class)
public final class LockingTest extends SandboxTest {
  /** How often should tests be repeated? */
  private static final int REPEAT = 1;

  /** Maximum sleep time in ms. */
  private static final long SLEEP = 200L;
  /** Additional allowed holding time for client creation overhead, ... in ms. */
  private static final long SYNC = 100L;

  /** Test document. */
  private static final String DOC = "src/test/resources/test.xml";
  /** XQuery code for handling latches. */
  private static final String Q
    = "Q{java:org.basex.server.LockingTest}countDownAndWait()";
  /** How often to run each query in load test. */
  private static final int RUN_COUNT = 100;
  /**
   * Queries to run in load test, %1$s will get substituted by DB name, %2$s by code for
   * sleeping {@code SLEEP_LOAD} milliseconds.
   */
  private static final String[] QUERIES = {
    "%2$s",
    "(doc('%1$s'), %2$s)",
    "insert node %2$s into doc('%1$s')",
    "for $i in ('%1$s') return insert node %2$s into doc($i)",
    "for $i in ('%1$s') return (doc($i), %2$s)"
  };

  /** Server reference. */
  private static BaseXServer server;

  /**
   * Enable repeated running of test to track down synchronization issues.
   * @return Collection of empty object arrays
   */
  @Parameters
  public static Collection<Object[]> generateParams() {
    final List<Object[]> params = new ArrayList<>();
    for(int i = 1; i <= REPEAT; i++) {
      params.add(new Object[0]);
    }
    return params;
  }

  /**
   * Starts the server.
   * @throws Exception None expected
   */
  @BeforeClass
  public static void start() throws Exception {
    server = createServer();
    final CountDownLatch latch = new CountDownLatch(2);
    new Client(new CreateDB(NAME, DOC), null, latch);
    new Client(new CreateDB(NAME + '1', DOC), null, latch);
    // wait for both databases being created
    latch.await();
  }

  /**
   * Stops the server.
   * @throws IOException I/O exception
   */
  @AfterClass
  public static void stop() throws IOException {
    stopServer(server);
  }

  /** Latch for synchronizing threads inside lock. */
  private static CountDownLatch sync;
  /** Latch for testing parallelism. */
  private static CountDownLatch test;

  /**
   * Handle thread synchronization so both threads/queries have to be inside their locks
   * at the same time to count down {@code test} latch.
   * @throws Exception None expected
   */
  public static void countDownAndWait() throws Exception {
    sync.countDown();
    if(sync.await(SLEEP, TimeUnit.MILLISECONDS)) test.countDown();
  }

  /**
   * Test parallel execution of given queries.
   * @param c1 First command
   * @param c2 Second command
   * @param parallel Should queries be executed in parallel?
   * @throws Exception None expected
   */
  private static void testQueries(final Command c1, final Command c2,
      final boolean parallel) throws Exception {
    sync = new CountDownLatch(2);
    test = new CountDownLatch(2);
    final Client cl1 = new Client(c1, null, null);
    final Client cl2 = new Client(c2, null, null);
    final boolean await = test.await(2 * SLEEP + SYNC, TimeUnit.MILLISECONDS);
    assertTrue(cl1.error, cl1.error == null);
    assertTrue(cl2.error, cl2.error == null);
    assertTrue(parallel ? "Parallel execution expected" : "Serial execution expected",
                        parallel == await);
  }

  /**
   * Encapsulates string formatter for convenience.
   * @param formatString Format string
   * @param args Objects to insert into format string
   * @return Formatted string
   */
  private static String f(final String formatString, final Object... args) {
    return new Formatter().format(formatString, args).toString();
  }

  /**
   * Test whether parallel execution of queries is successful.
   * @throws Exception None expected
   */
  @Test
  public void lockingTests() throws Exception {
    // Not querying any databases
    testQueries(
        new XQuery(Q),
        new XQuery(Q),
        true);
    // Reading the same database twice
    testQueries(
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        true);
    // Reading two different databases
    testQueries(
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        new XQuery(f("(doc('%s1'), %s)", NAME, Q)),
        true);
    // Writing to the same database twice
    testQueries(
        new XQuery(f("insert node %s into doc('%s')", Q, NAME)),
        new XQuery(f("insert node %s into doc('%s')", Q, NAME)),
        false);
    // Writing to different databases
    testQueries(
        new XQuery(f("insert node %s into doc('%s')", Q, NAME)),
        new XQuery(f("insert node %s into doc('%s1')", Q, NAME)),
        true);
    // Read from and write to the same database
    testQueries(
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        new XQuery(f("insert node %s into doc('%s')", Q, NAME)),
        false);
    // Read from and write to different databases
    testQueries(
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        new XQuery(f("insert node %s into doc('%s1')", Q, NAME)),
        true);
    // Read from a database, perform global write lock
    testQueries(
        new XQuery(f("(doc('%s'), %s)", NAME, Q)),
        new XQuery(f("for $i in ('%s') return insert node %s into doc($i)", NAME, Q)),
        false);
    // Global write lock twice
    testQueries(
        new XQuery(f("for $i in ('%s') return insert node %s into doc($i)", NAME, Q)),
        new XQuery(f("for $i in ('%s') return insert node %s into doc($i)", NAME, Q)),
        false);
    // Custom Java module locking
    testQueries(new XQuery(f(
        "import module namespace qm='java:org.basex.query.func.QueryModuleTest';"
            + "qm:writeLock(), %s", Q)), new XQuery(f(
        "import module namespace qm='java:org.basex.query.func.QueryModuleTest';"
            + "qm:writeLock(), %s", Q)), false);
  }

  /**
   * Load test.
   * @throws Exception None expected
   */
  @Test
  public void loadTests() throws Exception {
    final int totalQueries = RUN_COUNT * QUERIES.length;
    final ArrayList<Client> clients = new ArrayList<>(totalQueries);
    final CountDownLatch allDone = new CountDownLatch(totalQueries);

    for(int i = 0; i < RUN_COUNT; i++)
      for(final String query : QUERIES)
        clients.add(new Client(new XQuery(f(query, NAME, "1")), null, allDone));

    allDone.await(totalQueries * SLEEP, TimeUnit.MILLISECONDS);
    for(final Client client : clients)
        assertTrue(client.error, client.error == null);
  }

  /**
   * Test for concurrent writes.
   * @throws BaseXException database exception
   */
  @Test
  public void downgradeTest() throws BaseXException {
    // hangs if QueryContext.downgrade call is activated..
    new CreateDB(NAME, "<x/>").execute(context);
    new XQuery("delete node /y").execute(context);
    new XQuery("let $d := '" + NAME + "' return doc($d)").execute(context);
  }
}


text:
[![Version](https://img.shields.io/cocoapods/v/UIImageView_AFNetworking-Blocks.svg?style=flat)](http://cocoapods.org/pods/UIImageView_AFNetworking-Blocks)
[![License](https://img.shields.io/cocoapods/l/UIImageView_AFNetworking-Blocks.svg?style=flat)](http://cocoapods.org/pods/UIImageView_AFNetworking-Blocks)
[![Platform](https://img.shields.io/cocoapods/p/UIImageView_AFNetworking-Blocks.svg?style=flat)](http://cocoapods.org/pods/UIImageView_AFNetworking-Blocks)

## Usage

Use this to add completion blocks to UIImageView+AFNetworking.

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Installation

UIImageView_AFNetworking-Blocks is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod "UIImageView_AFNetworking-Blocks"
```

## Author

Daniel Blakemore, DanBlakemore@gmail.com

## License

UIImageView_AFNetworking-Blocks is available under the MIT license. See the LICENSE file for more info.


text:
FROM lenz/whaleware

EXPOSE 80

RUN yum install -y wget lsof nano tar jq mysql && \
    wget -P /etc/yum.repos.d http://yum.loway.ch/loway.repo

RUN yum install -y tzdata expat gd graphviz mysql-server mysql-devel openssl expat-devel gd-devel graphviz-devel mariadb-devel openssl-devel perl perl-CPAN wget screen mod_fcgid which
RUN yum groupinstall -y "Development Tools" "Web Server"

RUN curl -L http://cpanmin.us | perl - App::cpanminus

ENV RTVER 4.0.4

RUN mkdir -p /opt
RUN wget https://download.bestpractical.com/pub/rt/release/rt-${RTVER}.tar.gz
RUN tar xvzf rt-${RTVER}.tar.gz -C /opt
WORKDIR /opt/rt-${RTVER}
RUN ./configure --enable-graphviz --enable-gd --with-web-user=apache --with-web-group=apache

RUN cpanm XSLoader --force
RUN cpanm GnuPG::Interface
RUN cpanm Plack
RUN cpanm GD --force

RUN cpanm DateTime
RUN cpanm Encode
RUN cpanm DateTime::Locale
RUN cpanm MIME::Entity
RUN cpanm XML::RSS
RUN cpanm HTML::Mason
RUN cpanm DBD::mysql
RUN cpanm Plack::Handler::Starlet
RUN cpanm Term::ReadKey

RUN cpanm Term::ReadKey
RUN cpanm Class::ReturnValue
RUN cpanm Text::Quoted
RUN cpanm Regexp::IPv6
RUN cpanm CSS::Squish
RUN cpanm Module::Versions::Report
RUN cpanm Locale::Maketext::Lexicon
RUN cpanm Text::Password::Pronounceable
RUN cpanm Time::ParseDate
RUN cpanm Tree::Simple
RUN cpanm Text::Template
RUN cpanm HTML::Quoted
RUN cpanm HTML::Scrubber
RUN cpanm DBIx::SearchBuilder
RUN cpanm Regexp::Common
RUN cpanm Cache::Simple::TimedExpiry
RUN cpanm Class::Accessor
RUN cpanm Locale::Maketext::Fuzzy
RUN cpanm Text::Wrapper
RUN cpanm Regexp::Common::net::CIDR
RUN cpanm Net::CIDR
RUN cpanm Log::Dispatch
RUN cpanm UNIVERSAL::require
RUN cpanm Email::Address
RUN cpanm HTML::RewriteAttributes
RUN cpanm Data::ICal
RUN cpanm Term::ReadKey
RUN cpanm PerlIO::eol
RUN cpanm IPC::Run
RUN cpanm GraphViz
RUN cpanm GD::Graph
RUN cpanm GD::Text
RUN cpanm CGI::Emulate::PSGI
RUN cpanm CGI::PSGI
RUN cpanm HTML::Mason::PSGIHandler
RUN cpanm CGI
RUN cpanm Plack::Handler::Starlet
RUN cpanm FCGI::ProcManager
RUN cpanm FCGI
RUN cpanm Class::ReturnValue
RUN cpanm HTML::Quoted
RUN cpanm HTML::Scrubber
RUN cpanm Text::Quoted
RUN cpanm Regexp::IPv6
RUN cpanm DBIx::SearchBuilder
RUN cpanm CSS::Squish
RUN cpanm Regexp::Common
RUN cpanm Module::Versions::Report
RUN cpanm Cache::Simple::TimedExpiry
RUN cpanm Locale::Maketext::Lexicon
RUN cpanm Class::Accessor
RUN cpanm Locale::Maketext::Fuzzy
RUN cpanm Text::Password::Pronounceable
RUN cpanm Text::Wrapper
RUN cpanm Time::ParseDate
RUN cpanm Regexp::Common::net::CIDR
RUN cpanm Net::CIDR
RUN cpanm Log::Dispatch
RUN cpanm UNIVERSAL::require
RUN cpanm Text::Template
RUN cpanm Tree::Simple
RUN cpanm Email::Address

RUN RT_FIX_DEPS_CMD=/usr/local/bin/cpanm      make fixdeps
RUN make testdeps
RUN make install


text:
function [apps dtls] = wavelets_transform(signal, level, transform)
% Assesses the wavelets transform of the given signal by given number of
% levels.
%
%     [apps dtls] = wavelets_transform(signal, level, transform)
%
% Returns the signal's approximations and details as cell arrays of length
% `level`. The contents of these approximations and details depend on the string
% `transform`, that determines which mother wavelet to be used.
[apps dtls] = trans_loop(signal, {}, {}, 1, level, transform);

function [apps dtls] = trans_loop(signal, apps, dtls, level, limit, trans)
if level <= limit
    [app dtl] = dwt(signal, trans);
    [apps dtls] = trans_loop(app, ...
                             push_cell(apps, app), ...
                             push_cell(dtls, dtl), ...
                             level + 1, limit, trans);
end


text:
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Stripe
{
    public class StripeBankAccountList
    {
        [JsonProperty("object")]
        public string Object { get; set; }

        [JsonProperty("data")]
        public List<StripeBankAccount> StripeBankAccounts { get; set; }

        [JsonProperty("has_more")]
        public bool HasMore { get; set; }

        [JsonProperty("url")]
        public string Url { get; set; }

        [JsonProperty("total_count")]
        public int TotalCount { get; set; }
    }
}


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

class DataKonsultasi extends CI_Controller {
	 public function __construct()
   {
        parent::__construct();
        //$this->load->library('PHPExcel');
        $this->load->library('PHPExcel/IOFactory');
        if($this->session->userdata('login')!='TRUE'){
       	redirect('auth');
       };
        $this->load->helper(array('form', 'url'));

        $this->load->model('student_model');
        $this->load->model('school_model');
        $this->load->model('auth_model');
        $this->load->model('visit_model');
        $this->load->model('KartuPanggilan_model');
        $this->load->model('DataKonsultasi_model');
   }

	public function index()
	{
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		'data'=>$this->DataKonsultasi_model->show()
		);
		$this->load->view('dashboard/data-konsultasi/index',$data);
	}

	 public function pdf(){
	 	$id=$this->uri->segment(3);
        $query=$this->DataKonsultasi_model->edit($id);
        $data_sekolah=$this->school_model->show();
        $this->load->library('PdfGenerator');
         $data=array(
            'title'=>'cetak data siswa',
            'data_konsultasi'=>$query,
            'data_sekolah'=>$data_sekolah
        );

         $html=$this->load->view('dashboard/data-konsultasi/print',$data,true);
        $this->pdfgenerator->generate($html,'contoh');
  }

	 public function cetakRekap()
  {
  		$query=$this->DataKonsultasi_model->show();
        $data_sekolah=$this->school_model->show();
        $this->load->library('PdfGenerator');
         $data=array(
            'title'=>'cetak data siswa',
            'data_konsultasi'=>$query,
            'data_sekolah'=>$data_sekolah
        );

         $html=$this->load->view('dashboard/data-konsultasi/print-rekap',$data,true);
         $this->pdfgenerator->generate($html,'contoh');
  }

	public function add()
	{
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		);
		$this->load->view('dashboard/data-konsultasi/add',$data);
	}

	public function save()
	{
		 $data_post = $this->input->post();
		 $data=array(
		 'menghadap'=>$data_post['menghadap'],
		 'jam_ke'=>$data_post['jam_ke'],
		 'selesai_pukul'=>$data_post['selesai_pukul'],
		 'selesai_jam_ke'=>$data_post['selesai_jam'],
		 'id_student'=>$data_post['id_student']
		 );

		  $query=$this->DataKonsultasi_model->register($data);
			 if($query){
				$success ="data telah berhasil tambah";
	            $this->session->set_flashdata('success',$success);
	            redirect('DataKonsultasi');
			}else{
				$error ="data gagal tambah";
	            $this->session->set_flashdata('error',$error);
	            redirect('DataKonsultasi/add');
			}

		 //print_r($data_post);
	}

	public function edit()
	{
		$id=$this->uri->segment(3);
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		'data'=>$this->DataKonsultasi_model->edit($id)
		);
		$this->load->view('dashboard/data-konsultasi/edit',$data);
	}

	public function detail()
	{
		$id=$this->uri->segment(3);
		$data=array(
		'title'=>'sistem bimbingan konsultasi sekolah',
		'data'=>$this->DataKonsultasi_model->edit($id)
		);
		$this->load->view('dashboard/data-konsultasi/detail',$data);
	}

	public function update()
	{
	 	$data_post = $this->input->post();
		 $data=array(
		 'menghadap'=>$data_post['menghadap'],
		 'jam_ke'=>$data_post['jam_ke'],
		 'selesai_pukul'=>$data_post['selesai_pukul'],
		 'selesai_jam_ke'=>$data_post['selesai_jam'],
		 'id_student'=>$data_post['id_student']
		 );

		$query=$this->DataKonsultasi_model->update($data,$data_post['id_data_konsultasi']);
		if($query){
    	 	$success ="data telah berhasil di ubah";
            $this->session->set_flashdata('success',$success);
            redirect('DataKonsultasi');
        }else{
        	$error ="data gagal di ubah";
            $this->session->set_flashdata('error',$error);
            redirect('DataKonsultasi');
        }
	}

	public function delete()
	{
		$id=$this->uri->segment(3);
		$query=$this->DataKonsultasi_model->delete($id);
		if($query){
			$success ="data telah berhasil dihapus";
            $this->session->set_flashdata('success',$success);
            redirect('DataKonsultasi');
		}else{
			$error ="data telah gagal dihapus";
            $this->session->set_flashdata('error',$error);
            redirect('DataKonsultasi');
		}

	}

}

/* End of file DataKonsultasi.php */
/* Location: ./application/controllers/DataKonsultasi.php */


text:
Beginner Quickstarts
====================

Welcome to the beginner quickstarts. These quickstarts demonstrates how to build Apache Camel integrations with fabric8.

The following two quickstarts is the _hello world_ beginner level examples, which we recommand first time users to try.

* [camel.log](camel-log) - is a very simple Camel application using a timer to trigger a message every 5th second which is then written to the server log.
* [camel.log.wiki](camel-log-wiki) - wiki based example of [camel.log](camel-log) where the Camel routes are stored in an XML file inside the wiki so you can edit it via the browser and use rolling upgrades to update it and roll forward/backward changes to containers without having to release any Java artifacts.

The following quickstarts are also beginner examples that uses Apache Camel.

* [camel.cbr](camel-cbr) - is a small Camel application using the Content Based Router (one of the most common EIP pattern)
* [camel.eips](camel-eips) - demonstrates a number of other commonly used EIP patterns with Apache Camel.
* [camel.errorhandler](camel-errorhandler) - introduces to error handling with Camel, such as using redelivery and a Dead Letter Channel.


text:
<?php

return [
    // Class Aliases could be defined here
];


text:
class RTriangle :
	public Shape
{
public:
	RTriangle();
	RTriangle(int, int, int);
	void print();
	void calculate_area();

protected:
	int hypotenuse;
	int side1;
	int side2;
};


text:
var pluralize = require('pluralize');
var tensify = require('tensify');
var conjugate = require('conjugate');

var _ = require('lodash');

exports.preFilters = ['startsWith', 'endsWith', 'contains', 'matching', 'greaterThan', 'lessThan', 'include', 'exclude'];
exports.postFilters = ['pluralize', 'capitalize', 'past', 'pastParticiple', 'conjugate', 'saveAs'];
exports._refs = {};

// Default filter - do nothing
exports.noop = function(word) {
  return word;
};

/*
 * Pre filters
 */

exports.startsWith = function(letter, list) {
  return _.filter(list, function(item) {
    return _.startsWith(item, letter);
  });
};

exports.endsWith = function(letter, list) {
  return _.filter(list, function(item) {
    return _.endsWith(item, letter);
  });
};

exports.contains = function(letter, list) {
  return _.filter(list, function(item) {
    return _.contains(item, letter);
  });
};

exports.matching = function(regex, list) {
  regex = new RegExp(regex);
  return _.filter(list, function(item) {
    return regex.test(item);
  });
};

exports.greaterThan = function(count, list) {
  return _.filter(list, function(item) {
    return item.length > count;
  });
};

exports.lessThan = function(count, list) {
  return _.filter(list, function(item) {
    return item.length < count;
  });
};

exports.include = function(extras, list) {
  return list.concat(extras);
};

exports.exclude = function(exclusions, list) {
  if (typeof exclusions === 'string') {
    return _.without(list, exclusions);
  } else {
    return _.difference(list, exclusions);
  }
};

/*
 * Post filters
 */

exports.pluralize = function(word) {
  return pluralize(word);
};

exports.capitalize = _.capitalize;

exports.past = function(verb) {
  return tensify(verb).past;
};

exports.pastParticiple = function(verb) {
  return tensify(verb).past_participle;
};

exports.conjugate = conjugate;

exports.saveAs = function(key, val) {
  exports._refs[key] = val;
  return val;
};


text:
describe("Given a generic function", function () {
    var container = {
        myFunc: function (aNumber) {
            return aNumber + 1;
        }
    };
    it("when using a spy, then it tracks all the calls statistics", function () {
        spyOn(container, "myFunc");
        container.myFunc(10);
        container.myFunc(20);
        expect(container.myFunc).toHaveBeenCalled();
        expect(container.myFunc).toHaveBeenCalledWith(10);
        expect(container.myFunc).toHaveBeenCalledWith(20);
        expect(container.myFunc.calls.any()).toEqual(true);
        expect(container.myFunc.calls.count()).toEqual(2);
        expect(container.myFunc.calls.argsFor(0)).toEqual([10]);
        expect(container.myFunc.calls.argsFor(1)).toEqual([20]);
        expect(container.myFunc.calls.allArgs()).toEqual([
            [10],
            [20]
        ]);
        expect(container.myFunc.calls.all()).toEqual([
            {
                object: container,
                args: [10]
            },
            {
                object: container,
                args: [20]
            }
        ]);
        expect(container.myFunc.calls.mostRecent()).toEqual({
            object: container,
            args: [20]
        });
        expect(container.myFunc.calls.first()).toEqual({
            object: container,
            args: [10]
        });
        container.myFunc.calls.reset();
        expect(container.myFunc.calls.any()).toEqual(false);
    });
});


text:
class StudentMailerPreview < ActionMailer::Preview

  # Preview this email at http://localhost:3000/rails/mailers/student_mailer/password_reset
  def password_reset
    StudentMailer.password_reset
  end

end


text:
<?php

namespace AppBundle\Controller;

use AppBundle\Entity\Observation;
use AppBundle\Service\FileUploader;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class ObservationController extends Controller
{
    protected function getErrorForm($errors){
        foreach ($errors as $error){
            $error_validation[$error->getPropertyPath()] = $error->getMessage();
        }
        return $error_validation;
    }

    /**
     * @Route("/saveObservation", name="save-observation")
     */
    public function saveObservationAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $validator = $this->get('validator');
        $data = $request->request->all();
        $is_exist_espece = $em->getRepository('AppBundle:Aves')->findAves($data['nom_especes']);
        $date_observation = new \DateTime($data['date_obs']);
        $observation = new Observation();
        $observation->setNomEspece($data['nom_especes']);
        $observation->setNbIndividus($data['nb_especes']);
        $observation->setDateObservation($date_observation);
        $observation->setLatitude($data['latitude']);
        $observation->setLongitude($data['longitude']);
        $observation->setUser($this->getUser());

        $errors = $validator->validate($observation);
       /* dump(count($errors));
        dump(count($is_exist_espece));
        die();*/

        if($request->getMethod() === 'POST' && count($errors) > 0 && count($is_exist_espece )==0) {
            if( count($errors) > 0) {

                $error_observation = $this->getErrorForm($errors);

            }else{
                $error_observation = [];

            }
            if( count($is_exist_espece) > 0) {
                $espece_not_exist = false;
            }else{
                $espece_not_exist = true;
            }

            return $this->render(':MonCompte:observation.html.twig',[
                'error_observation' => $error_observation,
                'espece_not_exist' => $espece_not_exist,
                'old_value' => $data
            ]);

        }else if ($request->getMethod() === 'POST' && (count($errors) == 0 &&  count($is_exist_espece)==1)){

            $file = $request->files->get('fichier');
            $upload_service = $this->get('file_uploader_service');
            if(null != $data['file_mobile']){
                $fileName = $upload_service->base64Converter($data['file_mobile'] ,$upload_service->getTargetPath());
                $observation->setPhoto($fileName);
            }
            if(null != $file){
                $fileName = $upload_service->upload($file);
                $observation->setPhoto($fileName);
            }

            //Si l'utilisateur est un naturaliste on valide son observation automatiquement
            if ($this->getUser()->getRoles()[0] == "ROLE_NATURALIST") {
                $observation->setIsValidate(1);
            }

            $em->persist($observation);

            $em->flush();

            $request->getSession()->getFlashBag()
                ->add('success', 'Votre observation a bien été enregistrée');
            return $this->redirect($this->generateUrl('observationpage'));
        }
    }
}


text:
<?php

namespace Lit\Api;

/**
 * base API exception
 * @package Lito\Api
 * @author lostintime
 */
class Exception extends \Exception
{
    public function getTypeString()
    {
        return get_class($this);
    }
}