text:
package com.gigigo.orchextra.di.modules.device;

import com.gigigo.ggglib.ContextProvider;
import com.gigigo.orchextra.BuildConfig;
import com.gigigo.orchextra.control.controllers.config.ConfigObservable;
import com.gigigo.orchextra.control.invoker.InteractorExecution;
import com.gigigo.orchextra.control.invoker.InteractorInvoker;
import com.gigigo.orchextra.device.bluetooth.beacons.BeaconScannerImpl;
import com.gigigo.orchextra.di.qualifiers.BeaconEventsInteractorExecution;
import com.gigigo.orchextra.di.qualifiers.MainThread;
import com.gigigo.orchextra.di.qualifiers.RegionsProviderInteractorExecution;
import com.gigigo.orchextra.domain.abstractions.beacons.BeaconScanner;
import com.gigigo.orchextra.domain.abstractions.beacons.BluetoothStatusInfo;
import com.gigigo.orchextra.device.bluetooth.beacons.monitoring.MonitoringListenerImpl;
import com.gigigo.orchextra.device.bluetooth.beacons.mapper.BeaconAndroidMapper;
import com.gigigo.orchextra.device.bluetooth.beacons.mapper.BeaconRegionAndroidMapper;
import com.gigigo.orchextra.control.controllers.proximity.beacons.BeaconsController;
import com.gigigo.orchextra.device.bluetooth.beacons.monitoring.MonitoringListener;
import com.gigigo.orchextra.device.bluetooth.beacons.monitoring.RegionMonitoringScanner;
import com.gigigo.orchextra.device.bluetooth.beacons.monitoring.RegionMonitoringScannerImpl;
import com.gigigo.orchextra.device.bluetooth.beacons.ranging.BeaconRangingScanner;
import com.gigigo.orchextra.device.bluetooth.beacons.ranging.BeaconRangingScannerImpl;
import com.gigigo.orchextra.domain.abstractions.error.ErrorLogger;
import com.gigigo.orchextra.domain.abstractions.lifecycle.AppRunningMode;
import com.gigigo.orchextra.domain.interactors.actions.ActionDispatcher;
import dagger.Module;
import dagger.Provides;
import javax.inject.Provider;
import javax.inject.Singleton;
import me.panavtec.threaddecoratedview.views.ThreadSpec;
import org.altbeacon.beacon.BeaconManager;
import org.altbeacon.beacon.BeaconParser;
import org.altbeacon.beacon.logging.LogManager;
import org.altbeacon.beacon.logging.Loggers;
import org.altbeacon.beacon.powersave.BackgroundPowerSaver;

@Module
public class BeaconsModule {

  @Provides @Singleton BeaconManager provideBeaconManager(ContextProvider contextProvider){
    BeaconManager beaconManager = BeaconManager.getInstanceForApplication(
        contextProvider.getApplicationContext());

    switchAltBeaconLogOnOff();
    BeaconParser bp = new BeaconParser().setBeaconLayout(BuildConfig.IBEACON_LAYOUT_PARSING);
    beaconManager.getBeaconParsers().add(bp);
    return beaconManager;
  }

  private void switchAltBeaconLogOnOff() {
    //if (BuildConfig.DEBUG){
      LogManager.setVerboseLoggingEnabled(false);
      LogManager.setLogger(Loggers.empty());
    //}else{
    //  LogManager.setVerboseLoggingEnabled(true);
    //  LogManager.setLogger(Loggers.verboseLogger());
    //}
  }

  @Provides @Singleton BackgroundPowerSaver BackgroundPowerSaver(ContextProvider contextProvider){
    return new BackgroundPowerSaver(contextProvider.getApplicationContext());
  }

  @Provides @Singleton BeaconScanner provideBeaconScanner(RegionMonitoringScanner regionMonitoringScanner,
      BeaconRangingScanner beaconRangingScanner, AppRunningMode appRunningMode,
      BluetoothStatusInfo bluetoothStatusInfo, ConfigObservable configObservable){

    return new BeaconScannerImpl(regionMonitoringScanner, beaconRangingScanner, bluetoothStatusInfo,
        appRunningMode, configObservable);
  }

  @Provides @Singleton BeaconRangingScanner provideBeaconRangingScanner(BeaconManager beaconManager,
      BeaconsController beaconsController, BeaconRegionAndroidMapper beaconRegionControlMapper,
      BeaconAndroidMapper beaconAndroidMapper){
    return new BeaconRangingScannerImpl(beaconManager, beaconsController, beaconRegionControlMapper,
        beaconAndroidMapper);
  }

  @Provides @Singleton RegionMonitoringScanner provideRegionMonitoringScanner(ContextProvider contextProvider,
    BeaconManager beaconManager, MonitoringListener monitoringListener, BeaconsController beaconsController,
      BeaconRegionAndroidMapper beaconRegionControlMapper){
    return new RegionMonitoringScannerImpl(contextProvider, beaconManager, monitoringListener,
        beaconsController, beaconRegionControlMapper);
  }

  @Provides @Singleton BeaconsController provideBeaconsController(
      InteractorInvoker interactorInvoker, ActionDispatcher actionDispatcher,
      @BeaconEventsInteractorExecution Provider<InteractorExecution> beaconsInteractorExecutionProvider,
      @RegionsProviderInteractorExecution Provider<InteractorExecution> regionsProviderInteractorExecutionProvider,
      ErrorLogger errorLogger, @MainThread ThreadSpec mainThreadSpec){

    return new BeaconsController(interactorInvoker, actionDispatcher, beaconsInteractorExecutionProvider,
        regionsProviderInteractorExecutionProvider, errorLogger, mainThreadSpec);
  }

  @Provides @Singleton MonitoringListener provideMonitoringListener(AppRunningMode appRunningMode,
      BeaconRangingScanner beaconRangingScanner){
    return new MonitoringListenerImpl(appRunningMode, beaconRangingScanner);
  }

  @Provides @Singleton BeaconRegionAndroidMapper provideBeaconRegionAndroidMapper(){
    return new BeaconRegionAndroidMapper();
  }

  @Provides @Singleton BeaconAndroidMapper provideBeaconAndroidMapper(){
    return new BeaconAndroidMapper();
  }

}


text:
cmake_policy(SET CMP0046 OLD)

add_custom_target(foo)
add_custom_target(bar)
add_dependencies(foo bar)

redpajama_set_name: RedPajamaGithub


text:
package com.voxeo.moho.media;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import javax.media.mscontrol.Parameters;
import javax.media.mscontrol.mediagroup.MediaGroup;
import javax.media.mscontrol.mediagroup.Player;

import org.apache.log4j.Logger;

import com.voxeo.moho.common.util.SettableResultFuture;
import com.voxeo.moho.event.EventSource;
import com.voxeo.moho.event.OutputCompleteEvent;

public class OutputImpl<T extends EventSource> implements Output<T> {
  private static final Logger LOG = Logger.getLogger(OutputImpl.class);

  protected MediaGroup _group;

  protected SettableResultFuture<OutputCompleteEvent<T>> _future = new SettableResultFuture<OutputCompleteEvent<T>>();

  final Lock lock = new ReentrantLock();

  private Condition speedActionResult = lock.newCondition();

  private Condition volumeActionResult = lock.newCondition();

  private Condition pauseActionResult = lock.newCondition();

  private Condition resumeActionResult = lock.newCondition();

  private boolean _normalDisconnected = false;

  protected OutputImpl(final MediaGroup group) {
    _group = group;
  }

  protected void done(final OutputCompleteEvent<T> outputCompleteEvent) {
    _future.setResult(outputCompleteEvent);
  }

  @Override
  public synchronized void jump(final int index) {
    if (!_future.isDone()) {
      final Parameters params = _group.getParameters(null);
      final int oldValue = (Integer) params.get(Player.JUMP_PLAYLIST_INCREMENT);
      try {
        if (index > 0) {
          params.put(Player.JUMP_PLAYLIST_INCREMENT, index);
          _group.setParameters(params);
          _group.triggerAction(Player.JUMP_FORWARD_IN_PLAYLIST);
        }
        else if (index < 0) {
          params.put(Player.JUMP_PLAYLIST_INCREMENT, -index);
          _group.setParameters(params);
          _group.triggerAction(Player.JUMP_BACKWARD_IN_PLAYLIST);
        }
      }
      finally {
        params.put(Player.JUMP_PLAYLIST_INCREMENT, oldValue);
        _group.setParameters(params);
      }
    }
  }

  @Override
  public synchronized void move(final boolean direction, final long time) {
    if (!_future.isDone()) {
      final Parameters params = _group.getParameters(null);
      final int oldValue = (Integer) params.get(Player.JUMP_TIME);
      params.put(Player.JUMP_TIME, time);
      _group.setParameters(params);
      try {
        if (direction) {
          _group.triggerAction(Player.JUMP_FORWARD);
        }
        else {
          _group.triggerAction(Player.JUMP_BACKWARD);
        }
      }
      finally {
        params.put(Player.JUMP_TIME, oldValue);
        _group.setParameters(params);
      }
    }
  }

  @Override
  public void speed(final boolean upOrDown) {
    lock.lock();
    try {
      if (!_future.isDone()) {
        if (upOrDown) {
          _group.triggerAction(Player.SPEED_UP);
        }
        else {
          _group.triggerAction(Player.SPEED_DOWN);
        }

        while (!speedResult && !_future.isDone()) {
          try {
            speedActionResult.await(5, TimeUnit.SECONDS);
          }
          catch (InterruptedException e) {
            // ignore
          }
        }
        speedResult = false;
      }
    }
    finally {
      lock.unlock();
    }
  }

  protected boolean speedResult = false;

  protected void speedActionDone() {
    lock.lock();
    speedResult = true;
    try {
      speedActionResult.signalAll();
    }
    finally {
      lock.unlock();
    }
  }

  protected boolean volumeResult = false;

  @Override
  public void volume(final boolean upOrDown) {
    lock.lock();
    try {
      if (!_future.isDone()) {
        if (upOrDown) {
          _group.triggerAction(Player.VOLUME_UP);
        }
        else {
          _group.triggerAction(Player.VOLUME_DOWN);
        }

        while (!volumeResult && !_future.isDone()) {
          try {
            volumeActionResult.await(5, TimeUnit.SECONDS);
          }
          catch (InterruptedException e) {
            // ignore
          }
        }
        volumeResult = false;
      }
    }
    finally {
      lock.unlock();
    }
  }

  protected void volumeActionDone() {
    lock.lock();
    volumeResult = true;
    try {
      volumeActionResult.signalAll();
    }
    finally {
      lock.unlock();
    }
  }

  protected boolean paused = false;

  protected boolean pauseResult = false;

  @Override
  public void pause() {
    lock.lock();
    try {
      if (!_future.isDone() && !paused) {
        _group.triggerAction(Player.PAUSE);

        while (!pauseResult && !_future.isDone()) {
          try {
            pauseActionResult.await(5, TimeUnit.SECONDS);
          }
          catch (InterruptedException e) {
            // ignore
          }
        }

        pauseResult = false;
      }
    }
    finally {
      lock.unlock();
    }
  }

  protected void pauseActionDone() {
    lock.lock();
    pauseResult = true;
    paused = true;
    try {
      pauseActionResult.signalAll();
    }
    finally {
      lock.unlock();
    }
  }

  @Override
  public void resume() {
    lock.lock();
    try {
      if (!_future.isDone() && paused) {
        _group.triggerAction(Player.RESUME);

        while (!resumeResult && !_future.isDone()) {
          try {
            resumeActionResult.await(5, TimeUnit.SECONDS);
          }
          catch (InterruptedException e) {
            // ignore
          }
        }

        resumeResult = false;
      }
    }
    finally {
      lock.unlock();
    }

  }

  protected boolean resumeResult = false;

  protected void resumeActionDone() {
    lock.lock();
    resumeResult = true;
    paused = false;
    try {
      resumeActionResult.signalAll();
    }
    finally {
      lock.unlock();
    }
  }

  @Override
  public void stop() {
    if (!_future.isDone()) {
      _group.triggerAction(Player.STOP);
      try {
        _future.get(10, TimeUnit.SECONDS);
      }
      catch (InterruptedException e) {
        // ignore
      }
      catch (ExecutionException e) {
        // ignore
      }
      catch (TimeoutException e) {
        LOG.error("Timeout when waiting output complete for MediaGroup " + _group, e);
      }
    }
  }

  @Override
  public boolean cancel(final boolean mayInterruptIfRunning) {
    return _future.cancel(mayInterruptIfRunning);
  }

  @Override
  public OutputCompleteEvent<T> get() throws InterruptedException, ExecutionException {
    return _future.get();
  }

  @Override
  public OutputCompleteEvent<T> get(final long timeout, final TimeUnit unit) throws InterruptedException,
      ExecutionException, TimeoutException {
    return _future.get(timeout, unit);
  }

  @Override
  public boolean isCancelled() {
    return _future.isCancelled();
  }

  @Override
  public boolean isDone() {
    return _future.isDone();
  }

  public synchronized boolean isPending() {
    return !_future.isDone();
  }

  public void normalDisconnect(boolean normal) {
    _normalDisconnected = normal;
  }

  public boolean isNormalDisconnect() {
    return _normalDisconnected;
  }
}


text:
// <copyright file="Extensions.cs" company="Brown University">
// Copyright (c) 2009 by John Mertus
// </copyright>
// <author>John Mertus</author>
// <date>10/31/2009 9:30:22 AM</date>
// <summary></summary>

namespace EventHandlerSupport
{
    using System;
    using System.ComponentModel;
    using System.Linq;
    using System.Reflection;
    using System.Windows.Forms;

    /// <summary>
    /// This is a set of extensions for accessing the Event Handlers as well as cloning menu items
    /// </summary>
    public static class Extensions
    {
        //////////////////////////////////////////////////
        // Private static fields
        //////////////////////////////////////////////////
        #region Public static methods

        /// <summary>
        /// This contains a counter to help make names unique
        /// </summary>
        private static int menuNameCounter;

        #endregion

        //////////////////////////////////////////////////
        // Public static methods
        //////////////////////////////////////////////////
        #region Public static methods

        /// <summary>
        /// Clones the specified source tool strip menu item.
        /// </summary>
        /// <param name="sourceToolStripMenuItem">The source tool strip menu item.</param>
        /// <returns>A cloned version of the toolstrip menu item</returns>
        public static ToolStripMenuItem Clone(this ToolStripMenuItem sourceToolStripMenuItem)
        {
            ToolStripMenuItem menuItem = new ToolStripMenuItem();

            var propInfoList = from p in typeof(ToolStripMenuItem).GetProperties()
                               let attributes = p.GetCustomAttributes(true)
                               let notBrowseable = (from a in attributes
                                                    where a.GetType() == typeof(BrowsableAttribute)
                                                    select !(a as BrowsableAttribute).Browsable).FirstOrDefault()
                               where !notBrowseable && p.CanRead && p.CanWrite && p.Name != "DropDown"
                               orderby p.Name
                               select p;

            // Copy over using reflections
            foreach (var propertyInfo in propInfoList)
            {
                object propertyInfoValue = propertyInfo.GetValue(sourceToolStripMenuItem, null);
                propertyInfo.SetValue(menuItem, propertyInfoValue, null);
            }

            // Create a new menu name
            menuItem.Name = sourceToolStripMenuItem.Name + "-" + menuNameCounter++;

            // Process any other properties
            if (sourceToolStripMenuItem.ImageIndex != -1)
            {
                menuItem.ImageIndex = sourceToolStripMenuItem.ImageIndex;
            }

            if (!string.IsNullOrEmpty(sourceToolStripMenuItem.ImageKey))
            {
                menuItem.ImageKey = sourceToolStripMenuItem.ImageKey;
            }

            // We need to make this visible
            menuItem.Visible = true;

            // Recursively clone the drop down list
            foreach (var item in sourceToolStripMenuItem.DropDownItems)
            {
                ToolStripItem newItem;
                if (item is ToolStripMenuItem)
                {
                    newItem = ((ToolStripMenuItem)item).Clone();
                }
                else if (item is ToolStripSeparator)
                {
                    newItem = new ToolStripSeparator();
                }
                else
                {
                    throw new NotImplementedException("Menu item is not a ToolStripMenuItem or a ToolStripSeparatorr");
                }

                menuItem.DropDownItems.Add(newItem);
            }

            // The handler list starts empty because we created its parent via a new
            // So this is equivalen to a copy.
            menuItem.AddHandlers(sourceToolStripMenuItem);

            return menuItem;
        }

        /// <summary>
        /// Adds the handlers from the source component to the destination component
        /// </summary>
        /// <typeparam name="T">An IComponent type</typeparam>
        /// <param name="destinationComponent">The destination component.</param>
        /// <param name="sourceComponent">The source component.</param>
        public static void AddHandlers<T>(this T destinationComponent, T sourceComponent) where T : IComponent
        {
            // If there are other handlers, they will not be erased
            var destEventHandlerList = destinationComponent.GetEventHandlerList();
            var sourceEventHandlerList = sourceComponent.GetEventHandlerList();

            destEventHandlerList.AddHandlers(sourceEventHandlerList);
        }

        /// <summary>
        /// Gets the event handler list from a component
        /// </summary>
        /// <param name="component">The source component.</param>
        /// <returns>The EventHanderList or null if none</returns>
        public static EventHandlerList GetEventHandlerList(this IComponent component)
        {
            var eventsInfo = component.GetType().GetProperty("Events", BindingFlags.Instance | BindingFlags.NonPublic);
            return (EventHandlerList)eventsInfo.GetValue(component, null);
        }

        #endregion

        //////////////////////////////////////////////////
        // Private static methods
        //////////////////////////////////////////////////
    }
}


text:
require 'speed_gun/profiler'

class SpeedGun::Profiler::ActiveSupportNotificatiosProfiler < SpeedGun::Profiler
  def self.subscribe(event, ignore_payload = [])
    klass = self
    ActiveSupport::Notifications.subscribe(event) do |*args|
      klass.record(event, *args, ignore_payload)
    end
  end

  def self.record(event, name, started, ended, id, payload, ignore_payload)
    name = "#{self.name}.#{name.sub(event, '\1')}"

    payload.symbolize_keys!

    ignore_payload.each do |key|
      payload.delete(key)
    end

    payload[:backtrace] = backtrace

    event = SpeedGun::Event.new(name, payload, started, ended)
    SpeedGun.current_profile.record!(event)
  end

  def self.backtrace
    Rails.backtrace_cleaner.clean(caller[2..-1])
  end
end


text:
package org.plantuml.idea.adapter.rendering;

import org.junit.Assert;
import org.junit.Test;
import org.plantuml.idea.adapter.FacadeImpl;
import org.plantuml.idea.plantuml.ImageFormat;
import org.plantuml.idea.preview.Zoom;
import org.plantuml.idea.rendering.RenderCommand;
import org.plantuml.idea.rendering.RenderRequest;
import org.plantuml.idea.rendering.RenderResult;
import org.plantuml.idea.settings.PlantUmlSettings;

import static org.plantuml.idea.adapter.rendering.PlantUmlRendererUtil.NEW_PAGE_PATTERN;

public class PlantUmlRendererUtilTest {
    @Test
    public void render() throws Exception {
        RenderResult render = new FacadeImpl().render(new RenderRequest("sourceFilePath", "@startuml\n" +
                "xxx->yyy\n" +
                "@enduml", ImageFormat.PNG, 0, new Zoom(100, new PlantUmlSettings()), null, false, RenderCommand.Reason.REFRESH, null), null);
        Assert.assertNotNull(render);
        Assert.assertNotNull(render.getFirstDiagramBytes());
        Assert.assertNotNull(render.getImageItems().get(0));
    }

    @Test
    public void renderBrokenImage() throws Exception {
        RenderResult render = new FacadeImpl().render(new RenderRequest("sourceFilePath", "@startuml\n" +
                "xxx\n" +
                "@enduml", ImageFormat.PNG, 0, new Zoom(0, new PlantUmlSettings()), null, false, RenderCommand.Reason.REFRESH, null), null);
        Assert.assertNotNull(render);
        Assert.assertNotNull(render.getImageItems().get(0));
        Assert.assertTrue(render.hasError());
    }

    @Test
    public void splitNewPage() throws Exception {
        String[] strings = NEW_PAGE_PATTERN.split("@startuml\n" +
                "xx1\n" +
                " newpage \n" +
                "xx3\n" +
                "    @newpage    \n" +
                "xx4\n" +
                "@newpage\n" +
                "xx5\n" +
                "@enduml");

        Assert.assertArrayEquals(
                new String[]{
                        "@startuml\n" +
                                "xx1"
                        ,
                        "\nxx3"
                        ,
                        "\nxx4"
                        ,
                        "\nxx5\n@enduml"},
                strings);
    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <android.support.v7.widget.RecyclerView
        android:id="@+id/list"
        android:scrollbars="none"
        android:overScrollMode="never"
        android:layout_width="match_parent"
        android:layout_height="match_parent" />

</LinearLayout>


text:
// Copyright 2019 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package com.google.devtools.build.android.resources;

import static com.google.common.base.Preconditions.checkState;

/** Denotes whether a resource is public/global or private/local. */
public enum Visibility {
  /**
   * Unknown/unspecified visibility. These are the legacy semantics used by both Bazel and Gradle.
   *
   *
Resources of all types in any given library may be accessed from dependents (via both XML
   * and Java R class constants). Resources may also be overriden by dependents, subject to
   * precedence rules.
   */
  UNKNOWN,

  /**
   * Public/global visibility. Identical semantics to {@link UNKNOWN}, though explicitly so via a
   * {@code <public>}; tag.
   */
  PUBLIC,

  /**
   * Private/local visibility. Implicitly specified by the absence of a {@code <public}; tag when
   * {@code <public>}; is used elsewhere in a library.
   *
   *
A true resource (everything except "id" and "styleable"). may not be accessed from
   * dependents via XML nor via Java outside of the resource's package. May not be overriden by
   * dependents. May not be made public by other libraries.
   *
   *
"styleable" does not represent a true resource (it doesn't exist in {@code resources.arsc}),
   * but rather serves to group {@code R.attr} values for custom view classes. Thus it is
   * permissible for multiple libraries to define different styleables with the same name, which
   * will have different package-private definitions in their respective R classes.
   *
   *
"id" normally does not represent a true resource, but generally is intended to map the ID's
   * name to an arbitrary number (generated by aapt2). It is permissible for multiple libraries to
   * declare the same ID, which will have identical package-private definitions in their respective
   * R classes.
   */
  PRIVATE;

  /** Merge visibility, to be used for "resources" such as R.id and R.styleable. */
  public static Visibility merge(Visibility v1, Visibility v2) {
    if (v1 == UNKNOWN || v2 == UNKNOWN) {
      return UNKNOWN;
    }
    if (v1 == PUBLIC || v2 == PUBLIC) {
      return PUBLIC;
    }
    checkState(v1 == PRIVATE && v2 == PRIVATE);
    return PRIVATE;
  }
}


text:
package com.facebook.react.config;

/**
 * Hi there, traveller! This configuration class is not meant to be used by end-users of RN. It
 * contains mainly flags for features that are either under active development and not ready for
 * public consumption, or for use in experiments.
 *
 *
These values are safe defaults and should not require manual changes.
 */
public class ReactFeatureFlags {

  /**
   * Should this application use TurboModules? If yes, then any module that inherits {@link
   * com.facebook.react.turbomodule.core.interfaces.TurboModule} will NOT be passed in to C++
   * CatalystInstanceImpl
   */
  public static volatile boolean useTurboModules = false;

  /*
   * This feature flag enables logs for Fabric
   */
  public static boolean enableFabricLogs = false;

  /**
   * Should this application use a {@link com.facebook.react.uimanager.ViewManagerDelegate} (if
   * provided) to update the view properties. If {@code false}, then the generated {@code
   * ...$$PropsSetter} class will be used instead.
   */
  public static boolean useViewManagerDelegates = false;

  /**
   * Should this application use a {@link com.facebook.react.uimanager.ViewManagerDelegate} (if
   * provided) to execute the view commands. If {@code false}, then {@code receiveCommand} method
   * inside view manager will be called instead.
   */
  public static boolean useViewManagerDelegatesForCommands = false;

  /**
   * This react flag enables a custom algorithm for the getChildVisibleRect() method in the classes
   * ReactViewGroup, ReactHorizontalScrollView and ReactScrollView.
   *
   *
This new algorithm clip child rects if overflow is set to ViewProps.HIDDEN. More details in
   * https://github.com/facebook/react-native/issues/23870 and
   * https://github.com/facebook/react-native/pull/26334
   *
   *
The react flag is disabled by default because this is increasing ANRs (T57363204)
   */
  public static boolean clipChildRectsIfOverflowIsHidden = false;

  /**
   * Temporary feature flat to control a fix in the transition to layoutOnlyViews TODO T61185028:
   * remove this when bug is fixed
   */
  public static boolean enableTransitionLayoutOnlyViewCleanup = false;

  /** Feature flag to configure eager initialization of Fabric */
  public static boolean eagerInitializeFabric = false;

  /** Feature flag to use stopSurface when ReactRootView is unmounted. */
  public static boolean enableStopSurfaceOnRootViewUnmount = false;

  /** Use experimental SetState retry mechanism in view? */
  public static boolean enableExperimentalStateUpdateRetry = false;

  /** Enable caching of Spannable objects using equality of ReadableNativeMaps */
  public static boolean enableSpannableCacheByReadableNativeMapEquality = true;
}


text:
package org.terasology.input.device;

import org.terasology.input.ButtonState;
import org.terasology.input.Input;

/**
 */
public final class ControllerAction {
    private final Input input;
    private final ButtonState state;
    private final String controller;
    private final float axisValue;

    public ControllerAction(Input input, String controller, ButtonState state, float axisValue) {
        this.input = input;
        this.state = state;
        this.controller = controller;
        this.axisValue = axisValue;
    }

    /**
     * @return the name of the controller that sent the event
     */
    public String getController() {
        return controller;
    }

    /**
     * @return The type of input involved in this action (mouse button/mouse wheel)
     */
    public Input getInput() {
        return input;
    }

    /**
     * @return The state of that input button
     */
    public ButtonState getState() {
        return state;
    }

    public float getAxisValue() {
        return axisValue;
    }

    @Override
    public String toString() {
        return "ControllerAction [" + this.input + ", axis: " + axisValue + " (" + state + ")]";
    }
}


text:
layout: project
title: Projects
permalink: /en/projects/
redirect_from: /projects
weight: 2
lang: en
id: projects
---
{% include _pages/projects.html %}


text:
package com.robrua.orianna.type.dto.staticdata;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.robrua.orianna.type.dto.OriannaDto;

@Entity
@Table(name = "stats")
public class Stats extends OriannaDto {
    private static final long serialVersionUID = -5686446191361451936L;
    private Double armor, armorperlevel, attackdamage, attackdamageperlevel, attackrange, attackspeedoffset, attackspeedperlevel, crit, critperlevel, hp,
            hpperlevel, hpregen, hpregenperlevel, movespeed, mp, mpperlevel, mpregen, mpregenperlevel, spellblock, spellblockperlevel;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long dbId;

    /*
     * (non-Javadoc)
     * @see java.lang.Object#equals(java.lang.Object)
     */
    @Override
    public boolean equals(final Object obj) {
        if(this == obj) {
            return true;
        }
        if(obj == null) {
            return false;
        }
        if(!(obj instanceof Stats)) {
            return false;
        }
        final Stats other = (Stats)obj;
        if(armor == null) {
            if(other.armor != null) {
                return false;
            }
        }
        else if(!armor.equals(other.armor)) {
            return false;
        }
        if(armorperlevel == null) {
            if(other.armorperlevel != null) {
                return false;
            }
        }
        else if(!armorperlevel.equals(other.armorperlevel)) {
            return false;
        }
        if(attackdamage == null) {
            if(other.attackdamage != null) {
                return false;
            }
        }
        else if(!attackdamage.equals(other.attackdamage)) {
            return false;
        }
        if(attackdamageperlevel == null) {
            if(other.attackdamageperlevel != null) {
                return false;
            }
        }
        else if(!attackdamageperlevel.equals(other.attackdamageperlevel)) {
            return false;
        }
        if(attackrange == null) {
            if(other.attackrange != null) {
                return false;
            }
        }
        else if(!attackrange.equals(other.attackrange)) {
            return false;
        }
        if(attackspeedoffset == null) {
            if(other.attackspeedoffset != null) {
                return false;
            }
        }
        else if(!attackspeedoffset.equals(other.attackspeedoffset)) {
            return false;
        }
        if(attackspeedperlevel == null) {
            if(other.attackspeedperlevel != null) {
                return false;
            }
        }
        else if(!attackspeedperlevel.equals(other.attackspeedperlevel)) {
            return false;
        }
        if(crit == null) {
            if(other.crit != null) {
                return false;
            }
        }
        else if(!crit.equals(other.crit)) {
            return false;
        }
        if(critperlevel == null) {
            if(other.critperlevel != null) {
                return false;
            }
        }
        else if(!critperlevel.equals(other.critperlevel)) {
            return false;
        }
        if(hp == null) {
            if(other.hp != null) {
                return false;
            }
        }
        else if(!hp.equals(other.hp)) {
            return false;
        }
        if(hpperlevel == null) {
            if(other.hpperlevel != null) {
                return false;
            }
        }
        else if(!hpperlevel.equals(other.hpperlevel)) {
            return false;
        }
        if(hpregen == null) {
            if(other.hpregen != null) {
                return false;
            }
        }
        else if(!hpregen.equals(other.hpregen)) {
            return false;
        }
        if(hpregenperlevel == null) {
            if(other.hpregenperlevel != null) {
                return false;
            }
        }
        else if(!hpregenperlevel.equals(other.hpregenperlevel)) {
            return false;
        }
        if(movespeed == null) {
            if(other.movespeed != null) {
                return false;
            }
        }
        else if(!movespeed.equals(other.movespeed)) {
            return false;
        }
        if(mp == null) {
            if(other.mp != null) {
                return false;
            }
        }
        else if(!mp.equals(other.mp)) {
            return false;
        }
        if(mpperlevel == null) {
            if(other.mpperlevel != null) {
                return false;
            }
        }
        else if(!mpperlevel.equals(other.mpperlevel)) {
            return false;
        }
        if(mpregen == null) {
            if(other.mpregen != null) {
                return false;
            }
        }
        else if(!mpregen.equals(other.mpregen)) {
            return false;
        }
        if(mpregenperlevel == null) {
            if(other.mpregenperlevel != null) {
                return false;
            }
        }
        else if(!mpregenperlevel.equals(other.mpregenperlevel)) {
            return false;
        }
        if(spellblock == null) {
            if(other.spellblock != null) {
                return false;
            }
        }
        else if(!spellblock.equals(other.spellblock)) {
            return false;
        }
        if(spellblockperlevel == null) {
            if(other.spellblockperlevel != null) {
                return false;
            }
        }
        else if(!spellblockperlevel.equals(other.spellblockperlevel)) {
            return false;
        }
        return true;
    }

    /**
     * @return the armor
     */
    public Double getArmor() {
        return armor;
    }

    /**
     * @return the armorperlevel
     */
    public Double getArmorperlevel() {
        return armorperlevel;
    }

    /**
     * @return the attackdamage
     */
    public Double getAttackdamage() {
        return attackdamage;
    }

    /**
     * @return the attackdamageperlevel
     */
    public Double getAttackdamageperlevel() {
        return attackdamageperlevel;
    }

    /**
     * @return the attackrange
     */
    public Double getAttackrange() {
        return attackrange;
    }

    /**
     * @return the attackspeedoffset
     */
    public Double getAttackspeedoffset() {
        return attackspeedoffset;
    }

    /**
     * @return the attackspeedperlevel
     */
    public Double getAttackspeedperlevel() {
        return attackspeedperlevel;
    }

    /**
     * @return the crit
     */
    public Double getCrit() {
        return crit;
    }

    /**
     * @return the critperlevel
     */
    public Double getCritperlevel() {
        return critperlevel;
    }

    @Override
    public String getDataStoreIndexField(final Class<?> keyType) {
        if(keyType.equals(Long.class)) {
            return "dbId";
        }
        return null;
    }

    /**
     * @return the hp
     */
    public Double getHp() {
        return hp;
    }

    /**
     * @return the hpperlevel
     */
    public Double getHpperlevel() {
        return hpperlevel;
    }

    /**
     * @return the hpregen
     */
    public Double getHpregen() {
        return hpregen;
    }

    /**
     * @return the hpregenperlevel
     */
    public Double getHpregenperlevel() {
        return hpregenperlevel;
    }

    /**
     * @return the movespeed
     */
    public Double getMovespeed() {
        return movespeed;
    }

    /**
     * @return the mp
     */
    public Double getMp() {
        return mp;
    }

    /**
     * @return the mpperlevel
     */
    public Double getMpperlevel() {
        return mpperlevel;
    }

    /**
     * @return the mpregen
     */
    public Double getMpregen() {
        return mpregen;
    }

    /**
     * @return the mpregenperlevel
     */
    public Double getMpregenperlevel() {
        return mpregenperlevel;
    }

    /**
     * @return the spellblock
     */
    public Double getSpellblock() {
        return spellblock;
    }

    /**
     * @return the spellblockperlevel
     */
    public Double getSpellblockperlevel() {
        return spellblockperlevel;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#hashCode()
     */
    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + (armor == null ? 0 : armor.hashCode());
        result = prime * result + (armorperlevel == null ? 0 : armorperlevel.hashCode());
        result = prime * result + (attackdamage == null ? 0 : attackdamage.hashCode());
        result = prime * result + (attackdamageperlevel == null ? 0 : attackdamageperlevel.hashCode());
        result = prime * result + (attackrange == null ? 0 : attackrange.hashCode());
        result = prime * result + (attackspeedoffset == null ? 0 : attackspeedoffset.hashCode());
        result = prime * result + (attackspeedperlevel == null ? 0 : attackspeedperlevel.hashCode());
        result = prime * result + (crit == null ? 0 : crit.hashCode());
        result = prime * result + (critperlevel == null ? 0 : critperlevel.hashCode());
        result = prime * result + (hp == null ? 0 : hp.hashCode());
        result = prime * result + (hpperlevel == null ? 0 : hpperlevel.hashCode());
        result = prime * result + (hpregen == null ? 0 : hpregen.hashCode());
        result = prime * result + (hpregenperlevel == null ? 0 : hpregenperlevel.hashCode());
        result = prime * result + (movespeed == null ? 0 : movespeed.hashCode());
        result = prime * result + (mp == null ? 0 : mp.hashCode());
        result = prime * result + (mpperlevel == null ? 0 : mpperlevel.hashCode());
        result = prime * result + (mpregen == null ? 0 : mpregen.hashCode());
        result = prime * result + (mpregenperlevel == null ? 0 : mpregenperlevel.hashCode());
        result = prime * result + (spellblock == null ? 0 : spellblock.hashCode());
        result = prime * result + (spellblockperlevel == null ? 0 : spellblockperlevel.hashCode());
        return result;
    }

    /**
     * @param armor
     *            the armor to set
     */
    public void setArmor(final Double armor) {
        this.armor = armor;
    }

    /**
     * @param armorperlevel
     *            the armorperlevel to set
     */
    public void setArmorperlevel(final Double armorperlevel) {
        this.armorperlevel = armorperlevel;
    }

    /**
     * @param attackdamage
     *            the attackdamage to set
     */
    public void setAttackdamage(final Double attackdamage) {
        this.attackdamage = attackdamage;
    }

    /**
     * @param attackdamageperlevel
     *            the attackdamageperlevel to set
     */
    public void setAttackdamageperlevel(final Double attackdamageperlevel) {
        this.attackdamageperlevel = attackdamageperlevel;
    }

    /**
     * @param attackrange
     *            the attackrange to set
     */
    public void setAttackrange(final Double attackrange) {
        this.attackrange = attackrange;
    }

    /**
     * @param attackspeedoffset
     *            the attackspeedoffset to set
     */
    public void setAttackspeedoffset(final Double attackspeedoffset) {
        this.attackspeedoffset = attackspeedoffset;
    }

    /**
     * @param attackspeedperlevel
     *            the attackspeedperlevel to set
     */
    public void setAttackspeedperlevel(final Double attackspeedperlevel) {
        this.attackspeedperlevel = attackspeedperlevel;
    }

    /**
     * @param crit
     *            the crit to set
     */
    public void setCrit(final Double crit) {
        this.crit = crit;
    }

    /**
     * @param critperlevel
     *            the critperlevel to set
     */
    public void setCritperlevel(final Double critperlevel) {
        this.critperlevel = critperlevel;
    }

    /**
     * @param hp
     *            the hp to set
     */
    public void setHp(final Double hp) {
        this.hp = hp;
    }

    /**
     * @param hpperlevel
     *            the hpperlevel to set
     */
    public void setHpperlevel(final Double hpperlevel) {
        this.hpperlevel = hpperlevel;
    }

    /**
     * @param hpregen
     *            the hpregen to set
     */
    public void setHpregen(final Double hpregen) {
        this.hpregen = hpregen;
    }

    /**
     * @param hpregenperlevel
     *            the hpregenperlevel to set
     */
    public void setHpregenperlevel(final Double hpregenperlevel) {
        this.hpregenperlevel = hpregenperlevel;
    }

    /**
     * @param movespeed
     *            the movespeed to set
     */
    public void setMovespeed(final Double movespeed) {
        this.movespeed = movespeed;
    }

    /**
     * @param mp
     *            the mp to set
     */
    public void setMp(final Double mp) {
        this.mp = mp;
    }

    /**
     * @param mpperlevel
     *            the mpperlevel to set
     */
    public void setMpperlevel(final Double mpperlevel) {
        this.mpperlevel = mpperlevel;
    }

    /**
     * @param mpregen
     *            the mpregen to set
     */
    public void setMpregen(final Double mpregen) {
        this.mpregen = mpregen;
    }

    /**
     * @param mpregenperlevel
     *            the mpregenperlevel to set
     */
    public void setMpregenperlevel(final Double mpregenperlevel) {
        this.mpregenperlevel = mpregenperlevel;
    }

    /**
     * @param spellblock
     *            the spellblock to set
     */
    public void setSpellblock(final Double spellblock) {
        this.spellblock = spellblock;
    }

    /**
     * @param spellblockperlevel
     *            the spellblockperlevel to set
     */
    public void setSpellblockperlevel(final Double spellblockperlevel) {
        this.spellblockperlevel = spellblockperlevel;
    }

    /*
     * (non-Javadoc)
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        return "Stats [armor=" + armor + ", armorperlevel=" + armorperlevel + ", attackdamage=" + attackdamage + ", attackdamageperlevel="
                + attackdamageperlevel + ", attackrange=" + attackrange + ", attackspeedoffset=" + attackspeedoffset + ", attackspeedperlevel="
                + attackspeedperlevel + ", crit=" + crit + ", critperlevel=" + critperlevel + ", hp=" + hp + ", hpperlevel=" + hpperlevel + ", hpregen="
                + hpregen + ", hpregenperlevel=" + hpregenperlevel + ", movespeed=" + movespeed + ", mp=" + mp + ", mpperlevel=" + mpperlevel + ", mpregen="
                + mpregen + ", mpregenperlevel=" + mpregenperlevel + ", spellblock=" + spellblock + ", spellblockperlevel=" + spellblockperlevel + "]";
    }
}


text:
package core;

import net.dv8tion.jda.core.EmbedBuilder;
import net.dv8tion.jda.core.entities.Guild;
import net.dv8tion.jda.core.events.message.MessageReceivedEvent;
import utils.STATICS;

import java.io.*;
import java.util.*;
import java.util.stream.Collectors;

/**
 * Created by zekro on 17.05.2017 / 14:12
 * DiscordBot/core
 * © zekro 2017
 */

public class SSSS /* Stands for "SERVER SPECIFIC SETTINGS SYSTEM" :^) */ {

    public static void checkFolders(List<Guild> guilds) {

        guilds.forEach(guild -> {
            File f = new File("SERVER_SETTINGS/" + guild.getId());
            if (!f.exists() || !f.isDirectory()) {
                f.mkdirs();
            }
        });
    }

//    public static void listSettings(MessageReceivedEvent event) {
//
//        Guild g = event.getGuild();
//
//        StringBuilder keys = new StringBuilder();
//        StringBuilder values = new StringBuilder();
//
//        File[] files = new File("SERVER_SETTINGS/" + g.getId() + "/").listFiles();
//        System.out.println(files.length);
//
//        Arrays.stream(files).forEach(f -> {
//            try {
//                BufferedReader br = new BufferedReader(new FileReader(f));
//                keys.append("**" + f.getName() + "**\n");
//                values.append("`" + br.readLine() + "`\n");
//                br.close();
//            } catch (IOException e) {
//                e.printStackTrace();
//            }
//        });
//
//        event.getTextChannel().sendMessage(new EmbedBuilder()
//                .setTitle("SettingsCore for guild \"" + g.getName() + "\" (" + g.getId() + ")", null)
//                .addBlankField(false)
//                .addField("Keys", keys.toString(), true)
//                .addField("Values", values.toString(), true)
//                .build()
//        ).queue();
//
//    }

    public static void listSettings(MessageReceivedEvent event) {

        Guild g = event.getGuild();

        HashMap<String, String> sets = new HashMap<>();
        sets.put("PREFIX                ", getPREFIX(g));
        sets.put("SERVER_JOIN_MSG       ", getSERVERJOINMESSAGE(g));
        sets.put("SERVER_LEAVE_MSG      ", getSERVERJOINMESSAGE(g));
        sets.put("VKICK_CHANNEL         ", getVKICKCHANNEL(g));

        sets.put("GAME_CHANGELOG_CHANNEL_PREFIX     ", getGAMECHANGELOGCHANNELPREFIX(g));
        sets.put("GAME_CHANGELOG_UPDATE_INTERVAL    ", getGAMECHANGELOGUPDATEINTERVAL(g));

        HashMap<String, String> setsMulti = new HashMap<>();
        setsMulti.put("PERMROLES_LVL1", String.join(", ", getPERMROLES_1(g)));
        setsMulti.put("PERMROLES_LVL2", String.join(", ", getPERMROLES_2(g)));
        setsMulti.put("PERMROLES_LVL3", String.join(", ", getPERMROLES_3(g)));
        setsMulti.put("BLACKLIST", String.join(", ", getBLACKLIST(g)));

        StringBuilder sb = new StringBuilder()
                .append("**Список настроек этого сервера**\n\n")
                .append("```")
                .append("ПАРАМЕТР                           -  ЗНАЧЕНИЕ\n\n");

        sets.forEach((k, v) -> sb.append(
                String.format("%s  -  \"%s\"\n", k, v))
        );

        sb.append("\n- - - - -\n\n");
        setsMulti.forEach((k, v) -> sb.append(
                String.format("%s:\n\"%s\"\n\n", k, v))
        );

        event.getTextChannel().sendMessage(new EmbedBuilder().setDescription(sb.append("```").toString()).build()).queue();
    }

    public static String getPREFIX(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/prefix");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.PREFIX;
    }

    public static void setPREFIX(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/prefix");
        settingWrite(entry, f);
    }

    public static String getSERVERJOINMESSAGE(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/serverjoinmessage");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }  catch (Exception e) {}
        return "OFF";
    }

    public static void setSERVERJOINMESSAGE(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/serverjoinmessage");
        settingWrite(entry, f);
    }

    public static String getSERVERLEAVEMESSAGE(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/serverleavemessage");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return "OFF";
    }

    public static void setSERVERLEAVEMESSAGE(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/serverleavemessage");
        settingWrite(entry, f);
    }

    public static String[] getPERMROLES_1(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_1");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine().split(", ");
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.MEMBERPERMS;

    }

    public static void setPERMROLES_1(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_1");
        settingWrite(entry, f);
    }

    public static String[] getPERMROLES_2(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_2");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine().split(", ");
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.PERMS;
    }

    public static void setPERMROLES_2(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_2");
        settingWrite(entry, f);
    }

    public static String[] getPERMROLES_3(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_3");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine().split(", ");
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.FULLPERMS;

    }

    public static void setPERMROLES_3(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/permroles_3");
        settingWrite(entry, f);
    }

    public static String getVKICKCHANNEL(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/vkickchannel");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return "";
    }

    public static void setVKICKCHANNEL(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/vkickchannel");
        settingWrite(entry, f);
    }

    public static List<String> getBLACKLIST(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/blacklist");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).lines().map(s -> s.replace("\n", "")).collect(Collectors.toList());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return new ArrayList<>();
    }

    public static void setBLACKLIST(List<String> entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/blacklist");
        try {
            BufferedWriter r = new BufferedWriter(new FileWriter(f));
            entry.forEach(l -> {
                try {
                    r.write(l + "\n");
                } catch (IOException e) {}
            });
            r.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String getGAMECHANGELOGCHANNELPREFIX(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/gamechangelogchannel");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.gameChangelogChannelPrefix;
    }

    public static void setGAMECHANGELOGCHANNELPREFIX(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/gamechangelogchannel");
        settingWrite(entry, f);
    }

    public static String getGAMECHANGELOGUPDATEINTERVAL(Guild guild) {

        try {
            File f = new File("SERVER_SETTINGS/" + guild.getId() + "/gamechangelogupdateinterval");
            if (f.exists()) {
                try {
                    return new BufferedReader(new FileReader(f)).readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } catch (Exception e) {}
        return STATICS.gameChangelogUpdateInterval;
    }

    public static void setGAMECHANGELOGUPDATEINTERVAL(String entry, Guild guild) {

        File f = new File("SERVER_SETTINGS/" + guild.getId() + "/gamechangelogupdateinterval");
        settingWrite(entry, f);
    }

    private static void settingWrite(String entry, File f){
        try {
            if (!f.exists())
                f.createNewFile();
            BufferedWriter r = new BufferedWriter(new FileWriter(f));
            r.write(entry);
            r.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}


text:
struct RENDERDOC_API_1_4_0;

struct ImGuiInputTextCallbackData;

namespace flex
{
	class GameObject;
	class IFunction;
	enum class TransformState;

	class FlexEngine final
	{
	public:
		FlexEngine();
		~FlexEngine();

		void Initialize();
		void UpdateAndRender();
		void Stop();

		i32 ImGuiConsoleInputCallback(ImGuiInputTextCallbackData* data);

		void OnSceneChanged();

		bool IsRenderingImGui() const;

		bool IsRenderingEditorObjects() const;
		void SetRenderingEditorObjects(bool bRenderingEditorObjects);

		bool IsSimulationPaused() const;
		void SetSimulationPaused(bool bPaused);

		bool InstallShaderDirectoryWatch() const;

		static std::string EngineVersionString();

		std::string GetShaderEditorPath();

		void CreateCameraInstances();

		void SetFramesToFakeDT(i32 frameCount);

		real GetSimulationSpeed() const;
		void SetSimulationSpeed(real speed);
		void StepSimulationFrame();

		bool* GetUIWindowOpen(StringID windowNameSID);

		void ParseUIWindowCache();
		void SerializeUIWindowCache();

		static void GenerateRayAtMousePos(btVector3& outRayStart, btVector3& outRayEnd);
		static void GenerateRayAtScreenCenter(btVector3& outRayStart, btVector3& outRayEnd, real maxDist);

		// Returns the intersection point of the given ray & plane, projected on to axis
		static glm::vec3 CalculateRayPlaneIntersectionAlongAxis(
			const glm::vec3& axis,
			const glm::vec3& rayOrigin,
			const glm::vec3& rayEnd,
			const glm::vec3& planeOrigin,
			const glm::vec3& planeNorm,
			const glm::vec3& startPos,
			const glm::vec3& cameraForward,
			real& inOutOffset,
			bool recalculateOffset,
			glm::vec3& inOutPrevIntersectionPoint,
			glm::vec3* outTrueIntersectionPoint = nullptr);

		static const u32 EngineVersionMajor;
		static const u32 EngineVersionMinor;
		static const u32 EngineVersionPatch;

		// TODO: Figure out how to make this not cause a memory leak!
		static std::string s_CurrentWorkingDirectory;
		static std::string s_ExecutablePath;

		// TODO: Move to text file
		enum class SoundEffect
		{
			dud_dud_dud_dud,
			drmapan,
			blip,
			synthesized_00,
			synthesized_01,
			synthesized_02,
			synthesized_03,
			synthesized_04,
			synthesized_05,
			synthesized_06,
			synthesized_07,
			synthesized_08,
			synthesized_09,
			synthesized_10,
			synthesized_11,
			synthesized_12,
			synthesized_13,
			synthesized_14,
			melody_0,
			melody_0_fast,

			LAST_ELEMENT
		};

		static AudioSourceID GetAudioSourceID(SoundEffect effect);

		static bool s_bHasGLDebugExtension;
		u32 mainProcessID = 0;

	private:
		EventReply OnMouseButtonEvent(MouseButton button, KeyAction action);
		MouseButtonCallback<FlexEngine> m_MouseButtonCallback;

		EventReply OnKeyEvent(KeyCode keyCode, KeyAction action, i32 modifiers);
		KeyEventCallback<FlexEngine> m_KeyEventCallback;

		EventReply OnActionEvent(Action action, ActionEvent actionEvent);
		ActionCallback<FlexEngine> m_ActionCallback;

#if COMPILE_RENDERDOC_API
		void SetupRenderDocAPI();
		void CheckForRenderDocUIRunning();
		bool GetLatestRenderDocCaptureFilePath(std::string& outFilePath);
		bool ReadRenderDocSettingsFileFromDisk(std::string& dllDirPathOut);
		void SaveRenderDocSettingsFileToDisk(const std::string& dllDir);
#endif

		void Destroy();

		void CreateWindowAndRenderer();
		void InitializeWindowAndRenderer();
		void DestroyWindowAndRenderer();
		void SetupImGuiStyles();
		void DrawImGuiObjects();

		void PrintAllConsoleCommands();

		//void SelectNone();

		// Returns true if the common settings file existed and was valid
		bool LoadCommonSettingsFromDisk();
		void SaveCommonSettingsToDisk(bool bAddEditorStr);

		void AppendToBootupTimesFile(const std::string& entry);

		void ToggleUIWindow(const std::string& windowName);

		bool m_bRunning = false;

		bool m_bRenderImGui = true;
		// This value should be set to true on input callbacks
		// to ensure that m_bRenderImGui doesn't change during
		// a single frame, which would cause an uneven number of
		// window pushes/pops
		bool m_bToggleRenderImGui = false;

		bool m_bRenderEditorObjects = true;
		bool m_bUpdateProfilerFrame = false;

		const sec m_MinDT = 1.0f / 360.0f;
		const sec m_MaxDT = 1.0f;

		bool m_bSimulationPaused = false;
		bool m_bSimulateNextFrame = false;

		real m_SimulationSpeed = 1.0f;

		real m_ImGuiMainWindowWidth = 350.0f;
		real m_ImGuiMainWindowWidthMin = 200.0f;
		real m_ImGuiMainWindowWidthMax = 0.0f;

		std::string m_RendererName;
		std::string m_CompilerName;
		std::string m_CompilerVersion;

		// Indexed using SoundEffect enum
		static std::vector<AudioSourceID> s_AudioSourceIDs;

		std::string m_CommonSettingsFileName;
		std::string m_CommonSettingsAbsFilePath;

		std::string m_BootupTimesFileName;
		std::string m_BootupTimesAbsFilePath;

		std::string m_RenderDocSettingsFileName;
		std::string m_RenderDocSettingsAbsFilePath;

		std::string m_ShaderEditorPath;

		// Must be stored as member because ImGui will not make a copy
		std::string m_ImGuiIniFilepathStr;
		std::string m_ImGuiLogFilepathStr;

		Timer m_CommonSettingsSaveTimer;

		struct UIWindow
		{
			bool bOpen;
			std::string name;
		};

		// Maps hashed window names (lower case) to pair of (window name, bool storing whether the window is open)
		std::map<StringID, UIWindow> m_UIWindows;

		bool m_bWriteProfilerResultsToFile = false;

		std::vector<IFunction*> m_ConsoleCommands;
		bool m_bShowingConsole = false;
		bool m_bShowAllConsoleCommands = false;
		static const u32 MAX_CHARS_CMD_LINE_STR = 256;
		char m_CmdLineStrBuf[MAX_CHARS_CMD_LINE_STR];
		i32 m_SelectedCmdLineAutoCompleteIndex = -1;
		std::vector<std::string> m_CmdAutoCompletions;
		i32 m_PreviousCmdLineIndex = -1;
		std::vector<std::string> m_PreviousCmdLineEntries;
		bool m_bInvalidCmdLine = false;
		bool m_bShouldFocusKeyboardOnConsole = false;

		bool m_bInstallShaderDirectoryWatch = true;

		std::vector<Spring<glm::vec3>> m_TestSprings;
		real m_SpringTimer = 0.0f;

		std::vector<real> m_FrameTimes;

#if COMPILE_RENDERDOC_API
		RENDERDOC_API_1_4_0* m_RenderDocAPI = nullptr;
		bool m_bRenderDocTriggerCaptureNextFrame = false;
		bool m_bRenderDocCapturingFrame = false;
		i32 m_RenderDocUIPID = -1;
		HMODULE m_RenderDocModule = 0;
		i32 m_RenderDocAPIVerionMajor = -1;
		i32 m_RenderDocAPIVerionMinor = -1;
		i32 m_RenderDocAPIVerionPatch = -1;

		Timer m_RenderDocAPICheckTimer;
		sec m_SecSinceRenderDocPIDCheck = 0.0f;

		i32 m_RenderDocAutoCaptureFrameOffset = -1;
		i32 m_RenderDocAutoCaptureFrameCount = -1;
#endif

		// When non-zero we should override g_DeltaTime
		// Used when doing expensive operations (like scene loading)
		// to prevent massive dt values messing systems up
		i32 m_FramesToFakeDT = 3;
		sec m_FakeDT = 1.0f / 60.0f;

		Timer m_LogSaveTimer;
		Timer m_UIWindowCacheSaveTimer;

		FlexEngine(const FlexEngine&) = delete;
		FlexEngine& operator=(const FlexEngine&) = delete;
	};
} // namespace flex


text:
cask "remix-ide" do
  version "1.3.4"
  sha256 "017f862e7dc0583a2a6f162e3842f1ab1f5d9d08499962c4d577ad1a49db5630"

  url "https://github.com/ethereum/remix-desktop/releases/download/v#{version}/Remix-IDE-#{version}.dmg",
      verified: "github.com/ethereum/remix-desktop/"
  name "Remix IDE desktop"
  desc "Desktop version of Remix web IDE used for Ethereum smart contract development"
  homepage "https://remix-project.org/"

  app "Remix IDE.app"

  zap trash: [
    "~/Library/Preferences/org.ethereum.remix-ide.plist",
    "~/Library/Saved Application State/org.ethereum.remix-ide.savedState",
  ]
end


text:
#ifndef __mitkToFDistanceImageToSurfaceFilter_h
#define __mitkToFDistanceImageToSurfaceFilter_h

#include <mitkImage.h>
#include <mitkSurfaceSource.h>
#include <MitkToFProcessingExports.h>
#include <mitkToFProcessingCommon.h>
#include <mitkCameraIntrinsics.h>
#include "mitkCameraIntrinsics.h"
#include <mitkPointSet.h>
#include <cv.h>

#include <vtkSmartPointer.h>
#include <vtkIdList.h>

namespace mitk
{
  /**
  * @brief Converts a Time-of-Flight (ToF) distance image to a 3D surface using the pinhole camera model for coordinate computation.
  * The intrinsic parameters of the camera (FocalLength, PrincipalPoint, InterPixelDistance) are set via SetCameraIntrinsics(). The
  * measured distance for each pixel corresponds to the distance between the object point and the corresponding image point on the
  * image plane.
  *
  * The coordinate conversion follows the model of a common pinhole camera where the origin of the camera
  * coordinate system (world coordinates) is at the pinhole
  * \image html ../Modules/ToFProcessing/Documentation/PinholeCameraModel.png
  * The definition of the image plane and its coordinate systems (pixel and mm) is depicted in the following image
  * \image html ../Modules/ToFProcessing/Documentation/ImagePlane.png
  *
  * @ingroup SurfaceFilters
  * @ingroup ToFProcessing
  */
  class MitkToFProcessing_EXPORT ToFDistanceImageToSurfaceFilter : public SurfaceSource
  {
  public:

    mitkClassMacro( ToFDistanceImageToSurfaceFilter , SurfaceSource );
    itkFactorylessNewMacro(Self)
    itkCloneMacro(Self)

    itkSetMacro(CameraIntrinsics, mitk::CameraIntrinsics::Pointer);
    itkGetMacro(CameraIntrinsics, mitk::CameraIntrinsics::Pointer);
    itkSetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
    itkGetMacro(InterPixelDistance,ToFProcessingCommon::ToFPoint2D);
    itkSetMacro(TextureIndex,int);

    /**
     * @brief SetTriangulationThreshold Sets a triangulation threshold in order
     * to remove unusually huge faces from the surface. If this value is set,
     * the filter will check whether the distance between two neighboring vertices
     * exceeds the triangulation threshold. If yes, there vertices will not be
     * triangulated (connected with lines). The vertices will still be added to
     * the surface, but only as single point (if they have no other neighbors).
     * @param triangulationThreshold The triangulationThreshold in mm. (not mm*mm!)
     * @note vtkMath::Distance2BetweenPoints returns the squared distance
     * between two points and hence we square m_TriangulationThreshold in
     * order to save run-time.
     */
    void SetTriangulationThreshold( double triangulationThreshold );
    itkGetMacro(TriangulationThreshold, double);

    itkSetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);
    itkGetMacro(VertexIdList, vtkSmartPointer<vtkIdList>);

    itkSetMacro(GenerateTriangularMesh,bool);
    itkGetMacro(GenerateTriangularMesh,bool);

    /**
     * @brief The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and focal lenghts in pixel units  or interpixeldistances and focal length in mm. The Kinect option defines a special reconstruction mode for the kinect.
     */
    enum ReconstructionModeType{ WithOutInterPixelDistance = 1, WithInterPixelDistance = 2, Kinect = 3};

    itkSetEnumMacro(ReconstructionMode,ReconstructionModeType);
    itkGetEnumMacro(ReconstructionMode,ReconstructionModeType);
    /*!
    \brief Set scalar image used as texture of the surface.
    \param iplScalarImage OpenCV image for texturing
    */
    void SetScalarImage(IplImage* iplScalarImage);
    /*!
    \brief Set scalar image used as texture of the surface.
    \return OpenCV image for texturing
    */
    IplImage* GetScalarImage();
    /*!
    \brief Set width of the scalar image used for texturing the surface
    \param width width (x-dimension) of the texture image
    */
    void SetTextureImageWidth(int width);
    /*!
    \brief Set height of the scalar image used for texturing the surface
    \param height height (y-dimension) of the texture image
    */
    void SetTextureImageHeight(int height);

    /*!
    \brief Sets the input of this filter
    \param distanceImage input is the distance image of e.g. a ToF camera
    */
    virtual void SetInput( Image* distanceImage);

    /*!
    \brief Sets the input of this filter and the intrinsic parameters
    \param distanceImage input is the distance image of e.g. a ToF camera
    */
    virtual void SetInput( Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );

    /*!
    \brief Sets the input of this filter at idx
    \param idx number of the current input
    \param distanceImage input is the distance image of e.g. a ToF camera
    */
    virtual void SetInput(unsigned int idx,  Image* distanceImage);

    /*!
    \brief Sets the input of this filter at idx and the intrinsic parameters
    \param idx number of the current input
    \param distanceImage input is the distance image of e.g. a ToF camera
    \param cameraIntrinsics This is the camera model which holds parameters like focal length, pixel size, etc. which are needed for the reconstruction of the surface.
    */
    virtual void SetInput( unsigned int idx,  Image* distanceImage, mitk::CameraIntrinsics::Pointer cameraIntrinsics );

    /*!
    \brief Returns the input of this filter
    */
     Image* GetInput();

    /*!
    \brief Returns the input with id idx of this filter
    */
     Image* GetInput(unsigned int idx);

  protected:
    /*!
    \brief Standard constructor
    */
    ToFDistanceImageToSurfaceFilter();
    /*!
    \brief Standard destructor
    */
    ~ToFDistanceImageToSurfaceFilter();
    virtual void GenerateOutputInformation();
    /*!
    \brief Method generating the output of this filter. Called in the updated process of the pipeline.
    This method generates the output of the ToFSurfaceSource: The generated surface of the 3d points
    */
    virtual void GenerateData();
    /**
    * \brief Create an output for each input
    *
    * This Method sets the number of outputs to the number of inputs
    * and creates missing outputs objects.
    * \warning any additional outputs that exist before the method is called are deleted
    */
    void CreateOutputsForAllInputs();

    IplImage* m_IplScalarImage; ///< Scalar image used for surface texturing

    mitk::CameraIntrinsics::Pointer m_CameraIntrinsics; ///< Specifies the intrinsic parameters

    int m_TextureImageWidth; ///< Width (x-dimension) of the texture image
    int m_TextureImageHeight; ///< Height (y-dimension) of the texture image
    ToFProcessingCommon::ToFPoint2D m_InterPixelDistance; ///< distance in mm between two adjacent pixels on the ToF camera chip

    int m_TextureIndex; ///< Index of the input used as texture image when no scalar image was set via SetIplScalarImage(). 0 = Distance, 1 = Amplitude, 2 = Intensity
    bool m_GenerateTriangularMesh;

    ReconstructionModeType m_ReconstructionMode; ///< The ReconstructionModeType enum: Defines the reconstruction mode, if using no interpixeldistances and focal lenghts in pixel units  or interpixeldistances and focal length in mm. The Kinect option defines a special reconstruction mode for the kinect.

    vtkSmartPointer<vtkIdList> m_VertexIdList; ///< Make a vtkIdList to save the ID's of the polyData corresponding to the image pixel ID's. This can be accessed after generate data to obtain the mapping.

    double m_TriangulationThreshold;

  };
} //END mitk namespace
#endif


text:
function m = cell2num(C,EmptyString)
% M = CELL2NUM(C) converts a monodimensional cell array containing numeric and string
% values to a matrix containing only the numeric values. String values are converted
% to NaNs.
%
%	INPUT
%       c: Monodimensional cell to convert to a numerical matrix.
%       EmptyString: (optional) Specifies what the empty string marker is. Defaults
%       to '-';
%
%	OUTPUT
%       m: Numeric vector, values in 'c' matching 'EmptyString' are set to NaN
%
% Created by John W. Miller
% 2015-03-03
%
%   See also CELL2MAT, MAT2CELL, NUM2CELL

% Error out if there is no input argument
if nargin==0
    error(message('MATLAB:cell2mat:NoInputs'));
elseif nargin==1
    EmptyString = '-';
end

% Make sure 'C' is a column vector
if size(C,2) ~= 1
    C = C';
end

if isfloat(C)
    %warning('Matrix "c" is already a double')
    m = C;
    return
else
        % Identify the 'EmptyString' elements in 'c' which will be converted into NaNs
    n_elements = numel(C);
    nanMask = cellfun(@strcmp,C,repmat({EmptyString},n_elements,1));
    numMask = ~nanMask;
        % Assign values to 'm'
    m(nanMask,1) = NaN;
        % TODO: Fix this
    try m(numMask,1) = cellfun(@str2num,C(numMask));
    catch
        m(numMask,1) = cell2mat(C(numMask));
    end
end

end


text:
layout: about
group: about
current: about
title: Roadmap
order: 30
js: ""
---

#  {{ page.title }}

Our development priorities are highlighted using the [milestones](https://github.com/newtheatre/history-project/milestones?state=open) on the GitHub issue tracker. We used to publish a list here, but no longer do so.

The project started in April 2015 and has been incrementally improving since then.

- **April 2015** Project started, a prototype site was made live.
- **May 2015** Import and improvement of data from past data sources, including a wiki based history project.
- **June 2015** Implement alumni records.
- **September 2015** Officially launched the project, generate people pages from cast and crew lists.
- **October 2015** Implementation of SmugMug plugin, allowing images storage on the new [photos.newtheatre.org.uk](http://photos.newtheatre.org.uk/) site.
- **December 2015** Begin collecting alumni biographies, implement filters for shows by venue and season.
- **January 2016** Listing of plays and playwrights.
- **February 2016** Begin collecting alumni headshots.
- **July 2016** Begin collecting venue information.
- **September 2016** Begin collecting show anecdotes.
- **March 2017** Improvements to the history page, begin collecting show reviews, implement logic for show videos.

 Open Issues


text:
void SpriteRenderer::init() {

}

void SpriteRenderer::terminate() {

}

void SpriteRenderer::render(oak::graphics::Api *api) {

	static oak::graphics::Api::State state;
	state.viewport = oak::graphics::View{ pipeline_->x, pipeline_->y, pipeline_->width, pipeline_->height };
	state.blendMode = oak::graphics::BlendMode::NORMAL;

	api->setState(state);

	for (const auto& batch : *pipeline_->batches[1]) {
		api->draw(batch);
	}

	oak::graphics::GLVertexArray::unbind();
}


text:
package hydrate

import (
	"kpt.dev/configsync/pkg/core"
	"kpt.dev/configsync/pkg/metadata"
	"kpt.dev/configsync/pkg/status"
	"kpt.dev/configsync/pkg/validate/objects"
)

// ClusterName annotates the given Raw objects with the name of the current
// cluster.
func ClusterName(objs *objects.Raw) status.MultiError {
	if objs.ClusterName == "" {
		return nil
	}
	for _, obj := range objs.Objects {
		core.Annotation(metadata.ClusterNameAnnotationKey, objs.ClusterName)(obj)
	}
	return nil
}


text:
function Balancer(options) {

    this.auth = options.auth;
    this.connectTimeout = options.connectTimeout;
    this.parseValues = options.parseValues;
    this.nodes = options.nodes;
    this.index = -1;
}

Balancer.prototype.next = function () {

    ++this.index;
    if (this.index >= this.nodes.length) {
        this.index = 0;
    }

    return {
        host: this.nodes[this.index].host,
        port: this.nodes[this.index].port,
        connectTimeout: this.connectTimeout,
        parseValues: this.parseValues,
        auth: this.auth
    };
};

module.exports = Balancer;


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Get Next Music</title>

    <link href="/static/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <link href="/static/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
    <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">

    <link href="/static/css/grayscale.css" rel="stylesheet">

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
                    Menu
                </button>

                     GET NEXT MUSIC

                        About

                        Download

                        Contact

                        Find us

Get Next Music

A free, new way to share your music

Enjoy your freedom !

About Get Next Music

Get Next Music is a free software. It can be yours right now, simply download the software on the download section.

The software is open source, and you can use it for any purpose, personal or commercial.

GetNextMusic includes blah blah blah

I am not good to find comercial text and such ;)

Download GETNEXTMUSIC

You can download GetNextMusic for free

                     Mac
                     Windows
                     Linux

Contact GetNextMusic

Feel free to email us to provide some feedback on our software, give us suggestions for new ideas and stuff, or to just say hello!

contact@getnextmusic.com

                         No Twitter

                         No Facebook

                         No Instagram

Copyright © GetNextMusic


text:
module PathMapper
  module Node
    module File
      module Erb
        include Dir::Erb

        def erb_options=(options)
          @erb_options = options
        end

        def erb(script)
          ERB.new(script).result(OpenStruct.new(self.erb_options).instance_eval { binding })
        rescue Exception => e
          raise NetStatus::Exception, { code: :erb_error, data: { error: "#{e.backtrace.first.sub! '(erb)', self.path.to_s}: #{e.message}" } }
        end

        def value
          if self.name.end_with?('.erb')
            self.erb(super)
          else
            super
          end
        end
      end
    end
  end
end


text:
define(['backbone', 'underscore'],
       function(Backbone, _) {
  'use strict';
  // Promenade.Collection.Subset API
  // ------------------------------

  var SubsetApi = {

    configure: function(options) {
      this._prototype = this.constructor.prototype;

      this.url = options.url || this.url;
      this.superset = options.superset;
      this.iterator = options.iterator;
      this.alwaysRefresh = options.alwaysRefresh === true;
      this.dependencies = options.dependencies || [];

      this._connection = null;
      this._connectionStack = [];
      this._connectionMap = {};

      this.cid = _.uniqueId();
    },

    connect: function() {
      var connection = this._makeConnection();

      this._connectionMap[connection.id] = connection;
      this._connectionStack.push(connection.id);

      this._connectToSuperset();

      return connection;
    },

    release: function(connection) {
      connection = connection && this._connectionMap[connection.id];

      if (!connection) {
        return;
      }

      this._connectionMap[connection.id] = null;
      this._connectionStack.pop();

      if (!this._connectionStack.length) {
        this._disconnectFromSuperset();
      }
    },

    hasRootSuperset: function() {
      return !!(this.superset && !this.superset.superset);
    },

    isConnected: function() {
      return !!this._connection;
    },

    connectionCount: function() {
      return this._connectionStack.length;
    },

    refresh: function() {
      var index = 0;
      var model;

      while (index < this.length) {
        model = this.at(index);

        if (!this.iterator(model, index)) {
          this._prototype.remove.call(this, model, {
            operateOnSubset: true
          });
          continue;
        }

        ++index;
      }

      this._prototype.add.call(this, this.superset.filter(this.iterator), {
        operateOnSubset: true,
        sort: false
      });
    },

    _connectToSuperset: function() {
      var resource;
      var index;
      var length;

      // The ``'add'``, ``'remove'`` and ``'reset'`` events are listened to by
      // the ``subset`` on the superset ``Collection`` instance so that changes
      // to the superset are reflected automatically in the ``subset``.
      // When a ``subset`` is no longer being used, ``stopListening`` should
      // be called on it so that the automatically created listeners are cleaned
      // up.
      if (this.superset && !this.isConnected()) {
        this.listenTo(this.superset, 'add', this._onSupersetAdd);
        this.listenTo(this.superset, 'remove', this._onSupersetRemove);
        this.listenTo(this.superset, 'reset', this._onSupersetReset);
        this.listenTo(this.superset, 'change', this._onSupersetChange);
        this.listenTo(this.superset, 'sort', this._onSupersetSort);
        this.listenTo(this.superset, 'sync', this._onSupersetSync);
        this.listenTo(this.superset, 'resource', this._onSupersetChange);

        for (index = 0, length = this.dependencies.length; index < length; ++index) {
          resource = this.app.getResource(this.dependencies[index]);

          if (!resource) {
            continue;
          }

          this.listenTo(resource,
                        'add remove reset change sort', this.refresh);
        }

        this.refresh();

        this._connection = true;

        if (!this.hasRootSuperset()) {
          this._connection = this.retains(this.superset);
        }
      }

      return this;
    },

    _disconnectFromSuperset: function() {
      var resource;
      var index;
      var length;

      if (this.superset && this.isConnected()) {
        this.stopListening(this.superset);

        for (index = 0, length = this.dependencies.length; index < length; ++index) {
          resource = this.app.getResource(this.dependencies[index]);

          if (!resource) {
            continue;
          }

          this.stopListening(resource);
        }

        this.reset(null, { silent: true });

        if (_.isObject(this._connection)) {
          this._connection.release();
        }

        this._connection = false;
      }

      return this;
    },

    _makeConnection: function() {
      var subset = this;
      var connection = {
        id: _.uniqueId(),
        release: function() {
          subset.release(connection);
        }
      };

      return connection;
    },

    _onSupersetAdd: function(model) {
      if (this.alwaysRefresh) {
        return this.refresh();
      }

      if (!this.iterator(model)) {
        return;
      }

      this._prototype.add.call(this, model, {
        operateOnSubset: true
      });
    },

    _onSupersetRemove: function(model) {
      if (this.alwaysRefresh) {
        return this.refresh();
      }

      this._prototype.remove.call(this, model, {
        operateOnSubset: true
      });
    },

    _onSupersetReset: function() {
      if (this.alwaysRefresh) {
        return this.refresh();
      }

      this._prototype.reset.call(this, null, {
        operateOnSubset: true
      });
    },

    _onSupersetChange: function(model) {
      if (this.alwaysRefresh) {
        return this.refresh();
      }

      if (!this.iterator(model)) {
        return this._onSupersetRemove(model);
      }

      this._prototype.add.call(this, model, {
        operateOnSubset: true
      });
    },

    _onSupersetSort: function(superset, options) {
      if (options && options.sortSubsets === false) {
        return;
      }

      this.sort(options);
    },

    _onSupersetSync: function(model, resp, options) {
      if (options.originatingSubset !== this) {
        return;
      }

      this.trigger('sync', this, resp, options);
    },

    set: function(models, options) {
      if (options && options.operateOnSubset) {
        return this._prototype.set.apply(this, arguments);
      }

      return this.superset.set.call(this.superset, arguments);
    }
  };

  _.each(['toJSON', 'toArray'], function(method) {
    SubsetApi[method] = function() {
      var result;

      if (this.isConnected()) {
        return this._prototype[method].apply(this, arguments);
      }

      this._connectToSuperset();

      result = this._prototype[method].apply(this, arguments);

      this._disconnectFromSuperset();

      return result;
    };
  });

  // When a ``superset`` is assigned to a ``SubsetCollection`` instance, any
  // in-place manipulation of the ``SubsetCollection`` instance is redirected to
  // the ``superset``. Changes will automatically reflect in the
  // ``SubsetCollection`` as events propagate.
  _.each(['add', 'remove'], function(method) {
    SubsetApi[method] = function() {
      if (this.superset) {
        return this.superset[method].apply(this.superset, arguments);
      }
    };
  });

  _.each(['create', 'fetch', 'save'], function(method) {
    SubsetApi[method] = function(options) {
      var self = this;
      var error;
      var success;

      if (this.superset) {
        options = options || {};
        options.url = _.result(this, 'url');

        error = options.error;
        success = options.success;

        options.error = function() {
          self._popSync();
          if (error) {
            error.apply(this, arguments);
          }
        };

        options.success = function() {
          self._popSync();
          self._synced = true;
          if (success) {
            success.apply(this, arguments);
          }
        };

        options.originatingSubset = this;

        this._resetSyncState();
        this._pushSync();

        return this.superset[method].call(this.superset, options);
      }
    };
  });

  return SubsetApi;
});


text:
package models

import (
	"errors"
	"fmt"
	"reflect"
	"strings"
	"time"

	"github.com/astaxie/beego/orm"
)

type PmpRequestLog struct {
	Id           int       `orm:"column(id);auto"`
	AdDate       time.Time `orm:"column(ad_date);type(date);null"`
	PmpAdspaceId int       `orm:"column(pmp_adspace_id);null"`
	Bid          string    `orm:"column(bid);size(50);null"`
	RequestTime  time.Time `orm:"column(request_time);type(timestamp);null"`
	Os           int       `orm:"column(os);null"`
	Pkgname      string    `orm:"column(pkgname);size(50);null"`
	Uid          string    `orm:"column(uid);size(30);null"`
	Ip           string    `orm:"column(ip);size(20);null"`
	ProvinceCode string    `orm:"column(province_code);size(45);null"`
	CityCode     string    `orm:"column(city_code);size(45);null"`
	IdType       int       `orm:"column(id_type);null"`
	StatusCode   int       `orm:"column(status_code)"`
	Ua           string    `orm:"column(ua);size(255)"`
}

func (t *PmpRequestLog) TableName() string {
	return "pmp_request_log"
}

func init() {
	orm.RegisterModel(new(PmpRequestLog))
}

// AddPmpRequestLog insert a new PmpRequestLog into database and returns
// last inserted Id on success.
func AddPmpRequestLog(m *PmpRequestLog) (id int64, err error) {
	o := orm.NewOrm()
	id, err = o.Insert(m)
	return
}

// GetPmpRequestLogById retrieves PmpRequestLog by Id. Returns error if
// Id doesn't exist
func GetPmpRequestLogById(id int) (v *PmpRequestLog, err error) {
	o := orm.NewOrm()
	v = &PmpRequestLog{Id: id}
	if err = o.Read(v); err == nil {
		return v, nil
	}
	return nil, err
}

// GetAllPmpRequestLog retrieves all PmpRequestLog matches certain condition. Returns empty list if
// no records exist
func GetAllPmpRequestLog(query map[string]string, fields []string, sortby []string, order []string,
	offset int64, limit int64) (ml []interface{}, err error) {
	o := orm.NewOrm()
	qs := o.QueryTable(new(PmpRequestLog))
	// query k=v
	for k, v := range query {
		// rewrite dot-notation to Object__Attribute
		k = strings.Replace(k, ".", "__", -1)
		qs = qs.Filter(k, v)
	}
	// order by:
	var sortFields []string
	if len(sortby) != 0 {
		if len(sortby) == len(order) {
			// 1) for each sort field, there is an associated order
			for i, v := range sortby {
				orderby := ""
				if order[i] == "desc" {
					orderby = "-" + v
				} else if order[i] == "asc" {
					orderby = v
				} else {
					return nil, errors.New("Error: Invalid order. Must be either [asc|desc]")
				}
				sortFields = append(sortFields, orderby)
			}
			qs = qs.OrderBy(sortFields...)
		} else if len(sortby) != len(order) && len(order) == 1 {
			// 2) there is exactly one order, all the sorted fields will be sorted by this order
			for _, v := range sortby {
				orderby := ""
				if order[0] == "desc" {
					orderby = "-" + v
				} else if order[0] == "asc" {
					orderby = v
				} else {
					return nil, errors.New("Error: Invalid order. Must be either [asc|desc]")
				}
				sortFields = append(sortFields, orderby)
			}
		} else if len(sortby) != len(order) && len(order) != 1 {
			return nil, errors.New("Error: 'sortby', 'order' sizes mismatch or 'order' size is not 1")
		}
	} else {
		if len(order) != 0 {
			return nil, errors.New("Error: unused 'order' fields")
		}
	}

	var l []PmpRequestLog
	qs = qs.OrderBy(sortFields...)
	if _, err := qs.Limit(limit, offset).All(&l, fields...); err == nil {
		if len(fields) == 0 {
			for _, v := range l {
				ml = append(ml, v)
			}
		} else {
			// trim unused fields
			for _, v := range l {
				m := make(map[string]interface{})
				val := reflect.ValueOf(v)
				for _, fname := range fields {
					m[fname] = val.FieldByName(fname).Interface()
				}
				ml = append(ml, m)
			}
		}
		return ml, nil
	}
	return nil, err
}

// UpdatePmpRequestLog updates PmpRequestLog by Id and returns error if
// the record to be updated doesn't exist
func UpdatePmpRequestLogById(m *PmpRequestLog) (err error) {
	o := orm.NewOrm()
	v := PmpRequestLog{Id: m.Id}
	// ascertain id exists in the database
	if err = o.Read(&v); err == nil {
		var num int64
		if num, err = o.Update(m); err == nil {
			fmt.Println("Number of records updated in database:", num)
		}
	}
	return
}

// DeletePmpRequestLog deletes PmpRequestLog by Id and returns error if
// the record to be deleted doesn't exist
func DeletePmpRequestLog(id int) (err error) {
	o := orm.NewOrm()
	v := PmpRequestLog{Id: id}
	// ascertain id exists in the database
	if err = o.Read(&v); err == nil {
		var num int64
		if num, err = o.Delete(&PmpRequestLog{Id: id}); err == nil {
			fmt.Println("Number of records deleted in database:", num)
		}
	}
	return
}


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme"
        parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/primary</item>
        <item name="colorPrimaryDark">@color/primaryDark</item>
        <item name="colorAccent">@color/accent</item>
    </style>

    <style name="AppFullscreenDialog"
        parent="AppTheme">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:colorBackgroundCacheHint">@null</item>
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowAnimationStyle">@android:style/Animation</item>
    </style>

</resources>


text:
@extends('front.layout')
@section('content')
@include('front.index.stages_obj')
@yield('stageObj')

phone }}" class="top-phone-link">{{ $contacts->phone }}

О КОМПЛЕКСЕ

ГАЛЕРЕЯ

                    {{--
КВАРТИРЫ
--}}

КОНТАКТЫ

{{ $contacts->phone }}

                Заказать звонок

            {{--
{!! $main_block->block_title !!}

                    @foreach($main_block_flats as $item)

{{ $item['name'] }} квартиры

                                ОТ
                                {{ number_format($item['min_price'], 0, ',', ' ') }}
                                d

                    @endforeach

                @foreach($main_block_flats as $item)

{{ $item['name'] }} квартиры

                                ОТ
                                {{ number_format($item['min_price'], 0, ',', ' ') }}
                                d

                @endforeach

--}}

                {{----}}

{{ $main_block->block_1_title }}

{{ $main_block->block_1_subtitle }}

{{--
ПОДРОБНАЯ ИНФОРМАЦИЯ
 ОБ АКЦИИ В ОТДЕЛЕ ПРОДАЖ
--}}

            {{--

до 18%

Скидки

на 3- и 4-комнатные квартиры

--}}

                {{----}}

{{ $main_block->block_2_title }}

{{ $main_block->block_2_subtitle }}

                Узнать подробнее

{{ $about->block_title }}

{!! $about->text !!}

                {{--<address class="text-col__address">{!! $about->address !!}</address>

                --}}

Когда
все дороги
ведут
в центр!

ПРЕИМУЩЕСТВА В ДЕТАЛЯХ

{!! $about->title3 !!}

{!! $about->text3 !!}

{!! $about->title1 !!}

{!! $about->text1 !!}

{!! $about->title2 !!}

{!! $about->text2 !!}

{!! $about->title6 !!}

{!! $about->text6 !!}

{!! $about->title4 !!}

{!! $about->text4 !!}

{!! $about->title5 !!}

{!! $about->text5 !!}

{!! $about->title1 !!}

{!! $about->text1 !!}

{!! $about->title2 !!}

{!! $about->text2 !!}

{!! $about->title3 !!}

{!! $about->text3 !!}

{!! $about->title4 !!}

{!! $about->text4 !!}

{!! $about->title5 !!}

{!! $about->text5 !!}

{!! $about->title6 !!}

{!! $about->text6 !!}

{{ $gallery->block_title }}

                    <?php $slider_arr = [] ?>
                    @foreach($gallery->slider_group as $slide)
                        slide->link}}?{{$slide->slide->cache_index}}">
                        <?php $slider_arr[] = $slide->slide->link.'?'.$slide->slide->cache_index ?>
                    @endforeach

                @for($i = 0; $i < 9, isset($slider_arr[$i]); $i++)

                @endfor
                @foreach($stages->dom_stages_group as $stage)
                    @if($stage->show == 1)
                        @foreach($stage->stage_images_group as $stage_img)
                            stage_photo->link}}?{{$stage_img->stage_photo->cache_index}}" alt="">
                        @endforeach
                    @endif
                    @break
                @endforeach

{{ $stages->block_title }}

                    @foreach($stages->dom_stages_group as $stage)
                        @if($stage->show == 1)
                            <button class="stages__btn js_stage_btn" id="{{$stage->id}}">{{$stage->dom_stages_name}}</button>
                        @endif
                    @endforeach

Вам понравился
ЖК Центральный?

Оставьте ваши контакты, и наши менеджеры ответят на все ваши вопросы.

                <input type="hidden" name="form" class="form-input" value="call">

                        Имя
                        <input type="text" name="client_name" required class="form-row__input form-input feedbacks-input__input">

Как к вам обращаться

                        +7
                        <input type="tel" class="form-row__input form-input feedbacks-input__input" maxlength="25" data-mask="(000) 000-00-00" name="phone">

Телефонный номер для связи

                    <input type="submit" value="Перезвонить мне" class="feedbacks__btn form-row__send-form button send-form">

    {{--
dollar}}">

{{ $flats->block_title }}

ВЫБЕРИТЕ КОЛИЧЕСТВО КОМНАТ

                                @foreach($flats->dom_flat_group as $item)

<button class="layout-choice__button js_rooms_btn" data-id="flat{{$item->id}}" data-singularly="{{$item->singularly}}">{{$item->dom_flat_name}}</button>

                                @endforeach

ВЫБЕРИТЕ ПЛОЩАДЬ

                                @foreach($flats->dom_flat_group as $item)
                                    @foreach($item->layout_group as $layout_item)

                                            <button class="layout-choice__button js_area_btn layout-choice__button--area flat{{$layout_item->superior_item->id}}"
                                                    data-img="{{$layout_item->layout_scheme->link}}?{{$layout_item->layout_scheme->cache_index}}"
                                                    data-area="{{$layout_item->area}}" data-cost="{{$layout_item->meter_cost}}"
                                                    data-cost-in-tg="{{$layout_item->meter_in_tg}}"
                                                    data-discount-cost="{{$layout_item->discount}}"
                                                    data-info="{{$layout_item->info}}">{{$layout_item->area}} м2
                                            </button>

                                    @endforeach
                                @endforeach

СТОИМОСТЬ КВАРТИРЫ ОТ:

НОВАЯ ЦЕНА:

{{$flats->discount_text}}

                                Смотреть в 3D

м2

СТОИМОСТЬ КВАРТИРЫ ОТ:

НОВАЯ ЦЕНА:

{{$flats->discount_text}}

Понравилась планировка?

Свяжитесь с нашим менеджером и обсудите все детали.

                    <input type="hidden" name="form" class="form-input" value="call">

                            Имя
                            <input type="text" name="client_name" required class="form-row__input form-input feedbacks-input__input feedbacks-input__input--flats">

                            +7
                            <input type="tel" class="form-row__input form-input feedbacks-input__input feedbacks-input__input--flats" data-mask="(000) 000-00-00" maxlength="25" name="phone">

                        <input type="submit" value="Перезвонить мне" class="form-row__send-form form-row__send-form--flats send-form">

--}}

{{ $contacts->block_title }}

{{ $contacts->phone }}

{!! $contacts->address !!}

    @include('front.index.meta')
@endsection


text:
var spawn = require('child_process').spawn;
var waitOn = require('wait-on');

var target = process.argv[2];

var waitOpts = {
  resources: [target],
  timeout: 60000
};

waitOn(waitOpts, function(err) {
  if (err) {
    console.error('home-inspector failed to wait on ' + target);
    process.exit(1);
  } else {
    console.log('Running home-inspector');
    var child = spawn('casperjs', ['test', '/usr/src/home-inspector/lib/links.js', '--target=' + target], {
      stdio: 'inherit'
    });

    child.on('exit', process.exit);

    process.on('SIGINT', function() {
      if (child) {
        child.kill();
      }
      process.kill();
    });
  }
});


text:
@interface WKWorldView : UIView

@end