text:
<?php

/**
 * sfSessionTestStorage is a fake sfSessionStorage implementation to allow easy testing.
 *
 * @package    symfony
 * @subpackage storage
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfSessionTestStorage.class.php 9942 2008-06-27 18:00:49Z fabien $
 */
class sfSessionTestStorage extends sfStorage
{
  protected
    $sessionId   = null,
    $sessionData = array();

  /**
   * Available options:
   *
   *  * session_path: The path to store the session files (%SF_TEST_CACHE_DIR%/sessions by default)
   *  * session_id:   The session identifier
   *
   * @param array $options  An associative array of options
   *
   * @see sfStorage
   */
  public function initialize($options = null)
  {
    $options = array_merge(array(
      'session_path' => sfConfig::get('sf_test_cache_dir').'/sessions',
      'session_id'   => null,
    ), $options);

    // initialize parent
    parent::initialize($options);

    $this->sessionId = !is_null($this->options['session_id']) ? $this->options['session_id'] : (array_key_exists('session_id', $_SERVER) ? $_SERVER['session_id'] : null);

    if ($this->sessionId)
    {
      // we read session data from temp file
      $file = $this->options['session_path'].DIRECTORY_SEPARATOR.$this->sessionId.'.session';
      $this->sessionData = file_exists($file) ? unserialize(file_get_contents($file)) : array();
    }
    else
    {
      $this->sessionId   = md5(uniqid(rand(), true));
      $this->sessionData = array();
    }
  }

  /**
   * Gets session id for the current session storage instance.
   *
   * @return string Session id
   */
  public function getSessionId()
  {
    return $this->sessionId;
  }

  /**
   * Reads data from this storage.
   *
   * The preferred format for a key is directory style so naming conflicts can be avoided.
   *
   * @param  string $key  A unique key identifying your data
   *
   * @return mixed Data associated with the key
   */
  public function read($key)
  {
    $retval = null;

    if (isset($this->sessionData[$key]))
    {
      $retval = $this->sessionData[$key];
    }

    return $retval;
  }

  /**
   * Removes data from this storage.
   *
   * The preferred format for a key is directory style so naming conflicts can be avoided.
   *
   * @param  string $key  A unique key identifying your data
   *
   * @return mixed Data associated with the key
   */
  public function remove($key)
  {
    $retval = null;

    if (isset($this->sessionData[$key]))
    {
      $retval = $this->sessionData[$key];
      unset($this->sessionData[$key]);
    }

    return $retval;
  }

  /**
   * Writes data to this storage.
   *
   * The preferred format for a key is directory style so naming conflicts can be avoided
   *
   * @param string $key   A unique key identifying your data
   * @param mixed  $data  Data associated with your key
   *
   */
  public function write($key, $data)
  {
    $this->sessionData[$key] = $data;
  }

  /**
   * Clears all test sessions.
   */
  public function clear()
  {
    sfToolkit::clearDirectory($this->options['session_path']);
  }

  /**
   * Regenerates id that represents this storage.
   *
   * @param  boolean $destroy Destroy session when regenerating?
   *
   * @return boolean True if session regenerated, false if error
   *
   */
  public function regenerate($destroy = false)
  {
    return true;
  }

  /**
   * Executes the shutdown procedure.
   *
   */
  public function shutdown()
  {
    if ($this->sessionId)
    {
      $current_umask = umask(0000);
      if (!is_dir($this->options['session_path']))
      {
        mkdir($this->options['session_path'], 0777, true);
      }
      umask($current_umask);
      file_put_contents($this->options['session_path'].DIRECTORY_SEPARATOR.$this->sessionId.'.session', serialize($this->sessionData));
      $this->sessionId   = '';
      $this->sessionData = array();
    }
  }
}


text:
#include "scriptinterface.hpp"
#include "luascripting.hpp"

#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include <sstream>

int main(int argc, const char *argv[])
{
  std::vector<std::string> sargs(argv, argv + argc);

  if (sargs.size() != 3)
  {
    std::cout << "Syntax: " << sargs[0] << " <language> <filename>" << std::endl;
    return -1;
  }

  if (sargs[1] == "lua")
  {
    swigstarterkit::Script_Interface si;
    swigstarterkit::Lua_Scripting ls(si);
    std::ifstream f1(sargs[2].c_str(), std::fstream::binary);
    std::stringstream ss;
    ss << f1.rdbuf();
    std::cout << "Executing script: " << std::endl << ss.str() << std::endl;
    std::cout << "================= " << std::endl;
    ls.run_script(ss.str());
    std::cout << "================= " << std::endl;
    std::cout << "Script Responses: " << std::endl;

    int count(0);
    for (std::vector<std::string>::const_iterator itr(si.get_script_responses().begin());
         itr != si.get_script_responses().end();
         ++itr, ++count)
    {
      std::cout << "Resp "<< count << ": " << *itr << std::endl;
    }

  }
}

redpajama_set_name: RedPajamaGithub


text:
<?php
include('class.password.php');

class User extends Password{
    private $_db;
    protected $uid;

    function __construct($db){
        parent::__construct();

        $this->_db = $db;
    }

    public function is_logged_in(){
        if(isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true){
            return true;
        }
    }

    private function get_user_hash($username){
        try {
            $stmt = $this->_db->prepare('SELECT password, memberID FROM blog_members WHERE username = :username');
            $stmt->execute(array('username' => $username));

            $row = $stmt->fetch();
            $_SESSION['uid'] = $row['memberID'];

            return $row['password'];
        } catch(PDOException $e) {
            echo '
'.$e->getMessage().'
';
        }
    }

    public function login($username,$password){
        $hashed = $this->get_user_hash($username);

        if($this->password_verify($password,$hashed) == 1){

            $_SESSION['loggedin'] = true;
            return true;
        }
    }

    public function register(array $details) {
        try {
            $details['password'] = $this->password_hash($details['password'], PASSWORD_BCRYPT);

            $stmt = $this->_db->prepare('INSERT INTO users(username, password, email, name) VALUES (:user, :pass, :email, :name)');
            $stmt->execute(array(
                ':user' => $details['user'],
                ':pass' => $details['password'],
                ':email' => $details['email'],
                ':name' => $details['name']
            ));

            header('Location: index.php');
        } catch(\PDOException $e) {
            echo('
Sorry there was an issue with the registering, try again later
');
        }
    }

    public function logout(){
        session_destroy();
    }

    public function get_user()
    {
        if(isset($_SESSION['uid']) && $_SESSION['uid'] == true) {
            $stmt = $this->_db->prepare('SELECT memberID, name, email FROM blog_members WHERE memberID = :uid');
            $stmt->execute(array('uid' => $_SESSION['uid']));

            $row = $stmt->fetch();

            return $row;
        }
    }
}
?>


text:
package org.pac4j.core.profile.converter;

/**
 * This class only keeps String objects.
 *
 * @author Jerome Leleu
 * @since 1.1.0
 */
public final class StringConverter extends AbstractAttributeConverter {

    public StringConverter() {
        super(String.class);
    }
}


text:
import React from "react"
import PropTypes from "prop-types"
import GatsbyLink from "gatsby-link"

import Example from "./components/Example"

class ComponentPage extends React.Component {
  render() {
    const { displayName, props, html, description } = this.props.pageContext

    return (

{displayName}

{description.text}

Props/Methods

              Name
              Description
              Type
              Required

            {props.map(({ name, description, type, required }, index) => (

                {name}
                {description.text}
                {type.name}
                {String(Boolean(required))}

            ))}

        <Example html={html} />

          <GatsbyLink to="/components/">[index]</GatsbyLink>

    )
  }
}

ComponentPage.propTypes = {
  pageContext: PropTypes.shape({
    displayName: PropTypes.string.isRequired,
    props: PropTypes.array.isRequired,
    html: PropTypes.string.isRequired,
    description: PropTypes.shape({
      text: PropTypes.string.isRequired,
    }),
  }).isRequired,
}

export default ComponentPage


text:
package com.github.nhirakawa.db;

import org.skife.jdbi.v2.sqlobject.SqlQuery;

import com.github.nhirakawa.models.User;
import com.hubspot.rosetta.jdbi.BindWithRosetta;

public interface UserDao {

  @SqlQuery("SELECT EXISTS(SELECT 1 FROM users WHERE username = :username AND password = :password)")
  boolean getUser(@BindWithRosetta User user);
}


text:
package org.apache.drill.exec.store.sys;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import org.apache.drill.common.config.DrillConfig;
import org.apache.drill.common.util.FileUtils;
import org.apache.drill.exec.ExecConstants;
import org.apache.drill.exec.TestWithZookeeper;
import org.apache.drill.exec.coord.zk.PathUtils;
import org.apache.drill.exec.coord.zk.ZookeeperClient;
import org.apache.drill.exec.planner.physical.PlannerSettings;
import org.apache.drill.exec.server.options.PersistedOptionValue;
import org.apache.drill.exec.store.sys.store.provider.LocalPersistentStoreProvider;
import org.apache.drill.exec.store.sys.store.provider.ZookeeperPersistentStoreProvider;
import org.apache.drill.test.ClientFixture;
import org.apache.drill.test.ClusterFixture;
import org.apache.drill.test.FixtureBuilder;
import org.apache.drill.testutils.DirTestWatcher;
import org.apache.zookeeper.CreateMode;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;

import java.io.File;

public class TestPStoreProviders extends TestWithZookeeper {
  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestPStoreProviders.class);

  @Rule
  public DirTestWatcher dirTestWatcher = new DirTestWatcher();

  @Test
  public void verifyLocalStore() throws Exception {
    try(LocalPersistentStoreProvider provider = new LocalPersistentStoreProvider(DrillConfig.create())){
      PStoreTestUtil.test(provider);
    }
  }

  @Test
  public void verifyZkStore() throws Exception {
    try(CuratorFramework curator = createCurator()){
      curator.start();
      ZookeeperPersistentStoreProvider provider = new ZookeeperPersistentStoreProvider(zkHelper.getConfig(), curator);
      PStoreTestUtil.test(provider);
    }
  }

  /**
   * DRILL-5809
   * Note: If this test breaks you are probably breaking backward and forward compatibility. Verify with the community
   * that breaking compatibility is acceptable and planned for.
   * @throws Exception
   */
  @Test
  public void localBackwardCompatabilityTest() throws Exception {
    localLoadTestHelper("src/test/resources/options/store/local/old/sys.options");
  }

  private void localLoadTestHelper(String propertiesDir) throws Exception {
    File localOptionsResources = new File(propertiesDir);

    String optionsDirPath = String.format("%s/sys.options", dirTestWatcher.getDirPath());
    File optionsDir = new File(optionsDirPath);
    optionsDir.mkdirs();

    org.apache.commons.io.FileUtils.copyDirectory(localOptionsResources, optionsDir);

    FixtureBuilder builder = ClusterFixture.builder().
      configProperty(ExecConstants.HTTP_ENABLE, false).
      configProperty(ExecConstants.SYS_STORE_PROVIDER_CLASS, LocalPersistentStoreProvider.class.getCanonicalName()).
      configProperty(ExecConstants.SYS_STORE_PROVIDER_LOCAL_PATH, String.format("file://%s", dirTestWatcher.getDirPath())).
      configProperty(ExecConstants.SYS_STORE_PROVIDER_LOCAL_ENABLE_WRITE, true);

    try (ClusterFixture cluster = builder.build();
         ClientFixture client = cluster.clientFixture()) {
      String parquetPushdown = client.queryBuilder().
        sql("SELECT val FROM sys.%s where name='%s'",
          SystemTable.OPTION_VAL.getTableName(),
          PlannerSettings.PARQUET_ROWGROUP_FILTER_PUSHDOWN_PLANNING_THRESHOLD_KEY).
        singletonString();

      String plannerWidth = client.queryBuilder().
        sql("SELECT val FROM sys.%s where name='%s'",
          SystemTable.OPTION_VAL.getTableName(),
          ExecConstants.MAX_WIDTH_GLOBAL_KEY).
        singletonString();

      Assert.assertEquals("30000", parquetPushdown);
      Assert.assertEquals("3333", plannerWidth);
    }
  }

  /**
   * DRILL-5809
   * Note: If this test breaks you are probably breaking backward and forward compatibility. Verify with the community
   * that breaking compatibility is acceptable and planned for.
   * @throws Exception
   */
  @Test
  public void zkBackwardCompatabilityTest() throws Exception {
    final String oldName = "myOldOption";

    try (CuratorFramework curator = createCurator()) {
      curator.start();

      PersistentStoreConfig<PersistedOptionValue> storeConfig =
        PersistentStoreConfig.newJacksonBuilder(new ObjectMapper(), PersistedOptionValue.class).name("sys.test").build();

      try (ZookeeperClient zkClient = new ZookeeperClient(curator,
        PathUtils.join("/", storeConfig.getName()), CreateMode.PERSISTENT)) {
        zkClient.start();
        String oldOptionJson = FileUtils.getResourceAsString("/options/old_booleanopt.json");
        zkClient.put(oldName, oldOptionJson.getBytes(), null);
      }

      try (ZookeeperPersistentStoreProvider provider =
        new ZookeeperPersistentStoreProvider(zkHelper.getConfig(), curator)) {
        PersistentStore<PersistedOptionValue> store = provider.getOrCreateStore(storeConfig);

        PersistedOptionValue oldOptionValue = store.get(oldName, null);
        PersistedOptionValue expectedValue = new PersistedOptionValue("true");

        Assert.assertEquals(expectedValue, oldOptionValue);
      }
    }
  }

  private CuratorFramework createCurator() {
    String connect = zkHelper.getConnectionString();
    DrillConfig config = zkHelper.getConfig();

    CuratorFrameworkFactory.Builder builder = CuratorFrameworkFactory.builder()
      .namespace(zkHelper.getConfig().getString(ExecConstants.ZK_ROOT))
      .retryPolicy(new RetryNTimes(1, 100))
      .connectionTimeoutMs(config.getInt(ExecConstants.ZK_TIMEOUT))
      .connectString(connect);

    return builder.build();
  }
}


text:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<TITLE>CLHS: Issue ADJUST-ARRAY-DISPLACEMENT Writeup</TITLE>
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="The Harlequin Group Limited">
<LINK REL=TOP HREF="../FrontMatter/index.html">
<LINK REL=COPYRIGHT HREF="../FrontMatter/About-HyperSpec.html#Legal">
<LINK REL=DISCLAIMER HREF="../FrontMatter/About-HyperSpec.html#Disclaimer">
<LINK REL=PREV HREF="../Issues/iss002-writeup.html">
<LINK REL=UP HREF="../Issues/iss003.html">
<LINK REL=NEXT HREF="../Issues/iss004-writeup.html">

Issue ADJUST-ARRAY-DISPLACEMENT Writeup

Issue:        ADJUST-ARRAY-DISPLACEMENT

Reference:    ADJUST-ARRAY (CLtL p.297)

Category:     Clarification

Edit history: Version 1 by Fahlman, 18-Apr-87 (from Steele's list)

              Version 2 by Masinter

              Version 3 by Masinter, 5-Jun-87 (respond to comments)

              Version 4 by Masinter, 23-Nov-87

Problem Description:

The interaction of ADJUST-ARRAY and displaced arrays is insufficiently specified

in the case where the array being adjusted is displaced.

Proposal: ADJUST-ARRAY-DISPLAYCEMENT:RULES

Interaction of adjusting and displacement:

Suppose we are adjusting array A, which is perhaps displaced to B before the

ADJUST-ARRAY call and perhaps to C after the call.

(1) A is not displaced before or after: The dimensions of A are altered, and the

contents rearranged as appropriate.  Additional elements of A are taken from the

:INITIAL-ELEMENT.  The use of :INITIAL-CONTENTS causes all old contents to be

discarded.

(2) A is not displaced before, but is displaced to C after.  As specified in

CLtL, none of the original contents of A appears in A afterwards; A now contains

the contents of C, without any rearrangement of C.

(3) A is displaced to B before the call, and is displaced to C after the call.

(B and C may be the same.) As in case (2), the contents of B do not appear in A

afterward (unless such contents also happen to be in C).  If

:DISPLACED-INDEX-OFFSET is not specified in the ADJUST-ARRAY call, it defaults

to zero; the old offset (into B) is not retained.

(4) A is displaced to B before the call, but not displaced afterward.  A gets a

new "data region", and contents of B are copied into it as appropriate to

maintain the existing old contents; additional elements of A are taken from the

:INITIAL-ELEMENT.  However, the use of :INITIAL-CONTENTS causes all old contents

to be discarded.

If array X is displaced to array Y, and array Y is displaced to array Z, and

array Y is altered by ADJUST-ARRAY, array X must now refer to the adjusted

contents of Y.  This means that an implementation may not collapse the chain to

make X refer to Z directly and forget that the chain of reference passes through

array Y.  (Cacheing techniques are of course permitted, as long as they preserve

the semantics specified here and in CLtL.)

If X is displaced to Y, it is an error to adjust Y in such a way that it no

longer has enough elements to satisfy X.  This error may be signalled at the

time of the adjustment, but this is not required.

Note: Omitting the :DISPLACED-TO argument to ADJUST-ARRAY is equivalent to

specifying :DISPLACED-TO NIL; in either case, the array is not displaced after

the call and case (1) or (4) hold.

Rationale:

This interaction must be clarified.  This set of rules was proposed some time

ago, as a result of discussions on the Common Lisp mailing list, and this model

has been adopted by many Common Lisp implementations.

Current Practice:

Many implementations currently follow the model proposed here, although they

differ in some detail. For example, Symbolics Common Lisp behaves as indicated

except for case (4); in that case, it never copies the contents of B, and all

elements are taken from the :INITIAL-ELEMENT.

Cost to implementors:

Some existing implementations may have to be changed, but adopting any other

model would be worse.  Public-domain code implementing this model is available

from CMU.

Cost to users:

This is a relatively uncommon situation, which is the reason it didn't occur to

the original language designers to specify how it works.  Any user code that

cares about this issue probably already follows the proposed model.

Benefits:

Clarification of a situation that is currently not addressed by the standard.

Discussion:

The cleanup committee supports this clarification.

Some consideration was given to adding DISPLACED-ARRAY-P or ARRAY-DISPLACED-TO

and ARRAY-DISPLACED-INDEX-OFFSET which would allow access to information as to

whether an array was or was not displaced. However, these are not part of the

current proposal.

A similar issue arises with ADJUST-ARRAY and fill pointers, and will be the

subject of a separate issue.

Copyright 1996, The Harlequin Group Limited.  All Rights Reserved.


text:
import {
  UPDATE_THROUGHPUT,
  UPDATE_LEAD_TIME
} from '../actions';

const app = (state = {
  throughput: NaN
}, action) => {
  switch (action.type) {
    case UPDATE_THROUGHPUT:
      return {
        ...state,
        throughput: action.throughput
      };
    case UPDATE_LEAD_TIME:
      return {
        ...state,
        leadTime: action.leadTime
      };
    default:
      return state;
  }
};

export default app;


text:
#include "BasicDemo.h"
#include "GlutStuff.h"
#include "GLDebugDrawer.h"
#include "btBulletDynamicsCommon.h"
#include "LinearMath/btHashMap.h"

class OurValue
	{
		int m_uid;

	public:
		OurValue(const btVector3& initialPos)
			:m_position(initialPos)
		{
			static int gUid=0;
			m_uid=gUid;
			gUid++;
		}

		btVector3	m_position;
		int	getUid() const
		{
			return m_uid;
		}
	};

int main(int argc,char** argv)
{
	GLDebugDrawer	gDebugDrawer;

	///testing the btHashMap
	btHashMap<btHashKey<OurValue>,OurValue> map;

	OurValue value1(btVector3(2,3,4));
	btHashKey<OurValue> key1(value1.getUid());
	map.insert(key1,value1);

	OurValue value2(btVector3(5,6,7));
	btHashKey<OurValue> key2(value2.getUid());
	map.insert(key2,value2);

	{
		OurValue value3(btVector3(7,8,9));
		btHashKey<OurValue> key3(value3.getUid());
		map.insert(key3,value3);
	}

	map.remove(key2);

	const OurValue* ourPtr = map.find(key1);
	for (int i=0;i<map.size();i++)
	{
		OurValue* tmp = map.getAtIndex(i);
		//printf("tmp value=%f,%f,%f\n",tmp->m_position.getX(),tmp->m_position.getY(),tmp->m_position.getZ());
	}

	BasicDemo ccdDemo;
	ccdDemo.initPhysics();
	ccdDemo.getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);

#ifdef CHECK_MEMORY_LEAKS
	ccdDemo.exitPhysics();
#else
	return glutmain(argc, argv,640,480,"Bullet Physics Demo. http://bulletphysics.com",&ccdDemo);
#endif

	//default glut doesn't return from mainloop
	return 0;
}


text:
function Moon( scene, light ) {
  var uniforms = Object.assign(
      THREE.UniformsLib['lights'],
      THREE.UniformsLib['normalmap'],
      {
        lightPosition: { type: 'v3', value: light.position },
        textureMap: { type: 't', value: Texture.map },
        normalMap: { type: 't', value: Texture.normalmap },
        uvScale: { type: 'v2', value: new THREE.Vector2( 1.0, 1.0 ) }
        // specular: { type: 'c', value: new THREE.Color('grey') }
      }
  );
  // var _geometry = new THREE.BufferGeometry().fromGeometry( new THREE.SphereGeometry( 140, 256, 256 ) );
  var _geometry = new THREE.SphereBufferGeometry( 140, 256, 256 );

  var _material = new THREE.ShaderMaterial({
    uniforms: uniforms,
    defines: {
      M_PI: Math.PI
    },
    vertexShader: Shader.moon.vertex,
    fragmentShader: Shader.moon.fragment,
    lights: true,
    fog: false
  });

  var _mesh = new THREE.Mesh(_geometry, _material);

  _mesh.castShadow = true;
  _mesh.receiveShadow = true;
  THREE.BufferGeometryUtils.computeTangents( _mesh.geometry );

  this.mesh = _mesh;
  this.material = _material;
  this.geometry = _geometry;

  scene.add(_mesh);

  return this;

}

Moon.prototype.animate = function () {
  var axis = new THREE.Vector3(0, 1, 0).normalize();
  this.mesh.rotateOnAxis(axis, 0.005);
};


text:
<?php

class RoleController extends Sso_Controller_Action
{
    /**
     *
     *
     * @throws Sso_Exception_InvalidAuth
     */
    public function postAction() {
        $this->_requireValidToken();
        $role = $this->_request->identifier;

        $content_type = 'role';
        $role = Sso_Model_Role::create($role, $this->getRequest()->getParams());
        $result = (array) $role;

        $result = $this->_helper->serviceFormat($content_type, $result);
        $this->_helper->serviceJson($result);
    }

    /**
     *
     *
     * @throws Sso_Exception_InvalidAuth
     */
    public function deleteAction() {
        $this->_requireValidToken();
        $role = $this->_request->identifier;

        // delete the role, ignore any failure
        try {
            $role_object = Sso_Model_Role::fetch($role);
            $role_object->delete();
        } catch(Exception $e) {
            // that's OK, we don't care if we found it or deleted it or what
        }
        $content_type = 'role';
        $result = array('true');

        $result = $this->_helper->serviceFormat($content_type, $result);
        $this->_helper->serviceJson($result);
    }

    /**
     *
     *
     * @throws Sso_Exception_InvalidAuth
     * @throws Sso_Exception_NotFound
     */
    public function getAction() {
        $this->_requireValidToken();
        $role = $this->_request->identifier;
        $order = $this->getRequest()->getParam('order');
        $direction = $this->getRequest()->getParam('direction');

        $link = $this->getRequest()->getParam('link');
        $role = Sso_Model_Role::fetch($role, $order, $direction);

        if (!empty($link)) {
            // this is a subrequest

            switch($link) {
                case 'right':
                    // return the rights for this role
                    $content_type = 'right';
                    $result = (array) $role->getRights();
                    break;
                case 'children':
                    // return the child roles of this role
                    $content_type = 'role';
                    $result = (array) $role->getChildren($order, $direction);
                    break;
                default:
                    throw new Sso_Exception_NotFound('Unknown subrequest');
                    break;
            }
        } else {
            $content_type = 'role';
            $result = (array) $role;
        }

        $result = $this->_helper->serviceFormat($content_type, $result);
        $this->_helper->serviceJson($result);
    }

    /**
     *
     *
     * @throws Sso_Exception_InvalidAuth
     * @throws Sso_Exception_NotFound
     */
    public function putAction() {
        $this->_requireValidToken();
        $role = $this->_request->identifier;

        $link = $this->getRequest()->getParam('link');
        if (!empty($link)) {
            switch($link) {
                default:
                    throw new Sso_Exception_NotFound('Unknown subrequest');
                    break;
            }

        } else {
            // return the updated role data
            $content_type = 'role';
            $role_object = Sso_Model_Role::fetch($role);
            $role_object->update($this->getRequest()->getParams());
			$newName = $this->getRequest()->getParam('name');
			if (!empty($newName)) {
				$role = $newName;
			}
            $result = (array) Sso_Model_Role::fetch($role);
        }

        $result = $this->_helper->serviceFormat($content_type, $result);
        $this->_helper->serviceJson($result);
    }
}


text:
@interface MUKCirclePullToRefreshControlCircleView : UIView
@property (nonatomic) float filledFraction;
@end

@implementation MUKCirclePullToRefreshControlCircleView

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        CAShapeLayer *const layer = (CAShapeLayer *)self.layer;
        layer.fillColor = [UIColor clearColor].CGColor;
        layer.lineWidth = 2.0f;
        layer.strokeColor = self.tintColor.CGColor;
        layer.strokeEnd = 0.0f; // because _filledFraction = 0
    }

    return self;
}

+ (Class)layerClass {
    return [CAShapeLayer class];
}

- (void)tintColorDidChange {
    [super tintColorDidChange];
    CAShapeLayer *const layer = (CAShapeLayer *)self.layer;
    layer.strokeColor = self.tintColor.CGColor;
}

- (void)layoutSubviews {
    [super layoutSubviews];

    CAShapeLayer *const layer = (CAShapeLayer *)self.layer;
    if (!CGRectEqualToRect(CGPathGetBoundingBox(layer.path), self.bounds)) {
        CGFloat const radius = CGRectGetWidth(self.bounds)/2.0f;
        CGPoint const center = CGPointMake(radius, radius);
        UIBezierPath *const bezierPath = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:-M_PI/2.0f endAngle:M_PI*2.0f clockwise:YES];
        layer.path = bezierPath.CGPath;
    }
}

- (void)setFilledFraction:(float)filledFraction {
    if (filledFraction != _filledFraction) {
        _filledFraction = filledFraction;

        CAShapeLayer *const layer = (CAShapeLayer *)self.layer;
        layer.strokeEnd = filledFraction;
    }
}

@end

#pragma mark -

@interface MUKCirclePullToRefreshControl ()
@property (nonatomic, weak, nullable) MUKCirclePullToRefreshControlCircleView *circleView;
@property (nonatomic, readwrite, weak, nullable) UIActivityIndicatorView *activityIndicatorView;
@end

@implementation MUKCirclePullToRefreshControl

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        CommonInit(self);
    }

    return self;
}

- (id)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        CommonInit(self);
    }

    return self;
}

#pragma mark - Accessors

- (void)setRevealHeight:(CGFloat)revealHeight {
    [super setRevealHeight:revealHeight];
    [self updateCircleViewLayout];
}

#pragma mark - Overrides

- (void)didChangeRevealStateFromState:(MUKPullToRevealControlState)oldState {
    [super didChangeRevealStateFromState:oldState];

    [UIView animateWithDuration:0.2 animations:^{
        switch (self.revealState) {
            case MUKPullToRevealControlStateRevealed: {
                self.circleView.alpha = 0.0f;
                [self.activityIndicatorView startAnimating];
                break;
            }

            case MUKPullToRevealControlStatePulled: {
                self.circleView.alpha = 0.0f;
                [self.activityIndicatorView startAnimating];
                break;
            }

            case MUKPullToRevealControlStatePulling : {
                self.circleView.alpha = 1.0f;
                [self.activityIndicatorView stopAnimating];
                break;
            }

            case MUKPullToRevealControlStateCovered : {
                self.circleView.alpha = 0.0f;
                [self.activityIndicatorView stopAnimating];
                break;
            }

            default:
                break;
        }
    }];
}

- (void)didChangePulledHeight:(CGFloat)pulledHeight {
    [super didChangePulledHeight:pulledHeight];

    // Do not overlap with contents
    CGFloat const ignoredHeight = 0.37f * self.revealHeight;

    float progress;
    if (pulledHeight < ignoredHeight) {
        progress = 0.0f;
    }
    else {
        progress = (pulledHeight - ignoredHeight)/(self.revealHeight - ignoredHeight);
        progress = progress >= 0.0f ? progress : 0.0f;
        progress = progress <= 1.0f ? progress : 1.0f;
    }

    self.circleView.filledFraction = progress;
}

#pragma mark - Private

static void CommonInit(MUKCirclePullToRefreshControl *__nonnull me) {
    me.clipsToBounds = NO;
    [me insertCircleViewIfNeeded];
    [me insertActivityIndicatorViewIfNeededAlignedWithCircleView:me.circleView];
}

#pragma mark - Private — Circle View

- (CGRect)newCircleViewFrame {
    UIEdgeInsets const insets = UIEdgeInsetsMake(13.0f, 0.0f, 27.0f, 0.0f);
    CGFloat const height = self.revealHeight - insets.top - insets.bottom;
    return CGRectMake(roundf(CGRectGetMidX(self.bounds) - height/2.0f), insets.top, height, height);
}

- (void)insertCircleViewIfNeeded {
    if (!self.circleView) {
        // Insert new
        MUKCirclePullToRefreshControlCircleView *const circleView = [[MUKCirclePullToRefreshControlCircleView alloc] initWithFrame:[self newCircleViewFrame]];
        circleView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin|UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleBottomMargin;
        [self addSubview:circleView];
        self.circleView = circleView;
    }
}

- (void)updateCircleViewLayout {
    // Update frame
    self.circleView.frame = [self newCircleViewFrame];
}

#pragma mark - Private — Activity Indicator View

- (void)insertActivityIndicatorViewIfNeededAlignedWithCircleView:(MUKCirclePullToRefreshControlCircleView *__nonnull)circleView
{
    if (!self.activityIndicatorView) {
        UIActivityIndicatorView *view = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
        view.translatesAutoresizingMaskIntoConstraints = NO;
        [self addSubview:view];
        self.activityIndicatorView = view;

        [self addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:circleView attribute:NSLayoutAttributeCenterX multiplier:1.0f constant:0.0f]];
        [self addConstraint:[NSLayoutConstraint constraintWithItem:view attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:circleView attribute:NSLayoutAttributeCenterY multiplier:1.0f constant:0.0f]];
    }
}

@end


text:
layout: page
title: Bray Productions Dinner
date: 2016-05-24
author: Gerald Oneill
tags: weekly links, java
status: published
summary: Proin rhoncus neque vel tortor facilisis, non.
banner: images/banner/leisure-04.jpg
booking:
  startDate: 12/16/2016
  endDate: 12/20/2016
  ctyhocn: PITDNHX
  groupCode: BPD
published: true
---
Fusce in interdum dolor, sed congue ligula. Phasellus consectetur molestie aliquam. Morbi posuere, sem vitae mattis posuere, sapien neque malesuada felis, ac iaculis arcu arcu et turpis. Suspendisse consequat ex ac metus imperdiet interdum. Nunc malesuada tempor mi quis tincidunt. Quisque eget tellus non lorem suscipit gravida et non tortor. In in gravida quam. Aenean imperdiet semper dolor id imperdiet. Nam bibendum cursus maximus. Praesent in augue ac sem pretium porta. Phasellus fringilla at dui vitae rutrum. Donec at nisl suscipit leo iaculis bibendum id vel nibh.

* Vivamus ultricies urna sit amet urna maximus bibendum
* Nam feugiat sapien quis sapien dictum suscipit
* Pellentesque nec diam eu lacus cursus viverra
* Ut nec quam ac nisl porta gravida in vitae turpis
* Sed faucibus tortor eget gravida egestas
* Maecenas dapibus libero quis sem tincidunt venenatis.

Maecenas elit metus, dapibus eu rutrum non, placerat in velit. Praesent id nulla tellus. Maecenas volutpat sollicitudin justo finibus porttitor. Maecenas accumsan suscipit sem quis laoreet. Nullam posuere mollis ultricies. Nulla eu lobortis nisl. Etiam non erat vitae eros volutpat placerat. Cras auctor odio sit amet nisl auctor, viverra bibendum enim pulvinar. Duis facilisis tellus eu est cursus efficitur. Integer eleifend in lectus eget ultrices. Mauris ornare iaculis posuere. Morbi et erat quis dolor commodo elementum. Sed quam ligula, facilisis ornare orci id, suscipit tristique justo. Nullam sagittis luctus dui, at bibendum libero. Fusce erat enim, molestie eget egestas ac, imperdiet in diam. Phasellus ornare dignissim ex, eu pellentesque velit mollis tempus.


text:
namespace CSTest
{
    //------------------------------------------------------------------------------
    /// The main application class, providing the entry point to the a CS app and
    /// events for creating systems and pushing the first state.
    ///
    /// @author Ian Copland
    //------------------------------------------------------------------------------
    class App final : public CS::Application
    {
        //------------------------------------------------------------------------------
        /// The life-cycle event for creating all application systems.
        ///
        /// @author Ian Copland
        //------------------------------------------------------------------------------
        void CreateSystems() noexcept override;
        //------------------------------------------------------------------------------
        /// Initialisation event called immediately after create systems and before
        /// push initial state.
        ///
        /// @author Ian Copland
        //------------------------------------------------------------------------------
        void OnInit() noexcept override;
        //------------------------------------------------------------------------------
        /// Creates the first state that will be added to the state stack.
        ///
        /// @author Ian Copland
        //------------------------------------------------------------------------------
        void PushInitialState() noexcept override;
        //------------------------------------------------------------------------------
        /// Called when the application is about to be destroyed.
        ///
        /// @author Ian Copland
        //------------------------------------------------------------------------------
        void OnDestroy() noexcept override;

    public:
        //------------------------------------------------------------------------------
        /// Constructor; needs the SystemInfo class to get information about device,
        /// platform, and screen.
        ///
        /// @author Jordan Brown
        //------------------------------------------------------------------------------
        App(CS::SystemInfoCUPtr systemInfo) noexcept;
    };
}

#endif


text:
/*
    GAME MAIN

    the final script to call from the webpage?
    this contains webGLStart() which is called on load
*/

var gl;
var glcanvas;

var lastX;
var lastY;
var dragging = false;
var justClicked = false;
var MOUSERATE = 0.005;

// game related
var prevState;
var currentState;

function repaint() {
    currentState.render();
}

//*** MOUSE INTERACTION ***//
function getMousePos(evt) {
    var rect = glcanvas.getBoundingClientRect();
    return {
        X: evt.clientX - rect.left,
        Y: evt.clientY - rect.top
    };
}
function releaseClick(evt) {
    evt.preventDefault();
    dragging = false;
    if (typeof currentState.releaseClick !== 'undefined') {
        currentState.releaseClick(evt);
    }
    return false;
}

function makeClick(evt) {
    evt.preventDefault();
    dragging = true;
    justClicked = true;
    var mousePos = getMousePos(evt);
    lastX = mousePos.X;
    lastY = mousePos.Y;
    if (typeof currentState.makeClick !== 'undefined') {
        currentState.makeClick(evt);
    }
    return false;
}

function clickerDragged(evt) {
    evt.preventDefault();
    var mousePos = getMousePos(evt);
    var dx = mousePos.X - lastX;
    var dy = mousePos.Y - lastY;
    lastX = mousePos.X;
    lastY = mousePos.Y;
    if (dragging) {
        if (typeof currentState.clickerDragged !== 'undefined') {
            currentState.clickerDragged(evt,dx,dy);
        }
    }
    return false;
}

//*** INIT ***//
// <body onload="webGLStart();" text = "white" bgcolor = "black">
function webGLStart() {
    glcanvas = document.getElementById("MainGLCanvas");

    glcanvas.addEventListener('mousedown', makeClick     );
    glcanvas.addEventListener('mouseup'  , releaseClick  );
    glcanvas.addEventListener('mousemove', clickerDragged);

    //Support for mobile devices
    glcanvas.addEventListener('touchstart', makeClick     );
    glcanvas.addEventListener('touchend'  , releaseClick  );
    glcanvas.addEventListener('touchmove' , clickerDragged);

    initGL(glcanvas);
    initShaders();
    initGLBuffers();
    initTextures();
    initPickingFramebuffer(glcanvas);

    gl.clearColor(0.0, 0.0, 0.0, 1.0);
    gl.enable(gl.DEPTH_TEST);

    var gameState = {
        Intro        :  new Intro,          // short introduction before start menu
        StartMenu    :  new StartMenu,      // leads to game, scoreboard, or instructions
        Game         :  new Game,           // main gameplay
        PauseMenu    :  new PauseMenu,      // leads to instructions or the start menu
        Scoreboard   :  new Scoreboard,     // scoreboard for only current session atm
        Instructions :  new Instructions,   // game instructions
        //Failure      :  new Failure         // a screen to display errors i guess?
    };
    //currentState = gameState.Intro;
    //currentState = gameState.Instructions;
    currentState = gameState.Game;
    requestAnimFrame(repaint);
}


text:
<?php

namespace Ckdarby\PropagandaBundle;

use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;

class AbstractCommand extends ContainerAwareCommand
{

    public function __construct()
    {
        parent::__construct();
    }

    public function log($message, $type = "debug")
    {
        $logger = $this->getContainer()->get('logger');
        if(array_key_exists(strtoupper($type), $logger->getLevels())) {
            $logger->$type($message);
        } else {
            $logger->debug('Unknown logging type');
        }
    }
}


text:
package grinder

import java.io.File
import scala.xml.NodeSeq.seqToNodeSeq

case class TestCase(testTitle: String, testHref: String, refrenceValue: String, referenceHref: String, flagTitle: String, flags: Seq[String])

class CssReftestXmlParser {

  val UNSUPPORTED_FLAGS = List("Interact","Paged")

  private implicit def node2Convenience(n:xml.Node) = new {
    def attrib(key: String):String = {
      n.attribute(key).head.text
    }

    def firstChild(tag: String) = {
      (n \\ tag).head
    }
  }

  def parse(reftestXmlFile: File) = {

    val refTestXml = XmlUtils.loadXmlFromFile(reftestXmlFile)
    val rows = refTestXml \\ "tbody"

    val testCases = rows.map(row => {
      val trs = row \\ "tr"
      val tdNodes = trs.head \\ "td"
      val td0 = tdNodes.head
      val td1 = tdNodes(1)
      val td2 = tdNodes(2)
      val testTitle = td0.attrib("title")
      val testHref = td0.firstChild("a").attrib("href")
      val refrenceValue = td1.firstChild("a").text
      val refrenceHref = td1.firstChild("a").attrib("href")
      val flagTitle = (td2 \\ "abbr").map(node => node.attrib("title")).mkString(" ")
      val flagValue = (td2 \\ "abbr").map(node => node.head.text).mkString(" ")

      TestCase(testTitle, testHref, refrenceValue, refrenceHref, flagTitle, flagValue.split("\\s+").filter(_.length > 0))
    }).filterNot(hasUnsupportedFlag)

    println("Supported test cases: " + testCases.length)

    val testCaseXml = <tests>
      {testCases.map(testCase => {
        <test id={testCase.testHref}>
          <test-title>{testCase.testTitle}</test-title>
          <test-href>{testCase.testHref}</test-href>
          <reference-value>{testCase.refrenceValue}</reference-value>
          <reference-href>{testCase.referenceHref}</reference-href>
          {
            if (!testCase.flags.isEmpty) {
              <flags>
              {
                testCase.flags.map { flag => <flag>{flag}</flag> }
              }
              </flags>
            }
          }
        </test>
      })}
    </tests>

    testCaseXml
  }

  def hasUnsupportedFlag: (TestCase) => Boolean = {
    testCase => UNSUPPORTED_FLAGS.exists(flag => testCase.flags.contains(flag))
  }
}


text:
package jetbrains.buildServer.runAs.agent;

import org.jetbrains.annotations.NotNull;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import static org.assertj.core.api.BDDAssertions.then;

public class WindowsArgumentConverterTest {

  @DataProvider(name = "convertCases")
  public Object[][] getConvertCases() {
    return new Object[][] {
      { "a b", "\"a b\"" },
      { "", "\"\"" },
      { " ", "\" \"" },
      { "a \"b", "\"a \"\"b\"" },
      { "\"a b\"", "\"a b\"" }, //TW-50069 runAs fails to run NUnit tests if path to an agent contains spaces
    };
  }

  @Test(dataProvider = "convertCases")
  public void shouldConvert(@NotNull final String arg, @NotNull final String expectedConvertedArf) {
    // Given
    final Converter<String, String> instance = createInstance();

    // When
    final String actualConvertedArf = instance.convert(arg);

    // Then
    then(actualConvertedArf ).isEqualTo(expectedConvertedArf);
  }

  @NotNull
  private Converter<String, String> createInstance()
  {
    return new WindowsArgumentConverter();
  }
}


text:
{
padding:0;
}

.SchemaDesignTab .PanelContainer
{
position:absolute;
top:10px;
left:10px;
right:10px;
bottom:10px;
}

.SchemaDesignTab #SchemaDesignFields
{
height:250px;
}

.SchemaDesignTab .panel > .head
{
height:14px;
border-color:#a1a9b2;
padding-left:10px;
}

.SchemaDesignTab .panel > .head > .icon
{
background-image:url({ThemePath[Base]}Images/Controls/Panel/minimize_group.png);
}

.SchemaDesignTab .panel.closed > .head > .icon
{
background-image:url({ThemePath[Base]}Images/Controls/Panel/expand_group.png);
}

.SchemaDesignTab .panel.closed #SchemaDesignPanelContentWrapper
{
display:none;
}

.SchemaDesignTab .panel > .body
{
border-style:none;
padding:15px 30px;
min-height:0;
}

.SchemaDesignTab #SchemaDesignPanelContentWrapper
{
position:relative;
height:100%;
}

.SchemaDesignTab #SchemaDesignPanelContentWrapper #SchemaDesignBtnRemoveField
{
margin-left:10px;
}

.SchemaDesignTab #SchemaDesignPanelContentWrapper #SchemaDesignBtnMoveFieldUp
{
position:absolute;
top:0;
}

.SchemaDesignTab #SchemaDesignPanelContentWrapper #SchemaDesignBtnMoveFieldDown
{
position:absolute;
top:30px;
}

.SchemaDesignTab #SchemaDesignListButtonWrapper
{
position:absolute;
bottom:0;
height:25px;
}

.SchemaDesignTab #SchemaDesignMoveUpDownButtonWrapper
{
position:absolute;
top:0;
right:0;
bottom:0;
width:135px;
}

.SchemaDesignTab #SchemaDesignFieldsList
{
position:absolute;
top:0;
right:150px;
bottom:40px;
left:0;
}

.SchemaDesignTab #SchemaDesignFieldDetails
{
margin:10px 0 0 0;
}


text:
/*
 * 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.facebook.presto.delta;

import com.facebook.airlift.bootstrap.Bootstrap;
import com.facebook.airlift.json.JsonModule;
import com.facebook.presto.hive.authentication.HiveAuthenticationModule;
import com.facebook.presto.hive.gcs.HiveGcsModule;
import com.facebook.presto.hive.metastore.HiveMetastoreModule;
import com.facebook.presto.hive.s3.HiveS3Module;
import com.facebook.presto.spi.ConnectorHandleResolver;
import com.facebook.presto.spi.connector.Connector;
import com.facebook.presto.spi.connector.ConnectorContext;
import com.facebook.presto.spi.connector.ConnectorFactory;
import com.facebook.presto.spi.relation.RowExpressionService;
import com.google.inject.Injector;

import java.util.Map;
import java.util.Optional;

import static com.google.common.base.Throwables.throwIfUnchecked;
import static java.util.Objects.requireNonNull;

public class DeltaConnectorFactory
        implements ConnectorFactory
{
    @Override
    public String getName()
    {
        return "delta";
    }

    @Override
    public ConnectorHandleResolver getHandleResolver()
    {
        return new DeltaConnectionHandleResolver();
    }

    @Override
    public Connector create(String catalogName, Map<String, String> requiredConfig, ConnectorContext context)
    {
        requireNonNull(requiredConfig, "requiredConfig is null");
        try {
            Bootstrap app = new Bootstrap(
                    new JsonModule(),
                    new DeltaModule(catalogName, context.getTypeManager()),
                    new HiveS3Module(catalogName),
                    new HiveGcsModule(),
                    new HiveAuthenticationModule(),
                    new HiveMetastoreModule(catalogName, Optional.empty()),
                    binder -> {
                        binder.bind(RowExpressionService.class).toInstance(context.getRowExpressionService());
                    });

            Injector injector = app
                    .doNotInitializeLogging()
                    .setRequiredConfigurationProperties(requiredConfig)
                    .initialize();

            return injector.getInstance(DeltaConnector.class);
        }
        catch (Exception exception) {
            throwIfUnchecked(exception);
            throw new RuntimeException(exception);
        }
    }
}


text:
package org.apache.geronimo.gshell.artifact.ivy;

import org.apache.ivy.Ivy;
import org.apache.ivy.util.AbstractMessageLogger;
import org.apache.ivy.util.Message;
import org.apache.ivy.util.MessageLogger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Ivy {@link MessageLogger} to SLF4J adapter.
 *
 * @version $Rev$ $Date$
 */
public final class Slf4jMessageLogger
    extends AbstractMessageLogger
{
    private static final Logger log = LoggerFactory.getLogger(Ivy.class);

    public void log(final String msg, final int level) {
        switch (level) {
            case Message.MSG_ERR:
                log.error(msg);
                break;

            case Message.MSG_WARN:
                log.warn(msg);
                break;

            case Message.MSG_INFO:
                log.debug(msg);
                break;

            case Message.MSG_VERBOSE:
            case Message.MSG_DEBUG:
                log.trace(msg);
                break;

            default:
                log.error("Unknown level: {}, message: {}", level, msg);
        }
    }

    public void rawlog(final String msg, final int level) {
        log(msg, level);
    }

    public void doProgress() {
        // ignore
    }

    public void doEndProgress(final String msg) {
        // ignore
    }
}


text:
require_relative '../../spec_helper'

ruby_version_is ""..."3.1" do
  require 'matrix'

  describe "Matrix#hash" do

    it "returns an Integer" do
      Matrix[ [1,2] ].hash.should be_an_instance_of(Integer)
    end

    it "returns the same value for the same matrix" do
      data = [ [40,5], [2,7] ]
      Matrix[ *data ].hash.should == Matrix[ *data ].hash
    end

  end
end


text: nodejs social network


text:
// Write a program that extracts from a given sequence of strings all elements that present in it odd number of times.Example:

namespace FindOddOccurencies
{
    using System;
    using System.Linq;

    public class Startup
    {
        public static void Main()
        {
            // Example input: C#, SQL, PHP, PHP, SQL, SQL
            var splittedInput = Console.ReadLine().Split(',');
            var oddOccurencies = splittedInput.GroupBy(x => x.Trim())
                                              .Where(gr => gr.Count() % 2 != 0)
                                              .Select(gr => gr.Key);

            Console.WriteLine(string.Join(", ", oddOccurencies));
        }
    }
}


text: transfer_cookbook "from_definition.txt"


text:
package params

import (
	"bytes"
	"encoding/gob"
	"encoding/xml"
	"io"
	"io/ioutil"
	"mime/multipart"
	"net/http"
	"net/url"
	"os"
	"strings"
	"testing"

	"github.com/dolab/httpdispatch"
	"github.com/golib/assert"
)

func Test_ParamsHasQuery(t *testing.T) {
	it := assert.New(t)

	request, _ := http.NewRequest("GET", "/path/to/resource?test&key=url_value", nil)

	p := NewParams(request, httpdispatch.Params{})
	it.True(p.HasQuery("test"))
	it.True(p.HasQuery("key"))
	it.False(p.HasQuery("un-existed-key"))
}

func Test_ParamsHasForm(t *testing.T) {
	it := assert.New(t)

	params := url.Values{}
	params.Add("key", "name")

	request, _ := http.NewRequest("PUT", "/path/to/resource?test&key=url_value", bytes.NewBufferString(params.Encode()))
	request.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	p := NewParams(request, httpdispatch.Params{})
	it.True(p.HasForm("key"))
	it.False(p.HasForm("un-existed-key"))
}

func Test_ParamsRawBody(t *testing.T) {
	it := assert.New(t)

	params := url.Values{}
	params.Add("key", "name")

	request, _ := http.NewRequest("POST", "/path/to/resource?test&key=url_value", bytes.NewBufferString(params.Encode()))
	request.Header.Add("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")

	p := NewParams(request, httpdispatch.Params{})

	body, err := p.RawBody()
	if it.Nil(err) {
		it.Equal(params.Encode(), string(body))
	}

	// original FormValue should works also
	it.Equal(params.Get("key"), request.FormValue("key"))

	// safe to invoke more than one time
	body, err = p.RawBody()
	if it.Nil(err) {
		it.Equal(params.Encode(), string(body))
	}

	// original FormValue should works also
	it.Equal(params.Get("key"), request.FormValue("key"))
}

func Test_ParamsGet(t *testing.T) {
	it := assert.New(t)

	request, _ := http.NewRequest("GET", "/path/to/resource?key=url_value&test=url_true", nil)
	routeParams := httpdispatch.Params{
		httpdispatch.Param{"key", "route_value"},
		httpdispatch.Param{"test", ""},
	}

	p := NewParams(request, routeParams)
	it.Equal("route_value", p.Get("key"))
	it.Equal("url_true", p.Get("test"))
	it.Empty(p.Get("un-existed-key"))
}

func Test_ParamsForm(t *testing.T) {
	it := assert.New(t)

	params := url.Values{}
	params.Add("key", "post_value")

	request, _ := http.NewRequest("POST", "/path/to/resource?key=url_value&test=url_true", strings.NewReader(params.Encode()))
	request.Header.Set("Content-Type", "application/x-www-form-urlencoded")
	routeParams := httpdispatch.Params{
		httpdispatch.Param{"test", "route_true"},
	}

	p := NewParams(request, routeParams)
	it.Equal("post_value", p.Form("key"))
	it.Equal("url_true", p.Form("test"))
}

func fakeForm() (filename, contentType string, buf *bytes.Buffer) {
	var (
		root, _ = os.Getwd()
	)

	filename = root + "/const.go"
	buf = bytes.NewBuffer(nil)

	// build multipart form
	w := multipart.NewWriter(buf)
	w.WriteField("key", "form_value")
	fd, _ := os.Open(filename)
	form, _ := w.CreateFormFile("file", filename)
	io.Copy(form, fd)
	w.Close()

	contentType = w.FormDataContentType()

	return
}

func Test_ParamsFile(t *testing.T) {
	it := assert.New(t)

	filename, contentType, buf := fakeForm()

	request, _ := http.NewRequest("POST", "/path/to/resource?key=url_value&test=url_true", buf)
	request.Header.Set("Content-Type", contentType)
	routeParams := httpdispatch.Params{
		httpdispatch.Param{"test", "route_true"},
	}

	p := NewParams(request, routeParams)
	it.Equal("url_value", p.Form("key"))
	it.Equal("url_true", p.Form("test"))

	// validate uploaded content
	f, fh, err := p.File("file")
	if it.Nil(err) {
		it.Equal(filename, fh.Filename)

		buf.Reset()
		io.Copy(buf, f)

		content, err := ioutil.ReadFile(filename)
		if it.Nil(err) {
			it.Equal(content, buf.Bytes())
		}
	}
}

func Test_ParamsJson(t *testing.T) {
	it := assert.New(t)

	str := `{"key":"json_value", "test":true}`

	request, _ := http.NewRequest("POST", "/path/to/resource?key=url_value&test=url_true", strings.NewReader(str))
	request.Header.Set("Content-Type", "application/json")
	routeParams := httpdispatch.Params{
		httpdispatch.Param{"test", "route_true"},
	}

	p := NewParams(request, routeParams)

	var params struct {
		Key  string `json:"key"`
		Test bool   `json:"test"`
	}
	err := p.Json(&params)
	if it.Nil(err) {
		it.Equal("json_value", params.Key)
		it.True(params.Test)
	}
}

func Test_ParamsXml(t *testing.T) {
	it := assert.New(t)

	str := `<Params><Key>xml_value</Key><Test>true</Test></Params>`

	request, _ := http.NewRequest("POST", "/path/to/resource?key=url_value&test=url_true", strings.NewReader(str))
	request.Header.Set("Content-Type", "application/json")
	routeParams := httpdispatch.Params{
		httpdispatch.Param{"test", "route_true"},
	}

	p := NewParams(request, routeParams)

	var params struct {
		XMLName xml.Name `xml:"Params"`
		Key     string   `xml:"Key"`
		Test    bool     `xml:"Test"`
	}
	err := p.Xml(&params)
	if it.Nil(err) {
		it.Equal("xml_value", params.Key)
		it.True(params.Test)
	}
}

func Test_ParamsGob(t *testing.T) {
	it := assert.New(t)

	type data struct {
		Key  string `bson:"key"`
		Test bool   `bson:"test"`
	}

	var buf bytes.Buffer

	params := data{
		Key:  "gob_value",
		Test: true,
	}

	err := gob.NewEncoder(&buf).Encode(params)
	if it.Nil(err) {
		request, _ := http.NewRequest("POST", "/path/to/resource?key=url_value&test=url_true", strings.NewReader(buf.String()))
		request.Header.Set("Content-Type", "application/gob")

		p := NewParams(request, httpdispatch.Params{})

		var temp data

		err = p.Gob(&temp)
		if it.Nil(err) {
			it.Equal("gob_value", temp.Key)
			it.True(temp.Test)
		}
	}
}


text:
layout: post
title: Netinstall.exe & Windows 10
date: 2018-02-05 10:42
author: netravnen
comments: true
categories: [How-To, MikroTik, netinstall.exe, RouterOS, Windows 10]
---
Netinstall.exe can for some users prove problematic to get working. [0]

Take the below example. Renaming netinstall.exe to netinsttall.exe in windows 10 makes the OS not require administrator rights anymore to run the file.


text:
export declare var root: string;

export declare function compileAndRender(templateName: string, view: any): NodeJS.ReadableStream;

export declare function compile(filename: string, callback: (err: Error, parsed: IParsed) => void): void;

export declare function compileText(name: string, template: string, callback: (err: Error, parsed: IParsed) => void): void;
export declare function compileText(name: string, template: string): IParsed;
export declare function compileText(template: string): IParsed;

export declare function render(filenameOrParsed: string, view: any): NodeJS.ReadableStream;
export declare function render(filenameOrParsed: IParsed, view: any): NodeJS.ReadableStream;

export declare function renderText(template: string, view: any, partials?: any): NodeJS.ReadableStream;

export declare function clearCache(templateName?: string): void;

export interface IParsed { }


text:
use crate::{
    ast::AST,
    env::CellEnv,
    errors::RuntimeError,
    instructions::{Bytecode, Instruction},
    memory::Memory,
    primitives,
    values::{ArgumentsType, RcValue, Value},
};
use std::{collections::LinkedList, iter::FromIterator, mem};

pub type Rib = Vec<RcValue>;
pub type Stack = LinkedList<Frame>;

pub struct Frame {
    rib: Rib,
    env: CellEnv,
}

impl Frame {
    pub fn new(rib: &[RcValue], env: &CellEnv) -> Frame {
        Frame {
            rib: rib.to_vec(),
            env: env.clone(),
        }
    }
}

pub struct VM {
    pub acc: RcValue,
    pub memory: Memory,
    pub rib: Rib,
    pub env: CellEnv,
    pub stack: Stack,
    instructions: Bytecode,
    pc: usize,
    code: Vec<(Bytecode, usize)>,
}

impl VM {
    pub fn new() -> VM {
        let memory = Memory::new();

        let mut vm = VM {
            acc: memory.unspecified(),
            memory,
            stack: Default::default(),
            rib: Default::default(),
            env: CellEnv::new(),
            instructions: Default::default(),
            pc: 0,
            code: Default::default(),
        };

        vm.init_primitives();

        vm
    }

    pub fn execute(
        &mut self,
        instructions: Bytecode,
    ) -> Result<RcValue, RuntimeError> {
        self.instructions = instructions;
        self.pc = 0;

        loop {
            use crate::instructions::Instruction::*;

            match self.next_instruction() {
                Some(instr) => match instr {
                    LoadConstant(ref value) => self.load_constant(value),
                    Jump(offset) => self.jump(offset),
                    JumpOnFalse(offset) => self.jump_on_false(offset),
                    JumpOnTrue(offset) => self.jump_on_true(offset),
                    LoadReference(ref reference) => {
                        self.load_reference(reference)?
                    }
                    Assignment(ref reference) => self.assignment(reference),
                    Replace(ref reference) => self.replace(reference)?,
                    LoadUnspecified => self.load_unspecified(),
                    Apply => self.apply()?,
                    Argument => self.argument(),
                    Frame => self.push_frame(),
                    Close {
                        ref args,
                        ref args_type,
                        ref body,
                    } => self.push_closure(args, *args_type, body),
                },
                None => match self.pop_frame(true) {
                    Ok(()) => (),
                    Err(_) => break,
                },
            }
        }

        Ok(self.acc.clone())
    }

    fn next_instruction(&mut self) -> Option<Instruction> {
        let instr = self.instructions.get(self.pc).cloned();
        self.pc += 1;
        instr
    }

    fn load_constant(&mut self, ast: &AST) {
        self.acc = Value::from_ast(ast, &mut self.memory);
    }

    fn jump_on_false(&mut self, times: usize) {
        if self.acc == self.memory.b_false() {
            self.jump(times);
        }
    }

    fn jump_on_true(&mut self, times: usize) {
        if self.acc != self.memory.b_false() {
            self.jump(times);
        }
    }

    fn jump(&mut self, times: usize) {
        self.pc += times;
    }

    fn load_reference(&mut self, reference: &str) -> Result<(), RuntimeError> {
        match self.env.get(reference) {
            Some(value) => {
                self.acc = value;
                Ok(())
            }
            None => Err(RuntimeError::UnboundVariable(reference.into())),
        }
    }

    fn assignment(&mut self, reference: &str) {
        self.env.set(reference.into(), self.acc.clone());
        self.load_unspecified();
    }

    fn replace(&mut self, reference: &str) -> Result<(), RuntimeError> {
        match self.env.replace(reference.into(), self.acc.clone()) {
            Some(_) => {
                self.load_unspecified();
                Ok(())
            }
            None => Err(RuntimeError::UnboundVariable(reference.into())),
        }
    }

    fn load_unspecified(&mut self) {
        self.acc = self.memory.unspecified();
    }

    fn push_frame(&mut self) {
        self.stack.push_back(Frame::new(&self.rib, &self.env));

        self.rib = Vec::new();
    }

    fn pop_frame(&mut self, a: bool) -> Result<(), RuntimeError> {
        let frame = self
            .stack
            .pop_back()
            .ok_or(RuntimeError::CannotPopLastFrame)?;

        self.rib = frame.rib;
        self.env = frame.env;

        if a {
            let (instr, pc) =
                self.code.pop().ok_or(RuntimeError::CannotPopLastFrame)?;

            self.instructions = instr;
            self.pc = pc;
        }

        Ok(())
    }

    fn apply(&mut self) -> Result<(), RuntimeError> {
        match *self.acc.clone() {
            Value::PrimitiveFn(ref name) => {
                let result =
                    primitives::apply(name, &self.rib, &mut self.memory)?;

                self.acc = result;

                self.pop_frame(false)?;

                Ok(())
            }
            Value::Closure {
                ref name,
                ref args_type,
                args: ref arg_names,
                ref closure,
                code: ref body,
            } => {
                let mut instructions = Vec::from_iter(body.clone());
                mem::swap(&mut self.instructions, &mut instructions);

                self.code.push((instructions, self.pc));
                self.pc = 0;
                self.env = closure.clone();

                match *args_type {
                    ArgumentsType::Fixed => {
                        if arg_names.len() != self.rib.len() {
                            return Err(RuntimeError::BadArity(name.clone()));
                        }

                        for (name, value) in arg_names.iter().zip(self.rib.iter())
                        {
                            self.env.set(name.clone(), value.clone());
                        }
                    }
                    ArgumentsType::Variable => {
                        let fixed_arg_names = &arg_names[0..arg_names.len() - 1];

                        if fixed_arg_names.len() > self.rib.len() {
                            return Err(RuntimeError::BadArity(name.clone()));
                        }

                        for (name, value) in
                            fixed_arg_names.iter().zip(self.rib.iter())
                        {
                            self.env.set(name.clone(), value.clone());
                        }

                        let var_args = self
                            .rib
                            .iter()
                            .skip(fixed_arg_names.len())
                            .cloned()
                            .collect();

                        self.env.set(
                            arg_names.last().unwrap().clone(),
                            self.memory.list(var_args),
                        );
                    }
                    ArgumentsType::Any => {
                        self.env.set(
                            arg_names[0].clone(),
                            self.memory.list(self.rib.clone()),
                        );
                    }
                }

                Ok(())
            }
            _ => Err(RuntimeError::UnappliableValue(self.acc.clone())),
        }
    }

    fn push_closure(
        &mut self,
        args: &[String],
        args_type: ArgumentsType,
        body: &Bytecode,
    ) {
        self.acc = self.memory.closure(
            args_type,
            args.to_vec(),
            CellEnv::wraps(self.env.clone()),
            body.clone(),
        );
    }

    fn argument(&mut self) {
        self.rib.push(self.acc.clone());
    }

    fn init_primitives(&mut self) {
        for &name in &primitives::PRIMITIVES {
            let primitive = self.memory.primitive(name.to_owned());
            self.env.set(name.to_owned(), primitive);
        }
    }
}

#[cfg(test)]
mod test {
    use crate::{
        ast::AST::*, errors::RuntimeError, instructions::Instruction::*, vm::VM,
    };

    #[test]
    fn execute_load_constant() {
        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Integer(1)),
                LoadConstant(Integer(2)),
                LoadConstant(Integer(3)),
            ];

            assert_eq!(Ok(vm.memory.integer(3)), vm.execute(instr));
        }

        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Bool(false)),
                LoadConstant(Bool(true)),
                LoadConstant(Bool(false)),
            ];

            assert_eq!(Ok(vm.memory.b_false()), vm.execute(instr));
        }
    }

    #[test]
    fn execute_jump() {
        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Integer(23)),
                Jump(1),
                LoadConstant(Integer(42)),
            ];

            assert_eq!(Ok(vm.memory.integer(23)), vm.execute(instr));
        }
    }

    #[test]
    fn execute_jump_on_false() {
        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Bool(false)),
                JumpOnFalse(1),
                LoadConstant(Integer(23)),
            ];

            assert_eq!(Ok(vm.memory.b_false()), vm.execute(instr));
        }

        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Bool(false)),
                JumpOnFalse(2),
                LoadConstant(Integer(1)),
                Jump(1),
                LoadConstant(Bool(true)),
                JumpOnFalse(2),
                LoadConstant(Integer(1)),
                Jump(1),
                LoadConstant(Integer(2)),
            ];

            assert_eq!(Ok(vm.memory.integer(1)), vm.execute(instr));
        }
    }

    #[test]
    fn execute_jump_on_true() {
        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Bool(false)),
                JumpOnTrue(1),
                LoadConstant(Integer(23)),
            ];

            assert_eq!(Ok(vm.memory.integer(23)), vm.execute(instr));
        }

        {
            let mut vm = VM::new();
            let instr = vec![
                LoadConstant(Bool(true)),
                JumpOnTrue(1),
                LoadConstant(Integer(23)),
            ];

            assert_eq!(Ok(vm.memory.b_true()), vm.execute(instr));
        }
    }

    #[test]
    fn execute_load_reference() {
        {
            let mut vm = VM::new();
            let instr = vec![LoadReference("a".to_owned())];

            assert_eq!(
                Err(RuntimeError::UnboundVariable("a".into())),
                vm.execute(instr)
            );
        }

        {
            let mut vm = VM::new();
            let instr = vec![LoadReference("a".to_owned())];

            vm.env.set("a".to_owned(), vm.memory.integer(1));

            assert_eq!(Ok(vm.memory.integer(1)), vm.execute(instr));
        }
    }

    #[test]
    fn execute_assignment() {
        let mut vm = VM::new();
        let instr = vec![
            LoadConstant(Integer(1)),
            Assignment("x".to_owned()),
            LoadConstant(Integer(2)),
            LoadReference("x".to_owned()),
        ];

        assert_eq!(Ok(vm.memory.integer(1)), vm.execute(instr));
    }

    #[test]
    fn execute_load_unspecified() {
        let mut vm = VM::new();
        let instr = vec![LoadConstant(Integer(1)), LoadUnspecified];

        assert_eq!(Ok(vm.memory.unspecified()), vm.execute(instr));
    }

    #[test]
    fn execute_apply() {
        let mut vm = VM::new();
        let instr = vec![Frame, LoadReference("+".to_owned()), Apply];

        assert_eq!(Ok(vm.memory.integer(0)), vm.execute(instr));
    }

    #[test]
    fn execute_argument() {
        let mut vm = VM::new();
        let instr = vec![
            Frame,
            LoadConstant(Integer(2)),
            Argument,
            LoadReference("+".to_owned()),
            Apply,
        ];

        assert_eq!(Ok(vm.memory.integer(2)), vm.execute(instr));
    }

    #[test]
    fn execute_nested_arguments() {
        let mut vm = VM::new();
        let instr = vec![
            Frame,
            Frame,
            LoadConstant(Integer(1)),
            Argument,
            LoadConstant(Integer(2)),
            Argument,
            LoadReference("+".to_owned()),
            Apply,
            Argument,
            Frame,
            LoadConstant(Integer(4)),
            Argument,
            LoadConstant(Integer(3)),
            Argument,
            LoadReference("-".to_owned()),
            Apply,
            Argument,
            LoadReference("+".to_owned()),
            Apply,
        ];

        assert_eq!(Ok(vm.memory.integer(4)), vm.execute(instr));
    }

    #[test]
    fn illegal_frame_apply() {
        let mut vm = VM::new();
        let instr = vec![LoadReference("+".to_owned()), Apply];

        assert_eq!(Err(RuntimeError::CannotPopLastFrame), vm.execute(instr));
    }
}


text:
$LOAD_PATH << "./"

class Token
  attr_accessor :tag

  def initialize(tag)
    @tag = tag
  end

  def to_s
    '<%s: %s>' % [self.class, @tag]
  end
end

class ConstantToken < Token
  attr_accessor :value

  def initialize(tag, value)
    super(tag)
    @value = value
  end

  def to_s()
    '<%s: %s - %s>' % [self.class, @tag, @value]
  end
end

class BooleanToken < ConstantToken
end

class StringToken < ConstantToken
end

class NumberToken < ConstantToken
end

class IntegerToken < NumberToken
end

class RealToken < NumberToken
end


text:
chrome.runtime.onMessage.addListener(
	function(request, sender, sendResponse) {
		if (localStorage[request.name])
			sendResponse({authkey: localStorage[request.name]});
	})


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibMinecraft.Model.Items
{
    /// <summary>
    /// A Diamond Sword item (ID = 276)
    /// </summary>
    /// <remarks></remarks>
    public class DiamondSwordItem : SwordItem
    {
        /// <summary>
        /// The ID for this Item (276)
        /// </summary>
        /// <remarks></remarks>
        public override short ItemID
        {
            get { return 276; }
        }
    }
}


text:
.class Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager$2;
.super Landroid/database/ContentObserver;
.source "KeyguardUpdateMonitor.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

# instance fields
.field final synthetic this$1:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;

# direct methods
.method constructor <init>(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;Landroid/os/Handler;)V
    .locals 0
    .parameter
    .parameter "x0"

    .prologue
    .line 2359
    iput-object p1, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager$2;->this$1:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;

    invoke-direct {p0, p2}, Landroid/database/ContentObserver;-><init>(Landroid/os/Handler;)V

    return-void
.end method

# virtual methods
.method public onChange(Z)V
    .locals 4
    .parameter "selfChange"

    .prologue
    .line 2362
    iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager$2;->this$1:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;

    #calls: Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;->queryOOBEDisplay()I
    invoke-static {v1}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;->access$3400(Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;)I

    move-result v0

    .line 2364
    .local v0, value:I
    const-string v1, "KeyguardUpdateMonitor"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "DialogSequenceManager OOBEObserver--onChange()--oobe_display = "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/mediatek/xlog/Xlog;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 2367
    const/4 v1, 0x1

    if-eq v0, v1, :cond_0

    .line 2368
    iget-object v1, p0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager$2;->this$1:Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;

    invoke-virtual {v1}, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor$DialogSequenceManager;->handleShowDialog()V

    .line 2370
    :cond_0
    return-void
.end method