text:
<?php

namespace Sonata\UserBundle\Controller;

use FOS\UserBundle\Model\UserInterface;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;

/**
 * This class is inspired from the FOS Profile Controller, except :
 *   - only twig is supported
 *   - separation of the user authentication form with the profile form.
 */
class ProfileFOSUser1Controller extends Controller
{
    /**
     * @return Response
     *
     * @throws AccessDeniedException
     */
    public function showAction()
    {
        $user = $this->getUser();
        if (!is_object($user) || !$user instanceof UserInterface) {
            throw $this->createAccessDeniedException('This user does not have access to this section.');
        }

        return $this->render('SonataUserBundle:Profile:show.html.twig', array(
            'user' => $user,
            'blocks' => $this->container->getParameter('sonata.user.configuration.profile_blocks'),
        ));
    }

    /**
     * @return Response|RedirectResponse
     *
     * @throws AccessDeniedException
     */
    public function editAuthenticationAction()
    {
        $user = $this->getUser();
        if (!is_object($user) || !$user instanceof UserInterface) {
            throw $this->createAccessDeniedException('This user does not have access to this section.');
        }

        $form = $this->get('sonata.user.authentication.form');
        $formHandler = $this->get('sonata.user.authentication.form_handler');

        $process = $formHandler->process($user);
        if ($process) {
            $this->setFlash('sonata_user_success', 'profile.flash.updated');

            return $this->redirect($this->generateUrl('sonata_user_profile_show'));
        }

        return $this->render('SonataUserBundle:Profile:edit_authentication.html.twig', array(
            'form' => $form->createView(),
        ));
    }

    /**
     * @return Response|RedirectResponse
     *
     * @throws AccessDeniedException
     */
    public function editProfileAction()
    {
        $user = $this->getUser();
        if (!is_object($user) || !$user instanceof UserInterface) {
            throw $this->createAccessDeniedException('This user does not have access to this section.');
        }

        $form = $this->get('sonata.user.profile.form');
        $formHandler = $this->get('sonata.user.profile.form.handler');

        $process = $formHandler->process($user);
        if ($process) {
            $this->setFlash('sonata_user_success', 'profile.flash.updated');

            return $this->redirect($this->generateUrl('sonata_user_profile_show'));
        }

        return $this->render('SonataUserBundle:Profile:edit_profile.html.twig', array(
            'form' => $form->createView(),
            'breadcrumb_context' => 'user_profile',
        ));
    }

    /**
     * @param string $action
     * @param string $value
     */
    protected function setFlash($action, $value)
    {
        $this->get('session')->getFlashBag()->set($action, $value);
    }
}


text:
/*
 * (C) 2007-2012 Alibaba Group Holding Limited.
 *
 * 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.
 * Authors:
 *   wuhua <wq163@163.com> , boyan <killme2008@gmail.com>
 */
package com.taobao.metamorphosis.network;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import com.taobao.gecko.core.buffer.IoBuffer;
import com.taobao.metamorphosis.transaction.LocalTransactionId;
import com.taobao.metamorphosis.transaction.TransactionId;

public class PutCommandUnitTest {

    @Test
    public void testEncode_HasTransactionId() {
        final TransactionId id = new LocalTransactionId("test", 1);
        final PutCommand putCommand = new PutCommand("test", 1, "hello".getBytes(), id, 0, 0);
        final IoBuffer buf = putCommand.encode();
        assertEquals(0, buf.position());
        assertEquals("put test 1 5 0 -1 TX:test:1 0\r\nhello", new String(buf.array()));
    }

    @Test
    public void testEncode_NoTransactionId() {
        final PutCommand putCommand = new PutCommand("test", 1, "hello".getBytes(), null, 0, 0);
        final IoBuffer buf = putCommand.encode();
        assertEquals(0, buf.position());
        assertEquals("put test 1 5 0 -1 0\r\nhello", new String(buf.array()));
    }
}

redpajama_set_name: RedPajamaGithub


text:
package com.twitter.scalding.parquet.tuple.macros

import com.twitter.scalding.parquet.tuple.macros.impl.{ ParquetReadSupportProvider, ParquetSchemaProvider, WriteSupportProvider }
import com.twitter.scalding.parquet.tuple.scheme.{ ParquetReadSupport, ParquetWriteSupport }

import scala.reflect.macros.whitebox.Context
import scala.language.experimental.macros

/**
 * Macros used to generate parquet tuple read/write support.
 * These macros support only case class that contains primitive fields or nested case classes and also collection fields
 * like scala List, Set, and Map.
 * @author Jian TANG
 */

class Impl(val c: Context) {
  val schemaProvider = new ParquetSchemaProvider((s: String) => s)
  val r = new ParquetReadSupportProvider(schemaProvider)
  val w = new WriteSupportProvider(schemaProvider)

  def schema[T: c.WeakTypeTag]: c.Expr[String] =
    schemaProvider.toParquetSchemaImpl[T](c)

  def readSupport[T: c.WeakTypeTag]: c.Expr[ParquetReadSupport[T]] =
    r.toParquetReadSupportImpl[T](c)

  def writeSupport[T: c.WeakTypeTag]: c.Expr[ParquetWriteSupport[T]] =
    w.toWriteSupportImpl[T](c)
}

object Macros {
  /**
   * Macro used to generate parquet schema for a given case class. For example if we have:
   *
   * case class SampleClassA(x: Int, y: String)
   * case class SampleClassB(a: SampleClassA, y: String)
   *
   * The macro will generate a parquet message type like this:
   *
   * """
   *   message SampleClassB {
   *     required group a {
   *       required int32 x;
   *       required binary y;
   *     }
   *     required binary y;
   *   }
   *  """
   *
   * @tparam T Case class type that contains primitive fields or collection fields or nested case class.
   * @return Generated case class parquet message type string
   */
  implicit def caseClassParquetSchema[T]: String = macro Impl.schema[T]

  /**
   * Macro generated case class read support
   */
  implicit def caseClassParquetReadSupport[T]: ParquetReadSupport[T] = macro Impl.readSupport[T]

  /**
   * Macro used to generate case class write support to parquet.
   * @tparam T User defined case class tuple type.
   * @return Generated case class tuple write support function.
   */
  implicit def caseClassParquetWriteSupport[T]: ParquetWriteSupport[T] = macro Impl.writeSupport[T]
}


text:
package io.crnk.core.resource;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import io.crnk.core.engine.document.Resource;
import io.crnk.core.engine.document.ResourceIdentifier;
import io.crnk.core.engine.information.resource.AnyResourceFieldAccessor;
import io.crnk.core.engine.information.resource.ResourceField;
import io.crnk.core.engine.information.resource.ResourceFieldAccess;
import io.crnk.core.engine.information.resource.ResourceFieldAccessor;
import io.crnk.core.engine.information.resource.ResourceFieldType;
import io.crnk.core.engine.information.resource.ResourceInformation;
import io.crnk.core.engine.internal.information.resource.ResourceFieldImpl;
import io.crnk.core.engine.parser.TypeParser;
import io.crnk.core.exception.InvalidResourceException;
import io.crnk.core.exception.ResourceException;
import io.crnk.core.mock.models.Task;
import io.crnk.core.queryspec.pagingspec.OffsetLimitPagingSpec;
import io.crnk.core.resource.annotations.JsonApiId;
import io.crnk.core.resource.annotations.JsonApiResource;
import io.crnk.core.resource.annotations.JsonIncludeStrategy;
import io.crnk.core.resource.annotations.LookupIncludeBehavior;
import io.crnk.core.resource.annotations.RelationshipRepositoryBehavior;
import io.crnk.core.resource.annotations.SerializeType;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;

public class ResourceInformationTest {

    private ResourceInformation sut;

    private TypeParser typeParser = new TypeParser();

    private ResourceFieldImpl valueField;

    @Before
    public void setup() {
        ResourceField idField = new ResourceFieldImpl("id", "id", ResourceFieldType.ID, Long.class, Long.class, null);
        ResourceFieldAccessor valueIdAccessor = Mockito.mock(ResourceFieldAccessor.class);
        valueField = new ResourceFieldImpl("value", "value", ResourceFieldType.RELATIONSHIP, String.class,
                String.class, "projects", null, SerializeType.LAZY, JsonIncludeStrategy.DEFAULT, LookupIncludeBehavior.AUTOMATICALLY_ALWAYS,
                new ResourceFieldAccess(true, true, true, true, true, true),
                "valueId", String.class, valueIdAccessor, RelationshipRepositoryBehavior.DEFAULT, null);
        sut = new ResourceInformation(typeParser, Task.class, "tasks", null, Arrays.asList(idField, valueField),
                OffsetLimitPagingSpec.class);
    }

    @Test
    public void onRelationshipFieldSearchShouldReturnExistingField() {
        ResourceField result = sut.findRelationshipFieldByName("value");
        assertThat(result.getUnderlyingName()).isEqualTo("value");
    }

    @Test
    public void toIdString() {
        Assert.assertNull(sut.toIdString(null));
        Assert.assertEquals("13", sut.toIdString(13));
    }

    @Test
    public void toResourceIdentifier() {
        Resource resource = new Resource();
        resource.setId("13");
        resource.setType("tasks");

        Task task = new Task();
        task.setId(13L);

        ResourceIdentifier expected = new ResourceIdentifier("13", "tasks");
        Assert.assertSame(expected, sut.toResourceIdentifier(expected));
        Assert.assertNull(sut.toResourceIdentifier(null));
        Assert.assertEquals(expected, sut.toResourceIdentifier("13"));
        Assert.assertEquals(expected, sut.toResourceIdentifier(13L));
        Assert.assertEquals(expected, sut.toResourceIdentifier(task));
        Assert.assertEquals(expected, sut.toResourceIdentifier(resource));
        Assert.assertNotSame(resource, sut.toResourceIdentifier(resource));
    }

    @Test
    public void getFields() {
        Assert.assertEquals(2, sut.getFields().size());
    }

    @Test
    public void checkIdAccess() {
        Task task = new Task();
        sut.setId(task, 13L);
        Assert.assertEquals(13L, task.getId().longValue());
        Assert.assertEquals(13L, sut.getId(task));
    }

    @Test
    public void checkGetAccessor() {
        Assert.assertSame(valueField.getIdAccessor(), sut.getAccessor("valueId"));
        Assert.assertSame(valueField.getAccessor(), sut.getAccessor("value"));
    }

    @Test
    public void checkAnyAccessor() {
        ResourceField idField = new ResourceFieldImpl("id", "id", ResourceFieldType.ID, Long.class, Long.class, null);
        sut = new ResourceInformation(typeParser, ResourceWithAny.class, "tasks", null, Arrays.asList(idField),
                OffsetLimitPagingSpec.class);

        ResourceWithAny resource = new ResourceWithAny();

        AnyResourceFieldAccessor accessor = sut.getAnyFieldAccessor();

        Map<String, Object> map = accessor.getValues(resource);
        Assert.assertNull(map.get("test"));
        accessor.setValue(resource, "test", "testValue");
        Assert.assertEquals("testValue", map.get("test"));
        Assert.assertEquals("testValue", resource.getProperties().get("test"));
    }

    @Test(expected = IllegalStateException.class)
    public void attributeCannotBeNamedLinks() {
        new ResourceFieldImpl("links", "id", ResourceFieldType.ATTRIBUTE, Long.class, Long.class, null);
    }

    @Test(expected = IllegalStateException.class)
    public void attributeCannotBeNamedMeta() {
        new ResourceFieldImpl("meta", "id", ResourceFieldType.ATTRIBUTE, Long.class, Long.class, null);
    }

    @Test
    public void checkGetAnyWithInvalidKey() {
        ResourceField idField = new ResourceFieldImpl("id", "id", ResourceFieldType.ID, Long.class, Long.class, null);
        sut = new ResourceInformation(typeParser, ResourceWithAny.class, "tasks", null, Arrays.asList(idField),
                OffsetLimitPagingSpec.class);

        ResourceWithAny resource = new ResourceWithAny();

        AnyResourceFieldAccessor accessor = sut.getAnyFieldAccessor();
        Object o = accessor.getValues(resource);
        Map<String, Object> map = accessor.getValues(resource);
        Assert.assertNull(map.get("notAllowed"));
    }

    @Test(expected = ResourceException.class)
    public void checkSetAnyWithInvalidKey() {
        ResourceField idField = new ResourceFieldImpl("id", "id", ResourceFieldType.ID, Long.class, Long.class, null);
        sut = new ResourceInformation(typeParser, ResourceWithAny.class, "tasks", null, Arrays.asList(idField),
                OffsetLimitPagingSpec.class);

        ResourceWithAny resource = new ResourceWithAny();

        AnyResourceFieldAccessor accessor = sut.getAnyFieldAccessor();
        accessor.setValue(resource, "notAllowed", "testValue");
    }

    @Test(expected = InvalidResourceException.class)
    public void checkAnyAccessorWithoutSetterThrowsException() {
        ResourceField idField = new ResourceFieldImpl("id", "id", ResourceFieldType.ID, Long.class, Long.class, null);
        new ResourceInformation(typeParser, ResourceWithAnyWithoutSetter.class, "tasks", null, Arrays.asList(idField),
                OffsetLimitPagingSpec.class);
    }

    @JsonApiResource(type = "test")
    public static class ResourceWithAny {

        @JsonApiId
        private String id;

        private Map<String, String> properties = new HashMap<>();

        @JsonAnyGetter
        public Map getProperties() {
            return properties;
        }

        @JsonAnySetter
        public void setProperty(String key, String value) {
            if ("notAllowed".equals(key)) {
                throw new IllegalStateException();
            }
            this.properties.put(key, value);
        }
    }

    @JsonApiResource(type = "test")
    class ResourceWithAnyWithoutSetter {

        @JsonApiId
        private String id;

        @JsonAnyGetter
        public Map<String, String> getProperties() {
            return null;
        }
    }

}


text:
#import "SBFindbar.h"

@interface SBSearchbar : SBFindbar

+ (CGFloat)minimumWidth;
+ (CGFloat)availableWidth;
// Construction
- (void)constructBackwardButton;
- (void)constructForwardButton;
- (void)constructCaseSensitiveCheck;
- (void)constructWrapCheck;
// Actions
- (void)executeDoneSelector:(id)sender;
- (void)executeClose;

@end


text:
/* global $ requests helper sidebar */
'use strict';
// ==UserScript==
// @name         MusicBrainz: Display AcousticBrainz datasets count for work
// @namespace    mbz-loujine
// @author       loujine
// @version      2021.9.19
// @downloadURL  https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-display_acousticbrainz_dataset_for_work.user.js
// @updateURL    https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mb-display_acousticbrainz_dataset_for_work.user.js
// @supportURL   https://github.com/loujine/musicbrainz-scripts
// @icon         https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/icon.png
// @description  musicbrainz.org: Display AcousticBrainz count on Work page
// @compatible   firefox+tampermonkey
// @license      MIT
// @require      https://raw.githubusercontent.com/loujine/musicbrainz-scripts/master/mbz-loujine-common.js
// @include      http*://*musicbrainz.org/work/*
// @exclude      http*://*musicbrainz.org/work/create
// @exclude      http*://*musicbrainz.org/work/*/*
// @grant        none
// @run-at       document-end
// ==/UserScript==

const abzIconURL = '//acousticbrainz.org/static/images/favicon-16.png';
const MAX_ITEMS_PER_BULK_REQUEST = 25;

function showABids() {
    if (!$('thead > tr').length) {
        return;
    }
    const $recordings = $('table a[href*="/recording/"]');
    const recording_mbids = Array.from($recordings).map(
        node => node.href.split('/')[4]
    );
    $('thead > tr').append('ABrainz	');
    $('.subh > th')[1].colSpan += 1;
    $('table.tbl > tbody > tr:not(".subh")').append('');

    let mbid_batch;
    let idx = 0;
    while (recording_mbids.length) {
        mbid_batch = recording_mbids.splice(0, MAX_ITEMS_PER_BULK_REQUEST);
        const url =
            '//acousticbrainz.org/api/v1/count?recording_ids=' +
            mbid_batch.join(';');
        setTimeout(() => {
            requests.GET(url, (data) => {
                data = JSON.parse(data);
                console.log(`Fetching data for ${Object.keys(data).length - 1} MBIDs`);
                $recordings.each((_, recording) => {
                    const mbid = helper.mbidFromURL(recording.href);
                    if (data[mbid] === undefined || data[mbid].count === 0) {
                        return;
                    }
                    $(recording).parents('tr').find('td:last').append(
                        $('', {
                            'href': '//acousticbrainz.org/' + mbid,
                            'target': '_blank',
                            'text': data[mbid].count,
                        }
                    ).append($('')));
                });
            });
        }, 1500 * idx);
        idx += 1;
    }
}

(function displaySidebar() {
    sidebar.container().insertAdjacentHTML('beforeend', `

Show AcousticBrainz IDs

        <input type="button" id="showABids" value="Show AcousticBrainz IDs">
    `);
})();

$(document).ready(function () {
    document.getElementById('showABids').addEventListener('click', showABids);
    return false;
});


text:
module Azure::Cosmosdb::Mgmt::V2019_08_01
  module Models
    #
    # The List operation response, that contains the Cassandra tables and their
    # properties.
    #
    class CassandraTableListResult

      include MsRestAzure

      # @return [Array<CassandraTableGetResults>] List of Cassandra tables and
      # their properties.
      attr_accessor :value

      #
      # Mapper for CassandraTableListResult class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'CassandraTableListResult',
          type: {
            name: 'Composite',
            class_name: 'CassandraTableListResult',
            model_properties: {
              value: {
                client_side_validation: true,
                required: false,
                read_only: true,
                serialized_name: 'value',
                type: {
                  name: 'Sequence',
                  element: {
                      client_side_validation: true,
                      required: false,
                      serialized_name: 'CassandraTableGetResultsElementType',
                      type: {
                        name: 'Composite',
                        class_name: 'CassandraTableGetResults'
                      }
                  }
                }
              }
            }
          }
        }
      end
    end
  end
end


text:
package org.zaproxy.zap.extension.pscanrules;

import java.util.Vector;

import net.htmlparser.jericho.Source;

import org.parosproxy.paros.Constant;
import org.parosproxy.paros.core.scanner.Alert;
import org.parosproxy.paros.network.HttpHeader;
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.HttpStatusCode;
import org.zaproxy.zap.extension.pscan.PassiveScanThread;
import org.zaproxy.zap.extension.pscan.PluginPassiveScanner;

public class XContentTypeOptionsScanner extends PluginPassiveScanner {

	private PassiveScanThread parent = null;
	/**
	 * Prefix for internationalized messages used by this rule
	 */
	private static final String MESSAGE_PREFIX = "pscanrules.xcontenttypeoptionsscanner.";
	private static final int PLUGIN_ID = 10021;

	@Override
	public void scanHttpRequestSend(HttpMessage msg, int id) {

	}

	@Override
	public void scanHttpResponseReceive(HttpMessage msg, int id, Source source) {
		boolean includeErrorResponses=true;
		switch (this.getLevel()) {
			case HIGH:	includeErrorResponses=false; break;
			case MEDIUM:
			case DEFAULT:
			case LOW:
			case OFF: }
		if (msg.getResponseBody().length() > 0) {
			int responseStatus = msg.getResponseHeader().getStatusCode();
			// If it's an error and we're not including error responses then just return without alerting
			if (!includeErrorResponses &&
					(HttpStatusCode.isServerError(responseStatus) ||
					HttpStatusCode.isClientError(responseStatus))) {
				return;
			}
			Vector<String> xContentTypeOptions = msg.getResponseHeader().getHeaders(HttpHeader.X_CONTENT_TYPE_OPTIONS);
			if (xContentTypeOptions == null) {
				this.raiseAlert(msg, id, "");
			} else {
				for (String xContentTypeOptionsDirective : xContentTypeOptions) {
					//'nosniff' is currently the only defined value for this header, so this logic is ok
					if (xContentTypeOptionsDirective.toLowerCase().indexOf("nosniff") < 0) {
						this.raiseAlert(msg, id, xContentTypeOptionsDirective);
					}
				}
			}
		}
	}

	private void raiseAlert(HttpMessage msg, int id, String xContentTypeOption) {
		Alert alert = new Alert(getPluginId(), Alert.RISK_LOW, Alert.CONFIDENCE_MEDIUM,
		    	getName());
		    	alert.setDetail(
		    		getDescription(), // Desc
		    	    msg.getRequestHeader().getURI().toString(), // URL
		    	    xContentTypeOption,
		    	    "", // Attack
		    	    getOtherInfo(), // OtherInfo
		    	    getSolution(), // Soln
		            getReference(), // Refs
		            "", // Evidence
		            0,	// TODO CWE Id
		            15,
		            msg);

    	parent.raiseAlert(id, alert);
	}

	@Override
	public void setParent(PassiveScanThread parent) {
			this.parent = parent;
	}

	@Override
	public String getName() {
		return Constant.messages.getString(MESSAGE_PREFIX + "name");
	}

	@Override
	public int getPluginId() {
		return PLUGIN_ID;
	}

	private String getDescription() {
			return Constant.messages.getString(MESSAGE_PREFIX + "desc");
	}

	private String getOtherInfo() {
		return Constant.messages.getString(MESSAGE_PREFIX + "otherinfo");
	}

	private String getSolution() {
		return Constant.messages.getString(MESSAGE_PREFIX + "soln");
	}

	private String getReference() {
		return Constant.messages.getString(MESSAGE_PREFIX + "refs");
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    xmlns:jee="http://www.springframework.org/schema/jee"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:mvc="http://www.springframework.org/schema/mvc"
    xmlns:task="http://www.springframework.org/schema/task"
    xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd
        http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
        http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
        http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd
        http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd">

    <mvc:annotation-driven />
    <task:annotation-driven executor="exec-root" />
    <task:executor id="exec-root" pool-size="20"/>

    <context:annotation-config />
</beans>


text:
package com.talis.entity.compress;

import com.talis.entity.marshal.MarshallerTestBase;

public class LZFCodecTest extends MarshallerTestBase{

	@Override
	protected Codec getCodec() {
		return new LZFCodec();
	}

}


text:
			<?php if($this->session->flashdata('error')){echo '
'.$this->session->flashdata('error').'
' ;} ?>
        	<?php if($this->session->flashdata('success')){echo  '
'.$this->session->flashdata('success').'
';} ?>

              <form id="msform" action="<?php echo base_url();?>general_login/sign_up_action" method="post">

Login Information

Personal information

Areas of expertise

                <fieldset>

Login Information

                  <input type="email" name="user_email" id="user_email" placeholder="Email address" required="required"/>
				  Duplicate Email id

                  <input type="password" name="user_password" id="user_password" placeholder="Password"  required="required"/>
                  <input type="button" name="next" class="next action-button" value="Next" />
                </fieldset>
                <fieldset>

Personal information

                  <input type="text" id="user_fname" name="user_fname" placeholder="First Name"  required="required"/>
                  <input type="text" id="user_lname" name="user_lname" placeholder="Last Name"  required="required"/>
                  <input type="text" id="user_instiute" name="user_instiute" placeholder="Institution" required="required"/>
                  <textarea name="user_address" id="user_address" required="required" class="form-control"  placeholder="Address"></textarea>

                  <select name="user_country" id="user_country" required="required" class="form-control" >
					<option value=""> Select Counrty</option>
					<?php
					foreach($countries as $country)
					{?>
						<option value="<?php echo $country->code; ?>"><?php echo $country->name; ?></option>
					<?php
					}
					?>
				</select>
                  <input type="button" name="previous" class="previous action-button" value="Previous" />
                  <input type="button" name="next" class="next action-button" value="Next" />
                </fieldset>
                <fieldset>

Areas of expertise

				  <input type="hidden" name="user_classification" id="user_classification" value="" required />

Personal Classification

<button type="button" class="btn btn-primary select_sec_but" data-toggle="modal" data-target=".bs-example-modal-sm">Select</button>

 <button type="button" class="close reg_close" data-dismiss="modal" aria-label="Close">X</button>

AREAS OF EXPERTISE

	<?php foreach($classify as $classi)	{?>

 <input class="inner_check" name="user_expt" id="user_expt_<?php echo $classi->asubmi_id; ?>" data-parentid="<?php echo $classi->asubmi_id; ?>" data-name="<?php echo $classi->asubmi_title; ?>" type="checkbox" value="<?php echo $classi->asubmi_id; ?>"><?php echo $classi->asubmi_title; ?>
 <?php	}	?>

Avalabile as a Reviewer

                    <input type="checkbox"  name="user_reviewer" class="onoffswitch-checkbox" id="myonoffswitch" checked>

                  	<input type="button" name="previous" class="previous action-button" value="Previous" />
                  	<input type="submit" name="submit" class="submit action-button" value="Submit" />

                </fieldset>
              </form>


text:
package com.github.wesleyegberto.kafka.simpleproducer.properties;

import java.util.Properties;

public class ProducerProperties {
    public static Properties createRequiredProperties() {
        Properties props = new Properties();

        // List of brokers
        props.put("bootstrap.servers", "localhost:9092");

        // Serializers
        props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
        props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");

        return props;
    }
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>event-custom-complex - YUI 3</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 3.18.1

APIs

Classes

Modules

            <input type="search" id="api-filter" placeholder="Type to filter APIs">

Anim

App

App.Base

App.Content

App.Transitions

App.TransitionsNative

AreaSeries

AreaSplineSeries

Array

ArrayList

ArraySort

AsyncQueue

Attribute

AttributeCore

AttributeEvents

AttributeExtras

AttributeLite

AttributeObservable

AutoComplete

AutoCompleteBase

AutoCompleteFilters

AutoCompleteHighlighters

AutoCompleteList

Axis

AxisBase

BarSeries

Base

BaseCore

BaseObservable

BottomAxisLayout

Button

ButtonCore

ButtonGroup

Cache

CacheOffline

Calendar

CalendarBase

CandlestickSeries

CanvasCircle

CanvasDrawing

CanvasEllipse

CanvasGraphic

CanvasPath

CanvasPieSlice

CanvasRect

CanvasShape

CartesianChart

CartesianSeries

CategoryAxis

CategoryAxisBase

CategoryImpl

Chart

ChartBase

ChartLegend

Circle

CircleGroup

ClassNameManager

ClickableRail

Color

Color.Harmony

Color.HSL

Color.HSV

ColumnSeries

ComboSeries

ComboSplineSeries

config

Console

ContentEditable

Controller

Cookie

CurveUtil

CustomEvent

DataSchema.Array

DataSchema.Base

DataSchema.JSON

DataSchema.Text

DataSchema.XML

DataSource.Function

DataSource.Get

DataSource.IO

DataSource.Local

DataSourceArraySchema

DataSourceCache

DataSourceCacheExtension

DataSourceJSONSchema

DataSourceTextSchema

DataSourceXMLSchema

DataTable

DataTable.Base

DataTable.BodyView

DataTable.BodyView.Formatters

DataTable.Column

DataTable.ColumnWidths

DataTable.Core

DataTable.HeaderView

DataTable.Highlight

DataTable.KeyNav

DataTable.Message

DataTable.Mutable

DataTable.Paginator

DataTable.Paginator.Model

DataTable.Paginator.View

DataTable.Scrollable

DataTable.Sortable

DataTable.TableView

Date

DD.DDM

DD.Delegate

DD.Drag

DD.Drop

DD.Scroll

Dial

Do

Do.AlterArgs

Do.AlterReturn

Do.Error

Do.Halt

Do.Method

Do.Prevent

DOM

DOMEventFacade

Drawing

Easing

EditorBase

EditorSelection

Ellipse

EllipseGroup

Escape

Event

EventFacade

EventHandle

EventTarget

Features

File

FileFlash

FileHTML5

Fills

Frame

Get

Get.Transaction

GetNodeJS

Graph

Graphic

GraphicBase

Gridlines

GroupDiamond

GroupRect

Handlebars

Highlight

Histogram

HistoryBase

HistoryHash

HistoryHTML5

HorizontalLegendLayout

ImgLoadGroup

ImgLoadImgObj

InlineEditor

Intl

IO

JSON

JSONPRequest

Lang

LazyModelList

LeftAxisLayout

Lines

LineSeries

Loader

MarkerSeries

Matrix

MatrixUtil

Model

ModelList

ModelSync.Local

ModelSync.REST

Node

NodeList

Number

NumericAxis

NumericAxisBase

NumericImpl

Object

OHLCSeries

Overlay

Paginator

Paginator.Core

Paginator.Url

Panel

Parallel

Path

PieChart

PieSeries

Pjax

PjaxBase

PjaxContent

Plots

Plugin.Align

Plugin.AutoComplete

Plugin.Base

Plugin.Button

Plugin.Cache

Plugin.CalendarNavigator

Plugin.ConsoleFilters

Plugin.CreateLinkBase

Plugin.DataTableDataSource

Plugin.DDConstrained

Plugin.DDNodeScroll

Plugin.DDProxy

Plugin.DDWindowScroll

Plugin.Drag

Plugin.Drop

Plugin.EditorBidi

Plugin.EditorBR

Plugin.EditorLists

Plugin.EditorPara

Plugin.EditorParaBase

Plugin.EditorParaIE

Plugin.EditorTab

Plugin.ExecCommand

Plugin.ExecCommand.COMMANDS

Plugin.Flick

Plugin.Host

plugin.NodeFocusManager

Plugin.NodeFX

plugin.NodeMenuNav

Plugin.Pjax

Plugin.Resize

Plugin.ResizeConstrained

Plugin.ResizeProxy

Plugin.ScrollInfo

Plugin.ScrollViewList

Plugin.ScrollViewPaginator

Plugin.ScrollViewScrollbars

Plugin.Shim

Plugin.SortScroll

Plugin.Tree.Lazy

Plugin.WidgetAnim

Pollable

Promise

Promise.Resolver

QueryString

Queue

RangeSeries

Record

Recordset

RecordsetFilter

RecordsetIndexer

RecordsetSort

Rect

Renderer

Resize

RightAxisLayout

Router

ScrollView

Selector

SeriesBase

Shape

ShapeGroup

Slider

SliderBase

SliderValueRange

Sortable

SplineSeries

StackedAreaSeries

StackedAreaSplineSeries

StackedAxis

StackedAxisBase

StackedBarSeries

StackedColumnSeries

StackedComboSeries

StackedComboSplineSeries

StackedImpl

StackedLineSeries

StackedMarkerSeries

StackedSplineSeries

StackingUtil

State

StyleSheet

Subscriber

SVGCircle

SVGDrawing

SVGEllipse

SVGGraphic

SVGPath

SVGPieSlice

SVGRect

SVGShape

SWF

SWFDetect

SyntheticEvent

SyntheticEvent.Notifier

SynthRegistry

Tab

TabView

Template

Template.Micro

Test.ArrayAssert

Test.Assert

Test.AssertionError

Test.ComparisonFailure

Test.Console

Test.CoverageFormat

Test.DateAssert

Test.EventTarget

Test.Mock

Test.Mock.Value

Test.ObjectAssert

Test.Reporter

Test.Results

Test.Runner

Test.ShouldError

Test.ShouldFail

Test.TestCase

Test.TestFormat

Test.TestNode

Test.TestRunner

Test.TestSuite

Test.UnexpectedError

Test.UnexpectedValue

Test.Wait

Text.AccentFold

Text.WordBreak

TimeAxis

TimeAxisBase

TimeImpl

ToggleButton

TopAxisLayout

Transition

Tree

Tree.Labelable

Tree.Node

Tree.Node.Labelable

Tree.Node.Openable

Tree.Node.Selectable

Tree.Node.Sortable

Tree.Openable

Tree.Selectable

Tree.Sortable

UA

Uploader

Uploader.Queue

UploaderFlash

UploaderHTML5

ValueChange

VerticalLegendLayout

View

View.NodeMap

VMLCircle

VMLDrawing

VMLEllipse

VMLGraphic

VMLPath

VMLPieSlice

VMLRect

VMLShape

Widget

WidgetAutohide

WidgetButtons

WidgetChild

WidgetModality

WidgetParent

WidgetPosition

WidgetPositionAlign

WidgetPositionConstrain

WidgetStack

WidgetStdMod

XML

YQL

YQLRequest

YUI

YUI~substitute

align-plugin

anim

anim-base

anim-color

anim-curve

anim-easing

anim-node-plugin

anim-scroll

anim-shape

anim-shape-transform

anim-xy

app

app-base

app-content

app-transitions

app-transitions-native

array-extras

array-invoke

arraylist

arraylist-add

arraylist-filter

arraysort

async-queue

attribute

attribute-base

attribute-complex

attribute-core

attribute-extras

attribute-observable

autocomplete

autocomplete-base

autocomplete-filters

autocomplete-filters-accentfold

autocomplete-highlighters

autocomplete-highlighters-accentfold

autocomplete-list

autocomplete-list-keys

autocomplete-plugin

autocomplete-sources

axis

axis-base

axis-category

axis-category-base

axis-numeric

axis-numeric-base

axis-stacked

axis-stacked-base

axis-time

axis-time-base

base

base-base

base-build

base-core

base-observable

base-pluginhost

button

button-core

button-group

button-plugin

cache

cache-base

cache-offline

cache-plugin

calendar

calendar-base

calendarnavigator

charts

charts-base

charts-legend

classnamemanager

clickable-rail

collection

color

color-base

color-harmony

color-hsl

color-hsv

console

console-filters

content-editable

cookie

createlink-base

dataschema

dataschema-array

dataschema-base

dataschema-json

dataschema-text

dataschema-xml

datasource

datasource-arrayschema

datasource-cache

datasource-function

datasource-get

datasource-io

datasource-jsonschema

datasource-local

datasource-polling

datasource-textschema

datasource-xmlschema

datatable

datatable-base

datatable-body

datatable-column-widths

datatable-core

datatable-datasource

datatable-foot

datatable-formatters

datatable-head

datatable-highlight

datatable-keynav

datatable-message

datatable-mutable

datatable-paginator

datatable-scroll

datatable-sort

datatable-table

datatype

datatype-date

datatype-date-format

datatype-date-math

datatype-date-parse

datatype-number

datatype-number-format

datatype-number-parse

datatype-xml

datatype-xml-format

datatype-xml-parse

dd

dd-constrain

dd-ddm

dd-ddm-base

dd-ddm-drop

dd-delegate

dd-drag

dd-drop

dd-drop-plugin

dd-gestures

dd-plugin

dd-proxy

dd-scroll

dial

dom

dom-base

dom-screen

dom-style

dump

editor

editor-base

editor-bidi

editor-br

editor-inline

editor-lists

editor-para

editor-para-base

editor-para-ie

editor-tab

escape

event

event-base

event-contextmenu

event-custom

event-custom-base

event-custom-complex

event-delegate

event-flick

event-focus

event-gestures

event-hover

event-key

event-mouseenter

event-mousewheel

event-move

event-outside

event-resize

event-simulate

event-synthetic

event-tap

event-touch

event-valuechange

exec-command

features

file

file-flash

file-html5

frame

gesture-simulate

get

get-nodejs

graphics

graphics-group

handlebars

handlebars-base

handlebars-compiler

highlight

highlight-accentfold

highlight-base

history

history-base

history-hash

history-hash-ie

history-html5

imageloader

intl

io

io-base

io-form

io-nodejs

io-queue

io-upload-iframe

io-xdr

json

json-parse

json-stringify

jsonp

jsonp-url

lazy-model-list

loader

loader-base

loader-yui3

matrix

model

model-list

model-sync-rest

node

node-base

node-core

node-data

node-event-delegate

node-event-html5

node-event-simulate

node-flick

node-focusmanager

node-load

node-menunav

node-pluginhost

node-screen

node-scroll-info

node-style

oop

overlay

paginator

paginator-core

paginator-url

panel

parallel

pjax

pjax-base

pjax-content

pjax-plugin

plugin

pluginhost

pluginhost-base

pluginhost-config

promise

querystring

querystring-parse

querystring-parse-simple

querystring-stringify

querystring-stringify-simple

queue-promote

range-slider

recordset

recordset-base

recordset-filter

recordset-indexer

recordset-sort

resize

resize-contrain

resize-plugin

resize-proxy

rollup

router

scrollview

scrollview-base

scrollview-base-ie

scrollview-list

scrollview-paginator

scrollview-scrollbars

selection

selector-css2

selector-css3

selector-native

series-area

series-area-stacked

series-areaspline

series-areaspline-stacked

series-bar

series-bar-stacked

series-base

series-candlestick

series-cartesian

series-column

series-column-stacked

series-combo

series-combo-stacked

series-combospline

series-combospline-stacked

series-curve-util

series-fill-util

series-histogram

series-line

series-line-stacked

series-line-util

series-marker

series-marker-stacked

series-ohlc

series-pie

series-plot-util

series-range

series-spline

series-spline-stacked

series-stacked

shim-plugin

slider

slider-base

slider-value-range

sortable

sortable-scroll

stylesheet

substitute

swf

swfdetect

tabview

template

template-base

template-micro

test

test-console

text

text-accentfold

text-wordbreak

timers

transition

transition-timer

tree

tree-labelable

tree-lazy

tree-node

tree-openable

tree-selectable

tree-sortable

uploader

uploader-flash

uploader-html5

uploader-queue

view

view-node-map

widget

widget-anim

widget-autohide

widget-base

widget-base-ie

widget-buttons

widget-child

widget-htmlparser

widget-modality

widget-parent

widget-position

widget-position-align

widget-position-constrain

widget-skin

widget-stack

widget-stdmod

widget-uievents

yql

yql-jsonp

yql-nodejs

yql-winjs

yui

yui-base

yui-later

yui-log

yui-throttle

        Show:

            <input type="checkbox" id="api-show-inherited" checked>
            Inherited

            <input type="checkbox" id="api-show-protected">
            Protected

            <input type="checkbox" id="api-show-private">
            Private

            <input type="checkbox" id="api-show-deprecated">
            Deprecated

event-custom-complex Module

            User Guide & Examples

            Defined in: event-custom/js/event-facade.js:27

Adds event facades, preventable default behavior, and bubbling.
events.

This module provides the following classes:

                        EventFacade


text:
#ifndef __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H
#define __ARCH_ARM_MACH_OMAP2_CLOCKDOMAIN_H

#include <linux/init.h>

#include "powerdomain.h"
#include "clock.h"

/*
 * Clockdomain flags
 *
 * XXX Document CLKDM_CAN_* flags
 *
 * CLKDM_NO_AUTODEPS: Prevent "autodeps" from being added/removed from this
 *     clockdomain.  (Currently, this applies to OMAP3 clockdomains only.)
 * CLKDM_ACTIVE_WITH_MPU: The PRCM guarantees that this clockdomain is
 *     active whenever the MPU is active.  True for interconnects and
 *     the WKUP clockdomains.
 * CLKDM_MISSING_IDLE_REPORTING: The idle status of the IP blocks and
 *     clocks inside this clockdomain are not taken into account by
 *     the PRCM when determining whether the clockdomain is idle.
 *     Without this flag, if the clockdomain is set to
 *     hardware-supervised idle mode, the PRCM may transition the
 *     enclosing powerdomain to a low power state, even when devices
 *     inside the clockdomain and powerdomain are in use.  (An example
 *     of such a clockdomain is the EMU clockdomain on OMAP3/4.)  If
 *     this flag is set, and the clockdomain does not support the
 *     force-sleep mode, then the HW_AUTO mode will be used to put the
 *     clockdomain to sleep.  Similarly, if the clockdomain supports
 *     the force-wakeup mode, then it will be used whenever a clock or
 *     IP block inside the clockdomain is active, rather than the
 *     HW_AUTO mode.
 */
#define CLKDM_CAN_FORCE_SLEEP			(1 << 0)
#define CLKDM_CAN_FORCE_WAKEUP			(1 << 1)
#define CLKDM_CAN_ENABLE_AUTO			(1 << 2)
#define CLKDM_CAN_DISABLE_AUTO			(1 << 3)
#define CLKDM_NO_AUTODEPS			(1 << 4)
#define CLKDM_ACTIVE_WITH_MPU			(1 << 5)
#define CLKDM_MISSING_IDLE_REPORTING		(1 << 6)

#define CLKDM_CAN_HWSUP		(CLKDM_CAN_ENABLE_AUTO | CLKDM_CAN_DISABLE_AUTO)
#define CLKDM_CAN_SWSUP		(CLKDM_CAN_FORCE_SLEEP | CLKDM_CAN_FORCE_WAKEUP)
#define CLKDM_CAN_HWSUP_SWSUP	(CLKDM_CAN_SWSUP | CLKDM_CAN_HWSUP)

/**
 * struct clkdm_autodep - clkdm deps to add when entering/exiting hwsup mode
 * @clkdm: clockdomain to add wkdep+sleepdep on - set name member only
 *
 * A clockdomain that should have wkdeps and sleepdeps added when a
 * clockdomain should stay active in hwsup mode; and conversely,
 * removed when the clockdomain should be allowed to go inactive in
 * hwsup mode.
 *
 * Autodeps are deprecated and should be removed after
 * omap_hwmod-based fine-grained module idle control is added.
 */
struct clkdm_autodep {
	union {
		const char *name;
		struct clockdomain *ptr;
	} clkdm;
};

/**
 * struct clkdm_dep - encode dependencies between clockdomains
 * @clkdm_name: clockdomain name
 * @clkdm: pointer to the struct clockdomain of @clkdm_name
 * @wkdep_usecount: Number of wakeup dependencies causing this clkdm to wake
 * @sleepdep_usecount: Number of sleep deps that could prevent clkdm from idle
 *
 * Statically defined.  @clkdm is resolved from @clkdm_name at runtime and
 * should not be pre-initialized.
 *
 * XXX Should also include hardware (fixed) dependencies.
 */
struct clkdm_dep {
	const char *clkdm_name;
	struct clockdomain *clkdm;
	s16 wkdep_usecount;
	s16 sleepdep_usecount;
};

/* Possible flags for struct clockdomain._flags */
#define _CLKDM_FLAG_HWSUP_ENABLED		BIT(0)

struct omap_hwmod;

/**
 * struct clockdomain - OMAP clockdomain
 * @name: clockdomain name
 * @pwrdm: powerdomain containing this clockdomain
 * @clktrctrl_reg: CLKSTCTRL reg for the given clock domain
 * @clktrctrl_mask: CLKTRCTRL/AUTOSTATE field mask in CM_CLKSTCTRL reg
 * @flags: Clockdomain capability flags
 * @_flags: Flags for use only by internal clockdomain code
 * @dep_bit: Bit shift of this clockdomain's PM_WKDEP/CM_SLEEPDEP bit
 * @prcm_partition: (OMAP4 only) PRCM partition ID for this clkdm's registers
 * @cm_inst: (OMAP4 only) CM instance register offset
 * @clkdm_offs: (OMAP4 only) CM clockdomain register offset
 * @wkdep_srcs: Clockdomains that can be told to wake this powerdomain up
 * @sleepdep_srcs: Clockdomains that can be told to keep this clkdm from inact
 * @usecount: Usecount tracking
 * @node: list_head to link all clockdomains together
 *
 * @prcm_partition should be a macro from mach-omap2/prcm44xx.h (OMAP4 only)
 * @cm_inst should be a macro ending in _INST from the OMAP4 CM instance
 *     definitions (OMAP4 only)
 * @clkdm_offs should be a macro ending in _CDOFFS from the OMAP4 CM instance
 *     definitions (OMAP4 only)
 */
struct clockdomain {
	const char *name;
	union {
		const char *name;
		struct powerdomain *ptr;
	} pwrdm;
	const u16 clktrctrl_mask;
	const u8 flags;
	u8 _flags;
	const u8 dep_bit;
	const u8 prcm_partition;
	const u16 cm_inst;
	const u16 clkdm_offs;
	struct clkdm_dep *wkdep_srcs;
	struct clkdm_dep *sleepdep_srcs;
	int usecount;
	struct list_head node;
};

/**
 * struct clkdm_ops - Arch specific function implementations
 * @clkdm_add_wkdep: Add a wakeup dependency between clk domains
 * @clkdm_del_wkdep: Delete a wakeup dependency between clk domains
 * @clkdm_read_wkdep: Read wakeup dependency state between clk domains
 * @clkdm_clear_all_wkdeps: Remove all wakeup dependencies from the clk domain
 * @clkdm_add_sleepdep: Add a sleep dependency between clk domains
 * @clkdm_del_sleepdep: Delete a sleep dependency between clk domains
 * @clkdm_read_sleepdep: Read sleep dependency state between clk domains
 * @clkdm_clear_all_sleepdeps: Remove all sleep dependencies from the clk domain
 * @clkdm_sleep: Force a clockdomain to sleep
 * @clkdm_wakeup: Force a clockdomain to wakeup
 * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain
 * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain
 * @clkdm_clk_enable: Put the clkdm in right state for a clock enable
 * @clkdm_clk_disable: Put the clkdm in right state for a clock disable
 */
struct clkdm_ops {
	int	(*clkdm_add_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_del_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_read_wkdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_clear_all_wkdeps)(struct clockdomain *clkdm);
	int	(*clkdm_add_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_del_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_read_sleepdep)(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
	int	(*clkdm_clear_all_sleepdeps)(struct clockdomain *clkdm);
	int	(*clkdm_sleep)(struct clockdomain *clkdm);
	int	(*clkdm_wakeup)(struct clockdomain *clkdm);
	void	(*clkdm_allow_idle)(struct clockdomain *clkdm);
	void	(*clkdm_deny_idle)(struct clockdomain *clkdm);
	int	(*clkdm_clk_enable)(struct clockdomain *clkdm);
	int	(*clkdm_clk_disable)(struct clockdomain *clkdm);
};

int clkdm_register_platform_funcs(struct clkdm_ops *co);
int clkdm_register_autodeps(struct clkdm_autodep *ia);
int clkdm_register_clkdms(struct clockdomain **c);
int clkdm_complete_init(void);

struct clockdomain *clkdm_lookup(const char *name);

int clkdm_for_each(int (*fn)(struct clockdomain *clkdm, void *user),
			void *user);
struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm);

int clkdm_add_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_del_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_read_wkdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_clear_all_wkdeps(struct clockdomain *clkdm);
int clkdm_add_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_del_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_read_sleepdep(struct clockdomain *clkdm1, struct clockdomain *clkdm2);
int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm);

void clkdm_allow_idle_nolock(struct clockdomain *clkdm);
void clkdm_allow_idle(struct clockdomain *clkdm);
void clkdm_deny_idle_nolock(struct clockdomain *clkdm);
void clkdm_deny_idle(struct clockdomain *clkdm);
bool clkdm_in_hwsup(struct clockdomain *clkdm);
bool clkdm_missing_idle_reporting(struct clockdomain *clkdm);

int clkdm_wakeup_nolock(struct clockdomain *clkdm);
int clkdm_wakeup(struct clockdomain *clkdm);
int clkdm_sleep_nolock(struct clockdomain *clkdm);
int clkdm_sleep(struct clockdomain *clkdm);

int clkdm_clk_enable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_clk_disable(struct clockdomain *clkdm, struct clk *clk);
int clkdm_hwmod_enable(struct clockdomain *clkdm, struct omap_hwmod *oh);
int clkdm_hwmod_disable(struct clockdomain *clkdm, struct omap_hwmod *oh);

extern void __init omap242x_clockdomains_init(void);
extern void __init omap243x_clockdomains_init(void);
extern void __init omap3xxx_clockdomains_init(void);
extern void __init am33xx_clockdomains_init(void);
extern void __init ti814x_clockdomains_init(void);
extern void __init ti816x_clockdomains_init(void);
extern void __init omap44xx_clockdomains_init(void);
extern void __init omap54xx_clockdomains_init(void);
extern void __init dra7xx_clockdomains_init(void);
void am43xx_clockdomains_init(void);

extern void clkdm_add_autodeps(struct clockdomain *clkdm);
extern void clkdm_del_autodeps(struct clockdomain *clkdm);

extern struct clkdm_ops omap2_clkdm_operations;
extern struct clkdm_ops omap3_clkdm_operations;
extern struct clkdm_ops omap4_clkdm_operations;
extern struct clkdm_ops am33xx_clkdm_operations;
extern struct clkdm_ops am43xx_clkdm_operations;

extern struct clkdm_dep gfx_24xx_wkdeps[];
extern struct clkdm_dep dsp_24xx_wkdeps[];
extern struct clockdomain wkup_common_clkdm;

#endif


text:
package io.vavr;

import io.vavr.collection.HashMap;
import io.vavr.collection.List;
import io.vavr.control.Either;
import io.vavr.control.Option;
import org.junit.Test;

import java.util.function.Predicate;

import static org.assertj.core.api.Assertions.assertThat;

public class PartialFunctionTest {

    @Test
    public void shouldReturnSome() {
        Option<String> oneToOne = HashMap.of(1, "One").lift().apply(1);
        assertThat(oneToOne).isEqualTo(Option.some("One"));
    }

    @Test
    public void shouldReturnNone() {
        Option<String> oneToOne = HashMap.<Integer, String>empty().lift().apply(1);
        assertThat(oneToOne).isEqualTo(Option.none());
    }

    @Test
    public void shouldUnliftTotalFunctionReturningAnOption() {
        final Predicate<Number> isEven = n -> n.intValue() % 2 == 0;
        final Function1<Number, Option<String>> totalFunction = n -> isEven.test(n) ? Option.some("even") : Option.none();

        final PartialFunction<Integer, CharSequence> partialFunction = PartialFunction.unlift(totalFunction);

        assertThat(partialFunction.isDefinedAt(1)).isFalse();
        assertThat(partialFunction.isDefinedAt(2)).isTrue();
        assertThat(partialFunction.apply(2)).isEqualTo("even");
    }

    @Test
    public void shouldNotBeDefinedAtLeft() {
        final Either<RuntimeException, Object> left = Either.left(new RuntimeException());

        assertThat(PartialFunction.getIfDefined().isDefinedAt(left)).isFalse();
    }

    @Test
    public void shouldBeDefinedAtRight() {
        Either<Object, Number> right = Either.right(42);

        PartialFunction<Either<Object, Number>, Number> ifDefined = PartialFunction.getIfDefined();

        assertThat(ifDefined.isDefinedAt(right)).isTrue();
        assertThat(ifDefined.apply(right)).isEqualTo(42);
    }

    @Test
    public void shouldCollectSomeValuesAndIgnoreNone() {
        final List<Integer> evenNumbers = List.range(0, 10)
          .map(n -> n % 2 == 0 ? Option.some(n) : Option.<Integer>none())
          .collect(PartialFunction.getIfDefined());

        assertThat(evenNumbers).containsExactly(0, 2, 4, 6, 8);
    }

}


text:
require 'test_helper'

class TestHiddenElement < Test::Unit::TestCase

  def test_element_to_html
    elem = ActiveForm::Element::Hidden.new :elem, :value => 'test'
    expected = %|<input id="elem" name="elem" type="hidden" value="test"/>\n|
    assert_equal expected, elem.to_html
  end

end


text:
namespace Azure.Management.Network.Models
{
    /// <summary> Start packet capture parameters on virtual network gateway. </summary>
    public partial class VpnPacketCaptureStartParameters
    {
        /// <summary> Initializes a new instance of VpnPacketCaptureStartParameters. </summary>
        public VpnPacketCaptureStartParameters()
        {
        }

        /// <summary> Initializes a new instance of VpnPacketCaptureStartParameters. </summary>
        /// <param name="filterData"> Start Packet capture parameters. </param>
        internal VpnPacketCaptureStartParameters(string filterData)
        {
            FilterData = filterData;
        }

        /// <summary> Start Packet capture parameters. </summary>
        public string FilterData { get; set; }
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Please enter language data in the fields below.  All data should be entered in English -->
<ldml xmlns:sil="urn://www.sil.org/ldml/0.1">
	<identity>
		<version number="0.0.1"/>
		<!-- name.en(ijj)="Ede Ije" -->
		<language type="ijj"/>
		<special>
			<sil:identity defaultRegion="BJ" usage="unused" script="Latn"/>
		</special>
	</identity>
	<localeDisplayNames>
		<special>
			<sil:names>
				<sil:name xml:lang="en">Ede Ije</sil:name>
			</sil:names>
		</special>
	</localeDisplayNames>
	<layout>
		<!--  Enter the orientation attributes  -->
		<orientation>
			<characterOrder>left-to-right</characterOrder>
		</orientation>
	</layout>
	<characters>
		<exemplarCharacters>[a b d e ɛ f g {gb} h i j k {kp} l m n o ɔ r s {sh} t u w y \u0301 \u0300]</exemplarCharacters>
		<exemplarCharacters type="auxiliary">[c p q v x z]</exemplarCharacters>
		<exemplarCharacters type="index">[A B D E Ɛ F G {Gb} H I J K {Kp} L M N O Ɔ R S {Sh} T U W Y]</exemplarCharacters>
	</characters>
	<special>
		<sil:external-resources>
			<sil:font name="Charis SIL" types="default">
				<sil:url>https://wirl.api.sil.org/CharisSILReg&type=ttf</sil:url>
			</sil:font>
			<sil:font name="Noto Sans"><!--types="ui"-->
				<sil:url>https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSans/NotoSans-Regular.ttf</sil:url>
			</sil:font>
			<sil:font name="Noto Serif">
				<sil:url>https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSerif/NotoSerif-Regular.ttf</sil:url>
			</sil:font>
		</sil:external-resources>
	</special>
</ldml>


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Persoonia 13(3): 266 (1987)

#### Original name
Asordaria tenerifae Arx & Guarro, 1987

### Remarks
null


text:
//###########################################################################
//
// FILE:    F2837xD_ecap.h
//
// TITLE:   F2837xD Device ECAP Register Definitions.
//
//###########################################################################
// $TI Release: F2837xD Support Library v190 $
// $Release Date: Mon Feb  1 16:51:57 CST 2016 $
// $Copyright: Copyright (C) 2013-2016 Texas Instruments Incorporated -
//             http://www.ti.com/ ALL RIGHTS RESERVED $
//###########################################################################

#ifndef __F2837xD_ECAP_H__
#define __F2837xD_ECAP_H__

#ifdef __cplusplus
extern "C" {
#endif

//---------------------------------------------------------------------------
// ECAP Individual Register Bit Definitions:

struct ECCTL1_BITS {                    // bits description
    Uint16 CAP1POL:1;                   // 0 Capture Event 1 Polarity select
    Uint16 CTRRST1:1;                   // 1 Counter Reset on Capture Event 1
    Uint16 CAP2POL:1;                   // 2 Capture Event 2 Polarity select
    Uint16 CTRRST2:1;                   // 3 Counter Reset on Capture Event 2
    Uint16 CAP3POL:1;                   // 4 Capture Event 3 Polarity select
    Uint16 CTRRST3:1;                   // 5 Counter Reset on Capture Event 3
    Uint16 CAP4POL:1;                   // 6 Capture Event 4 Polarity select
    Uint16 CTRRST4:1;                   // 7 Counter Reset on Capture Event 4
    Uint16 CAPLDEN:1;                   // 8 Enable Loading CAP1-4 regs on a Cap Event
    Uint16 PRESCALE:5;                  // 13:9 Event Filter prescale select
    Uint16 FREE_SOFT:2;                 // 15:14 Emulation mode
};

union ECCTL1_REG {
    Uint16  all;
    struct  ECCTL1_BITS  bit;
};

struct ECCTL2_BITS {                    // bits description
    Uint16 CONT_ONESHT:1;               // 0 Continuous or one-shot
    Uint16 STOP_WRAP:2;                 // 2:1 Stop value for one-shot, Wrap for continuous
    Uint16 REARM:1;                     // 3 One-shot re-arm
    Uint16 TSCTRSTOP:1;                 // 4 TSCNT counter stop
    Uint16 SYNCI_EN:1;                  // 5 Counter sync-in select
    Uint16 SYNCO_SEL:2;                 // 7:6 Sync-out mode
    Uint16 SWSYNC:1;                    // 8 SW forced counter sync
    Uint16 CAP_APWM:1;                  // 9 CAP/APWM operating mode select
    Uint16 APWMPOL:1;                   // 10  APWM output polarity select
    Uint16 rsvd1:5;                     // 15:11 Reserved
};

union ECCTL2_REG {
    Uint16  all;
    struct  ECCTL2_BITS  bit;
};

struct ECEINT_BITS {                    // bits description
    Uint16 rsvd1:1;                     // 0 Reserved
    Uint16 CEVT1:1;                     // 1 Capture Event 1 Interrupt Enable
    Uint16 CEVT2:1;                     // 2 Capture Event 2 Interrupt Enable
    Uint16 CEVT3:1;                     // 3 Capture Event 3 Interrupt Enable
    Uint16 CEVT4:1;                     // 4 Capture Event 4 Interrupt Enable
    Uint16 CTROVF:1;                    // 5 Counter Overflow Interrupt Enable
    Uint16 CTR_EQ_PRD:1;                // 6 Period Equal Interrupt Enable
    Uint16 CTR_EQ_CMP:1;                // 7 Compare Equal Interrupt Enable
    Uint16 rsvd2:8;                     // 15:8 Reserved
};

union ECEINT_REG {
    Uint16  all;
    struct  ECEINT_BITS  bit;
};

struct ECFLG_BITS {                     // bits description
    Uint16 INT:1;                       // 0 Global Flag
    Uint16 CEVT1:1;                     // 1 Capture Event 1 Interrupt Flag
    Uint16 CEVT2:1;                     // 2 Capture Event 2 Interrupt Flag
    Uint16 CEVT3:1;                     // 3 Capture Event 3 Interrupt Flag
    Uint16 CEVT4:1;                     // 4 Capture Event 4 Interrupt Flag
    Uint16 CTROVF:1;                    // 5 Counter Overflow Interrupt Flag
    Uint16 CTR_PRD:1;                   // 6 Period Equal Interrupt Flag
    Uint16 CTR_CMP:1;                   // 7 Compare Equal Interrupt Flag
    Uint16 rsvd1:8;                     // 15:8 Reserved
};

union ECFLG_REG {
    Uint16  all;
    struct  ECFLG_BITS  bit;
};

struct ECCLR_BITS {                     // bits description
    Uint16 INT:1;                       // 0 ECAP Global Interrupt Status Clear
    Uint16 CEVT1:1;                     // 1 Capture Event 1 Status Clear
    Uint16 CEVT2:1;                     // 2 Capture Event 2 Status Clear
    Uint16 CEVT3:1;                     // 3 Capture Event 3 Status Clear
    Uint16 CEVT4:1;                     // 4 Capture Event 4 Status Clear
    Uint16 CTROVF:1;                    // 5 Counter Overflow Status Clear
    Uint16 CTR_PRD:1;                   // 6 Period Equal Status Clear
    Uint16 CTR_CMP:1;                   // 7 Compare Equal Status Clear
    Uint16 rsvd1:8;                     // 15:8 Reserved
};

union ECCLR_REG {
    Uint16  all;
    struct  ECCLR_BITS  bit;
};

struct ECFRC_BITS {                     // bits description
    Uint16 rsvd1:1;                     // 0 Reserved
    Uint16 CEVT1:1;                     // 1 Capture Event 1 Force Interrupt
    Uint16 CEVT2:1;                     // 2 Capture Event 2 Force Interrupt
    Uint16 CEVT3:1;                     // 3 Capture Event 3 Force Interrupt
    Uint16 CEVT4:1;                     // 4 Capture Event 4 Force Interrupt
    Uint16 CTROVF:1;                    // 5 Counter Overflow Force Interrupt
    Uint16 CTR_PRD:1;                   // 6 Period Equal Force Interrupt
    Uint16 CTR_CMP:1;                   // 7 Compare Equal Force Interrupt
    Uint16 rsvd2:8;                     // 15:8 Reserved
};

union ECFRC_REG {
    Uint16  all;
    struct  ECFRC_BITS  bit;
};

struct ECAP_REGS {
    Uint32                                   TSCTR;                        // Time-Stamp Counter
    Uint32                                   CTRPHS;                       // Counter Phase Offset Value Register
    Uint32                                   CAP1;                         // Capture 1 Register
    Uint32                                   CAP2;                         // Capture 2 Register
    Uint32                                   CAP3;                         // Capture 3 Register
    Uint32                                   CAP4;                         // Capture 4 Register
    Uint16                                   rsvd1[8];                     // Reserved
    union   ECCTL1_REG                       ECCTL1;                       // Capture Control Register 1
    union   ECCTL2_REG                       ECCTL2;                       // Capture Control Register 2
    union   ECEINT_REG                       ECEINT;                       // Capture Interrupt Enable Register
    union   ECFLG_REG                        ECFLG;                        // Capture Interrupt Flag Register
    union   ECCLR_REG                        ECCLR;                        // Capture Interrupt Clear Register
    union   ECFRC_REG                        ECFRC;                        // Capture Interrupt Force Register
    Uint16                                   rsvd2[6];                     // Reserved
};

//---------------------------------------------------------------------------
// ECAP External References & Function Declarations:
//
#ifdef CPU1
extern volatile struct ECAP_REGS ECap1Regs;
extern volatile struct ECAP_REGS ECap2Regs;
extern volatile struct ECAP_REGS ECap3Regs;
extern volatile struct ECAP_REGS ECap4Regs;
extern volatile struct ECAP_REGS ECap5Regs;
extern volatile struct ECAP_REGS ECap6Regs;
#endif
#ifdef CPU2
extern volatile struct ECAP_REGS ECap1Regs;
extern volatile struct ECAP_REGS ECap2Regs;
extern volatile struct ECAP_REGS ECap3Regs;
extern volatile struct ECAP_REGS ECap4Regs;
extern volatile struct ECAP_REGS ECap5Regs;
extern volatile struct ECAP_REGS ECap6Regs;
#endif
#ifdef __cplusplus
}
#endif                                  /* extern "C" */

#endif

//===========================================================================
// End of file.
//===========================================================================


text:
{% extends "layout-split-2.html" %}
{% load i18n %}

{% block title %}Delete Forwarding Rule{% endblock %}

{% block javascripts %}{{ block.super }}

{% endblock %}

{% block stylesheets %}{{ block.super }}
    <link type="text/css" rel="stylesheet" href="{{ STATIC_URL }}css/aremind.css" />
{% endblock %}

{% block content %}

Delete Forwarding Rule

    <form method="POST" action="#" class='buttons'>

Are you sure you want to delete Forwarding Rule #{{ rule.pk }}?

        {% csrf_token %}

            <input type='button' name='cancel' value='Cancel' />
            <input type='submit' name='submit' value="Delete" />

    </form>

{% endblock %}


text:
$(document).ready(function () {
	$('.scrollspy').scrollSpy();
	$('.pinmenu .table-of-contents').pushpin({ top: $('.pinmenu').offset().top });
	$('.modal-trigger').leanModal();
});


text:
#ifndef _WIN32
        #ifndef __USE_FILE_OFFSET64
                #define __USE_FILE_OFFSET64
        #endif
        #ifndef __USE_LARGEFILE64
                #define __USE_LARGEFILE64
        #endif
        #ifndef _LARGEFILE64_SOURCE
                #define _LARGEFILE64_SOURCE
        #endif
        #ifndef _FILE_OFFSET_BIT
                #define _FILE_OFFSET_BIT 64
        #endif
#endif

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <errno.h>
#include <fcntl.h>

#ifdef __APPLE__
# include <unistd.h>
# include <utime.h>
# include <sys/types.h>
# include <sys/stat.h>
#else
# include <direct.h>
# include <io.h>
#endif

#include "zip.h"
#include "main.h"

#ifdef _WIN32
        #define USEWIN32IOAPI
        #include "iowin32.h"
#endif

#define WRITEBUFFERSIZE (16384)
#define MAXFILENAME (256)

#ifdef _WIN32
uLong filetime(f, tmzip, dt)
    char *f;                /* name of file to get info on */
    tm_zip *tmzip;             /* return value: access, modific. and creation times */
    uLong *dt;             /* dostime */
{
  int ret = 0;
  {
      FILETIME ftLocal;
      HANDLE hFind;
      WIN32_FIND_DATAA ff32;

      hFind = FindFirstFileA(f,&ff32);
      if (hFind != INVALID_HANDLE_VALUE)
      {
        FileTimeToLocalFileTime(&(ff32.ftLastWriteTime),&ftLocal);
        FileTimeToDosDateTime(&ftLocal,((LPWORD)dt)+1,((LPWORD)dt)+0);
        FindClose(hFind);
        ret = 1;
      }
  }
  return ret;
}
#else
uLong filetime(f, tmzip, dt)
    char *f;               /* name of file to get info on */
    tm_zip *tmzip;         /* return value: access, modific. and creation times */
    uLong *dt;             /* dostime */
{
  int ret=0;
  struct stat s;        /* results of stat() */
  struct tm* filedate;
  time_t tm_t=0;

  if (strcmp(f,"-")!=0)
  {
    char name[MAXFILENAME+1];
    unsigned long len = strlen(f);
    if (len > MAXFILENAME)
      len = MAXFILENAME;

    strncpy(name, f,MAXFILENAME-1);
    /* strncpy doesnt append the trailing NULL, of the string is too long. */
    name[ MAXFILENAME ] = '\0';

    if (name[len - 1] == '/')
      name[len - 1] = '\0';
    /* not all systems allow stat'ing a file with / appended */
    if (stat(name,&s)==0)
    {
      tm_t = s.st_mtime;
      ret = 1;
    }
  }
  filedate = localtime(&tm_t);

  tmzip->tm_sec  = filedate->tm_sec;
  tmzip->tm_min  = filedate->tm_min;
  tmzip->tm_hour = filedate->tm_hour;
  tmzip->tm_mday = filedate->tm_mday;
  tmzip->tm_mon  = filedate->tm_mon ;
  tmzip->tm_year = filedate->tm_year;

  return ret;
}
#endif

int check_exist_file(filename)
    const char* filename;
{
    FILE* ftestexist;
    int ret = 1;
    ftestexist = fopen64(filename,"rb");
    if (ftestexist==NULL)
        ret = 0;
    else
        fclose(ftestexist);
    return ret;
}

void do_banner()
{
    printf("MiniZip 1.1, demo of zLib + MiniZip64 package, written by Gilles Vollant\n");
    printf("more info on MiniZip at http://www.winimage.com/zLibDll/minizip.html\n\n");
}
/* calculate the CRC32 of a file,
   because to encrypt a file, we need known the CRC32 of the file before */
int getFileCrc(const char* filenameinzip,void*buf,unsigned long size_buf,unsigned long* result_crc)
{
   unsigned long calculate_crc=0;
   int err=ZIP_OK;
   FILE * fin = fopen64(filenameinzip,"rb");
   uint size_read = 0;
   unsigned long total_read = 0;
   if (fin==NULL)
   {
       err = ZIP_ERRNO;
   }

    if (err == ZIP_OK)
        do
        {
            err = ZIP_OK;
            size_read = (int)fread(buf,1,size_buf,fin);
            if (size_read < size_buf)
                if (feof(fin)==0)
            {
                printf("error in reading %s\n",filenameinzip);
                err = ZIP_ERRNO;
            }

            if (size_read>0)
                calculate_crc = crc32(calculate_crc,buf,size_read);
            total_read += size_read;

        } while ((err == ZIP_OK) && (size_read>0));

    if (fin)
        fclose(fin);

    *result_crc=calculate_crc;
    printf("file %s crc %lx\n", filenameinzip, calculate_crc);
    return err;
}

int isLargeFile(const char* filename)
{
  int largeFile = 0;
  ZPOS64_T pos = 0;
  FILE* pFile = fopen64(filename, "rb");

  if(pFile != NULL)
  {
    fseeko64(pFile, 0, SEEK_END);

    pos = ftello64(pFile);
    if(pos >= 0xffffffff)
     largeFile = 1;

    fclose(pFile);
  }

 return largeFile;
}

int zip(char* basePath, RPS* basePtr, char* zipFileName)
{
	uint64_t lengthBase = strlen(basePath);
	char path[lengthBase + MAX_PATH];
    int i;
    int opt_overwrite=2;
    int opt_compress_level=Z_DEFAULT_COMPRESSION;
    int opt_exclude_path=1;
    char filename_try[MAXFILENAME+16];
    int err=0;
    int size_buf=0;
    void* buf=NULL;
    const char* password=NULL;

    size_buf = WRITEBUFFERSIZE;
    buf = (void*)malloc(size_buf);
    if (buf==NULL)
    {
        printf("Error allocating memory\n");
        return ZIP_INTERNALERROR;
    }

	unsigned long len;

	strncpy(filename_try, zipFileName,MAXFILENAME-1);
	/* strncpy doesnt append the trailing NULL, of the string is too long. */
	filename_try[ MAXFILENAME ] = '\0';

	len = strlen(filename_try);
	for (i=0;i<len && filename_try[i]!='.';i++);

	if (filename_try[i] != '.')
		strcat(filename_try,".zip");

	/* if the file don't exist, we not append file */
	if (check_exist_file(filename_try)==0)
		opt_overwrite=1;

	zipFile zf;
	int errclose;
#        ifdef USEWIN32IOAPI
	zlib_filefunc64_def ffunc;
	fill_win32_filefunc64A(&ffunc);
	zf = zipOpen2_64(filename_try,(opt_overwrite==2) ? 2 : 0,NULL,&ffunc);
#        else
	zf = zipOpen64(filename_try,(opt_overwrite==2) ? 2 : 0);
#        endif

	if (zf == NULL)
	{
		printf("error opening %s\n",filename_try);
		err= ZIP_ERRNO;
	}
	else
		printf("creating %s\n",filename_try);

	for (; basePtr && err==ZIP_OK; basePtr = basePtr->next)
	{
		FILE * fin = NULL;
		int size_read;
		const char *savefilenameinzip;
		zip_fileinfo zi;
		unsigned long crcFile=0;
		int zip64 = 0;

		puts(basePtr->name);

		snprintf(path, sizeof(path), "%s/%s", basePath, basePtr->name);

		zi.tmz_date.tm_sec = zi.tmz_date.tm_min = zi.tmz_date.tm_hour =  zi.tmz_date.tm_mday = zi.tmz_date.tm_mon = zi.tmz_date.tm_year = 0;
		zi.dosDate = 0;
		zi.internal_fa = 0;
		zi.external_fa = 0;
		filetime(path, &zi.tmz_date, &zi.dosDate);

		if ((password != NULL) && (err==ZIP_OK))
			err = getFileCrc(path, buf, size_buf, &crcFile);

		zip64 = isLargeFile(path);

	   /* The path name saved, should not include a leading slash. */
	   /*if it did, windows/xp and dynazip couldn't read the zip file. */
		 savefilenameinzip = path;

		 while( savefilenameinzip[0] == '\\' || savefilenameinzip[0] == '/' )
			 savefilenameinzip++;

		 /*should the zip file contain any path at all?*/
		 if( opt_exclude_path )
		 {
			 const char *tmpptr;
			 const char *lastslash = 0;
			 for( tmpptr = savefilenameinzip; *tmpptr; tmpptr++)
			 {
				 if( *tmpptr == '\\' || *tmpptr == '/')
				 {
					 lastslash = tmpptr;
				 }
			 }
			 if( lastslash != NULL )
			 {
				 savefilenameinzip = lastslash+1; // base filename follows last slash.
			 }
		 }

		 /**/
		err = zipOpenNewFileInZip3_64(zf,savefilenameinzip,&zi,NULL,0,NULL,0,NULL,(opt_compress_level != 0) ? Z_DEFLATED : 0,opt_compress_level,0,-MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY,password,crcFile, zip64);

		if (err != ZIP_OK)
			printf("error in opening %s in zipfile\n",path);
		else
		{
			fin = fopen64(path,"rb");
			if (fin==NULL)
			{
				err=ZIP_ERRNO;
				printf("error in opening %s for reading\n",path);
			}
		}

		if (err == ZIP_OK)
		{
			do
			{
				err = ZIP_OK;
				size_read = (int)fread(buf,1,size_buf,fin);
				if (size_read < size_buf)
					if (feof(fin)==0)
					{
						printf("error in reading %s\n",path);
						err = ZIP_ERRNO;
					}

				if (size_read>0)
				{
					err = zipWriteInFileInZip (zf,buf,size_read);
					if (err<0)
						printf("error in writing %s in the zipfile\n", path);

				}
			} while (err == ZIP_OK && size_read > 0);
		}

		if (fin != NULL)
			fclose(fin);

		if (err<0)
			err=ZIP_ERRNO;
		else if ((err = zipCloseFileInZip(zf)) !=ZIP_OK)
			printf("error in closing %s in the zipfile\n", path);
	}
	errclose = zipClose(zf,NULL);
	if (errclose != ZIP_OK)
		printf("error in closing %s\n",filename_try);

    free(buf);
    return 0;
}


text:
/*-----------------------------------------------------------------------------

- Revolution Slider 5.0 Navigatin Skin Style	-

 HEBE SKIN

author:	ThemePunch
email:			info@themepunch.com
website:		http://www.themepunch.com
-----------------------------------------------------------------------------*/
/* ARROWS */
.hebe.tparrows {
	cursor:pointer;
	background:#fff;
	min-width:70px;
		min-height:70px;
	position:absolute;
	display:block;
	z-index:100;
}
.hebe.tparrows:hover {
}
.hebe.tparrows:before {
	font-family: "revicons";
	font-size:30px;
	color:#aaa;
	display:block;
	line-height: 70px;
	text-align: center;
	-webkit-transition: color 0.3s;
	-moz-transition: color 0.3s;
	transition: color 0.3s;
	z-index:2;
	position:relative;
	 background:#fff;
	min-width:70px;
		min-height:70px;
}
.hebe.tparrows.tp-leftarrow:before {
	content: "\e824";
}
.hebe.tparrows.tp-rightarrow:before {
	content: "\e825";
}
.hebe.tparrows:hover:before {
 color:#000;
			}
.tp-title-wrap {
	position:absolute;
	z-index:0;
	display:inline-block;
	background:#000;
	background:rgba(0,0,0,0.75);
	min-height:60px;
	line-height:60px;
	top:-10px;
	margin-left:0px;
	-webkit-transition: -webkit-transform 0.3s;
	transition: transform 0.3s;
	transform:scaleX(0);
	-webkit-transform:scaleX(0);
	transform-origin:0% 50%;
	 -webkit-transform-origin:0% 50%;
}
 .hebe.tp-rightarrow .tp-title-wrap {
	 right:0px;
	 -webkit-transform-origin:100% 50%;
 }
.hebe.tparrows:hover .tp-title-wrap {
	transform:scaleX(1);
	-webkit-transform:scaleX(1);
}
.hebe .tp-arr-titleholder {
	position:relative;
	text-transform:uppercase;
	color:#fff;
	font-weight:600;
	font-size:12px;
	line-height:90px;
	white-space:nowrap;
	padding:0px 20px 0px 90px;
}

.hebe.tp-rightarrow .tp-arr-titleholder {
	 margin-left:0px;
	 padding:0px 90px 0px 20px;
 }

.hebe.tparrows:hover .tp-arr-titleholder {
	 transform:translateX(0px);
	 -webkit-transform:translateX(0px);
	transition-delay: 0.1s;
	opacity:1;
}

.hebe .tp-arr-imgholder{
			width:90px;
			height:90px;
			position:absolute;
			left:100%;
			display:block;
			background-size:cover;
			background-position:center center;
		 top:0px; right:-90px;
		}
.hebe.tp-rightarrow .tp-arr-imgholder{
				right:auto;left:-90px;
			}

/* BULLETS */
.hebe.tp-bullets {
}
.hebe.tp-bullets:before {
	content:" ";
	position:absolute;
	width:100%;
	height:100%;
	background:transparent;
	padding:10px;
	margin-left:-10px;margin-top:-10px;
	box-sizing:content-box;
}

.hebe .tp-bullet {
	width:3px;
	height:3px;
	position:absolute;
	background:#fff;
	cursor: pointer;
	border:5px solid #222;
	border-radius:50%;
	box-sizing:content-box;
	-webkit-perspective:400;
	perspective:400;
	-webkit-transform:translateZ(0.01px);
	transform:translateZ(0.01px);
	 transition:all 0.3s;
}
.hebe .tp-bullet:hover,
.hebe .tp-bullet.selected {
	background:#222;
	border-color:#fff;
}

.hebe .tp-bullet-image {
	position:absolute;
	top:-90px; left:-40px;
	width:70px;
	height:70px;
	background-position:center center;
	background-size:cover;
	visibility:hidden;
	opacity:0;
	transition:all 0.3s;
	-webkit-transform-style:flat;
	transform-style:flat;
	perspective:600;
	-webkit-perspective:600;
	transform: scale(0);
	-webkit-transform: scale(0);
	transform-origin:50% 100%;
	-webkit-transform-origin:50% 100%;
border-radius:6px;

}
.hebe .tp-bullet:hover .tp-bullet-image {
	display:block;
	opacity:1;
	transform: scale(1);
	-webkit-transform: scale(1);
	visibility:visible;
		}
.hebe .tp-bullet-title {
}

/* TABS */
.hebe .tp-tab-title {
		color:#a8d8ee;
		font-size:13px;
		font-weight:700;
		text-transform:uppercase;
		font-family:"Roboto Slab"
		margin-bottom:5px;
}

.hebe .tp-tab-desc {
	font-size:18px;
		font-weight:400;
		color:#fff;
		line-height:25px;
	font-family:"Roboto Slab";
}


text:
package com.agami.leavemanagement.dao;

import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.BatchPreparedStatementSetter;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowCountCallbackHandler;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.agami.leavemanagement.model.GroupDepartmentInfo;
import com.agami.leavemanagement.model.GroupDepartments;
import com.agami.leavemanagement.model.OrganizationDepartment;
import com.agami.leavemanagement.model.OrganizationSubDepartment;

@Repository
public class AdminDaoImpl implements AdminDao {
	@Autowired
	JdbcTemplate jdbcTemplate;

	@Override
	public List<Map<String, Object>> saveLeaveSetupData(
			List<Map<String, String>> adminLeaveSetup, String year) {
		Map<String, Object> map = new HashMap<String, Object>();
		List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
		try {
			String value[] = new String[4];
			for (Map<String, String> map1 : adminLeaveSetup) {
				int i = 0;
				for (Entry<String, String> entry : map1.entrySet()) {
					String key = entry.getKey();
					value[i] = entry.getValue();
					System.out.println(key + " : " + value[i]);
					i++;
				}
				jdbcTemplate
						.update("insert into admin_leave_setup (title, event_type, start_date, end_date, leave_setup_year) values (?, ?, ?, ?, ?)",
								new Object[] { value[0], value[1], value[2],
										value[3], year });
			}
			map.put("isInserted", true);
			map.put("eventsList", adminLeaveSetup);
			map.put("leaveYear", year);
		} catch (Exception ex) {
			map.put("isInserted", false);
			map.put("eventsList", "");
			map.put("leaveYear", "");
			ex.printStackTrace();
		}
		list.add(map);

		return list;

	}

	@Override
	public List<Map<String, Object>> getLeaveSetupList() {
		String sql = "Select * from admin_leave_setup";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("title", rst.getString(2));
							map.put("type", rst.getString(3));
							map.put("startsAt", rst.getString(4));
							map.put("endsAt", rst.getString(5));
							map.put("leaveSetupYear", rst.getString(6));
							return map;
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	@Override
	public Map<String, Object> deleteLeaveSetup(String id) {
		Map<String, Object> map = new HashMap<String, Object>();
		try {
			jdbcTemplate.update("delete from admin_leave_setup where id=?",
					new Object[] { id });
			map.put("isDeleted", true);
			return map;
		} catch (Exception ex) {

			ex.printStackTrace();
			map.put("isDeleted", false);
			return map;
		}
	}

	@Override
	public Map<String, Object> updateLeaveSetupInfo(
			Map<String, Object> eventData) {
		Map<String, Object> map = new HashMap<String, Object>();
		try {
			jdbcTemplate
					.update("update admin_leave_setup set title =?, event_type =?, start_date=?, end_date =?, leave_setup_year =? where id =? ",
							new Object[] { eventData.get("title"),
									eventData.get("type"),
									eventData.get("startsAt"),
									eventData.get("endsAt"),
									eventData.get("leaveSetupYear"),
									eventData.get("id") });
			map.put("isUpdated", true);
		} catch (Exception ex) {
			map.put("isUpdated", false);
		}
		return map;
	}

	// vashu start
	@Override
	public int saveDepartments(final List<OrganizationDepartment> departments,
			final String who) throws SQLException {
		System.out.println(departments.getClass());
		for (int i = 0; i < departments.size(); i++) {
			System.out.println(departments.get(i).getClass());
			// OrganizationDepartment od =
			// (OrganizationDepartment)departments.get(i);
			// System.out.println(od);
		}
		int[] count = null;
		String sql = "INSERT INTO agami_emp_leave.department_info(department_name,departmet_head_id,departmet_head_name,descriptions, who)VALUES(?,?,?,?,?)";
		try {

			count = jdbcTemplate.batchUpdate(sql,
					new BatchPreparedStatementSetter() {
						@Override
						public void setValues(PreparedStatement ps, int i)
								throws SQLException {
							try {
								System.out.println(departments.get(i));
								System.out.println(departments.get(i)
										.getDepartmentName());
								System.out.println(departments.get(i)
										.getManagerId());
								System.out.println(departments.get(i)
										.getManagerName());
								System.out.println(who);
								ps.setString(1, departments.get(i)
										.getDepartmentName());
								ps.setInt(2,
										(departments.get(i).getManagerId()));
								ps.setString(3, departments.get(i)
										.getManagerName());
								ps.setString(4, departments.get(i)
										.getDescription());
								ps.setString(5, who);
							} catch (Exception ex) {
								ex.printStackTrace();
							}
						}

						@Override
						public int getBatchSize() {
							System.out.println("----------------------------"
									+ departments.size());
							return departments.size();

						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return 0;
		}
		System.out.println(count);
		System.out.println(count);

		for (int i = 0; i < count.length; i++) {
			System.out.println("i === " + count[i]);
		}
		return 1;
	}

	// vash end
	@Override
	public Map<String, Object> checkDeptName(String deptName) {

		Map<String, Object> map = new HashMap<String, Object>();
		try {
			RowCountCallbackHandler rowCountCallbackHandler = new RowCountCallbackHandler();

			jdbcTemplate.query(
					"select department_name from department_info where department_name="
							+ "'" + deptName + "'", rowCountCallbackHandler);
			int count = rowCountCallbackHandler.getRowCount();
			if (count == 0) {
				map.put("isUniqueDeptName", true);
			} else {
				map.put("isUniqueDeptName", false);
			}

		} catch (Exception ex) {
			map.put("isUniqueDeptName", false);
			ex.printStackTrace();
		}
		return map;
	}

	@Override
	public List<Map<String, Object>> getDeptSetupList() {
		String sql = "Select * from department_info";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("departmentName", rst.getString(2));
							map.put("managerId", rst.getString(3));
							map.put("managerName", rst.getString(4));
							map.put("description", rst.getString(5));
							map.put("who", rst.getString(6));
							return map;
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	@Override
	public Map<String, Object> deleteDeptLeaveSetup(String sql, int id) {
		Map<String, Object> map = new HashMap<String, Object>();
		try {
			jdbcTemplate.update(sql, new Object[] { id });
			map.put("isDeleted", true);
			return map;
		} catch (Exception ex) {

			ex.printStackTrace();
			map.put("isDeleted", false);
			return map;
		}
	}

	@Override
	public Map<String, Object> updateDeptLeaveSetupInfo(
			Map<String, Object> deptInfo) {
		Map<String, Object> map = new HashMap<String, Object>();
		try {
			jdbcTemplate
					.update("update department_info set department_name =?, departmet_head_id =?, departmet_head_name=?, who =? where id =? ",
							new Object[] { deptInfo.get("title"),
									deptInfo.get("type"),
									deptInfo.get("startsAt"),
									deptInfo.get("endsAt"),
									deptInfo.get("leaveSetupYear"),
									deptInfo.get("id") });
			map.put("isUpdated", true);
		} catch (Exception ex) {
			map.put("isUpdated", false);
		}
		return map;
	}

	@Override
	public int saveSubDepartments(
			final List<OrganizationSubDepartment> subDepartments,
			final int departmentId, final String who) throws SQLException {
		int[] count = null;
		String sql = "INSERT INTO sub_department_info(sub_department_name,department_id,manager_id,leave_head_id, descriptions, who)VALUES(?,?,?,?,?,?);";
		try {

			count = jdbcTemplate.batchUpdate(sql,
					new BatchPreparedStatementSetter() {
						@Override
						public void setValues(PreparedStatement ps, int i)
								throws SQLException {
							OrganizationSubDepartment department = subDepartments
									.get(i);
							// TODO Auto-generated method stub
							System.out.println(department
									.getSubDepartmentName());
							System.out.println(department.getManagerId());
							System.out.println(department.getManagerName());
							System.out.println(who);
							ps.setString(1, department.getSubDepartmentName());
							ps.setInt(2, departmentId);
							ps.setInt(3, department.getManagerId());
							ps.setInt(4, department.getLeaveHeadId());
							ps.setString(5, department.getDescription());
							ps.setString(6, who);

						}

						@Override
						public int getBatchSize() {
							// TODO Auto-generated method stub
							return subDepartments.size();
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return 0;
		}
		System.out.println(count);
		System.out.println(count);

		for (int i = 0; i < count.length; i++) {
			System.out.println("i === " + count[i]);
		}
		return 1;
	}

	@Override
	public List<Map<String, Object>> subDepartmentList() {
		String sql = "Select * from sub_department_info";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("subDepartmentName", rst.getString(2));
							map.put("departmentId", rst.getString(3));
							map.put("managerId", rst.getInt(4));
							map.put("leaveHeadId", rst.getString(5));
							map.put("description", rst.getString(6));
							map.put("who", rst.getString(7));
							return map;
						}
						/*
						 * ps.setString(1, department.getSubDepartmentName());
						 * ps.setInt(2, departmentId); ps.setInt(3,
						 * department.getManagerId()); ps.setInt(4,
						 * department.getLeaveHeadId()); ps.setString(5,
						 * department.getDescription()); ps.setString(6, who);
						 */
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	@Override
	public Map<String, Object> deleteSubDepartment(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	public List<Map<String, Object>> getDepartmentName() {
		String sql = "select id, department_name as departmentName, departmet_head_name as departmentHeadName from department_info";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("departmentName", rst.getString(2));
							map.put("departmentHeadName", rst.getString(3));
							System.out.println("-------------- " + map);
							return map;
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}

	@Override
	public Map<String, Object> saveGroupInfo(
			GroupDepartmentInfo groupDepartmentInfo) {
		Map<String, Object> map = new HashMap<String, Object>();
		try {
			for (int i = 0; i < groupDepartmentInfo.getGroupDepartments()
					.size(); i++) {
				GroupDepartments groupDepartments = groupDepartmentInfo
						.getGroupDepartments().get(i);
				System.out.println("-- " + groupDepartments.getDescription());
				System.out.println("---- " + groupDepartments.getGroupName());
				System.out.println("---" + groupDepartments.getLeaveHeadId());
				System.out.println("--- " + groupDepartments.getTeamLeadName());
				jdbcTemplate
						.update("insert into group_info (group_name, team_lead_name, description, leave_head_id, deptartment_id, sub_department_id, group_manager_id) values(?, ?, ?, ?, ?, ?, ?)",
								new Object[] { groupDepartments.getGroupName(),
										groupDepartments.getTeamLeadName(),
										groupDepartments.getDescription(),
										groupDepartments.getLeaveHeadId(),
										groupDepartmentInfo.getDepartmentId(),
										groupDepartmentInfo.getSubDepartmentId(),
										groupDepartmentInfo.getGroupManagerId()
										});
				map.put("isInserted", true);
			}
		} catch (Exception ex) {
			map.put("isInserted", false);
			ex.printStackTrace();
		}
		return map;
	}

	@Override
	public Map<String, Object> checkGroupName(String groupName, int deptId) {

		Map<String, Object> map = new HashMap<String, Object>();
		try {
			RowCountCallbackHandler rowCountCallbackHandler = new RowCountCallbackHandler();

			jdbcTemplate.query(
					"select group_name from group_info where group_name=" + "'"
							+ groupName + "' and deptartment_id ='" + deptId
							+ "'", rowCountCallbackHandler);
			int count = rowCountCallbackHandler.getRowCount();
			if (count == 0) {
				map.put("isUniqueGroupName", true);
			} else {
				map.put("isUniqueGroupName", false);
			}

		} catch (Exception ex) {
			map.put("isUniqueGroupName", false);
			ex.printStackTrace();
		}
		return map;
	}
	@Override
	public Map<String, Object> groupList() {

		return null;
	}
	@Override
	public List<Map<String, Object>> getSubDepartmentName() {
		String sql = "select id, sub_department_name as subDepartmentName from sub_department_info";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("subDepartmentName", rst.getString(2));
							System.out.println("-------------- " + map);
							return map;
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}
	@Override
	public List<Map<String, Object>> getGroupName() {
		String sql = "select id, group_name as groupName from group_info";
		try {
			return jdbcTemplate.query(sql,
					new RowMapper<Map<String, Object>>() {
						@Override
						public Map<String, Object> mapRow(ResultSet rst,
								int arg1) throws SQLException {
							Map<String, Object> map = new HashMap<String, Object>();
							map.put("id", rst.getInt(1));
							map.put("groupName", rst.getString(2));
							return map;
						}
					});
		} catch (Exception ex) {
			ex.printStackTrace();
			return null;
		}
	}
}


text:
<?php

// OroUIBundle:Default:Page503.html.twig
return array (
);


text:
Block 1:
```
#include <iostream>

using namespace std;

int main() {
    double a = 1.1;
    double b = 1.9;
    int c = a + b;
    cout << c << endl; // 3
    return 0;
}
```

Block 2:
```
#include <iostream>

using namespace std;

int main() {
    double a = 1.1;
    double b = 1.9;
    double c = (int)a + b; // 2.9
    cout << c << endl;
    return 0;
}
```

Block 3:
```
#include <iostream>

using namespace std;

int main() {
    double a = 1.1;
    double b = 1.9;
    double c = (int)a + (int)b; // 2
    cout << c << endl;
    return 0;
}
```

#### Pointers

##### Block 1:
```
#include <iostream>

using namespace std;

int main() {
    double a = 1;
    double *c = &a;
    cout << "&a:" << &a << endl<< "a:" << a << endl << "c:" << c << endl << "&c:" << &c << endl;
    return 0;
}
```
##### Comment 1:
value of a and c should be the same

##### Block 2:
```
#include <iostream>

using namespace std;

int main() {
    double a = 1;
    cout << &*a << endl;
    return 0;
}
```

##### Comment 1:
Does not compile because a is not a pointer

#### Lifetime of variables

##### Static variables

The lifetime of function static variables begins the first time the program flow encounters the declaration and it ends at program termination. This means that the run-time must perform some book keeping in order to destruct it only if it was actually constructed.
http://stackoverflow.com/questions/246564/what-is-the-lifetime-of-a-static-variable-in-a-c-function

Also destructor are executed in reverse order

#### Global variables

The lifetime of function global variables begins the first time the program flow encounters the declaration and it ends at program termination.

Destructor after static and are executed in reverse order (C++11)