text:
class Mageo::Tetrahedron

  class InitializeError < Exception; end

  VERTEX_INDICES_OF_TRIANGLES = [ [ 0, 1, 2 ], [ 1, 2, 3 ], [ 2, 3, 0 ], [ 3, 0, 1 ] ]

  attr_reader :vertices

  class TypeError < StandardError; end
  class NotImplementError < StandardError; end

  def edges
    results = []
    triangles.each do |triangle|
      triangle.edges.each do |edge|
        results << edge unless results.include_eql?(edge)
      end
    end
    return results
  end

  def triangles
    results = VERTEX_INDICES_OF_TRIANGLES.map do |indices|
      Mageo::Triangle.new( *(indices.map{|i| @vertices[i] }) )
    end
    return results
  end

  #面で囲まれた空間の中にあれば true を返す。
  def inside?( pos )
    raise TypeError if pos.class == Mageo::Vector3DInternal

    result = true
    triangles.each do |triangle|
      result = false unless triangle.same_side?( center, pos.to_v3d )
    end
    return result
  end

  def include?(pos, tolerance = 0.0)
    raise TypeError if pos.class == Mageo::Vector3DInternal

    return true if inside?( pos )
    triangles.each do |triangle|
      #pp pos
      #pp triangle
      return true if triangle.include?(pos.to_v3d, tolerance)
    end
    return false
  end

  #各頂点の座標の平均値を返す。
  def center
    tmp = Mageo::Vector3D[ 0.0, 0.0, 0.0 ]
    @vertices.each do |vertex|
      tmp += vertex
    end
    return tmp * ( 1.0 / @vertices.size.to_f ) # 座標の平均の算出
  end

  def translate!(vector)
    @vertices.map! do |pos|
      pos + vector
    end
  end

  def translate(vector)
    result = Marshal.load(Marshal.dump(self))
    result.translate! vector
    result
  end

  def shared_vertices(other, tolerance = 0.0)
    results = []
    @vertices.each do |sv|
      flag = false
      other.vertices.each do |ov|
        flag = true if (ov - sv).r <= tolerance
      end
      results << sv if flag
    end
    results
  end

  #private

  #def vertices_include?(vertex, vertices, tolerance)
  #end

  ## v0, v1, v2, v3 are 四面体の頂点
  def initialize( v0, v1, v2, v3 )
    #raise InitializeError if vertices.class != Array
    #raise InitializeError if vertices.size != 4
    #vertices.each do |vertex|
    #  raise InitializeError if vertex.size != 3
    #  raise InitializeError unless vertex.methods.include?( :[] )
    #  raise InitializeError unless vertex.methods.include?( :map )
    #end
    #@vertices = vertices.map { |vertex| vertex.to_v3d }
    vertices = [v0, v1, v2, v3]
    vertices.each do |vertex|
      raise InitializeError if vertex.class == Mageo::Vector3DInternal
    end

    @vertices = vertices.map {|v| v.to_v3d}

    raise InitializeError, "volume is zero." if volume == 0.0
  end

  # 体積を返す
  def volume
    result = 0.0
    [ [ 0, 1, 2 ], [ 1, 2, 3 ], [ 2, 3, 0 ], [ 3, 0, 1 ] ].each do |tri_vertices|
      vectors =  tri_vertices.map { |i| @vertices[i] - center }
      volume = Mageo::Vector3D.scalar_triple_product( *vectors ).abs
      volume /= 6.0
      result += volume
    end
    return result
  end

end


text:
<?php

namespace OPNsense\TrafficShaper;

use Phalcon\Messages\Message;
use OPNsense\Base\BaseModel;

/**
 * Class TrafficShaper
 * @package OPNsense\TrafficShaper
 */
class TrafficShaper extends BaseModel
{
    /**
     * {@inheritdoc}
     */
    public function performValidation($validateFullModel = false)
    {
        // standard model validations
        $max_bandwidth = 4294967295; // bps
        $messages = parent::performValidation($validateFullModel);
        $all_nodes = $this->getFlatNodes();
        foreach ($all_nodes as $key => $node) {
            if ($validateFullModel || $node->isFieldChanged()) {
                $parentNode = $node->getParentNode();
                if (in_array($node->getInternalXMLTagName(), ['bandwidth', 'bandwidthMetric'])) {
                    $currentval = (int)(string)$parentNode->bandwidth;
                    $maximumval = $max_bandwidth;
                    if ($parentNode->bandwidthMetric == "Kbit") {
                        $maximumval /= 1000;
                    } elseif ($parentNode->bandwidthMetric == "Mbit") {
                        $maximumval /= 1000000;
                    } elseif ($parentNode->bandwidthMetric == "Gbit") {
                        $maximumval /= 1000000000;
                    }
                    if ($currentval > $maximumval) {
                        $messages->appendMessage(new Message(
                            sprintf(
                                gettext('%d %s/s exceeds the maximum bandwidth of %d %s/s.'),
                                $currentval,
                                $parentNode->bandwidthMetric,
                                $maximumval,
                                $parentNode->bandwidthMetric
                            ),
                            $key
                        ));
                    }
                }
            }
        }
        return $messages;
    }

    /**
     * generate new Id by filling a gap or add 1 to the last
     * @param int $startAt start search at number
     * @param array $allIds all reserved id's
     * @return int next number
     */
    private function generateNewId($startAt, $allIds)
    {
        $newId = $startAt;
        for ($i = 0; $i < count($allIds); ++$i) {
            if ($allIds[$i] > $newId && isset($allIds[$i + 1])) {
                if ($allIds[$i + 1] - $allIds[$i] > 1) {
                    // gap found
                    $newId = $allIds[$i] + 1;
                    break;
                }
            } elseif ($allIds[$i] >= $newId) {
                // last item is higher than target
                $newId = $allIds[$i] + 1;
            }
        }

        return $newId;
    }

    /**
     * Generate a new pipe number
     * The first 10000 id's are automatically reserved for internal usage.
     * @param null $pipenr new pipe number
     * @return ArrayField
     */
    public function newPipeNumber()
    {
        $allpipes = array();
        foreach ($this->pipes->pipe->iterateItems() as $pipe) {
            $allpipes[] = (string)$pipe->number;
        }
        sort($allpipes);
        return $this->generateNewId(10000, $allpipes);
    }

    /**
     * Generate a new queue number
     * The first 10000 id's are automatically reserved for internal usage.
     * @param null $queuenr new queue number
     * @return ArrayField
     */
    public function newQueueNumber()
    {
        $allqueues = array();
        foreach ($this->queues->queue->iterateItems() as $queue) {
            $allqueues[] = (string)$queue->number;
        }
        sort($allqueues);
        return $this->generateNewId(10000, $allqueues);
    }

    /**
     * retrieve last generated rule sequence number
     */
    public function getMaxRuleSequence()
    {
        $seq = 0;
        foreach ($this->rules->rule->iterateItems() as $rule) {
            if ((string)$rule->sequence > $seq) {
                $seq = (string)$rule->sequence;
            }
        }

        return $seq;
    }

    /**
     * return whether the shaper is currently in use
     */
    public function isEnabled()
    {
        foreach ($this->pipes->pipe->iterateItems() as $item) {
            if ((string)$item->enabled == '1') {
                return true;
            }
        }
        return false;
    }
}

redpajama_set_name: RedPajamaGithub


text:
'''

    Copyright 2013 Joe Harris

    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.

'''

'''

    Set development mode for a zone. See:

    http://www.cloudflare.com/docs/client-api.html#s4.3

'''

from txcloudflare.request import HttpRequest
from txcloudflare.errors import RequestValidationException

class SetDeveloperModeRequest(HttpRequest):

    ACTION = 'devmode'
    METHOD = 'POST'
    REQUIRED_PARAMS = {
        'z': str,
        'v': bool,
    }
    OPTIONAL_PARAMS = {}
    PARAM_MAP = {
        'zone': 'z',
        'on': 'v',
    }

    def pre_process(self, params):
        params['v'] = 1 if params.get('v', False) else 0
        return params

    def post_process(self, data):
        return data.get('zone', {}).get('obj', {})

api_request = SetDeveloperModeRequest

'''

    EOF

'''


text:
import Ember from 'ember';

export default Ember.Controller.extend({
  multiSelect: false,
  buttons: [
    {
      index: 0,
      label: 'Option 1',
      action: 'select',
      selected: true,
      prepIcon: 'fa:hand-o-right'
    },
    {
      index: 1,
      label: 'Option 2',
      action: 'select',
      selected: false,
      prepIcon: 'fa:hand-o-right'
    },
    {
      index: 2,
      label: 'Option 3',
      action: 'select',
      selected: false,
      prepIcon: 'fa:hand-o-right'
    },
    {
      index: 3,
      label: 'Disabled Option',
      action: 'select',
      disabled: true,
      selected: false,
      prepIcon: 'fa:hand-o-right'
    }
  ],
  message: null,
  updateMessage: function() {
    let indexes = '';
    let buttons = this.get('buttons');
    let max = buttons.length - 1;
    buttons.forEach(function(button) {
      if (button.selected === true) {
        indexes += button.index;
        indexes += ', ';
      }
    });
    indexes = indexes.slice(0, -2);
    this.set('message', 'Selected indexes: ' + indexes);
  }.on('init'),
  actions: {
    select: function(btnIndex) {
      this.updateMessage();
    }
  }
});


text:
#include "ParticleTest.h"
#include "OgreParticleSystem.h"

ParticleTest::ParticleTest()
{
    mInfo["Title"] = "VTests_Particles";
    mInfo["Description"] = "Tests basic particle system functionality.";
    // take screenshot early, when emitters are just beginning
    addScreenshotFrame(35);
    // and another after particles have died, extra emitters emitted, etc
    addScreenshotFrame(500);
}
//---------------------------------------------------------------------------

void ParticleTest::setupContent()
{
    // create a bunch of random particle systems
    Ogre::ParticleSystem* ps = mSceneMgr->createParticleSystem("Fireworks", "Examples/Fireworks");
    mSceneMgr->getRootSceneNode()->attachObject(ps);

    // Multiple systems didn't seem to stay deterministic... (in gcc at least...)
    //ps = mSceneMgr->createParticleSystem("Fountain", "Examples/PurpleFountain");
    //mSceneMgr->getRootSceneNode()->attachObject(ps);
    //ps = mSceneMgr->createParticleSystem("Nimbus", "Examples/GreenyNimbus");
    //mSceneMgr->getRootSceneNode()->createChildSceneNode(Vector3(150, 0, 0))->attachObject(ps);
    //ps = mSceneMgr->createParticleSystem("Nimbus2", "Examples/GreenyNimbus");
    //mSceneMgr->getRootSceneNode()->createChildSceneNode(Vector3(-150, 0, 0))->attachObject(ps);
    mCameraNode->setPosition(0,150,500);
}
//-----------------------------------------------------------------------


text:
package com.alibaba.jstorm.cache.rocksdb;

import org.rocksdb.*;
import org.rocksdb.util.SizeUnit;

public interface RocksDbOptionsFactory {
    public Options createOptions(Options currentOptions);

    public DBOptions createDbOptions(DBOptions currentOptions);

    public ColumnFamilyOptions createColumnFamilyOptions(ColumnFamilyOptions currentOptions);

    public class Defaults implements RocksDbOptionsFactory {
        private static final int DEFAULT_BLOOM_FILTER_BITS = 10;

        @Override
        public Options createOptions(Options currentOptions) {
            if (currentOptions == null)
                currentOptions = new Options();
            currentOptions.setCreateIfMissing(true);
            currentOptions.setCreateMissingColumnFamilies(true);
            currentOptions.setMergeOperator(new StringAppendOperator());

            BlockBasedTableConfig tableOptions = new BlockBasedTableConfig();
            tableOptions.setBlockSize(32 * SizeUnit.KB);

            // Set memory table size
            currentOptions.setMaxWriteBufferNumber(4);
            currentOptions.setWriteBufferSize(64 * SizeUnit.MB);

            // Set block cache size
            tableOptions.setBlockCacheSize(64 * SizeUnit.MB);
            tableOptions.setFilter(new BloomFilter(DEFAULT_BLOOM_FILTER_BITS, false));
            // Put all index into block cache
            tableOptions.setCacheIndexAndFilterBlocks(true);

            /*
            tableOptions.setIndexType(IndexType.kHashSearch);
            tableOptions.setWholeKeyFiltering(false);
            currentOptions.setMemTableConfig(new HashLinkedListMemTableConfig());
            currentOptions.useFixedLengthPrefixExtractor(Integer.SIZE / Byte.SIZE * 2);
            currentOptions.setMemtablePrefixBloomBits(10000000);
            currentOptions.setMemtablePrefixBloomProbes(6);
            */

            currentOptions.setTableFormatConfig(tableOptions);

            //currentOptions.setStatsDumpPeriodSec(300);
            //currentOptions.createStatistics();

            currentOptions.setTargetFileSizeBase(64 * SizeUnit.MB);
            currentOptions.setAllowOsBuffer(true);
            currentOptions.setMaxOpenFiles(-1);
            currentOptions.setMaxBackgroundFlushes(2);
            currentOptions.setMaxBackgroundCompactions(2);
            currentOptions.setCompactionStyle(CompactionStyle.LEVEL);
            currentOptions.setLevelZeroFileNumCompactionTrigger(4);
            currentOptions.setLevelZeroSlowdownWritesTrigger(20);
            currentOptions.setLevelZeroStopWritesTrigger(30);
            currentOptions.setNumLevels(4);
            currentOptions.setMaxBytesForLevelBase(64 * 4 * SizeUnit.MB);
            currentOptions.setAllowOsBuffer(false);
            return currentOptions;
        }

        @Override
        public DBOptions createDbOptions(DBOptions currentOptions) {
            if (currentOptions == null)
                currentOptions = new DBOptions();
            currentOptions.setCreateIfMissing(true);
            currentOptions.setCreateMissingColumnFamilies(true);
            //currentOptions.setMemTableConfig(new HashLinkedListMemTableConfig());
            //currentOptions.setStatsDumpPeriodSec(300);
            //currentOptions.createStatistics();
            currentOptions.setAllowOsBuffer(true);
            currentOptions.setMaxOpenFiles(-1);
            currentOptions.setMaxBackgroundFlushes(2);
            currentOptions.setMaxBackgroundCompactions(2);
            currentOptions.setAllowOsBuffer(false);
            return currentOptions;
        }

        @Override
        public ColumnFamilyOptions createColumnFamilyOptions(ColumnFamilyOptions currentOptions) {
            if (currentOptions == null)
                currentOptions = new ColumnFamilyOptions();
            currentOptions.setMergeOperator(new StringAppendOperator());

            BlockBasedTableConfig tableOptions = new BlockBasedTableConfig();
            tableOptions.setBlockSize(32 * SizeUnit.KB);

            // Set memory table size
            currentOptions.setMaxWriteBufferNumber(4);
            currentOptions.setWriteBufferSize(64 * SizeUnit.MB);

            // Set block cache size
            tableOptions.setBlockCacheSize(64 * SizeUnit.MB);
            tableOptions.setFilter(new BloomFilter(DEFAULT_BLOOM_FILTER_BITS, false));
            // Put all index into block cache
            tableOptions.setCacheIndexAndFilterBlocks(true);
            /*
            tableOptions.setIndexType(IndexType.kHashSearch);
            tableOptions.setWholeKeyFiltering(false);*/

            /*
            currentOptions.useFixedLengthPrefixExtractor(Integer.SIZE / Byte.SIZE * 2);
            currentOptions.setMemtablePrefixBloomBits(10000000);
            currentOptions.setMemtablePrefixBloomProbes(6);
            */

            currentOptions.setTableFormatConfig(tableOptions);

            currentOptions.setTargetFileSizeBase(64 * SizeUnit.MB);
            currentOptions.setCompactionStyle(CompactionStyle.LEVEL);
            currentOptions.setLevelZeroFileNumCompactionTrigger(4);
            currentOptions.setLevelZeroSlowdownWritesTrigger(20);
            currentOptions.setLevelZeroStopWritesTrigger(30);
            currentOptions.setNumLevels(4);
            currentOptions.setMaxBytesForLevelBase(64 * 4 * SizeUnit.MB);
            return currentOptions;
        }
    }
}


text:
namespace content {

struct ShellPlatformDelegate::ShellData {
  gfx::NativeWindow window;
};

struct ShellPlatformDelegate::PlatformData {
  std::unique_ptr<ShellPlatformDataAura> aura;
};

ShellPlatformDelegate::ShellPlatformDelegate() = default;
ShellPlatformDelegate::~ShellPlatformDelegate() = default;

void ShellPlatformDelegate::Initialize(const gfx::Size& default_window_size) {
  platform_ = std::make_unique<PlatformData>();
  platform_->aura =
      std::make_unique<ShellPlatformDataAura>(default_window_size);
}

void ShellPlatformDelegate::CreatePlatformWindow(
    Shell* shell,
    const gfx::Size& initial_size) {
  DCHECK(!base::Contains(shell_data_map_, shell));
  ShellData& shell_data = shell_data_map_[shell];

  if (!shell->headless())
    platform_->aura->ShowWindow();
  platform_->aura->ResizeWindow(initial_size);

  shell_data.window = platform_->aura->host()->window();
}

gfx::NativeWindow ShellPlatformDelegate::GetNativeWindow(Shell* shell) {
  DCHECK(base::Contains(shell_data_map_, shell));
  ShellData& shell_data = shell_data_map_[shell];
  return shell_data.window;
}

void ShellPlatformDelegate::CleanUp(Shell* shell) {
  DCHECK(base::Contains(shell_data_map_, shell));
  shell_data_map_.erase(shell);
}

void ShellPlatformDelegate::SetContents(Shell* shell) {
  aura::Window* content = shell->web_contents()->GetNativeView();
  aura::Window* parent = platform_->aura->host()->window();
  if (!parent->Contains(content))
    parent->AddChild(content);

  content->Show();
}

void ShellPlatformDelegate::ResizeWebContent(Shell* shell,
                                             const gfx::Size& content_size) {
  shell->web_contents()->GetRenderWidgetHostView()->SetSize(content_size);
}

void ShellPlatformDelegate::EnableUIControl(Shell* shell,
                                            UIControl control,
                                            bool is_enabled) {}

void ShellPlatformDelegate::SetAddressBarURL(Shell* shell, const GURL& url) {}

void ShellPlatformDelegate::SetIsLoading(Shell* shell, bool loading) {}

void ShellPlatformDelegate::SetTitle(Shell* shell,
                                     const base::string16& title) {}

void ShellPlatformDelegate::RenderViewReady(Shell* shell) {}

bool ShellPlatformDelegate::DestroyShell(Shell* shell) {
  return false;  // Shell destroys itself.
}

}  // namespace content


text:
using Expressive.Expressions;
using System;

namespace Expressive.Functions.Mathematical
{
    internal class IEEERemainderFunction : FunctionBase
    {
        #region FunctionBase Members

        public override string Name { get { return "IEEERemainder"; } }

        public override object Evaluate(IExpression[] parameters, Context context)
        {
            this.ValidateParameterCount(parameters, 2, 2);

            return Math.IEEERemainder(Convert.ToDouble(parameters[0].Evaluate(Variables)), Convert.ToDouble(parameters[1].Evaluate(Variables)));
        }

        #endregion
    }
}


text:
class SkBitmap;
struct ANativeWindow;

namespace cc {
class Layer;
class LayerTreeHost;
class OnscreenDisplayClient;
class SurfaceIdAllocator;
class SurfaceManager;
class VulkanInProcessContextProvider;
}

namespace content {
class CompositorClient;

// -----------------------------------------------------------------------------
// Browser-side compositor that manages a tree of content and UI layers.
// -----------------------------------------------------------------------------
class CONTENT_EXPORT CompositorImpl
    : public Compositor,
      public cc::LayerTreeHostClient,
      public cc::LayerTreeHostSingleThreadClient,
      public ui::UIResourceProvider,
      public ui::WindowAndroidCompositor {
 public:
  class VSyncObserver {
   public:
    virtual void OnVSync(base::TimeTicks timebase,
                         base::TimeDelta interval) = 0;
  };

  CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window);
  ~CompositorImpl() override;

  static bool IsInitialized();

  static cc::SurfaceManager* GetSurfaceManager();
  static std::unique_ptr<cc::SurfaceIdAllocator> CreateSurfaceIdAllocator();

  static scoped_refptr<cc::VulkanInProcessContextProvider>
  SharedVulkanContextProviderAndroid();

  void PopulateGpuCapabilities(gpu::Capabilities gpu_capabilities);

  void AddObserver(VSyncObserver* observer);
  void RemoveObserver(VSyncObserver* observer);
  void OnNeedsBeginFramesChange(bool needs_begin_frames);

  // ui::ResourceProvider implementation.
  cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override;
  void DeleteUIResource(cc::UIResourceId resource_id) override;
  bool SupportsETC1NonPowerOfTwo() const override;

 private:
  // Compositor implementation.
  void SetRootLayer(scoped_refptr<cc::Layer> root) override;
  void SetSurface(jobject surface) override;
  void setDeviceScaleFactor(float factor) override;
  void SetWindowBounds(const gfx::Size& size) override;
  void SetHasTransparentBackground(bool flag) override;
  void SetNeedsComposite() override;
  ui::UIResourceProvider& GetUIResourceProvider() override;
  ui::ResourceManager& GetResourceManager() override;

  // LayerTreeHostClient implementation.
  void WillBeginMainFrame() override {}
  void DidBeginMainFrame() override {}
  void BeginMainFrame(const cc::BeginFrameArgs& args) override {}
  void BeginMainFrameNotExpectedSoon() override {}
  void UpdateLayerTreeHost() override;
  void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
                           const gfx::Vector2dF& outer_delta,
                           const gfx::Vector2dF& elastic_overscroll_delta,
                           float page_scale,
                           float top_controls_delta) override {}
  void RequestNewOutputSurface() override;
  void DidInitializeOutputSurface() override;
  void DidFailToInitializeOutputSurface() override;
  void WillCommit() override {}
  void DidCommit() override;
  void DidCommitAndDrawFrame() override {}
  void DidCompleteSwapBuffers() override;
  void DidCompletePageScaleAnimation() override {}
  void ReportFixedRasterScaleUseCounters(
      bool has_blurry_content,
      bool has_potential_performance_regression) override {}

  // LayerTreeHostSingleThreadClient implementation.
  void DidPostSwapBuffers() override;
  void DidAbortSwapBuffers() override;

  // WindowAndroidCompositor implementation.
  void RequestCopyOfOutputOnRootLayer(
      std::unique_ptr<cc::CopyOutputRequest> request) override;
  void OnVSync(base::TimeTicks frame_time,
               base::TimeDelta vsync_period) override;
  void SetNeedsAnimate() override;
  void SetVisible(bool visible);
  void CreateOutputSurface();
  void CreateLayerTreeHost();

  void OnGpuChannelEstablished();
  void OnGpuChannelTimeout();

  // root_layer_ is the persistent internal root layer, while subroot_layer_
  // is the one attached by the compositor client.
  scoped_refptr<cc::Layer> root_layer_;
  scoped_refptr<cc::Layer> subroot_layer_;

  // Destruction order matters here:
  std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
  base::ObserverList<VSyncObserver, true> observer_list_;
  std::unique_ptr<cc::LayerTreeHost> host_;
  ui::ResourceManagerImpl resource_manager_;

  std::unique_ptr<cc::OnscreenDisplayClient> display_client_;

  gfx::Size size_;
  bool has_transparent_background_;
  float device_scale_factor_;

  ANativeWindow* window_;
  gpu::SurfaceHandle surface_handle_;

  CompositorClient* client_;

  gfx::NativeWindow root_window_;

  // Whether we need to update animations on the next composite.
  bool needs_animate_;

  // The number of SwapBuffer calls that have not returned and ACK'd from
  // the GPU thread.
  unsigned int pending_swapbuffers_;

  size_t num_successive_context_creation_failures_;

  base::OneShotTimer establish_gpu_channel_timeout_;

  // Whether there is an OutputSurface request pending from the current
  // |host_|. Becomes |true| if RequestNewOutputSurface is called, and |false|
  // if |host_| is deleted or we succeed in creating *and* initializing an
  // OutputSurface (which is essentially the contract with cc).
  bool output_surface_request_pending_;

  gpu::Capabilities gpu_capabilities_;
  bool needs_begin_frames_;
  base::WeakPtrFactory<CompositorImpl> weak_factory_;

  DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
};

} // namespace content

#endif  // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.1" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
	<display-name>la-musique</display-name>
</web-app>


text:
import passport from '../core/passport';

export default function istoken(app) {
  app.get('/istoken',
    passport.authenticate('bearer', { session: false }),
    (req, res) => {
      res.json({ status: 'ok' });
    });
}


text:
<!DOCTYPE html>

<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />

  <ng-map center="[{{vm.lat}}, {{vm.lng}}]"></ng-map>

Latigude : <input type="number" ng-model="vm.lat" />

Longitude : <input type="number" ng-model="vm.lng" />


text:
#include "SkPdfEncryptedEmbeddedFileStreamDictionary_autogen.h"
#include "SkPdfNativeDoc.h"

int64_t SkPdfEncryptedEmbeddedFileStreamDictionary::EncryptionRevision(SkPdfNativeDoc* doc) {
  SkPdfNativeObject* ret = get("EncryptionRevision", "");
  if (doc) {ret = doc->resolveReference(ret);}
  if ((ret != NULL && ret->isInteger()) || (doc == NULL && ret != NULL && ret->isReference())) return ret->intValue();
  // TODO(edisonn): warn about missing default value for optional fields
  return 0;
}

bool SkPdfEncryptedEmbeddedFileStreamDictionary::has_EncryptionRevision() const {
  return get("EncryptionRevision", "") != NULL;
}


text:
//
// msgpack::rpc::exception_impl - MessagePack-RPC for C++
//
// Copyright (C) 2010 FURUHASHI Sadayuki
//
//    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.
//
#ifndef MSGPACK_RPC_EXCEPTION_IMPL_H__
#define MSGPACK_RPC_EXCEPTION_IMPL_H__

#include "exception.h"
#include "future_impl.h"

namespace msgpack {
namespace rpc {

extern const object TIMEOUT_ERROR;
extern const object CONNECT_ERROR;

void throw_exception(future_impl* f);

}  // namespace rpc
}  // namespace msgpack

#endif /* msgpack/rpc/exception_impl.h */


text:
package org.apache.tajo.algebra;

import com.google.common.base.Objects;

public class DropTable extends Expr {
  private final String tableName;
  private final boolean purge;

  public DropTable(String tableName, boolean purge) {
    super(OpType.DropTable);
    this.tableName = tableName;
    this.purge = purge;
  }

  public String getTableName() {
    return this.tableName;
  }

  public boolean isPurge() {
    return purge;
  }

  @Override
  public int hashCode() {
    return Objects.hashCode(tableName, purge);
  }

  @Override
  boolean equalsTo(Expr expr) {
    if (expr instanceof DropTable) {
      DropTable another = (DropTable) expr;
      return tableName.equals(another.tableName) && purge == another.purge;
    }
    return false;
  }
}


text:
/*
 * Description:
 *     What is this file about?
 *
 * Revision history:
 *     xxxx-xx-xx, author, first version
 *     xxxx-xx-xx, author, fix bug about xxx
 */

#pragma once

#include <dsn/service_api_cpp.h>
#include <dsn/tool-api/task.h>
#include <dsn/tool-api/task_worker.h>
#include <gtest/gtest.h>
#include <iostream>

using namespace ::dsn;

#ifndef TEST_PORT_BEGIN
#define TEST_PORT_BEGIN 20201
#define TEST_PORT_END 20203
#endif

DEFINE_THREAD_POOL_CODE(THREAD_POOL_TEST_SERVER)
DEFINE_TASK_CODE_RPC(RPC_TEST_HASH, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)

DEFINE_TASK_CODE_RPC(RPC_TEST_HASH1, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)
DEFINE_TASK_CODE_RPC(RPC_TEST_HASH2, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)
DEFINE_TASK_CODE_RPC(RPC_TEST_HASH3, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)
DEFINE_TASK_CODE_RPC(RPC_TEST_HASH4, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)

DEFINE_TASK_CODE_RPC(RPC_TEST_STRING_COMMAND, TASK_PRIORITY_COMMON, THREAD_POOL_TEST_SERVER)

extern int g_test_count;
extern int g_test_ret;

inline void exec_tests()
{
    g_test_ret = RUN_ALL_TESTS();
    g_test_count++;
}

class test_client : public ::dsn::serverlet<test_client>, public ::dsn::service_app
{
public:
    test_client(const service_app_info *info)
        : ::dsn::serverlet<test_client>("test-server"), ::dsn::service_app(info)
    {
    }

    void on_rpc_test(const int &test_id, ::dsn::rpc_replier<std::string> &replier)
    {
        std::string r = ::dsn::task::get_current_worker()->name();
        replier(r);
    }

    void on_rpc_string_test(dsn::message_ex* message)
    {
        std::string command;
        ::dsn::unmarshall(message, command);

        if (command == "expect_talk_to_others") {
            dsn::rpc_address next_addr = dsn::service_app::primary_address();
            if (next_addr.port() != TEST_PORT_END) {
                next_addr.assign_ipv4(next_addr.ip(), next_addr.port() + 1);
                ddebug("test_client_server, talk_to_others: %s", next_addr.to_string());
                dsn_rpc_forward(message, next_addr);
            } else {
                ddebug("test_client_server, talk_to_me: %s", next_addr.to_string());
                reply(message, next_addr.to_std_string());
            }
        } else if (command == "expect_no_reply") {
            if (dsn::service_app::primary_address().port() == TEST_PORT_END) {
                ddebug("test_client_server, talk_with_reply: %s",
                       dsn::service_app::primary_address().to_std_string().c_str());
                reply(message, dsn::service_app::primary_address().to_std_string());
            }
        } else if (command.substr(0, 5) == "echo ") {
            reply(message, command.substr(5));
        } else {
            derror("unknown command");
        }
    }

    ::dsn::error_code start(const std::vector<std::string> &args)
    {
        // server
        if (args.size() == 1) {
            register_async_rpc_handler(RPC_TEST_HASH, "rpc.test.hash", &test_client::on_rpc_test);
            // used for corrupted message test
            register_async_rpc_handler(RPC_TEST_HASH1, "rpc.test.hash1", &test_client::on_rpc_test);
            register_async_rpc_handler(RPC_TEST_HASH2, "rpc.test.hash2", &test_client::on_rpc_test);
            register_async_rpc_handler(RPC_TEST_HASH3, "rpc.test.hash3", &test_client::on_rpc_test);
            register_async_rpc_handler(RPC_TEST_HASH4, "rpc.test.hash4", &test_client::on_rpc_test);

            register_rpc_handler(RPC_TEST_STRING_COMMAND,
                                 "rpc.test.string.command",
                                 &test_client::on_rpc_string_test);
        }

        // client
        else {
            std::cout << "=========================================================== "
                      << std::endl;
            std::cout << "================== run in rDSN threads ==================== "
                      << std::endl;
            std::cout << "=========================================================== "
                      << std::endl;
            exec_tests();
        }

        return ::dsn::ERR_OK;
    }

    ::dsn::error_code stop(bool cleanup = false) { return ERR_OK; }
};


text:
package erogenousbeef.bigreactors.client.renderer;

import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;

import org.lwjgl.opengl.GL11;

import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
import erogenousbeef.bigreactors.api.data.ReactantData;
import erogenousbeef.bigreactors.api.registry.Reactants;
import erogenousbeef.bigreactors.common.BigReactors;
import erogenousbeef.bigreactors.common.data.StandardReactants;
import erogenousbeef.bigreactors.common.multiblock.MultiblockReactor;
import erogenousbeef.bigreactors.common.multiblock.block.BlockFuelRod;
import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorFuelRod;

public class SimpleRendererFuelRod implements ISimpleBlockRenderingHandler {

	private static final float FLUID_RENDER_OFFSET_MAX = 0.05f;
	private static final float FLUID_RENDER_OFFSET_MIN = 0.45f;

	public SimpleRendererFuelRod() {
	}

	@Override
	public void renderInventoryBlock(Block block, int metadata, int modelID,
			RenderBlocks renderer) {
		Tessellator tessellator = Tessellator.instance;
        GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, -1.0F, 0.0F);
        renderer.renderFaceYNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 0, metadata));
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 1.0F, 0.0F);
        renderer.renderFaceYPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 1, metadata));
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 0.0F, -1.0F);
        renderer.renderFaceZNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 2, metadata));
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(0.0F, 0.0F, 1.0F);
        renderer.renderFaceZPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 3, metadata));
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(-1.0F, 0.0F, 0.0F);
        renderer.renderFaceXNeg(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 4, metadata));
        tessellator.draw();
        tessellator.startDrawingQuads();
        tessellator.setNormal(1.0F, 0.0F, 0.0F);
        renderer.renderFaceXPos(block, 0.0D, 0.0D, 0.0D, renderer.getBlockIconFromSideAndMetadata(block, 5, metadata));
        tessellator.draw();
        GL11.glTranslatef(0.5F, 0.5F, 0.5F);
	}

	@Override
	public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
			Block block, int modelId, RenderBlocks renderer) {
		if(!(block instanceof BlockFuelRod)) { return false; }

        Tessellator tessellator = Tessellator.instance;

        boolean renderTop = block.shouldSideBeRendered(world, x, y + 1, z, 0);
        boolean renderBottom = block.shouldSideBeRendered(world, x, y - 1, z, 0);
        boolean renderedFuelOnTop = false;
        boolean renderedFuelOnBottom = false;

        boolean[] renderSides = new boolean[]
        {
            block.shouldSideBeRendered(world, x, y, z - 1, 2),
            block.shouldSideBeRendered(world, x, y, z + 1, 3),
            block.shouldSideBeRendered(world, x - 1, y, z, 4),
            block.shouldSideBeRendered(world, x + 1, y, z, 5)
        };

        if (!renderTop && !renderBottom && !renderSides[0] && !renderSides[1] && !renderSides[2] && !renderSides[3])
        {
            return false;
        }

        boolean rendered = false;
        int blockMetadata = world.getBlockMetadata(x, y, z);

        // Render internal bits, if we can
        TileEntity te;
        te = world.getTileEntity(x, y, z);
        if(te instanceof TileEntityReactorFuelRod) {
        	TileEntityReactorFuelRod fuelRod = (TileEntityReactorFuelRod)te;
        	if(fuelRod.isConnected()) {
        		MultiblockReactor reactor = (MultiblockReactor)fuelRod.getMultiblockController();
        		int fuelAmount = reactor.getFuelAmount();
        		int wasteAmount = reactor.getWasteAmount();
        		int totalFluid = fuelAmount + wasteAmount;
        		int capacity = reactor.getCapacity();
        		if(capacity > 0 && totalFluid > 0) {
        			// Okay, we're connected and have some kind of fluid inside. Let's do this.
        	        float fluidColumnOffsetFromCenter = -1f;
        	        float red, green, blue;
        	        IIcon iconSide, iconBottom;
        	        iconSide = iconBottom = null;
        	        red = green = blue = 1f;

    	    		iconSide = BigReactors.fluidFuelColumn.getFlowingIcon();
    	    		iconBottom = BigReactors.fluidFuelColumn.getStillIcon();

    	    		ReactantData fuelData = Reactants.getReactant(reactor.getFuelType());
    	    		ReactantData wasteData = Reactants.getReactant(reactor.getWasteType());

    	    		int fuelColor = fuelData != null ? fuelData.getColor() : StandardReactants.colorYellorium;
    	    		int wasteColor = wasteData != null ? wasteData.getColor() : StandardReactants.colorCyanite;

        	    	if(fuelAmount == 0) {
        	        	red = unpackR(wasteColor);
        	        	green = unpackG(wasteColor);
        	        	blue = unpackB(wasteColor);
        	    	}
        	    	else if(fuelAmount >= totalFluid) {
        	        	red = unpackR(fuelColor);
        	        	green = unpackG(fuelColor);
        	        	blue = unpackB(fuelColor);
        	    	}
        	    	else {
        	        	// Blend the colors
        	        	float proportion = (float)fuelAmount / (float)totalFluid;
        	        	float fuelR, fuelG, fuelB;
        	        	float wasteR, wasteG, wasteB;

        	        	fuelR = unpackR(fuelColor);
        	        	fuelG = unpackG(fuelColor);
        	        	fuelB = unpackB(fuelColor);
        	        	wasteR = unpackR(wasteColor);
        	        	wasteG = unpackG(wasteColor);
        	        	wasteB = unpackB(wasteColor);

        	        	red = lerp(wasteR, fuelR, proportion);
        	        	green = lerp(wasteG, fuelG, proportion);
        	        	blue = lerp(wasteB, fuelB, proportion);
        	    	}

    	    		float pctFilled = Math.min(1f, Math.max(0f, (float)totalFluid / (float)capacity));
    	    		fluidColumnOffsetFromCenter = lerp(FLUID_RENDER_OFFSET_MIN, FLUID_RENDER_OFFSET_MAX, pctFilled);

    	    		if(iconSide != null && iconBottom != null) {
    	    			// We've got fuel data! Let's do this thang.

	    	            tessellator.setColorRGBA_F(red, green, blue, 0.75f);
	    	            tessellator.setBrightness(world.getLightBrightnessForSkyBlocks(x, y, z, 15));

    	    			renderer.setOverrideBlockTexture(iconBottom);
	    	            float xzMin = fluidColumnOffsetFromCenter;
	    	            float xzMax = 1f - fluidColumnOffsetFromCenter;
	    				renderer.setRenderBounds(xzMin, 0.01f, xzMin, xzMax, 0.99f, xzMax);

    	    			if(renderer.renderAllFaces || renderBottom) {
    	    				rendered = true;
    	    				renderer.renderFaceYNeg(block, x, y, z, iconBottom);
    	    			}

    	    			if(renderer.renderAllFaces || renderTop) {
    	    				rendered = true;
    	    				renderer.renderFaceYPos(block, x, y, z, iconBottom);
    	    			}

    	    			renderer.setOverrideBlockTexture(iconSide);
	    				renderer.setRenderBounds(xzMin, 0f, xzMin, xzMax, 1f, xzMax);

	    				if(renderer.renderAllFaces || renderSides[0]) {
    	    				rendered = true;
	    		            renderer.renderFaceZNeg(block, x, y, z, iconSide);
	    				}
	    				if(renderer.renderAllFaces || renderSides[1]) {
    	    				rendered = true;
	    		            renderer.renderFaceZPos(block, x, y, z, iconSide);
	    				}
	    				if(renderer.renderAllFaces || renderSides[2]) {
    	    				rendered = true;
	    		            renderer.renderFaceXNeg(block, x, y, z, iconSide);
	    				}
	    				if(renderer.renderAllFaces || renderSides[3]) {
    	    				rendered = true;
	    		            renderer.renderFaceXPos(block, x, y, z, iconSide);
	    				}
    	    		}
        		}
        	}
        }

        // Then render external housing
        tessellator.setColorRGBA(255, 255, 255, 255);
        renderer.setRenderBoundsFromBlock(block);
        renderer.setOverrideBlockTexture(null);

        // First, render the regular block
        if(!renderedFuelOnBottom && (renderer.renderAllFaces || renderBottom)) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceYNeg(block, x, y, z, block.getIcon(0, blockMetadata));
        }
        if(renderer.renderAllFaces || renderTop) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceYPos(block, x, y, z, block.getIcon(1, blockMetadata));
        }
        if(renderer.renderAllFaces || renderSides[0]) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceZNeg(block, x, y, z, block.getIcon(2, blockMetadata));
        }
        if(renderer.renderAllFaces || renderSides[1]) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceZPos(block, x, y, z, block.getIcon(3, blockMetadata));
        }
        if(renderer.renderAllFaces || renderSides[2]) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceXNeg(block, x, y, z, block.getIcon(4, blockMetadata));
        }
        if(renderer.renderAllFaces || renderSides[3]) {
        	rendered = true;
            tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z));
            renderer.renderFaceXPos(block, x, y, z, block.getIcon(5, blockMetadata));
        }

		return rendered;
	}

	@Override
	public boolean shouldRender3DInInventory(int modelID) {
		return true;
	}

	@Override
	public int getRenderId() {
		return BlockFuelRod.renderId;
	}

	/// HELPERS ///
	protected static float unpackR(int rgb) {
		return (float)(rgb >> 16 & 255) / 255.0F;
	}

	protected static float unpackG(int rgb) {
		return (float)(rgb >> 8 & 255) / 255.0F;
	}

	protected static float unpackB(int rgb) {
		return (float)(rgb & 255) / 255.0F;
	}
	protected static float lerp(float min, float max, float value) {
		return min + (max-min)*value;
	}
}


text:
import assign from './assign';

export default class Progress {
  constructor(target, options = {observe: ()=> {}}) {
    this.observe = options.observe;
    this.target = target;
    this.state = new State({freeze: options.freeze});
    target.onloadstart = (event)=> {
      this.update({loadStart: new ProgressEvent(event)});
    };
    target.onloadend = (event)=> {
      this.update({loadEnd: new ProgressEvent(event)});
    };
    target.onprogress = (event)=> {
      this.update((next)=> {
        next.progress = next.progress.concat(new ProgressEvent(event));
      });
    };
    target.onabort = (event)=> {
      this.update({abort: new ProgressEvent(event)});
    };
    target.onerror = (event)=> {
      this.update({error: new ProgressEvent(event)});
    };
    target.ontimeout = (event)=> {
      this.update({timeout: new ProgressEvent(event)});
    };
  }
  update(change) {
    this.state = new State(this.state, change);
    this.observe(this.state);
  }
}

class State {
  constructor(previous = {}, change = ()=> {}) {
    assign(this, {
      abort: null,
      error: null,
      loadStart: null,
      loadEnd: null,
      timeout: null,
      progress: []
    }, previous);
    if (change.call) {
      change(this);
    } else {
      assign(this, change);
    }
    if (this.freeze !== false) {
      Object.freeze(this.progress);
      Object.freeze(this);
    }
  }

  get isAborted() {
    return !!this.abort;
  }

  get isErrored() {
    return !!this.error;
  }

  get isLoadStarted() {
    return !!this.loadStart;
  }

  get isLoadEnded() {
    return !!this.loadEnd;
  }

  get isTimedOut() {
    return !!this.timeout;
  }

  get latest() {
    let event = this.progress[this.progress.length - 1];
    if (!event) {
      event = { total: 0, loaded: 0, lengthComputable: false };
    }
    return event;
  }

  get isLengthComputable() {
    return this.latest.lengthComputable;
  }

  get loaded() {
    return this.latest.loaded;
  }

  get total() {
    return this.latest.total;
  }

  get ratio() {
    if (this.loaded === 0 && this.total === 0) {
      return 0;
    }
    return this.loaded / this.total;
  }

  get percentage() {
    return Math.floor(this.ratio * 100);
  }
}

class ProgressEvent {
  constructor(event) {
    this.event = event;
    this.timestamp = new Date();
  }

  get lengthComputable() {
    return this.event.lengthComputable;
  }

  get total() {
    return this.event.total;
  }

  get loaded() {
    return this.event.loaded;
  }
}


text:
// # camunda-commons-ui
// @name camunda-commons-ui
//
// This file is an entry point for modules which depends on
// camunda-commons-ui to get the libraries

/* jshint node: true */
'use strict';
var _ = require('lodash');

// ## requirejs
// @name camunda-commons-ui.requirejs
//
// This function is aimed to provide a common (but overridable)
// configuration for grunt require.js tasks.
//
// @param options
// @param options.pathPrefix should be the path to
//                           camunda-commons-ui relative from
//                           the project running the grunt task
function requirejsConf(options) {
  options = options || {};

  if (typeof options.pathPrefix === 'undefined') {
    options.pathPrefix = '../../camunda-commons-ui';
  }

  var conf = {
    stubModules: [
      'text'
    ],

    paths: {
      'camunda-commons-ui':         'lib',

      // #### npm dependencies
      'angular-data-depend':        'node_modules/angular-data-depend/src/dataDepend',
      'angular-translate':          'node_modules/angular-translate/dist/angular-translate',
      'angular-moment':             'node_modules/angular-moment/angular-moment',
      'camunda-bpm-sdk-js':         'node_modules/camunda-bpm-sdk-js/dist/camunda-bpm-sdk-angular',
      'camunda-bpm-sdk-js-type-utils':   'node_modules/camunda-bpm-sdk-js/dist/camunda-bpm-sdk-type-utils',
      jquery:                       'node_modules/jquery/dist/jquery',
      moment:                       'node_modules/moment/moment',
      requirejs:                    'node_modules/requirejs/require',
      ngDefine:                     'node_modules/requirejs-angular-define/dist/ngDefine',
      text:                         'node_modules/requirejs-text/text',
      lodash:                       'node_modules/lodash/lodash',

      // #### vendor dependencies
      angular:                      'vendor/angular',
      'angular-animate':            'vendor/angular-animate',
      'angular-cookies':            'vendor/angular-cookies',
      'angular-loader':             'vendor/angular-loader',
      'angular-mocks':              'vendor/angular-mocks',
      'angular-resource':           'vendor/angular-resource',
      'angular-route':              'vendor/angular-route',
      'angular-sanitize':           'vendor/angular-sanitize',
      'angular-scenario':           'vendor/angular-scenario',
      'angular-touch':              'vendor/angular-touch',
      'angular-bootstrap':          'vendor/ui-bootstrap-tpls-0.11.2-camunda',
      'jquery-ui-core':             'vendor/jquery.ui.core',
      'jquery-ui-mouse':            'vendor/jquery.ui.mouse',
      'jquery-ui-widget':           'vendor/jquery.ui.widget',
      'jquery-ui-draggable':        'vendor/jquery.ui.draggable',
      'jquery-mousewheel':          'vendor/jquery.mousewheel',
      'jquery-overscroll':          'vendor/jquery.overscroll',
      domReady:                     'vendor/domReady',
      'placeholders-js':            'vendor/placeholders.main',
      'bpmn-io':                    'node_modules/bower-bpmn-js/dist/bpmn-navigated-viewer',
      'dmn-io':                     'node_modules/dmn-js/dist/dmn-viewer'
    },

    shim: {
      angular: {
        deps: ['jquery'],
        exports: 'angular'
      },

      'placeholders-js':      [
                                'vendor/placeholders.utils.js',
                                'vendor/placeholders.jquery.js'
                              ],
      'camunda-commons-ui':   [
                                'angular',
                                'angular-resource',
                                'angular-route',
                                'angular-sanitize',
                                'angular-translate',
                                'angular-bootstrap',
                                'moment',
                                'placeholders-js'
                              ],
      'angular-animate':      ['angular'],
      'angular-cookies':      ['angular'],
      'angular-loader':       ['angular'],
      'angular-mocks':        ['angular'],
      'angular-resource':     ['angular'],
      'angular-route':        ['angular'],
      'angular-sanitize':     ['angular'],
      'angular-scenario':     ['angular'],
      'angular-touch':        ['angular'],
      'angular-bootstrap':    ['angular'],
      'angular-translate':    ['angular'],
      'jquery-overscroll':    ['jquery'],
      'jquery-mousewheel':    ['jquery'],

      'jquery-ui-core':       ['jquery'],
      'jquery-ui-widget':     ['jquery-ui-core'],
      'jquery-ui-mouse':      ['jquery-ui-widget'],
      'jquery-ui-draggable':  [
                                'jquery-ui-widget',
                                'jquery-ui-mouse'
                              ]
    },

    packages: [
      {
        name: 'camunda-commons-ui',
        location: 'lib',
        main: 'index'
      },
      {
        name: 'camunda-commons-ui/util',
        location: 'lib/util',
        main: 'index'
      }
    ]
  };

  // prefix all the paths
  _.each(conf.paths, function (val, key) {
    conf.paths[key] = options.pathPrefix + '/' + val;
  });
  _.each(conf.packages, function (val, key) {
    if (conf.packages[key].location) {
      conf.packages[key].location = options.pathPrefix + '/' + conf.packages[key].location;
    }
  });

  return conf;
}

function livereloadSnippet(grunt) {
  return function (data) {
    var buildMode = grunt.config('buildMode');
    var livereloadPort = grunt.config('pkg.gruntConfig.livereloadPort');
    if (buildMode !== 'prod' && livereloadPort) {
      grunt.log.writeln('Enabling livereload for ' + data.name + ' on port: ' + livereloadPort);
      var contents = grunt.file.read(data.path);

      contents = contents
                  .replace(/\/\* live-reload/, '/* live-reload */')
                  .replace(/LIVERELOAD_PORT/g, livereloadPort);

      grunt.file.write(data.path, contents);
    }
  };
}

function builder(grunt) {
  return function(mode) {
    mode = mode || 'prod';
    var pkg = grunt.config.data.pkg;
    var config = pkg.gruntConfig;

    grunt.config.data.buildTarget = (mode === 'prod' ? config.prodTarget : config.devTarget);
    grunt.log.subhead('Will build the "'+ pkg.name +'" project in "'+ mode +'" mode and place it in "'+ grunt.config('buildTarget') +'"');
    if (mode === 'dev') {
      grunt.log.writeln('Will serve on port "'+
        config.connectPort +
        '" and liverreload available on port "'+
        config.livereloadPort +
        '"');
    }

    var tasks = [
      'clean',
      'copy',
      'less',
      'requirejs'
    ];

    grunt.task.run(tasks);
  };
}

module.exports = {
  // @name camunda-commons-ui.utils
  utils: {
    // @name camunda-commons-ui.utils._
    _: _
  },

  builder: builder,

  livereloadSnippet: livereloadSnippet,

  requirejs: requirejsConf
};


text:
// External variables used:
//  _cfTransIconURL  - the transparent color swatch icon
//  _cfOpaqueIconURL - the opaque color swatch icon
//  _cfBgColor       - the background color of the page

var _cfBus = new Object();
var _cfTransIconURL;
var _cfOpaqueIconURL;
var _cfBgColor;

/*
 * Update the color field swatch.
 */
function _cfsw(
  colorField)
{
  var cff = _getColorFieldFormat(colorField);
  var swatchID = colorField.name + "$sw";
  var value = null;
  var swatch = _getElementById(document, swatchID);

  if (swatch != null)
  {
    var converterError = false;
    if (colorField.value != "")
    {
      try
      {
        value = cff.getAsObject(colorField.value);
      }
      catch (e)
      {
        // no-op
      }
    }
    if (value != null)
    {
      if (value.alpha == 0)
      {
        swatch.style.backgroundColor = null;
        swatch.src = _cfTransIconURL;
        swatch.alt = _cfTrans;
      }
      else
      {
        swatch.style.backgroundColor =
          new TrColorConverter("#RRGGBB").getAsString(value);
        swatch.src = _cfOpaqueIconURL;
        swatch.alt = cff.getAsString(value);
      }
    }
    else
    {
      swatch.style.backgroundColor = _cfBgColor;
      swatch.src = _cfOpaqueIconURL;
      swatch.alt = null;
    }

    // make sure tooltips are updated correctly
    // on Mozilla
    if (_agent.isGecko)
      swatch.title = swatch.alt;
  }
}

function _returnColorPickerValue(
  closingWindow,
  event
  )
{
  // extract the return value
  var newColor = closingWindow.returnValue;

  var colorField = closingWindow._colorField;

  // See below!
  if (colorField == null)
  {
    colorField = _savedColorField1879034;
  }

  //pu: Do not update if user dismissed color picker
  // dialog without "Apply" ing the color
  if (closingWindow.isApplicable)
    _cfUpdate(colorField, newColor);
}

/*
 * ColorField Bus Select (used by ColorPalette)
 */
function _cfbs(
  event)
{
  _cfUpdate(_cfBus[event.source], event.params.value);
}

function _cfUpdate(
  colorField,
  newColor)
{
  if (colorField != null)
  {
    //
    // get the format to use to format the result
    //
    var cff = _getColorFieldFormat(colorField);

    // update the contents of the text field
    // or update hidden input for compact color field
    var isVisible = (colorField.type != 'hidden');
    var oldValue = colorField.value;
    var newValue = cff.getAsString(newColor);

    //pu: If transparent was not allowed, and the chosen color were to be
    // transparent, do not update the color field.
    if (newValue == _cfTrans && !cff._allowsTransparent)
      return;

    //pu: In case of blank selection from external picker, undefined newValue is
    // legitimate, but "undefined" should not literally appear in the text area.
    if (newValue == null)
      newValue="";

    if (newValue != colorField.value)
    {
      // bug 2898744
      // also trigger onchange for compact mode
      // with only color swatch displayed
      // bug 2275982
      // trigger onchange programatically
      if (colorField.onchange != null)
      {
        // The IE event delivery mechanism for built-in events like onchange
        // automatically sets the window.event property for inspection by
        // event handlers.
        // When we synthesize this onchange event here, we must ensure that
        // window.event is as close as possible to the value of window.event
        // that would be visible to the onchange handler if it had been triggered
        // by user interaction, like moving focus away from the field.
        // Updating window.event directly triggers a JS error in IE, so we must
        // use the built-in event delivery mechanism instead.
        // Here, we attach a handler to the IE-specific propertychange event,
        // which will fire when any property is changed, not just the value.
        // In our handler, we only respond to a change in the value property,
        // by detaching the handler and delivering the onchange event.
        // Now, the value for window.event during the onchange handler execution
        // is the property change event but it has the right values for source,
        // target, etc.
        // In all cases, the ordering for updates to the color field are as follows
        // 1. input value updated
        // 2. color swatch synchronized with new value (if present)
        // 3. onchange handler fires (if present)
        if (_agent.isIE)
        {
          // attach the value change listener
          colorField.onpropertychange = function()
          {
            var event = window.event;
            if (event.propertyName == 'value')
            {
              // detach the value change listener
              colorField.onpropertychange = function(){};

              // update swatch first to make sure it has correct
              // value before propertychange event delivery
              _cfsw(colorField);

              colorField.onchange(event);
            }
          }

          colorField.value = newValue;
        }
        else
        {
          colorField.value = newValue;

          // swatch not supported on NS47
          if (!_agent.isNav)
            _cfsw(colorField);

          var event = new Object();
          event.type = 'change';
          event.target = colorField;
          colorField.onchange(event);
        }
      }
      else // no onchange handler
      {
        colorField.value = newValue;

        // swatch not supported on NS47
        if (!_agent.isNav)
          _cfsw(colorField);
      }
    }

    if (isVisible)
    {
      colorField.select();
      colorField.focus();
    }
  }
}

/**
 * Private function for launching the color picker
 */
function _lcp(
  formName,
  nameInForm,
  destination
  )
{
  var colorField = document.forms[formName][nameInForm];

  // default the destination to the color picker dialog destination
  if (!destination)
  {
    destination = _jspDir + _getQuerySeparator(_jspDir) + "_t=fred&_red=cp";
  }
  else
  {
    // since we need to redirect, replace the last portion of the URL with
    // the redirect JSP
    var endOfUrl = destination.lastIndexOf('?');
    var urlArgs  = "";

    if (endOfUrl == -1)
    {
      endOfUrl = destination.length;
    }
    else
    {
      urlArgs = destination.substr(endOfUrl + 1);
    }

    var newDest = _jspDir + _getQuerySeparator(_jspDir);
    newDest += urlArgs;

    // add the correct first param separator
    newDest += _getQuerySeparator(newDest);
    newDest += "_t=fred";

    var redirect = destination.substring(0, endOfUrl);

    destination = newDest;

    // add in the redirect
    destination += "&redirect=" + escape(redirect);
  }

  var patterns = _cfs[nameInForm];
  var pattern = "#RRGGBB"
  if (patterns != null)
  {
    destination += "&pattern=";
    if (typeof patterns == "string")
    {
      pattern = patterns;
      destination += escape(pattern);
    }
    else
    {
      pattern = patterns[0];
      destination += escape(patterns.join(" "));
    }
  }

  // add the current color text
  if (colorField.value != "")
  {
    var format = _getColorFieldFormat(colorField);
    try
    {
      var color = format.getAsObject(colorField.value);
      if (color != null)
      {
        destination += "&value=";

        // escape due to '#' in color code, or possible spaces in _cfTrans
        if (color.alpha == 0)
          destination += escape(_cfTrans);
        else
          destination += escape(new TrColorConverter(pattern).getAsString(color));
      }
    }
    catch (e)
    {
      // no-op
    }
  }

  var allowsTransparent = _cfts[nameInForm];
  if (allowsTransparent != null)
  {
    destination += "&allowsTransparent=" + allowsTransparent;
  }

  // add the locale
  destination += "&loc=" + _locale;

  // and the character set encoding
  if (window["_enc"])
  {
    destination += "&enc=" + _enc;
  }

  var colorDialog = openWindow(self,
                             destination,
                             'colorDialog',
                             {width:430, height:230},
                             true,
                             null,
                             _returnColorPickerValue);

  // save the date field on the calendar window for access
  // from event handler
  colorDialog._colorField = colorField;

  // And, for bug 1879034, stash it on a JS variable.  It
  // seems that IE sometimes has already blown away the values
  // on "colorDialog"!
  _savedColorField1879034 = colorField;
}

var _savedColorField1879034;


text:
<?php

namespace CampaignChain\Channel\TwitterBundle\Controller;

use CampaignChain\CoreBundle\Entity\Location;
use CampaignChain\Location\TwitterBundle\Entity\TwitterUser;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;

class TwitterController extends Controller
{
    const RESOURCE_OWNER = 'Twitter';

    private $applicationInfo = [
        'key_labels' => ['key', 'App Key'],
        'secret_labels' => ['secret', 'App Secret'],
        'config_url' => 'https://apps.twitter.com',
        'parameters' => [
            'force_login' => true,
        ],
    ];

    public function createAction()
    {
        $oauthApp = $this->get('campaignchain.security.authentication.client.oauth.application');
        $application = $oauthApp->getApplication(self::RESOURCE_OWNER);

        if (!$application) {
            return $oauthApp->newApplicationTpl(self::RESOURCE_OWNER, $this->applicationInfo);
        } else {
            return $this->render(
                'CampaignChainChannelTwitterBundle:Create:index.html.twig',
                [
                    'page_title' => 'Connect with Twitter',
                    'app_id' => $application->getKey(),
                ]
            );
        }
    }

    public function loginAction()
    {
        $oauth = $this->get('campaignchain.security.authentication.client.oauth.authentication');
        $status = $oauth->authenticate(self::RESOURCE_OWNER, $this->applicationInfo);
        $profile = $oauth->getProfile();

        if ($status) {
            try {
                $em = $this->getDoctrine()->getManager();
                $em->getConnection()->beginTransaction();

                $wizard = $this->get('campaignchain.core.channel.wizard');
                $wizard->setName($profile->displayName);

                // Get the location module.
                $locationService = $this->get('campaignchain.core.location');
                $locationModule = $locationService->getLocationModule(
                    'campaignchain/location-twitter',
                    'campaignchain-twitter-user'
                );

                $location = new Location();
                $location->setIdentifier($profile->identifier);
                $location->setName($profile->displayName);
                $location->setLocationModule($locationModule);
                $location->setImage($profile->photoURL);
                $location->setUrl($profile->profileURL);

                $wizard->addLocation($location->getIdentifier(), $location);

                $channel = $wizard->persist();
                $wizard->end();

                $oauth->setLocation($channel->getLocations()[0]);

                $twitterUser = new TwitterUser();
                $twitterUser->setLocation($channel->getLocations()[0]);
                $twitterUser->setIdentifier($profile->identifier);
                $twitterUser->setDisplayName($profile->firstName);
                $twitterUser->setUsername($profile->displayName);
                $twitterUser->setProfileImageUrl($profile->photoURL);
                $twitterUser->setProfileUrl($profile->profileURL);

                $em->persist($twitterUser);

                // schedule job to get metrics from now on
                if ($channel->getLocations()[0]->getLocationModule()->getIdentifier(
                    ) === 'campaignchain-twitter-user'
                ) {
                    $this->get('campaignchain.job.report.location.twitter')->schedule($channel->getLocations()[0]);
                }

                $em->flush();

                $em->getConnection()->commit();

                $this->addFlash(
                    'success',
                    'The Twitter location '.$profile->displayName.' was connected successfully.'
                );
            } catch (\Exception $e) {
                $em->getConnection()->rollback();
                throw $e;
            }
        } else {
            // A channel already exists that has been connected with this Facebook account
            $this->addFlash(
                'warning',
                'A location has already been connected for this Twitter account.'
            );
        }

        return $this->render(
            'CampaignChainChannelTwitterBundle:Create:login.html.twig',
            [
                'redirect' => $this->generateUrl('campaignchain_core_location'),
            ]
        );
    }
}


text:
module Azure::Redis::Mgmt::V2016_04_01
  module Models
    #
    # Parameters supplied to the Update Redis operation.
    #
    class RedisUpdateParameters

      include MsRestAzure

      # @return [Hash{String => String}] All Redis Settings. Few possible keys:
      # rdb-backup-enabled,rdb-storage-connection-string,rdb-backup-frequency,maxmemory-delta,maxmemory-policy,notify-keyspace-events,maxmemory-samples,slowlog-log-slower-than,slowlog-max-len,list-max-ziplist-entries,list-max-ziplist-value,hash-max-ziplist-entries,hash-max-ziplist-value,set-max-intset-entries,zset-max-ziplist-entries,zset-max-ziplist-value
      # etc.
      attr_accessor :redis_configuration

      # @return [Boolean] Specifies whether the non-ssl Redis server port
      # (6379) is enabled.
      attr_accessor :enable_non_ssl_port

      # @return [Hash{String => String}] tenantSettings
      attr_accessor :tenant_settings

      # @return [Integer] The number of shards to be created on a Premium
      # Cluster Cache.
      attr_accessor :shard_count

      # @return [String] The full resource ID of a subnet in a virtual network
      # to deploy the Redis cache in. Example format:
      # /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/Microsoft.{Network|ClassicNetwork}/VirtualNetworks/vnet1/subnets/subnet1
      attr_accessor :subnet_id

      # @return [String] Static IP address. Required when deploying a Redis
      # cache inside an existing Azure Virtual Network.
      attr_accessor :static_ip

      # @return [Sku] The SKU of the Redis cache to deploy.
      attr_accessor :sku

      # @return [Hash{String => String}] Resource tags.
      attr_accessor :tags

      #
      # Mapper for RedisUpdateParameters class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'RedisUpdateParameters',
          type: {
            name: 'Composite',
            class_name: 'RedisUpdateParameters',
            model_properties: {
              redis_configuration: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.redisConfiguration',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              enable_non_ssl_port: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.enableNonSslPort',
                type: {
                  name: 'Boolean'
                }
              },
              tenant_settings: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.tenantSettings',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              },
              shard_count: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.shardCount',
                type: {
                  name: 'Number'
                }
              },
              subnet_id: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.subnetId',
                constraints: {
                  Pattern: '^/subscriptions/[^/]*/resourceGroups/[^/]*/providers/Microsoft.(ClassicNetwork|Network)/virtualNetworks/[^/]*/subnets/[^/]*$'
                },
                type: {
                  name: 'String'
                }
              },
              static_ip: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.staticIP',
                constraints: {
                  Pattern: '^\d+\.\d+\.\d+\.\d+$'
                },
                type: {
                  name: 'String'
                }
              },
              sku: {
                client_side_validation: true,
                required: false,
                serialized_name: 'properties.sku',
                type: {
                  name: 'Composite',
                  class_name: 'Sku'
                }
              },
              tags: {
                client_side_validation: true,
                required: false,
                serialized_name: 'tags',
                type: {
                  name: 'Dictionary',
                  value: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'StringElementType',
                      type: {
                        name: 'String'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
@interface MJRefreshNormalHeader()
@property (weak, nonatomic) UIActivityIndicatorView *loadingView;
@property (weak, nonatomic) UILabel *labelText;
@end

@implementation MJRefreshNormalHeader

#pragma mark - 重写父类的方法
- (void)prepare
{
    [super prepare];

    // 添加label
    UILabel *label = [[UILabel alloc] init];
    label.textColor = [UIColor colorWithRed:1.0 green:0.5 blue:0.0 alpha:1.0];
    label.font = [UIFont boldSystemFontOfSize:15];
    label.textAlignment = NSTextAlignmentCenter;
    label.text = [self localizedStringForKey:MJRefreshHeaderIdleText];
    [self addSubview:label];
    self.labelText = label;

    // loading
    UIActivityIndicatorView *loading = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
    [self addSubview:loading];
    self.loadingView = loading;

}

- (void)placeSubviews
{
    [super placeSubviews];

    self.labelText.frame = CGRectMake(0, 0, self.mj_w, self.mj_h);
    self.loadingView.center = self.labelText.center;

}

- (void)setState:(MJRefreshState)state
{
    MJRefreshCheckState

    switch (state) {
        case MJRefreshStateIdle:
            self.labelText.hidden = NO;
            self.loadingView.hidden = YES;
            [self.loadingView stopAnimating];
            break;
        case MJRefreshStatePulling:
            self.labelText.hidden = YES;
            self.loadingView.hidden = NO;
            break;
        case MJRefreshStateRefreshing:
            self.labelText.hidden = YES;
            self.loadingView.hidden = NO;
            [self.loadingView startAnimating];
            break;
        default:
            break;
    }

}
@end


text:
<link rel="import" href="../libs/polymer/polymer.html">
<link rel="import" href="../libs/paper-header-panel/paper-header-panel.html">
<link rel="import" href="../libs/paper-toolbar/paper-toolbar.html">
<link rel="import" href="../libs/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../libs/iron-icons/iron-icons.html">
<link rel="import" href="../libs/iron-flex-layout/classes/iron-flex-layout.html">

<link rel="import" href="../libs/neon-animation/neon-animatable-behavior.html">
<link rel="import" href="../libs/neon-animation/animations/slide-from-left-animation.html">
<link rel="import" href="../libs/neon-animation/animations/fade-out-animation.html">

<dom-module id="gn-ui-prosettings">

  <template>
   <paper-header-panel>

Pro Einstellungen

	<paper-icon-button class="right" icon="close" on-tap="showHeadermenu"></paper-icon-button>

	NOT IMPLEMENTED YET

      </paper-header-panel>
  </template>

</dom-module>


text:
module.exports.isPalindrome = function(text){
	if(!text)
		return false;
	//Remove spaces to support long, multi-word palindromes. Ignore case. Remove special characters
	text = text.replace(/\s+/g, '').toLowerCase().replace(/[^a-z]/g, '');
	var reverse = text.split("").reverse().join("");
	return text === reverse;
}


text:
/* This file was generated by SableCC (http://www.sablecc.org/). */

package com.google.clearsilver.jsilver.syntax.parser;

import com.google.clearsilver.jsilver.syntax.node.*;
import com.google.clearsilver.jsilver.syntax.analysis.*;

class TokenIndex extends AnalysisAdapter
{
    int index;

    @Override
    public void caseTData(@SuppressWarnings("unused") TData node)
    {
        this.index = 0;
    }

    @Override
    public void caseTComment(@SuppressWarnings("unused") TComment node)
    {
        this.index = 1;
    }

    @Override
    public void caseTVar(@SuppressWarnings("unused") TVar node)
    {
        this.index = 2;
    }

    @Override
    public void caseTLvar(@SuppressWarnings("unused") TLvar node)
    {
        this.index = 3;
    }

    @Override
    public void caseTEvar(@SuppressWarnings("unused") TEvar node)
    {
        this.index = 4;
    }

    @Override
    public void caseTUvar(@SuppressWarnings("unused") TUvar node)
    {
        this.index = 5;
    }

    @Override
    public void caseTSet(@SuppressWarnings("unused") TSet node)
    {
        this.index = 6;
    }

    @Override
    public void caseTIf(@SuppressWarnings("unused") TIf node)
    {
        this.index = 7;
    }

    @Override
    public void caseTElseIf(@SuppressWarnings("unused") TElseIf node)
    {
        this.index = 8;
    }

    @Override
    public void caseTElse(@SuppressWarnings("unused") TElse node)
    {
        this.index = 9;
    }

    @Override
    public void caseTWith(@SuppressWarnings("unused") TWith node)
    {
        this.index = 10;
    }

    @Override
    public void caseTEscape(@SuppressWarnings("unused") TEscape node)
    {
        this.index = 11;
    }

    @Override
    public void caseTAutoescape(@SuppressWarnings("unused") TAutoescape node)
    {
        this.index = 12;
    }

    @Override
    public void caseTLoop(@SuppressWarnings("unused") TLoop node)
    {
        this.index = 13;
    }

    @Override
    public void caseTEach(@SuppressWarnings("unused") TEach node)
    {
        this.index = 14;
    }

    @Override
    public void caseTAlt(@SuppressWarnings("unused") TAlt node)
    {
        this.index = 15;
    }

    @Override
    public void caseTName(@SuppressWarnings("unused") TName node)
    {
        this.index = 16;
    }

    @Override
    public void caseTDef(@SuppressWarnings("unused") TDef node)
    {
        this.index = 17;
    }

    @Override
    public void caseTCall(@SuppressWarnings("unused") TCall node)
    {
        this.index = 18;
    }

    @Override
    public void caseTInclude(@SuppressWarnings("unused") TInclude node)
    {
        this.index = 19;
    }

    @Override
    public void caseTLinclude(@SuppressWarnings("unused") TLinclude node)
    {
        this.index = 20;
    }

    @Override
    public void caseTContentType(@SuppressWarnings("unused") TContentType node)
    {
        this.index = 21;
    }

    @Override
    public void caseTInline(@SuppressWarnings("unused") TInline node)
    {
        this.index = 22;
    }

    @Override
    public void caseTComma(@SuppressWarnings("unused") TComma node)
    {
        this.index = 23;
    }

    @Override
    public void caseTBang(@SuppressWarnings("unused") TBang node)
    {
        this.index = 24;
    }

    @Override
    public void caseTAssignment(@SuppressWarnings("unused") TAssignment node)
    {
        this.index = 25;
    }

    @Override
    public void caseTEq(@SuppressWarnings("unused") TEq node)
    {
        this.index = 26;
    }

    @Override
    public void caseTNe(@SuppressWarnings("unused") TNe node)
    {
        this.index = 27;
    }

    @Override
    public void caseTLt(@SuppressWarnings("unused") TLt node)
    {
        this.index = 28;
    }

    @Override
    public void caseTGt(@SuppressWarnings("unused") TGt node)
    {
        this.index = 29;
    }

    @Override
    public void caseTLte(@SuppressWarnings("unused") TLte node)
    {
        this.index = 30;
    }

    @Override
    public void caseTGte(@SuppressWarnings("unused") TGte node)
    {
        this.index = 31;
    }

    @Override
    public void caseTAnd(@SuppressWarnings("unused") TAnd node)
    {
        this.index = 32;
    }

    @Override
    public void caseTOr(@SuppressWarnings("unused") TOr node)
    {
        this.index = 33;
    }

    @Override
    public void caseTString(@SuppressWarnings("unused") TString node)
    {
        this.index = 34;
    }

    @Override
    public void caseTHash(@SuppressWarnings("unused") THash node)
    {
        this.index = 35;
    }

    @Override
    public void caseTPlus(@SuppressWarnings("unused") TPlus node)
    {
        this.index = 36;
    }

    @Override
    public void caseTMinus(@SuppressWarnings("unused") TMinus node)
    {
        this.index = 37;
    }

    @Override
    public void caseTStar(@SuppressWarnings("unused") TStar node)
    {
        this.index = 38;
    }

    @Override
    public void caseTPercent(@SuppressWarnings("unused") TPercent node)
    {
        this.index = 39;
    }

    @Override
    public void caseTBracketOpen(@SuppressWarnings("unused") TBracketOpen node)
    {
        this.index = 40;
    }

    @Override
    public void caseTBracketClose(@SuppressWarnings("unused") TBracketClose node)
    {
        this.index = 41;
    }

    @Override
    public void caseTParenOpen(@SuppressWarnings("unused") TParenOpen node)
    {
        this.index = 42;
    }

    @Override
    public void caseTParenClose(@SuppressWarnings("unused") TParenClose node)
    {
        this.index = 43;
    }

    @Override
    public void caseTDot(@SuppressWarnings("unused") TDot node)
    {
        this.index = 44;
    }

    @Override
    public void caseTDollar(@SuppressWarnings("unused") TDollar node)
    {
        this.index = 45;
    }

    @Override
    public void caseTQuestion(@SuppressWarnings("unused") TQuestion node)
    {
        this.index = 46;
    }

    @Override
    public void caseTDecNumber(@SuppressWarnings("unused") TDecNumber node)
    {
        this.index = 47;
    }

    @Override
    public void caseTHexNumber(@SuppressWarnings("unused") THexNumber node)
    {
        this.index = 48;
    }

    @Override
    public void caseTWord(@SuppressWarnings("unused") TWord node)
    {
        this.index = 49;
    }

    @Override
    public void caseTSlash(@SuppressWarnings("unused") TSlash node)
    {
        this.index = 50;
    }

    @Override
    public void caseTCsOpen(@SuppressWarnings("unused") TCsOpen node)
    {
        this.index = 51;
    }

    @Override
    public void caseTCommentStart(@SuppressWarnings("unused") TCommentStart node)
    {
        this.index = 52;
    }

    @Override
    public void caseTCommandDelimiter(@SuppressWarnings("unused") TCommandDelimiter node)
    {
        this.index = 53;
    }

    @Override
    public void caseTHardDelimiter(@SuppressWarnings("unused") THardDelimiter node)
    {
        this.index = 54;
    }

    @Override
    public void caseTCsClose(@SuppressWarnings("unused") TCsClose node)
    {
        this.index = 55;
    }

    @Override
    public void caseEOF(@SuppressWarnings("unused") EOF node)
    {
        this.index = 56;
    }
}


text:
<?php
namespace Usuario\InscripcionBundle\Controller;

use Usuario\InscripcionBundle\Entidades\Inscripcion;
use Usuario\InscripcionBundle\Form\InscripcionType;

use Symfony\Component\Form\FormBuilder;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;

class DefaultController extends Controller
{

    public function indexAction()
    {
        return new Response('hola, capo');
    }
    public function inscripcionAction()
    {
        $inscripcion=new Inscripcion;
        $form=$this->createForm(new InscripcionType(),$inscripcion);
        return $this->render('UsuarioInscripcionBundle:Default:inscripcion.html.twig',array('form'=>$form->createView()));
    }
    public function otracosaAction()
    {
        return new Response('otra_cosa');
    }
}

?>


text:
<?php

namespace SoundGap\ContentAdminBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

use SoundGap\ContentAdminBundle\Form\Type\AddQuestType;
use SoundGap\ContentAdminBundle\Form\Type\AddStationType;
use SoundGap\ContentAdminBundle\Form\Type\AddStationLessonPageType;

use SoundGap\ContentAdminBundle\Document\Station;
use SoundGap\ContentAdminBundle\Document\StationLessonPage;
use SoundGap\ContentAdminBundle\Document\Quest;

use SoundGap\ContentAdminBundle\Constants\SessionConstants;

class StationController extends Controller
{
    public function indexAction($gradeId, $id = null)
    {
        $schoolAppId = $this->getRequest()->getSession()->get(SessionConstants::SESSION_SYSTEM_SCHOOLAPP_ID);
        $dm = $this->get('doctrine_mongodb')->getManager();
        $station = $dm->getRepository('SoundGapContentAdminBundle:Station')->find($id);
        $grade = $dm->getRepository('SoundGapContentAdminBundle:Grade')->find($gradeId);
        $stations = $dm->createQueryBuilder('SoundGapContentAdminBundle:Station')
                ->field('grade.id')->equals($gradeId)
                ->field('isDeleted')->notEqual(true)
                ->sort('position')
                ->getQuery()->execute();

        $form = $this->createForm(new AddStationType($schoolAppId), $station);
        if ($this->getRequest()->getMethod() == 'POST') {

            ## modify post value
            $stationArray = $this->getRequest()->request->get('Station');
            if ($stationArray['position']=='') {
                $stationArray['position'] = $stations->count()+1;
                $this->getRequest()->request->set('Station', $stationArray);
            }
            $form->bind($this->getRequest());

            if ($form->isValid()) {
                $data = $form->getData();
                $data->setGrade($grade);
                $dm->persist($data);
                $dm->flush();
                $this->getRequest()->getSession()->getFlashBag()->add('notice','Added');
                return $this->redirect($this->getRequest()->getUri());
            }
        }
        return $this->render('SoundGapContentAdminBundle:Station:index.html.twig',array(
            'form' => $form->createView(),
            'grade' => $grade,
            'stations' => $dm->createQueryBuilder('SoundGapContentAdminBundle:Station')
                ->field('grade.id')->equals($gradeId)
                ->field('isDeleted')->notEqual(true)
                ->sort('position')
                ->getQuery()->execute(),
            'pageName' => 'station',
            'actionName' => $id ? 'update' : 'create',
        ));
    }

    public function lessonAction($stationId, $id = null)
    {
        $actionName = $id ? 'update' : 'create';
        $schoolAppId = $this->getRequest()->getSession()->get(SessionConstants::SESSION_SYSTEM_SCHOOLAPP_ID);

        $dm = $this->get('doctrine_mongodb')->getManager();
        $station = $dm->getRepository('SoundGapContentAdminBundle:Station')->find($stationId);
        $page = $dm->getRepository('SoundGapContentAdminBundle:StationLessonPage')->find($id);
        $pages = $dm->createQueryBuilder('SoundGapContentAdminBundle:StationLessonPage')
            ->field('station.id')->equals($stationId)
            ->field('isDeleted')->notEqual(true)
            ->getQuery()->execute();

        $form = $this->createForm(new AddStationLessonPageType($schoolAppId, $station->getGrade()->getId()), $page);

        if ($this->getRequest()->getMethod() == 'POST') {

            ## modify post value
            $stationLessonPageArray = $this->getRequest()->request->get('StationLessonPage');
            if ($stationLessonPageArray['position']=='') {
                $stationLessonPageArray['position'] = $pages->count()+1;
                $this->getRequest()->request->set('StationLessonPage', $stationLessonPageArray);
            }

            $form->bind($this->getRequest());
            if ($form->isValid()) {
                $data = $form->getData();
                $data->setStation($station);
                $dm->persist($data);
                $dm->flush();
                $this->getRequest()->getSession()->getFlashBag()->add('notice',$actionName.'d');
                return $this->redirect($this->getRequest()->getUri());
            }
        }

        return $this->render('SoundGapContentAdminBundle:Station:lesson.html.twig',array(
            'form' => $form->createView(),
            'station' => $station,
            'pages' => $pages,
            'pageName' => 'Lesson Page',
            'actionName' => $actionName,
        ));
    }

    public function examQuestAction($stationId)
    {
        $schoolAppId = $this->getRequest()->getSession()->get(SessionConstants::SESSION_SYSTEM_SCHOOLAPP_ID);

        $dm = $this->get('doctrine_mongodb')->getManager();
        $station = $dm->getRepository('SoundGapContentAdminBundle:Station')->find($stationId);
        $quests = $dm->createQueryBuilder('SoundGapContentAdminBundle:Quest')
            ->field('grade.id')->equals($station->getGrade()->getId())
            ->sort('id','desc')
            ->getQuery()->execute();
        $schoolApp = $dm->getRepository('SoundGapContentAdminBundle:SchoolApp')->find($schoolAppId);

        return $this->render('SoundGapContentAdminBundle:Station:examQuest.html.twig',array(
            'station' => $station,
            'quests' => $quests,
            'pageName' => 'examQuest',
            'actionName' => 'link',
        ));
    }

    public function examQuestAddAction($stationId, $id)
    {
        $dm = $this->get('doctrine_mongodb')->getManager();
        $station = $dm->getRepository('SoundGapContentAdminBundle:Station')->find($stationId);
        $quest = $dm->getRepository('SoundGapContentAdminBundle:Quest')->find($id);
        $station->addExamQuest($quest);
        $dm->flush();
        $this->getRequest()->getSession()->getFlashBag()->add('notice','added');
        return $this->redirect($this->getRequest()->headers->get('referer'));
    }

    public function examQuestRemoveAction($stationId, $id)
    {
        $dm = $this->get('doctrine_mongodb')->getManager();
        $station = $dm->getRepository('SoundGapContentAdminBundle:Station')->find($stationId);
        $quest = $dm->getRepository('SoundGapContentAdminBundle:Quest')->find($id);
        $station->removeExamQuest($quest);
        $dm->flush();
        $this->getRequest()->getSession()->getFlashBag()->add('notice','removed');
        return $this->redirect($this->getRequest()->headers->get('referer'));
    }
}