text:
package com.deere.api.axiom.generated.v3;

import org.joda.time.DateTime;

import java.util.List;

/**
 * Created by dv30371 on 1/18/2017.
 */
public class GenericNote  extends Resource{

    protected String createdDate;
    protected DateTime lastModifiedDate;
    protected String title;
    protected String text;
    protected List<ContributedMetadata> metadata;
    protected User author;
    protected String geometry;
    protected String noteType;

    public String getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(String createdDate) {
        this.createdDate = createdDate;
    }

    public DateTime getLastModifiedDate() {
        return lastModifiedDate;
    }

    public void setLastModifiedDate(DateTime lastModifiedDate) {
        this.lastModifiedDate = lastModifiedDate;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public List<ContributedMetadata> getMetadata() {
        return metadata;
    }

    public void setMetadata(List<ContributedMetadata> metadata) {
        this.metadata = metadata;
    }

    public User getAuthor() {
        return author;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public String getGeometry() {
        return geometry;
    }

    public void setGeometry(String geometry) {
        this.geometry = geometry;
    }

    public String getNoteType() {
        return noteType;
    }

    public void setNoteType(String noteType) {
        this.noteType = noteType;
    }
}

redpajama_set_name: RedPajamaGithub


text:
#include<stdio.h>
#include<stdlib.h>
int main(){
	int  quantidade, indice;
	int* pontInt;
	printf("\n Quantos inteiros quer armazenar? ");
	scanf("%d", &quantidade);
	if (quantidade <= 0){
		printf("\a\n Quantidade nao pode ser menor ou igual a zero!\n");
		return -1;
	}
	/*
		Atribuição do endereço da área de memória alocada para o ponteiro
		Como é alocada uma quantidade de int, na prática é um vetor dinâmico
	*/
	pontInt = (int*) malloc(quantidade * sizeof(int));
	if (pontInt == NULL){
		printf("\a\n Erro na alocacao de memoria!\n");
		return -2;
	}
	printf("\n Alocacao realizada com sucesso!");
	printf("\n Endereco armazenado no ponteiro: %p\n\n", pontInt);
	for (indice = 0; indice < quantidade; indice++){
		printf(" Entre com inteiro %d: ", indice + 1);
		scanf("%d", pontInt + indice);
	}
	printf("\n Impressao dos valores");
	printf("\n =====================\n\n");
	for (indice = 0; indice < quantidade; indice++){
		printf(" %d = %d\n", indice + 1, *(pontInt + indice));
	}
	// Libera a memória alocada
	free(pontInt);
	return 0;
}


text:
require 'active_support/core_ext/module/delegation'

require 'parcels/fortitude_inline_parcel'
require 'parcels/fortitude_alongside_parcel'
require 'parcels/dependency_parcel_list'

require 'pathname'

require 'find'

module Parcels
  class WidgetTree
    attr_reader :root, :parcels_environment

    def initialize(parcels_environment, root)
      @parcels_environment = parcels_environment
      @root = File.expand_path(root, parcels_environment.root)

      @sprockets_environments_added_to = { }
    end

    def widget_naming_root_dirs
      @widget_naming_root_dirs ||= [ root, File.dirname(root) ]
    end

    def add_workaround_directory_to_sprockets!(sprockets_environment)
      return if (! root_exists?)

      @sprockets_environments_added_to[sprockets_environment] ||= begin
        sprockets_environment.prepend_path(workaround_directory)
        true
      end
    end

    def subpath_to(full_path)
      ::Parcels::Utils::PathUtils.path_under(full_path, root)
    end

    def remove_workaround_directory_from(full_path)
      if (path_under_workaround = ::Parcels::Utils::PathUtils.maybe_path_under(full_path, workaround_directory))
        if (separator_index = path_under_workaround.index(File::SEPARATOR))
          if (separator_index > 0 && separator_index < (path_under_workaround.length - 1))
            link_name = path_under_workaround[0..(separator_index - 1)]
            after_link = path_under_workaround[(separator_index + 1)..-1]

            if File.symlink?(File.join(workaround_directory, link_name))
              link_value = File.readlink(File.join(workaround_directory, link_name))
              resolved_link = File.expand_path(File.join(workaround_directory, link_value))
              final_path = File.join(resolved_link, after_link)
              return final_path
            end
          end
        end
      end

      nil
    end

    def add_all_widgets_to_sprockets_context!(sprockets_context, set_names)
      return unless root_exists?
      sprockets_context.depend_on(root)

      all_parcels = [ ]

      for_each_parcel(sprockets_context) do |parcel|
        if parcel.included_in_any_set?(set_names)
          if all_parcels.length == 0
            ensure_workaround_directory_is_set_up!
          end

          all_parcels << parcel
        end
      end

      parcel_list = ::Parcels::DependencyParcelList.new
      parcel_list.add_parcels!(all_parcels)
      parcel_list.parcels_in_order.each do |parcel|
        parcel.add_to_sprockets_context!(sprockets_context)
      end
    end

    # not ideal since this same traversal happens in add_all_widgets_to_sprockets_context
    # fortunately we have an early return if we run into a usable parcel
    def ensure_workaround_directory_is_set_up_during_init!
      for_each_parcel do |parcel|
        ensure_workaround_directory_is_set_up!
        return
      end
    end

    private
    EXTENSION_TO_PARCEL_CLASS_MAP   = {
      '.rb'.freeze => ::Parcels::FortitudeInlineParcel,
      '.pcss'.freeze => ::Parcels::FortitudeAlongsideParcel
    }.freeze

    ALL_EXTENSIONS                    = EXTENSION_TO_PARCEL_CLASS_MAP.keys.dup.freeze

    PARCELS_LOGICAL_PATH_PREFIXES     = EXTENSION_TO_PARCEL_CLASS_MAP.values.map { |k| k.logical_path_prefix }

    def for_each_parcel(sprockets_context_to_add_to = nil)
      return unless File.exist?(root)
      Find.find(root) do |path|
        full_path = File.expand_path(path, root)
        stat = File.stat(full_path)

        sprockets_context_to_add_to.depend_on(path) if sprockets_context_to_add_to && stat.directory?
        next unless stat.file?

        extension = File.extname(full_path).strip.downcase
        if (klass = EXTENSION_TO_PARCEL_CLASS_MAP[extension])
          parcel = klass.new(self, full_path)
          yield parcel if parcel.usable?
        end
      end
    end

    def root_exists?
      File.exist?(root)
    end

    def workaround_directory
      @workaround_directory ||= parcels_environment.workaround_directory_root_for_widget_tree(self)
    end

    def ensure_workaround_directory_is_set_up!
      @workaround_directory_exists ||= begin
        ensure_workaround_directory_exists!
        ensure_nothing_else_is_in_workaround_directory!
        ensure_symlinks_point_to_the_right_place!

        true
      end
    end

    def ensure_workaround_directory_exists!
      unless File.directory?(workaround_directory)
        if File.exist?(workaround_directory)
          raise Errno::EEXIST, %{Parcels uses the directory '#{workaround_directory}' internally
  (to allow us to safely add assets to Sprockets without treading on the global asset namespace);
  however, there is already something at that path that is not a directory.}
        end

        FileUtils.mkdir_p(workaround_directory)
      end
    end

    def ensure_nothing_else_is_in_workaround_directory!
      entries = Dir.entries(workaround_directory).reject { |e| e =~ /^\./ }
      extra = entries - PARCELS_LOGICAL_PATH_PREFIXES

      if extra.length > 0
        raise Errno::EEXIST, %{Parcels uses the directory '#{workaround_directory}' internally
(to allow us to safely add assets to Sprockets without treading on the global asset namespace);
it should either be empty, or contain at most symlinks named any of
#{PARCELS_LOGICAL_PATH_PREFIXES.map { |p| "'#{p}'" }.join(", ")}.
(Parcels will create those symlinks automatically; you should not manage them yourself.)

However, this directory currently contains other file(s) that we weren't expecting:

#{extra.join("\n")}}
      end
    end

    SYMLINK_TARGET = "..".freeze

    def ensure_symlinks_point_to_the_right_place!
      PARCELS_LOGICAL_PATH_PREFIXES.each do |prefix|
        symlink = File.join(workaround_directory, prefix)

        if File.exist?(symlink)
          if File.symlink?(symlink)
            contents = File.readlink(symlink)

            if contents == symlink_target
              # ok, great
            else
              File.delete(symlink)
              create_symlink!(prefix)
            end
          else
            raise Errno::EEXIST, %{Parcels uses the directory '#{workaround_directory}' internally
(to allow us to safely add assets to Sprockets without treading on the global asset namespace);
it should either be empty, or contain at most symlinks named any of
#{PARCELS_LOGICAL_PATH_PREFIXES.map { |p| "'#{p}'" }.join(", ")}.

This directory has a file called '#{prefix}' that isn't a symlink.
Out of respect for your data, we're going to raise this fatal error. Please check what's going on,
and try again.}
          end
        else
          create_symlink!(prefix)
        end
      end
    end

    def create_symlink!(prefix)
      Dir.chdir(workaround_directory) do
        begin
          FileUtils.ln_s(symlink_target, prefix)
        rescue Errno::EEXIST
          # This is to deal with race conditions -- if multiple processes try to create the
          # symlink at the exact same time.
        end
      end
    end

    def symlink_target
      workaround_dir_path = Pathname.new(workaround_directory).realpath
      root_path = Pathname.new(root).realpath
      root_path.relative_path_from(workaround_dir_path).to_s
    end
  end
end


text:
<?php

namespace Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter;

use Symfony\Component\HttpFoundation\Request;

/*
 * This file is part of the Symfony framework.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

/**
 *
 *
 * @author     Fabien Potencier <fabien@symfony.com>
 */
class ParamConverterManager
{
    protected $converters = array();

    public function apply(Request $request, $configurations)
    {
        if (is_object($configurations)) {
            $configurations = array($configurations);
        }

        foreach ($configurations as $configuration) {
            foreach ($this->all() as $converter) {
                if ($converter->supports($configuration)) {
                    $converter->apply($request, $configuration);
                }
            }
        }
   }

   /**
    * Adds a parameter converter.
    *
    * @param ParamConverterInterface $converter A ParamConverterInterface instance
    * @param integer                 $priority  The priority (between -10 and 10)
    */
    public function add(ParamConverterInterface $converter, $priority = 0)
    {
       if (!isset($this->converters[$priority])) {
           $this->converters[$priority] = array();
       }

       $this->converters[$priority][] = $converter;
    }

   /**
    * Returns all registered param converters.
    *
    * @return array An array of param converters
    */
   public function all()
   {
       krsort($this->converters);

       $converters = array();
       foreach ($this->converters as $all) {
           $converters = array_merge($converters, $all);
       }

       return $converters;
   }
}


text:
package ca.ualberta.medroad.view.list_adapters;

import android.content.Context;
import android.text.TextUtils;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import java.util.List;

/**
 * Created by Yuey on 2015-03-17.
 */
public class TwoLineArrayAdapter
		extends ArrayAdapter< Pair< String, String > >
{
	protected       List< Pair< String, String > > data;
	protected final boolean                        oneLine;

	public TwoLineArrayAdapter( Context context,
								List< Pair< String, String > > objects,
								boolean oneLine )
	{
		super( context, android.R.layout.simple_list_item_2, android.R.id.text1, objects );
		this.data = objects;
		this.oneLine = oneLine;
	}

	@Override
	public View getView( int position, View convertView, ViewGroup parent )
	{
		ViewHolder holder;

		if ( convertView == null )
		{
			LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
			convertView = inflater.inflate( android.R.layout.simple_list_item_2, parent, false );

			holder = new ViewHolder( convertView );
			convertView.setTag( holder );
		}
		else
		{
			holder = (ViewHolder) convertView.getTag();
		}

		Pair< String, String > item = data.get( position );
		holder.text1.setText( item.first );
		holder.text2.setText( item.second );

		return convertView;
	}

	@Override
	public View getDropDownView( int position, View convertView, ViewGroup parent )
	{
		ViewHolder holder;

		if ( convertView == null )
		{
			LayoutInflater inflater = (LayoutInflater) getContext().getSystemService( Context.LAYOUT_INFLATER_SERVICE );
			convertView = inflater.inflate( android.R.layout.simple_list_item_2, parent, false );

			holder = new ViewHolder( convertView );
			convertView.setTag( holder );
		}
		else
		{
			holder = (ViewHolder) convertView.getTag();
		}

		Pair< String, String > item = data.get( position );
		holder.text1.setText( item.first );
		holder.text2.setText( item.second );

		return convertView;
	}

	protected class ViewHolder
	{
		public TextView text1;
		public TextView text2;

		public ViewHolder( View parentView )
		{
			text1 = (TextView) parentView.findViewById( android.R.id.text1 );
			text2 = (TextView) parentView.findViewById( android.R.id.text2 );

			if ( oneLine )
			{
				text1.setMaxLines( 1 );
				text2.setMaxLines( 1 );

				text1.setEllipsize( TextUtils.TruncateAt.END );
				text2.setEllipsize( TextUtils.TruncateAt.END );
			}
		}
	}
}


text:
namespace egl
{

class AttributeMap final
{
  public:
    AttributeMap();
    explicit AttributeMap(const EGLint *attributes);

    void insert(EGLint key, EGLint value);
    bool contains(EGLint key) const;
    EGLint get(EGLint key, EGLint defaultValue) const;

    typedef std::map<EGLint, EGLint>::const_iterator const_iterator;

    const_iterator begin() const;
    const_iterator end() const;

  private:
    std::map<EGLint, EGLint> mAttributes;
};

}

#endif   // LIBANGLE_ATTRIBUTEMAP_H_


text:
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;

namespace Amazon.RDS.Model
{
    ///
    /// <para> Contains the result of a successful invocation of the DescribeEvents action. </para>
    ///
    public class DescribeEventsResult
    {

        private string marker;
        private List<Event> events = new List<Event>();

        ///
        /// An optional pagination token provided by a previous Events request. If this parameter is specified, the response includes only records
        /// beyond the marker, up to the value specified by <c>MaxRecords</c> .
        ///
        ///
        public string Marker
        {
            get { return this.marker; }
            set { this.marker = value; }
        }

        ///
        /// Sets the Marker property
        ///
        /// <param name="marker">The value to set for the Marker property </param>
        /// <returns>this instance</returns>
        [Obsolete("The With methods are obsolete and will be removed in version 2 of the AWS SDK for .NET. See http://aws.amazon.com/sdkfornet/#version2 for more information.")]
        public DescribeEventsResult WithMarker(string marker)
        {
            this.marker = marker;
            return this;
        }

        // Check to see if Marker property is set
        internal bool IsSetMarker()
        {
            return this.marker != null;
        }

        ///
        /// A list of Event instances.
        ///
        ///
        public List<Event> Events
        {
            get { return this.events; }
            set { this.events = value; }
        }
        ///
        /// Adds elements to the Events collection
        ///
        /// <param name="events">The values to add to the Events collection </param>
        /// <returns>this instance</returns>
        [Obsolete("The With methods are obsolete and will be removed in version 2 of the AWS SDK for .NET. See http://aws.amazon.com/sdkfornet/#version2 for more information.")]
        public DescribeEventsResult WithEvents(params Event[] events)
        {
            foreach (Event element in events)
            {
                this.events.Add(element);
            }

            return this;
        }

        ///
        /// Adds elements to the Events collection
        ///
        /// <param name="events">The values to add to the Events collection </param>
        /// <returns>this instance</returns>
        [Obsolete("The With methods are obsolete and will be removed in version 2 of the AWS SDK for .NET. See http://aws.amazon.com/sdkfornet/#version2 for more information.")]
        public DescribeEventsResult WithEvents(IEnumerable<Event> events)
        {
            foreach (Event element in events)
            {
                this.events.Add(element);
            }

            return this;
        }

        // Check to see if Events property is set
        internal bool IsSetEvents()
        {
            return this.events.Count > 0;
        }
    }
}


text:
package cc.seeed.iot.webapi.model;

/**
 * Created by tenwong on 15/6/23.
 */
public class ErrorResponse {
    public String error;
}


text:
/**
 *
 */
package ar.com.notarip.semantic.brain;

import weka.core.Attribute;
import weka.core.FastVector;

/**
 * @author pablo
 *
 */
public class Training {

	public void train(){

		   // Declare two numeric attributes
        Attribute Attribute1 = new Attribute("firstNumeric");
        Attribute Attribute2 = new Attribute("secondNumeric");

        // Declare a nominal attribute along with its values
        FastVector fvNominalVal = new FastVector(3);
        fvNominalVal.addElement("blue");
        fvNominalVal.addElement("gray");
        fvNominalVal.addElement("black");
        Attribute Attribute3 = new Attribute("aNominal", fvNominalVal);

        // Declare the class attribute along with its values
        FastVector fvClassVal = new FastVector(2);
        fvClassVal.addElement("positive");
        fvClassVal.addElement("negative");
        Attribute ClassAttribute = new Attribute("theClass", fvClassVal);

        // Declare the feature vector
        FastVector fvWekaAttributes = new FastVector(4);
        fvWekaAttributes.addElement(Attribute1);
        fvWekaAttributes.addElement(Attribute2);
        fvWekaAttributes.addElement(Attribute3);
        fvWekaAttributes.addElement(ClassAttribute);
	}

}


text:
'use strict';

exports.up = function(knex, Promise) {
  return Promise.all([
  	knex.schema.table('logs', function(table) {
  		table.text('message');
  	})
  ]);
};

exports.down = function(knex, Promise) {

};


text:
package decksClassesTests;

import static org.junit.Assert.*;

import org.junit.Test;

import common.AttackObjectCard;
import common.Card;
import common.Coordinate;
import common.Sector;
import common.SectorType;
import decks.DiscardDeck;

/**
 * Tests for the DiscardDeck class
 *
 * @author Andrea Sessa
 * @author Giorgio Pea
 * @see DiscardDeck
 * @see Card
 * @see ObjectCard
 */
public class DiscardDeckTest {

	/*
	 * The ObjectDeck variable that is used for all the tests below
	 */
	private DiscardDeck discardDeck;

	/**
	 * Test for the constructor
	 */
	@Test
	public void testInit() {
		/*
		 * Testing if the constructor of the sector deck fills correctly the
		 * content field
		 */
		discardDeck = new DiscardDeck();
		assertTrue(discardDeck.getCards().isEmpty());
	}

	@Test
	public void testAddCardGetCards() {
		/*
		 * Testing if addCard changes correctly the content of the discard deck
		 * Testing if getCards returns the correct cards
		 */
		discardDeck = new DiscardDeck();
		Card card = new AttackObjectCard(new Sector(new Coordinate('A', 1),
				SectorType.SAFE));
		discardDeck.addCard(card);
		assertTrue(discardDeck.getCards().contains(card));
		assertEquals(discardDeck.getCards().size(), 1);
	}

	/**
	 * Test for the removeCards method
	 */
	@Test
	public void testRemoveCards() {
		/*
		 * Testing if removeCards remove all the cards of the discard deck so
		 * its size is zero
		 */
		discardDeck = new DiscardDeck();
		discardDeck.removeCards();
		assertTrue(discardDeck.getCards().isEmpty());
		Card card = new AttackObjectCard(new Sector(new Coordinate('A', 1),
				SectorType.SAFE));
		discardDeck.addCard(card);
		discardDeck.removeCards();
		assertTrue(discardDeck.getCards().isEmpty());
	}
}


text:
package com.uber.tchannel.fragmentation;

public enum FragmentationState {
    /* Currently decoding Arg2 */
    ARG1,

    /* Currently decoding Arg2 */
    ARG2,

    /* Currently decoding Arg3 */
    ARG3,

    /* Done! */
    DONE;

    public static FragmentationState nextState(FragmentationState current) {
        switch (current) {
            case ARG1:
                return ARG2;
            case ARG2:
                return ARG3;
            case ARG3:
                return DONE;
            case DONE:
            default:
                return DONE;
        }
    }
}


text:
                       Kelola Shopping

Youth Shopping

Kelola Shopping

                                        <?php if($this->session->flashdata('msg_berhasil')!=''){?>

                                                <button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
                                                <?php echo $this->session->flashdata('msg_berhasil');?>

                                        <?php }?>

                                                    No.
                                                    Nama Produk
                                                    Jenis Produk
                                                    Harga Produk
                                                    Posted By
                                                    Telephone
                                                    Waktu Posting
                                                    Aksi

                                                <?php
                                                    foreach($listProduk as $item)
                                                    { ?>

                                                            <?php echo $item['id_produk'] ?>
                                                            <?php echo $item['nama_produk'] ?>
                                                            <?php echo $item['jenis_produk'] ?>
                                                            <?php echo "Rp ".$item['harga_produk'] ?>
                                                            <?php echo $item['posted_by'] ?>
                                                            <?php echo $item['phone_number'] ?>
                                                            <?php echo $item['tanggal_posting'] ?>

                                                                <a href="<?php echo site_url('KelolaShopping/lihat_detail_produk/'.$item['id_produk']);?>"><button class="btn btn-warning btn-sm"> Detail</button>

                                                                <button onclick="delete_produk_ajax(<?php echo $item['id_produk']; ?>)" id="delete-button-produk" type="submit" class="btn btn-danger btn-sm"> Hapus</button>

                                                    <?php } ?>


text:
function loginCheck(loginId, logoutId, greetingId) {
    $.ajax({
        type: "GET",
        url: "/login",
        success: function (response) {
            if (response) {
                showGreetings(greetingId, loginId, logoutId, response);
            } else {
                document.getElementById(loginId).style.display = 'block';
            }
        },
        error: function (response) {
            document.getElementById(loginId).style.display = 'block';
        }
    });
}

function login(loginFormId, loginId, logoutid, greetingid) {
    $.ajax({
        type: "POST",
        url: "/login",
        data: jQuery("#"+loginFormId).serialize(),
        success: function (response) {
            if (response) {
                if (response.role.role == 'admin') {
                    window.location.replace('/admin');
                } else {
                    showGreetings(greetingid, loginId, logoutid, response.login);
                }
            } else {
                $('#loginerror').empty().append('Wrong login/password!');
            }
        },
        error: function () {
            $('#loginerror').empty().append('Error!');
        }
    });
}

function logout(loginId, logoutId, greetingId) {
    $.ajax({
        type: "POST",
        url: "/logout",
        success: function (response) {
            document.getElementById(loginId).style.display = 'block';
            document.getElementById(logoutId).style.display = 'none';
        },
        error: function () {
            $('#' + greetingId).empty().append('<p style="color: red;">Error!<p>');
        }
    });
}

function showGreetings(greetingid, loginId, logoutId, login) {
    document.getElementById(loginId).style.display = 'none';
    document.getElementById(logoutId).style.display = 'block';
    document.getElementById(greetingid).innerHTML = '';
    greetingid = '#' + greetingid;
    $(greetingid).empty().append('Hello, '+ login);
}


text: export { TestItemStatus } from './testItemStatus';


text:
package org.osgi.impl.service.upnp.cp.event;

import java.io.BufferedInputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.URL;

public class GenaSocket {
	private BufferedInputStream	in;
	private OutputStream		dos;
	private RequestProcessor	requestparser;
	public String				receivedTimeout;
	public String				sid;
	public long					timeDuration;
	private Socket				clientSocket;

	/**
	 * This method creates a socket and returns it. Based on the given path,
	 * extracts the host and the port for creating the socket.If any error
	 * occurs while creating the socket, throws GenaException with the error
	 * message.
	 */
	void createSocket(String path) throws Exception {
		try {
			URL url = new URL(path);
			String host = url.getHost();
			int port = url.getPort();
			if (port == -1) {
				port = 80;
			}
			clientSocket = new Socket(host, port);
		}
		catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

	// This method writes the given message to the client.
	void sendSocket(String message) {
		try {
			in = new BufferedInputStream(clientSocket.getInputStream());
			dos = clientSocket.getOutputStream();
			dos.write(message.getBytes());
			dos.flush();
			clientSocket.setSoTimeout(30 * 1000);
		}
		catch (Exception e) {
			System.out.println(e.getMessage());
		}
	}

	// This method checks for the subscription id. And if the subscription id is
	// invalid.
	void checkSubscriptionId() throws Exception {
		sid = requestparser.headers.get("sid");
		if (sid == null || !sid.startsWith("uuid:")) {
			throw new Exception("Invalid sid received, please try again");
		}
	}

	// This method checks for the timeout duration. And if the timeout duration
	// is invalid
	void checkTimeoutDuration() throws Exception {
		receivedTimeout = requestparser.headers.get("timeout");
		if (receivedTimeout == null) {
			throw new Exception("Invalid timeout received,please try again");
		}
		if (!receivedTimeout.equals("infinite")) {
			int result = receivedTimeout.indexOf("-");
			timeDuration = Integer.parseInt(receivedTimeout
					.substring(result + 1));
			timeDuration = (timeDuration * 1000) + System.currentTimeMillis();
		}
		else {
			timeDuration = 0;
		}
	}

	// This method parses the request and if the request is unable to get parsed
	boolean parseRequest() {
		requestparser = new RequestProcessor(in);
		int result = requestparser.parseRequest();
		if (result != 200) {
			return false;
		}
		try {
			clientSocket.close();
			dos.close();
			in.close();
		}
		catch (Exception e) {
			System.out.println(e.getMessage());
		}
		return true;
	}
}


text:
bool parse(char* ifname, long long* rx_bytes, long long* rx_packets,
           long long* tx_bytes, long long* tx_packets);

int main(int argc, char* argv[]) {
    if (argc < 2) {
        std::cerr << "Usage: " << argv[0] << " interface_name" << std::endl;
        return 1;
    }

    long long rx_bytes = 0;
    long long rx_packets = 0;
    long long tx_bytes = 0;
    long long tx_packets = 0;

    if (!parse(argv[1], &rx_bytes, &rx_packets, &tx_bytes, &tx_packets)) {
        std::cerr << "Can't find such interface: " << argv[1] << std::endl;
        return 1;
    }

    std::cout << argv[1] << ":" << std::endl;
    std::cout << "\tReceive " << rx_bytes << " bytes (" << rx_packets << " packets)" << std::endl;
    std::cout << "\tTransmit " << tx_bytes << " bytes (" << tx_packets << " packets)" << std::endl;

    return 0;
}

bool parse(char* ifname, long long* rx_bytes, long long* rx_packets,
           long long* tx_bytes, long long* tx_packets) {
    std::string interface(ifname);
    interface.append(":");
    std::string buff;
    std::ifstream netstat("/proc/net/dev");

    while(std::getline(netstat, buff)) {
        size_t shift = buff.find_first_not_of(' ');
        if (buff.compare(shift, interface.length(), interface) == 0) {
            std::regex rx(R"([^[:alpha:]][[:digit:]]+[^[:alpha:]])");
            std::sregex_iterator pos(buff.cbegin(), buff.cend(), rx);

            *rx_bytes = std::stoll(pos->str());
            ++pos;
            *rx_packets = std::stoll(pos->str());
            std::advance(pos, 7);
            *tx_bytes = std::stoll(pos->str());
            ++pos;
            *tx_packets = std::stoll(pos->str());

            return true;
        }
    }
    return false;
}


text:
require 'bipbip'
require 'bipbip/plugin/redis'

describe Bipbip::Plugin::Redis do
  let(:plugin) { Bipbip::Plugin::Redis.new('redis', { 'hostname' => 'localhost', 'port' => 6379 }, 10) }

  it 'should collect data' do
    data = plugin.monitor

    data['total_commands_processed'].should be_kind_of(Integer)
    data['used_memory'].should be_kind_of(Integer)
    data['mem_fragmentation_ratio'].should be_instance_of(Float)
  end
end


text:
package org.apache.commons.collections4.set;

import java.util.Collection;
import java.util.Iterator;
import java.util.SortedSet;
import java.util.function.Predicate;
import org.apache.commons.collections4.Unmodifiable;
import org.apache.commons.collections4.set.AbstractSortedSetDecorator;

public class UnmodifiableSortedSet<E> extends AbstractSortedSetDecorator<E> implements Unmodifiable
{
    protected UnmodifiableSortedSet() {}
    public Iterator<E> iterator(){ return null; }
    public SortedSet<E> headSet(E p0){ return null; }
    public SortedSet<E> subSet(E p0, E p1){ return null; }
    public SortedSet<E> tailSet(E p0){ return null; }
    public boolean add(E p0){ return false; }
    public boolean addAll(Collection<? extends E> p0){ return false; }
    public boolean remove(Object p0){ return false; }
    public boolean removeAll(Collection<? extends Object> p0){ return false; }
    public boolean removeIf(Predicate<? super E> p0){ return false; }
    public boolean retainAll(Collection<? extends Object> p0){ return false; }
    public static <E> SortedSet<E> unmodifiableSortedSet(SortedSet<E> p0){ return null; }
    public void clear(){}
}


text:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_margin="20dp"
android:clipChildren="false"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
tools:context=".notifications_page.FcmPayloadActivity">

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:clipChildren="false"
    android:clipToPadding="false"
    android:orientation="vertical"
    android:padding="20dp">

    <TextView
        android:id="@+id/fcm_message_value"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:textIsSelectable="true" />

</LinearLayout>

</ScrollView>


text:
	console.log("Getting songs from playlist");
	Playlist.fromURI('spotify:user:drsounds:playlist:1TdnOdTVGt82cUGmbH9s5Q', function (playlist) {
		var contextView = new ContextView(playlist);
		$('#featuredSongs').append(contextView.node);
	});


text:
<?php namespace Mmanos\Billing\Gateways\Local\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class Charge extends Model
{
	use SoftDeletes;
	protected $guarded = array('id');
	protected $connection = 'billinglocal';

	public function customer()
	{
		return $this->belongsTo('Mmanos\Billing\Gateways\Local\Models\Customer')->withTrashed();
	}

	public function card()
	{
		return $this->belongsTo('Mmanos\Billing\Gateways\Local\Models\Card')->withTrashed();
	}

	public function capture()
	{
		$this->captured = 1;
		$this->paid = 1;
		$this->refunded = 0;
		$this->save();
	}

	public function refund()
	{
		if (!$this->paid) {
			return;
		}

		$this->refunded = 1;
		$this->save();
	}
}


text:
package org.thymeleaf.spring6.context.webmvc;

import java.beans.PropertyEditor;

import org.springframework.validation.Errors;
import org.springframework.web.servlet.support.BindStatus;
import org.thymeleaf.spring6.context.IThymeleafBindStatus;
import org.thymeleaf.util.Validate;

/**
 * <p>
 *   Implementation of the {@link IThymeleafBindStatus} interface, meant to wrap a Spring
 *   {@link BindStatus} object.
 * </p>
 *
 * @see BindStatus
 *
 * @author Daniel Fernández
 *
 * @since 3.0.3
 *
 */
class SpringWebMvcThymeleafBindStatus implements IThymeleafBindStatus {

    private final BindStatus bindStatus;

    SpringWebMvcThymeleafBindStatus(final BindStatus bindStatus) {
        super();
        Validate.notNull(bindStatus, "BindStatus cannot be null");
        this.bindStatus = bindStatus;
    }

    @Override
    public String getPath() {
        return this.bindStatus.getPath();
    }

    @Override
    public String getExpression() {
        return this.bindStatus.getExpression();
    }

    @Override
    public Object getValue() {
        return this.bindStatus.getValue();
    }

    @Override
    public Class<?> getValueType() {
        return this.bindStatus.getValueType();
    }

    @Override
    public Object getActualValue() {
        return this.bindStatus.getActualValue();
    }

    @Override
    public String getDisplayValue() {
        return this.bindStatus.getDisplayValue();
    }

    @Override
    public boolean isError() {
        return this.bindStatus.isError();
    }

    @Override
    public String[] getErrorCodes() {
        return this.bindStatus.getErrorCodes();
    }

    @Override
    public String getErrorCode() {
        return this.bindStatus.getErrorCode();
    }

    @Override
    public String[] getErrorMessages() {
        return this.bindStatus.getErrorMessages();
    }

    @Override
    public String getErrorMessage() {
        return this.bindStatus.getErrorMessage();
    }

    @Override
    public String getErrorMessagesAsString(final String delimiter) {
        return this.bindStatus.getErrorMessagesAsString(delimiter);
    }

    @Override
    public Errors getErrors() {
        return this.bindStatus.getErrors();
    }

    @Override
    public PropertyEditor getEditor() {
        return this.bindStatus.getEditor();
    }

    @Override
    public PropertyEditor findEditor(final Class<?> valueClass) {
        return this.bindStatus.findEditor(valueClass);
    }

    @Override
    public String toString() {
        return this.bindStatus.toString();
    }

}


text:
require 'spec_helper'

describe Mongoid::Geospatial::Circle do
  it 'should work' do
    alarm = Alarm.new(radius: [[1, 2], 3])
    expect(alarm.radius).to be_a Mongoid::Geospatial::Circle
  end
end


text:
import json

from django.http import HttpResponse
from django.views.generic import CreateView, DeleteView, ListView
from .models import Picture
from .response import JSONResponse, response_mimetype
from .serialize import serialize

class PictureCreateView(CreateView):
    model = Picture
    fields = "__all__"

    def form_valid(self, form):
        self.object = form.save()
        files = [serialize(self.object)]
        data = {'files': files}
        response = JSONResponse(data, mimetype=response_mimetype(self.request))
        response['Content-Disposition'] = 'inline; filename=files.json'
        return response

    def form_invalid(self, form):
        data = json.dumps(form.errors)
        return HttpResponse(content=data, status=400, content_type='application/json')

class BasicVersionCreateView(PictureCreateView):
    template_name_suffix = '_basic_form'

class BasicPlusVersionCreateView(PictureCreateView):
    template_name_suffix = '_basicplus_form'

class AngularVersionCreateView(PictureCreateView):
    template_name_suffix = '_angular_form'

class jQueryVersionCreateView(PictureCreateView):
    template_name_suffix = '_jquery_form'

class PictureDeleteView(DeleteView):
    model = Picture

    def delete(self, request, *args, **kwargs):
        self.object = self.get_object()
        self.object.delete()
        response = JSONResponse(True, mimetype=response_mimetype(request))
        response['Content-Disposition'] = 'inline; filename=files.json'
        return response

class PictureListView(ListView):
    model = Picture

    def render_to_response(self, context, **response_kwargs):
        files = [ serialize(p) for p in self.get_queryset() ]
        data = {'files': files}
        response = JSONResponse(data, mimetype=response_mimetype(self.request))
        response['Content-Disposition'] = 'inline; filename=files.json'
        return response


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>Constant Field Values</title>
<meta name="date" content="2015-12-10">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Constant Field Values

Contents

ihm.*

ihm.*

ihm.AppFrame

Modifier and Type
Constant Field
Value

protected static final int
HEIGHT
400

protected static final int
WIDTH
600

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes


text:
<?xml version="1.0" encoding="UTF-8"?>
<sem:triples uri="http://www.lds.org/vrl/specific-people/general-authorities-and-area-representatives/arnold-mervyn-b" xmlns:sem="http://marklogic.com/semantics">
  <sem:triple>
    <sem:subject>http://www.lds.org/vrl/specific-people/general-authorities-and-area-representatives/arnold-mervyn-b</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#prefLabel</sem:predicate>
    <sem:object datatype="xsd:string" xml:lang="eng">Arnold, Mervyn B.</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/vrl/specific-people/general-authorities-and-area-representatives/arnold-mervyn-b</sem:subject>
    <sem:predicate>http://www.w3.org/2004/02/skos/core#inScheme</sem:predicate>
    <sem:object datatype="sem:iri">http://www.lds.org/concept-scheme/vrl</sem:object>
  </sem:triple>
  <sem:triple>
    <sem:subject>http://www.lds.org/vrl/specific-people/general-authorities-and-area-representatives/arnold-mervyn-b</sem:subject>
    <sem:predicate>http://www.lds.org/core#entityType</sem:predicate>
    <sem:object datatype="sem:iri">http://www.schema.org/Place</sem:object>
  </sem:triple>
</sem:triples>


text:
package com.twitter.finagle.mux

import com.twitter.io.Buf
import org.scalacheck.Gen
import org.scalatest.FunSuite
import org.scalatestplus.scalacheck.ScalaCheckDrivenPropertyChecks

class ReqRepHeadersTest extends FunSuite with ScalaCheckDrivenPropertyChecks {

  private val Header: Gen[(Buf, Buf)] = {
    val byte = Gen.choose[Byte](Byte.MinValue, Byte.MaxValue)
    val token = Gen.listOf(byte).map(bs => Buf.ByteArray(bs: _*))
    for {
      k <- token
      v <- token
    } yield (k -> v)
  }

  test("round trips headers") {
    forAll(Gen.listOf(Header)) { hs =>
      val encoded = ReqRepHeaders.encode(hs)
      val decoded = ReqRepHeaders.decode(encoded)

      if (ContextCodec.encodedLength(hs.iterator) <= ReqRepHeaders.MaxEncodedLength) {
        assert(decoded == hs)
      } else {
        assert(decoded == truncate(hs))
      }
    }
  }

  def truncate(headers: Iterable[(Buf, Buf)]): Iterable[(Buf, Buf)] = {
    var size = 0
    headers.takeWhile {
      case (k, v) =>
        size += 4 + k.length + v.length
        size <= ReqRepHeaders.MaxEncodedLength
    }
  }

  test("encodes up to MaxEncodedLength") {
    // the key, value pair should max out the encoded header block size.
    val k = Buf.Utf8("k")
    val v = Buf.Utf8("." * (ReqRepHeaders.MaxEncodedLength - 5))

    val encoded = ReqRepHeaders.encode(Seq(k -> v))
    assert(encoded.length == ReqRepHeaders.MaxEncodedLength)
    assert(ReqRepHeaders.decode(encoded) == Seq(k -> v))
  }

  test("drops headers that overflow the max encoded size") {
    // the key, value pair should max out the encoded header block size.
    val k = Buf.Utf8("k")
    val v1 = Buf.Utf8("1" * (ReqRepHeaders.MaxEncodedLength - 5))
    val v2 = Buf.Utf8("2")

    val encoded1 = ReqRepHeaders.encode(Seq(k -> v1, k -> v2))
    assert(encoded1.length == ReqRepHeaders.MaxEncodedLength) // should have dropped the second pair
    assert(ReqRepHeaders.decode(encoded1) == Seq(k -> v1))

    val encoded2 = ReqRepHeaders.encode(Seq(k -> v2, k -> v1))
    assert(encoded2.length == 6) // should have dropped the second pair
    assert(ReqRepHeaders.decode(encoded2) == Seq(k -> v2))
  }

}


text:
package com.amazonaws.services.lakeformation.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StartTransactionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     *

     * Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     * transaction ID will be rejected. Read-only transactions do not need to be committed.
     *

     */
    private String transactionType;

    /**
     *

     * Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     * transaction ID will be rejected. Read-only transactions do not need to be committed.
     *

     *
     * @param transactionType
     *        Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     *        transaction ID will be rejected. Read-only transactions do not need to be committed.
     * @see TransactionType
     */

    public void setTransactionType(String transactionType) {
        this.transactionType = transactionType;
    }

    /**
     *

     * Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     * transaction ID will be rejected. Read-only transactions do not need to be committed.
     *

     *
     * @return Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     *         transaction ID will be rejected. Read-only transactions do not need to be committed.
     * @see TransactionType
     */

    public String getTransactionType() {
        return this.transactionType;
    }

    /**
     *

     * Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     * transaction ID will be rejected. Read-only transactions do not need to be committed.
     *

     *
     * @param transactionType
     *        Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     *        transaction ID will be rejected. Read-only transactions do not need to be committed.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see TransactionType
     */

    public StartTransactionRequest withTransactionType(String transactionType) {
        setTransactionType(transactionType);
        return this;
    }

    /**
     *

     * Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     * transaction ID will be rejected. Read-only transactions do not need to be committed.
     *

     *
     * @param transactionType
     *        Indicates whether this transaction should be read only or read and write. Writes made using a read-only
     *        transaction ID will be rejected. Read-only transactions do not need to be committed.
     * @return Returns a reference to this object so that method calls can be chained together.
     * @see TransactionType
     */

    public StartTransactionRequest withTransactionType(TransactionType transactionType) {
        this.transactionType = transactionType.toString();
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getTransactionType() != null)
            sb.append("TransactionType: ").append(getTransactionType());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof StartTransactionRequest == false)
            return false;
        StartTransactionRequest other = (StartTransactionRequest) obj;
        if (other.getTransactionType() == null ^ this.getTransactionType() == null)
            return false;
        if (other.getTransactionType() != null && other.getTransactionType().equals(this.getTransactionType()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getTransactionType() == null) ? 0 : getTransactionType().hashCode());
        return hashCode;
    }

    @Override
    public StartTransactionRequest clone() {
        return (StartTransactionRequest) super.clone();
    }

}


text:
class Exporter {
public:
    void exportToFile(const Assembler &assembler, const std::string &filePath, const int type);
    void exportAssembly(const std::vector<Assembly> &assemblies, std::ostream &os, const int type);

    static const int COE;
    static const int HEX;
    static const int BIN;
    static const int ASCIIBIN;
};

#endif


text:
/* __START_OF_JASPER_LICENSE__
 *
 * JasPer License Version 2.0
 *
 * Copyright (c) 1999-2000 Image Power, Inc.
 * Copyright (c) 1999-2000 The University of British Columbia
 * Copyright (c) 2001-2003 Michael David Adams
 *
 * All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person (the
 * "User") obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without restriction,
 * including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, and/or sell copies of the Software, and to permit
 * persons to whom the Software is furnished to do so, subject to the
 * following conditions:
 *
 * 1.  The above copyright notices and this permission notice (which
 * includes the disclaimer below) shall be included in all copies or
 * substantial portions of the Software.
 *
 * 2.  The name of a copyright holder shall not be used to endorse or
 * promote products derived from the Software without specific prior
 * written permission.
 *
 * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS
 * LICENSE.  NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER
 * THIS DISCLAIMER.  THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS
 * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
 * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO
 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
 * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  NO ASSURANCES ARE
 * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE
 * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.
 * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS
 * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL
 * PROPERTY RIGHTS OR OTHERWISE.  AS A CONDITION TO EXERCISING THE RIGHTS
 * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE
 * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY.  THE SOFTWARE
 * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL
 * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,
 * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL
 * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH
 * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,
 * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH
 * RISK ACTIVITIES").  THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY
 * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.
 *
 * __END_OF_JASPER_LICENSE__
 */

/*
 * MQ Arithmetic Decoder
 *
 * $Id: jpc_mqdec.h,v 1.3 2005/07/06 18:57:13 lpysher Exp $
 */

#ifndef JPC_MQDEC_H
#define JPC_MQDEC_H

/******************************************************************************\
* Includes.
\******************************************************************************/

#include "jasper/jas_types.h"
#include "jasper/jas_stream.h"

#include "jpc_mqcod.h"

/******************************************************************************\
* Types.
\******************************************************************************/

/* MQ arithmetic decoder. */

typedef struct {

	/* The C register. */
	uint_fast32_t creg;

	/* The A register. */
	uint_fast32_t areg;

	/* The CT register. */
	uint_fast32_t ctreg;

	/* The current context. */
	jpc_mqstate_t **curctx;

	/* The per-context information. */
	jpc_mqstate_t **ctxs;

	/* The maximum number of contexts. */
	int maxctxs;

	/* The stream from which to read data. */
	jas_stream_t *in;

	/* The last character read. */
	uchar inbuffer;

	/* The EOF indicator. */
	int eof;

} jpc_mqdec_t;

/******************************************************************************\
* Functions/macros for construction and destruction.
\******************************************************************************/

/* Create a MQ decoder. */
jpc_mqdec_t *jpc_mqdec_create(int maxctxs, jas_stream_t *in);

/* Destroy a MQ decoder. */
void jpc_mqdec_destroy(jpc_mqdec_t *dec);

/******************************************************************************\
* Functions/macros for initialization.
\******************************************************************************/

/* Set the input stream associated with a MQ decoder. */
void jpc_mqdec_setinput(jpc_mqdec_t *dec, jas_stream_t *in);

/* Initialize a MQ decoder. */
void jpc_mqdec_init(jpc_mqdec_t *dec);

/******************************************************************************\
* Functions/macros for manipulating contexts.
\******************************************************************************/

/* Set the current context for a MQ decoder. */
#define	jpc_mqdec_setcurctx(dec, ctxno) \
	((mqdec)->curctx = &(mqdec)->ctxs[ctxno]);

/* Set the state information for a particular context of a MQ decoder. */
void jpc_mqdec_setctx(jpc_mqdec_t *dec, int ctxno, jpc_mqctx_t *ctx);

/* Set the state information for all contexts of a MQ decoder. */
void jpc_mqdec_setctxs(jpc_mqdec_t *dec, int numctxs, jpc_mqctx_t *ctxs);

/******************************************************************************\
* Functions/macros for decoding bits.
\******************************************************************************/

/* Decode a symbol. */
#if !defined(DEBUG)
#define	jpc_mqdec_getbit(dec) \
	jpc_mqdec_getbit_macro(dec)
#else
#define	jpc_mqdec_getbit(dec) \
	jpc_mqdec_getbit_func(dec)
#endif

/* Decode a symbol (assuming an unskewed probability distribution). */
#if !defined(DEBUG)
#define	jpc_mqdec_getbitnoskew(dec) \
	jpc_mqdec_getbit_macro(dec)
#else
#define	jpc_mqdec_getbitnoskew(dec) \
	jpc_mqdec_getbit_func(dec)
#endif

/******************************************************************************\
* Functions/macros for debugging.
\******************************************************************************/

/* Dump the MQ decoder state for debugging. */
void jpc_mqdec_dump(jpc_mqdec_t *dec, FILE *out);

/******************************************************************************\
* EVERYTHING BELOW THIS POINT IS IMPLEMENTATION SPECIFIC AND NOT PART OF THE
* APPLICATION INTERFACE.  DO NOT RELY ON ANY OF THE INTERNAL FUNCTIONS/MACROS
* GIVEN BELOW.
\******************************************************************************/

#define	jpc_mqdec_getbit_macro(dec) \
	((((dec)->areg -= (*(dec)->curctx)->qeval), \
	  (dec)->creg >> 16 >= (*(dec)->curctx)->qeval) ? \
	  ((((dec)->creg -= (*(dec)->curctx)->qeval << 16), \
	  (dec)->areg & 0x8000) ?  (*(dec)->curctx)->mps : \
	  jpc_mqdec_mpsexchrenormd(dec)) : \
	  jpc_mqdec_lpsexchrenormd(dec))

#define	jpc_mqdec_mpsexchange(areg, delta, curctx, bit) \
{ \
	if ((areg) < (delta)) { \
		register jpc_mqstate_t *state = *(curctx); \
		/* LPS decoded. */ \
		(bit) = state->mps ^ 1; \
		*(curctx) = state->nlps; \
	} else { \
		register jpc_mqstate_t *state = *(curctx); \
		/* MPS decoded. */ \
		(bit) = state->mps; \
		*(curctx) = state->nmps; \
	} \
}

#define	jpc_mqdec_lpsexchange(areg, delta, curctx, bit) \
{ \
	if ((areg) >= (delta)) { \
		register jpc_mqstate_t *state = *(curctx); \
		(areg) = (delta); \
		(bit) = state->mps ^ 1; \
		*(curctx) = state->nlps; \
	} else { \
		register jpc_mqstate_t *state = *(curctx); \
		(areg) = (delta); \
		(bit) = state->mps; \
		*(curctx) = state->nmps; \
	} \
}

#define	jpc_mqdec_renormd(areg, creg, ctreg, in, eof, inbuf) \
{ \
	do { \
		if (!(ctreg)) { \
			jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf); \
		} \
		(areg) <<= 1; \
		(creg) <<= 1; \
		--(ctreg); \
	} while (!((areg) & 0x8000)); \
}

#define	jpc_mqdec_bytein2(creg, ctreg, in, eof, inbuf) \
{ \
	int c; \
	unsigned char prevbuf; \
	if (!(eof)) { \
		if ((c = jas_stream_getc(in)) == EOF) { \
			(eof) = 1; \
			c = 0xff; \
		} \
		prevbuf = (inbuf); \
		(inbuf) = c; \
		if (prevbuf == 0xff) { \
			if (c > 0x8f) { \
				(creg) += 0xff00; \
				(ctreg) = 8; \
			} else { \
				(creg) += c << 9; \
				(ctreg) = 7; \
			} \
		} else { \
			(creg) += c << 8; \
			(ctreg) = 8; \
		} \
	} else { \
		(creg) += 0xff00; \
		(ctreg) = 8; \
	} \
}

int jpc_mqdec_getbit_func(jpc_mqdec_t *dec);
int jpc_mqdec_mpsexchrenormd(jpc_mqdec_t *dec);
int jpc_mqdec_lpsexchrenormd(jpc_mqdec_t *dec);

#endif


text:
.class public final Landroid/provider/Downloads$Impl;
.super Ljava/lang/Object;
.source "Downloads.java"

# interfaces
.implements Landroid/provider/BaseColumns;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Landroid/provider/Downloads;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x19
    name = "Impl"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/provider/Downloads$Impl$RequestHeaders;
    }
.end annotation

# static fields
.field public static final ACTION_DOWNLOAD_COMPLETED:Ljava/lang/String; = "android.intent.action.DOWNLOAD_COMPLETED"

.field public static final ACTION_NOTIFICATION_CLICKED:Ljava/lang/String; = "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"

.field public static final ALL_DOWNLOADS_CONTENT_URI:Landroid/net/Uri; = null

.field public static final CD_METHOD_DIRECT:I = 0x0

.field public static final CD_METHOD_DIRECT_ROAP:I = 0x2

.field public static final CD_METHOD_OMA:I = 0x1

.field public static final CD_METHOD_OMA_DD_ROAP:I = 0x5

.field public static final CD_METHOD_OMA_ROAP:I = 0x3

.field public static final CD_METHOD_OMA_ROAP_DCF:I = 0x4

.field public static final CD_RESULT_FAIL:I = 0x0

.field public static final CD_RESULT_OK:I = 0x1

.field public static final CD_STATE_CANCEL:I = 0x8

.field public static final CD_STATE_COMPLETED:I = 0xa

.field public static final CD_STATE_FAIL:I = 0x9

.field public static final CD_STATE_PENDING_NOTIFY:I = 0x6

.field public static final CD_STATE_PROCESS_DESCRIPTION:I = 0x1

.field public static final CD_STATE_PROCESS_DONE_DOWNLOADING:I = 0x3

.field public static final CD_STATE_PROCESS_DOWNLOADING:I = 0x0

.field public static final CD_STATE_PROCESS_NOTIFY:I = 0x7

.field public static final CD_STATE_PROCESS_RO:I = 0x5

.field public static final CD_STATE_PROCESS_ROAP_DOWNLOADING:I = 0x2

.field public static final CD_STATE_PROCESS_SAVING:I = 0x4

.field public static final CD_STATUS_DOWNLOAD_COMPLETED:I = 0xc9

.field public static final CD_STATUS_DRM2_ACCESS_DENY:I = 0x28c

.field public static final CD_STATUS_DRM2_CMLA_EXPIRED:I = 0x28d

.field public static final CD_STATUS_DRM2_DOMAIN_FULL:I = 0x28f

.field public static final CD_STATUS_DRM2_DOMAIN_NOT_EXIST:I = 0x28e

.field public static final CD_STATUS_DRM2_MULTIPROCESS_NOT_SUPPORTED:I = 0x292

.field public static final CD_STATUS_DRM2_NOT_SUPPORTED_CONTENTS:I = 0x291

.field public static final CD_STATUS_DRM2_ROAP_RESPONSE_ERROR:I = 0x290

.field public static final CD_STATUS_DRM2_SERVER_NOT_SUPPORTED:I = 0x28b

.field public static final CD_STATUS_DRM_INVALID_RO_DATA:I = 0x28a

.field public static final CD_STATUS_EXTERNAL_MEMORY_NOT_EXIST:I = 0x279

.field public static final CD_STATUS_INSTALL_COMPLETED:I = 0xcb

.field public static final CD_STATUS_INSUFFICIENT_EXTERNAL_MEMORY:I = 0x278

.field public static final CD_STATUS_INSUFFICIENT_MEMORY:I = 0x276

.field public static final CD_STATUS_INSUFFICIENT_PHONE_MEMORY:I = 0x277

.field public static final CD_STATUS_INVALID_CONTENTS:I = 0x26c

.field public static final CD_STATUS_INVALID_DD:I = 0x259

.field public static final CD_STATUS_INVALID_DDVERSION:I = 0x25a

.field public static final CD_STATUS_MISMATCH_CONTENT:I = 0x26d

.field public static final CD_STATUS_NETWORK_UNAVAILABLE:I = 0x281

.field public static final CD_STATUS_NOTIFICATION_FAIL:I = 0xbb

.field public static final CD_STATUS_NOTIFICATION_SUCCESS:I = 0xba

.field public static final CD_STATUS_NOT_ACCEPTABLE_CONTENT:I = 0x27a

.field public static final CD_STATUS_PENDING_DDPARSE:I = 0xb5

.field public static final CD_STATUS_PENDING_ROAP_PROCESS:I = 0xb8

.field public static final CD_STATUS_PENDING_USERCONFIRM:I = 0xb6

.field public static final CD_STATUS_ROAP_PROCESSING:I = 0xb9

.field public static final CD_STATUS_RO_PROCESSING:I = 0xbc

.field public static final CD_STATUS_SAVING_COMPLETED:I = 0xca

.field public static final CD_STATUS_UNSUPPORT_MIME:I = 0x262

.field public static final CD_STATUS_USERCONFIRMED:I = 0xb7

.field public static final CD_STORAGE_EXTERNAL_MEMORY:I = 0x0

.field public static final CD_STORAGE_PHONE_MEMORY:I = 0x1

.field public static final COLUMN_ALLOWED_NETWORK_TYPES:Ljava/lang/String; = "allowed_network_types"

.field public static final COLUMN_ALLOW_METERED:Ljava/lang/String; = "allow_metered"

.field public static final COLUMN_ALLOW_ROAMING:Ljava/lang/String; = "allow_roaming"

.field public static final COLUMN_APP_DATA:Ljava/lang/String; = "entity"

.field public static final COLUMN_BYPASS_RECOMMENDED_SIZE_LIMIT:Ljava/lang/String; = "bypass_recommended_size_limit"

.field public static final COLUMN_CONTROL:Ljava/lang/String; = "control"

.field public static final COLUMN_COOKIE_DATA:Ljava/lang/String; = "cookiedata"

.field public static final COLUMN_CURRENT_BYTES:Ljava/lang/String; = "current_bytes"

.field public static final COLUMN_DD_CONTENT_SIZE:Ljava/lang/String; = "dd_contentSize"

.field public static final COLUMN_DD_FILE_DESCRIPTION:Ljava/lang/String; = "dd_description"

.field public static final COLUMN_DD_FILE_NAME:Ljava/lang/String; = "dd_fileName"

.field public static final COLUMN_DD_NOTIFY_URL:Ljava/lang/String; = "dd_notifyurl"

.field public static final COLUMN_DD_OBJ_URL:Ljava/lang/String; = "dd_objUrl"

.field public static final COLUMN_DD_PRIMARY_MIMETYPE:Ljava/lang/String; = "dd_primaryMimeType"

.field public static final COLUMN_DD_SECONDARY_MIMETYPE1:Ljava/lang/String; = "dd_SecondaryMimeType1"

.field public static final COLUMN_DD_SECONDARY_MIMETYPE2:Ljava/lang/String; = "dd_SecondaryMimeType2"

.field public static final COLUMN_DD_VENDOR_NAME:Ljava/lang/String; = "dd_vendor"

.field public static final COLUMN_DD_VERSION_NUMBER:Ljava/lang/String; = "dd_majorVersion"

.field public static final COLUMN_DELETED:Ljava/lang/String; = "deleted"

.field public static final COLUMN_DESCRIPTION:Ljava/lang/String; = "description"

.field public static final COLUMN_DESTINATION:Ljava/lang/String; = "destination"

.field public static final COLUMN_ERROR_MSG:Ljava/lang/String; = "errorMsg"

.field public static final COLUMN_FILE_NAME_HINT:Ljava/lang/String; = "hint"

.field public static final COLUMN_IS_PUBLIC_API:Ljava/lang/String; = "is_public_api"

.field public static final COLUMN_IS_VISIBLE_IN_DOWNLOADS_UI:Ljava/lang/String; = "is_visible_in_downloads_ui"

.field public static final COLUMN_LAST_MODIFICATION:Ljava/lang/String; = "lastmod"

.field public static final COLUMN_LAST_UPDATESRC:Ljava/lang/String; = "lastUpdateSrc"

.field public static final COLUMN_MEDIAPROVIDER_URI:Ljava/lang/String; = "mediaprovider_uri"

.field public static final COLUMN_MEDIA_SCANNED:Ljava/lang/String; = "scanned"

.field public static final COLUMN_METHOD:Ljava/lang/String; = "downloadmethod"

.field public static final COLUMN_MIME_TYPE:Ljava/lang/String; = "mimetype"

.field public static final COLUMN_NOTIFICATION_CLASS:Ljava/lang/String; = "notificationclass"

.field public static final COLUMN_NOTIFICATION_EXTRAS:Ljava/lang/String; = "notificationextras"

.field public static final COLUMN_NOTIFICATION_PACKAGE:Ljava/lang/String; = "notificationpackage"

.field public static final COLUMN_NO_INTEGRITY:Ljava/lang/String; = "no_integrity"

.field public static final COLUMN_OTHER_UID:Ljava/lang/String; = "otheruid"

.field public static final COLUMN_REFERER:Ljava/lang/String; = "referer"

.field public static final COLUMN_STATE:Ljava/lang/String; = "state"

.field public static final COLUMN_STATUS:Ljava/lang/String; = "status"

.field public static final COLUMN_STORAGE_TYPE:Ljava/lang/String; = "storagetype"

.field public static final COLUMN_TITLE:Ljava/lang/String; = "title"

.field public static final COLUMN_TOTAL_BYTES:Ljava/lang/String; = "total_bytes"

.field public static final COLUMN_URI:Ljava/lang/String; = "uri"

.field public static final COLUMN_USER_AGENT:Ljava/lang/String; = "useragent"

.field public static final COLUMN_VISIBILITY:Ljava/lang/String; = "visibility"

.field public static final CONTENT_CDURI:Landroid/net/Uri; = null

.field public static final CONTENT_URI:Landroid/net/Uri; = null

.field public static final CONTROL_PAUSED:I = 0x1

.field public static final CONTROL_RUN:I = 0x0

.field public static final DESTINATION_CACHE_PARTITION:I = 0x1

.field public static final DESTINATION_CACHE_PARTITION_NOROAMING:I = 0x3

.field public static final DESTINATION_CACHE_PARTITION_PURGEABLE:I = 0x2

.field public static final DESTINATION_EXTERNAL:I = 0x0

.field public static final DESTINATION_FILE_URI:I = 0x4

.field public static final DESTINATION_NON_DOWNLOADMANAGER_DOWNLOAD:I = 0x6

.field public static final DESTINATION_SYSTEMCACHE_PARTITION:I = 0x5

.field public static final LAST_UPDATESRC_DONT_NOTIFY_DOWNLOADSVC:I = 0x1

.field public static final LAST_UPDATESRC_NOT_RELEVANT:I = 0x0

.field public static final MIN_ARTIFICIAL_ERROR_STATUS:I = 0x1e8

.field public static final PERMISSION_ACCESS:Ljava/lang/String; = "android.permission.ACCESS_DOWNLOAD_MANAGER"

.field public static final PERMISSION_ACCESS_ADVANCED:Ljava/lang/String; = "android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED"

.field public static final PERMISSION_ACCESS_ALL:Ljava/lang/String; = "android.permission.ACCESS_ALL_DOWNLOADS"

.field public static final PERMISSION_CACHE:Ljava/lang/String; = "android.permission.ACCESS_CACHE_FILESYSTEM"

.field public static final PERMISSION_CACHE_NON_PURGEABLE:Ljava/lang/String; = "android.permission.DOWNLOAD_CACHE_NON_PURGEABLE"

.field public static final PERMISSION_NO_NOTIFICATION:Ljava/lang/String; = "android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"

.field public static final PERMISSION_SEE_ALL_EXTERNAL:Ljava/lang/String; = "android.permission.SEE_ALL_EXTERNAL"

.field public static final PERMISSION_SEND_INTENTS:Ljava/lang/String; = "android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS"

.field public static final PUBLICLY_ACCESSIBLE_DOWNLOADS_URI:Landroid/net/Uri; = null

.field public static final PUBLICLY_ACCESSIBLE_DOWNLOADS_URI_SEGMENT:Ljava/lang/String; = "public_downloads"

.field public static final STATUS_BAD_REQUEST:I = 0x190

.field public static final STATUS_BLOCKED:I = 0x1f2
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation
.end field

.field public static final STATUS_CANCELED:I = 0x1ea

.field public static final STATUS_CANNOT_RESUME:I = 0x1e9

.field public static final STATUS_DEVICE_NOT_FOUND_ERROR:I = 0xc7

.field public static final STATUS_FILE_ALREADY_EXISTS_ERROR:I = 0x1e8

.field public static final STATUS_FILE_ERROR:I = 0x1ec

.field public static final STATUS_HTTP_DATA_ERROR:I = 0x1ef

.field public static final STATUS_HTTP_EXCEPTION:I = 0x1f0

.field public static final STATUS_INSUFFICIENT_SPACE_ERROR:I = 0xc6

.field public static final STATUS_LENGTH_REQUIRED:I = 0x19b

.field public static final STATUS_NOT_ACCEPTABLE:I = 0x196

.field public static final STATUS_PAUSED_BY_APP:I = 0xc1

.field public static final STATUS_PENDING:I = 0xbe

.field public static final STATUS_PENDING_PAUSED:I = 0xbf

.field public static final STATUS_PRECONDITION_FAILED:I = 0x19c

.field public static final STATUS_QUEUED_FOR_WIFI:I = 0xc4

.field public static final STATUS_RUNNING:I = 0xc0

.field public static final STATUS_RUNNING_PAUSED:I = 0xc1

.field public static final STATUS_SUCCESS:I = 0xc8

.field public static final STATUS_TOO_MANY_REDIRECTS:I = 0x1f1

.field public static final STATUS_UNHANDLED_HTTP_CODE:I = 0x1ee

.field public static final STATUS_UNHANDLED_REDIRECT:I = 0x1ed

.field public static final STATUS_UNKNOWN_ERROR:I = 0x1eb

.field public static final STATUS_WAITING_FOR_NETWORK:I = 0xc3

.field public static final STATUS_WAITING_TO_RETRY:I = 0xc2

.field public static final VISIBILITY_HIDDEN:I = 0x2

.field public static final VISIBILITY_VISIBLE:I = 0x0

.field public static final VISIBILITY_VISIBLE_NOTIFY_COMPLETED:I = 0x1

.field public static final _DATA:Ljava/lang/String; = "_data"

.field public static final _ID:Ljava/lang/String; = "_id"

# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 101
    const-string v0, "content://downloads/my_downloads"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Landroid/provider/Downloads$Impl;->CONTENT_URI:Landroid/net/Uri;

    .line 108
    const-string v0, "content://downloads/all_downloads"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Landroid/provider/Downloads$Impl;->ALL_DOWNLOADS_CONTENT_URI:Landroid/net/Uri;

    .line 118
    const-string v0, "content://downloads/public_downloads"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Landroid/provider/Downloads$Impl;->PUBLICLY_ACCESSIBLE_DOWNLOADS_URI:Landroid/net/Uri;

    .line 863
    const-string v0, "content://sisodownloads/sisodownloads"

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    sput-object v0, Landroid/provider/Downloads$Impl;->CONTENT_CDURI:Landroid/net/Uri;

    return-void
.end method

.method private constructor <init>()V
    .locals 0

    .prologue
    .line 48
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static isDownloadCompleted(I)Z
    .locals 1
    .parameter "state"

    .prologue
    .line 605
    const/16 v0, 0xa

    if-eq p0, v0, :cond_0

    const/16 v0, 0x9

    if-ne p0, v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isDownloadSuccessCompleted(II)Z
    .locals 1
    .parameter "status"
    .parameter "state"

    .prologue
    .line 611
    const/16 v0, 0xa

    if-ne p1, v0, :cond_0

    const/16 v0, 0xc8

    if-lt p0, v0, :cond_0

    const/16 v0, 0x12c

    if-ge p0, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isNotificationToBeDisplayed(I)Z
    .locals 2
    .parameter "visibility"

    .prologue
    const/4 v0, 0x1

    .line 587
    if-eq p0, v0, :cond_0

    const/4 v1, 0x3

    if-ne p0, v1, :cond_1

    :cond_0
    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusClientError(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 569
    const/16 v0, 0x190

    if-lt p0, v0, :cond_0

    const/16 v0, 0x1f4

    if-lt p0, v0, :cond_1

    :cond_0
    const/16 v0, 0x258

    if-lt p0, v0, :cond_2

    const/16 v0, 0x2bc

    if-ge p0, v0, :cond_2

    :cond_1
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_2
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusCompleted(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 596
    const/16 v0, 0xc8

    if-lt p0, v0, :cond_0

    const/16 v0, 0x12c

    if-lt p0, v0, :cond_1

    :cond_0
    const/16 v0, 0x190

    if-lt p0, v0, :cond_2

    const/16 v0, 0x258

    if-ge p0, v0, :cond_2

    :cond_1
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_2
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusError(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 556
    const/16 v0, 0x190

    if-lt p0, v0, :cond_0

    const/16 v0, 0x2bc

    if-ge p0, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusInformational(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 525
    const/16 v0, 0x64

    if-lt p0, v0, :cond_0

    const/16 v0, 0xc8

    if-ge p0, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusServerError(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 577
    const/16 v0, 0x1f4

    if-lt p0, v0, :cond_0

    const/16 v0, 0x258

    if-ge p0, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusSuccess(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 544
    const/16 v0, 0xc8

    if-lt p0, v0, :cond_0

    const/16 v0, 0x12c

    if-ge p0, v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static isStatusSuspended(I)Z
    .locals 1
    .parameter "status"

    .prologue
    .line 536
    const/16 v0, 0xbf

    if-eq p0, v0, :cond_0

    const/16 v0, 0xc1

    if-ne p0, v0, :cond_1

    :cond_0
    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static statusToString(I)Ljava/lang/String;
    .locals 1
    .parameter "status"

    .prologue
    .line 788
    sparse-switch p0, :sswitch_data_0

    .line 813
    invoke-static {p0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object v0

    :goto_0
    return-object v0

    .line 789
    :sswitch_0
    const-string v0, "PENDING"

    goto :goto_0

    .line 790
    :sswitch_1
    const-string v0, "RUNNING"

    goto :goto_0

    .line 791
    :sswitch_2
    const-string v0, "PAUSED_BY_APP"

    goto :goto_0

    .line 792
    :sswitch_3
    const-string v0, "WAITING_TO_RETRY"

    goto :goto_0

    .line 793
    :sswitch_4
    const-string v0, "WAITING_FOR_NETWORK"

    goto :goto_0

    .line 794
    :sswitch_5
    const-string v0, "QUEUED_FOR_WIFI"

    goto :goto_0

    .line 795
    :sswitch_6
    const-string v0, "INSUFFICIENT_SPACE_ERROR"

    goto :goto_0

    .line 796
    :sswitch_7
    const-string v0, "DEVICE_NOT_FOUND_ERROR"

    goto :goto_0

    .line 797
    :sswitch_8
    const-string v0, "SUCCESS"

    goto :goto_0

    .line 798
    :sswitch_9
    const-string v0, "BAD_REQUEST"

    goto :goto_0

    .line 799
    :sswitch_a
    const-string v0, "NOT_ACCEPTABLE"

    goto :goto_0

    .line 800
    :sswitch_b
    const-string v0, "LENGTH_REQUIRED"

    goto :goto_0

    .line 801
    :sswitch_c
    const-string v0, "PRECONDITION_FAILED"

    goto :goto_0

    .line 802
    :sswitch_d
    const-string v0, "FILE_ALREADY_EXISTS_ERROR"

    goto :goto_0

    .line 803
    :sswitch_e
    const-string v0, "CANNOT_RESUME"

    goto :goto_0

    .line 804
    :sswitch_f
    const-string v0, "CANCELED"

    goto :goto_0

    .line 805
    :sswitch_10
    const-string v0, "UNKNOWN_ERROR"

    goto :goto_0

    .line 806
    :sswitch_11
    const-string v0, "FILE_ERROR"

    goto :goto_0

    .line 807
    :sswitch_12
    const-string v0, "UNHANDLED_REDIRECT"

    goto :goto_0

    .line 808
    :sswitch_13
    const-string v0, "UNHANDLED_HTTP_CODE"

    goto :goto_0

    .line 809
    :sswitch_14
    const-string v0, "HTTP_DATA_ERROR"

    goto :goto_0

    .line 810
    :sswitch_15
    const-string v0, "HTTP_EXCEPTION"

    goto :goto_0

    .line 811
    :sswitch_16
    const-string v0, "TOO_MANY_REDIRECTS"

    goto :goto_0

    .line 812
    :sswitch_17
    const-string v0, "BLOCKED"

    goto :goto_0

    .line 788
    :sswitch_data_0
    .sparse-switch
        0xbe -> :sswitch_0
        0xc0 -> :sswitch_1
        0xc1 -> :sswitch_2
        0xc2 -> :sswitch_3
        0xc3 -> :sswitch_4
        0xc4 -> :sswitch_5
        0xc6 -> :sswitch_6
        0xc7 -> :sswitch_7
        0xc8 -> :sswitch_8
        0x190 -> :sswitch_9
        0x196 -> :sswitch_a
        0x19b -> :sswitch_b
        0x19c -> :sswitch_c
        0x1e8 -> :sswitch_d
        0x1e9 -> :sswitch_e
        0x1ea -> :sswitch_f
        0x1eb -> :sswitch_10
        0x1ec -> :sswitch_11
        0x1ed -> :sswitch_12
        0x1ee -> :sswitch_13
        0x1ef -> :sswitch_14
        0x1f0 -> :sswitch_15
        0x1f1 -> :sswitch_16
        0x1f2 -> :sswitch_17
    .end sparse-switch
.end method


text:
.messenger {
	font-family: Arial;
	font-size: 12px;
}
.messenger .link {
	cursor: pointer;
}
.messenger .link:hover {
	text-decoration: underline;
}
.messenger .title-bar {
	background: #a3a3a3;
	color: white;
	padding: 5px;
}
.messenger .close-button {
	background: #555;
	color: white;
	padding: 0 4px 1px 4px;
	margin-left: 10px;
	float: right;
	cursor: pointer;
	border-radius: 10px;
}
.messenger .resize-icon {
	cursor: nwse-resize;
}
.messenger .toggle-button {
	padding: 2px 3px 0 3px;
	border-radius: 5px;
	border: 1px outset lightgray;
	display: inline-block;
	background: #fafafa;
	cursor: pointer;
}
.messenger .toggle-button.depressed {
	border: 1px inset lightgray;
}

.messenger .user-list {
	position: fixed;
	top: 50px;
	right: 0;
	border: 1px outset lightgray;
	border-radius: 5px;
	background: white;
}
.messenger .user-list .item {
	padding: 5px 25px 5px 5px;
	cursor: pointer;
}
.messenger .user-list .item:hover {
	background: #eee;
}
.messenger .user-list .buttons {
	padding: 5px;
	background: lightgray;
}

.messenger .chat-box {
	position: fixed;
	left: 100px;
	top: 100px;
	width: 250px;
	border: 1px outset lightgray;
	border-radius: 5px;
}
.messenger .chat-box .title-bar {
	cursor: move;
}
.messenger .chat-log {
	height: 250px;
	overflow: auto;
	padding: 5px;
	color: #333;
	background: white;
}
.messenger .chat-log .time-marker {
	color: gray;
	text-align: center;
	margin: 10px 0;
}
.messenger .chat-entry {
	padding: 5px 10px 5px 10px;
	margin-bottom: 5px;
	border: 1px solid #ddd;
	border-radius: 5px;
	background: #ffd;
}
.messenger .chat-entry.me {
	background: #f5f5f5;
}
.messenger .chat-form {
	background: lightgray;
	padding: 4px;
}
.messenger .chat-form input[name=message] {
	box-sizing: border-box;
	width: 100%;
}


text:
package dao

import (
	"context"
	"net"
	"strconv"

	"go-common/app/admin/main/cache/model"
	"go-common/library/log"
)

var (
	apiserverURI = "http://cache-mng.bilibili.co/api/v1/appids/%s"
)

// OverlordClusters get all overlord clusters.
func (d *Dao) OverlordClusters(c context.Context, zone, appid string) (ocs []*model.OverlordCluster, err error) {
	var res struct {
		Data []*model.OverlordApiserver `json:"grouped_clusters"`
	}
	if err = d.client.RESTfulGet(c, apiserverURI, "", nil, &res, appid); err != nil {
		log.Error("overlord cluster url(%s) appid(%s) error(%v)", apiserverURI, appid, err)
		return
	}
GETALL:
	for _, oa := range res.Data {
		if zone == "" || oa.Group == zone {
			for _, oc := range oa.Clusters {
				cluster := &model.OverlordCluster{
					Name:             oc.Name,
					Type:             oc.Type,
					Zone:             zone,
					HashMethod:       "fnv1a_64",
					HashDistribution: "ketama",
					HashTag:          "{}",
					ListenProto:      "tcp",
					ListenAddr:       net.JoinHostPort("0.0.0.0", strconv.Itoa(oc.FrontEndPort)),
					DailTimeout:      1000,
					ReadTimeout:      1000,
					WriteTimeout:     1000,
					NodeConn:         2,
					PingFailLimit:    3,
					PingAutoEject:    true,
				}
				for _, oci := range oc.Instances {
					if oc.Type == "redis_cluster" && oci.Role != "master" {
						continue
					}
					on := &model.OverlordNode{
						Alias:  oci.Alias,
						Addr:   net.JoinHostPort(oci.IP, strconv.Itoa(oci.Port)),
						Weight: oci.Weight,
					}
					cluster.Nodes = append(cluster.Nodes, on)
				}
				ocs = append(ocs, cluster)
			}
		}
	}
	if len(ocs) == 0 && zone != "" {
		zone = ""
		goto GETALL
	}
	return
}


text:
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Linq;

namespace vtortola.Redis
{
    [DebuggerDisplay("{RedisType}: {_response.ToString()} ")]
    internal sealed class RedisResultInspector : IRedisResultInspector
    {
        readonly RESPObject _response;
        readonly Int32 _lineNumber;

        public RedisType RedisType { get; private set; }

        internal RedisResultInspector(RESPObject response, Int32 lineNumber)
        {
            Contract.Assert(response != null, "Result instpector without response object.");
            Contract.Assert(lineNumber > 0, "Result inspectors start counting numbers from 1.");

            _response = response;
            _lineNumber = lineNumber;
            RedisType = GetRedisType();
        }
        private RedisType GetRedisType()
        {
            switch (_response.Header)
            {
                case RESPHeaders.SimpleString:
                case RESPHeaders.BulkString:
                    return RedisType.String;

                case RESPHeaders.Integer:
                    return RedisType.Integer;

                case RESPHeaders.Array:
                    return RedisType.Array;

                case RESPHeaders.Error:
                    return RedisType.Error;

                default: throw new InvalidOperationException("Unexpected RESP header " + _response.Header);
            }
        }
        public String GetString()
        {
            CheckException();
            return _response.GetString();
        }
        public Int64 GetInteger()
        {
            CheckException();
            return _response.GetInt64();
        }
        public String AsString()
        {
            CheckException();
            return _response.AsString();
        }
        public Int64 AsInteger()
        {
            CheckException();
            return _response.AsInt64();
        }
        public Double AsDouble()
        {
            CheckException();
            return _response.AsDouble();
        }
        public TEnum AsEnum<TEnum>()
            where TEnum : struct, IConvertible, IComparable, IFormattable
        {
            if (!typeof(TEnum).IsEnum)
                throw new ArgumentException("TEnum must be an enum.");

            CheckException();

            return (TEnum)Enum.Parse(typeof(TEnum), _response.AsString());
        }

        public void AssertOK()
        {
            CheckException();
            if (!RESPString.IsString(_response.Header))
                throw new RedisClientAssertException("Expected result for command was 'OK' but a '" + this.RedisType + "' was received instead");
            var value = _response.GetString();
            if (!"OK".Equals(value, StringComparison.Ordinal))
                throw new RedisClientAssertException("Expected result for command was 'OK' but result was '" + (value ?? "<null>") + "'");
        }
        public RedisClientCommandException GetException()
        {
            if (_response.Header == RESPHeaders.Error)
            {
                return new RedisClientCommandException((RESPError)_response, _lineNumber);
            }
            else
                return null;
        }
        private void CheckException()
        {
            if (_response.Header == RESPHeaders.Error)
                throw new RedisClientCommandException((RESPError)_response, _lineNumber);
        }

        public IRedisResults AsResults()
        {
            CheckException();
            return new RedisResults(_response.Cast<RESPArray>().ToArray(), null);
        }

        public IDictionary<TKey, TValue> AsDictionaryCollation<TKey, TValue>()
        {
            CheckException();

            var dictionary = new Dictionary<TKey, TValue>();
            var complex = _response.Cast<RESPArray>();

            var keyFormatter = FormatterHelper.Formatter<TKey>();
            var valueFormatter = FormatterHelper.Formatter<TValue>();

            try
            {
                for (int i = 0; i < complex.Count; i += 2)
                    dictionary.Add(keyFormatter(complex[i]), valueFormatter(i < complex.Count ? complex[i + 1] : null));
            }
            catch(Exception ex)
            {
                throw new RedisClientBindingException(String.Format("Cannot create Dictionary<{0},{1}> from response to command in line number {2}.", typeof(TKey).Name, typeof(TValue).Name, _lineNumber ),ex);
            }

            return dictionary;
        }

        public void AsObjectCollation<T>(T instance, Boolean ignoreMissingMembers=true, Boolean ignoreTypeMissmatchMembers = true)
        {
            var complex = _response.Cast<RESPArray>();
            ObjectBinder<T>.Bind(complex, instance, ignoreMissingMembers, ignoreTypeMissmatchMembers);
        }

        public T AsObjectCollation<T>(Boolean ignoreMissingMembers = true, Boolean ignoreTypeMissmatchMembers = true) where T : new()
        {
            T instance = new T();
            AsObjectCollation(instance, ignoreMissingMembers, ignoreTypeMissmatchMembers);
            return instance;
        }

        public String[] GetStringArray()
        {
            CheckException();

            var complex = _response.Cast<RESPArray>();
            var result = new String[complex.Count];

            for (int i = 0; i < complex.Count; i++)
                result[i] = complex[i].GetString();

            return result;
        }

        public String[] AsStringArray()
        {
            CheckException();

            var complex = _response.Cast<RESPArray>();
            var result = new String[complex.Count];

            for (int i = 0; i < complex.Count; i++)
                result[i] = complex[i].AsString();

            return result;
        }

        public Int64[] AsIntegerArray()
        {
            CheckException();

            var complex = _response.Cast<RESPArray>();
            var result = new Int64[complex.Count];

            for (int i = 0; i < complex.Count; i++)
                result[i] = complex[i].AsInt64();

            return result;
        }

        public Int64[] GetIntegerArray()
        {
            CheckException();

            var complex = _response.Cast<RESPArray>();
            var result = new Int64[complex.Count];

            for (int i = 0; i < complex.Count; i++)
                result[i] = complex[i].GetInt64();

            return result;
        }
        public Object[] GetArray()
        {
            CheckException();

            var complex = _response.Cast<RESPArray>();
            var result = new Object[complex.Count];

            for (int i = 0; i < complex.Count; i++)
            {
                var element = complex[i];
                switch (element.Header)
                {
                    case RESPHeaders.Array:
                        throw new RedisClientBindingException("Redis arrays cannot be bound to a member of a .NET array. Use .AsResults() instead.");
                    case RESPHeaders.Integer:
                        result[i] = element.GetInt64();
                        break;
                    case RESPHeaders.BulkString:
                    case RESPHeaders.SimpleString:
                        result[i] = element.GetString();
                        break;
                    case RESPHeaders.Error:
                        result[i] = new RedisClientCommandException((RESPError)element);
                        break;
                    default:
                        throw new InvalidOperationException("Unexpected RESP header " + element.Header);
                }
            }

            return result;
        }
    }
}


text:
package test.rmi;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

/**
 * A class that writes more data than it reads in.
 * This is dangerous since a child class may not know where its own data begins.
 * This is addressed in custom marshaled stream format version 2, which boxes the
 * parent data so the reading ORB can skip to the end of any custom marshaled
 * parent data before reading in the child data.
 */
public class SampleCmsfv2ParentData implements Serializable {
    private static final long serialVersionUID = 1L;
    private final byte value = (byte) 0xdd;

    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
        ois.defaultReadObject();
    }

    private void writeObject(ObjectOutputStream oos) throws IOException {
        oos.defaultWriteObject();
        oos.writeObject(new Object[0]);
        oos.writeByte(0x77);
    }

    @Override
    public int hashCode() {
        return 31 + value;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (!(obj instanceof SampleCmsfv2ParentData))
            return false;
        return (value == ((SampleCmsfv2ParentData) obj).value);
    }

    @Override
    public String toString() {
        return String.format("%s:%02x", super.toString(), value);
    }
}


text:
function Install-ManagedServiceAccount{
    Param(
        [Parameter(ValueFromPipeline = $true,
                   ValueFromPipelineByPropertyName = $true)]
        [string[]]$ComputerName  = $ENV:ComputerName,

        [Parameter(Mandatory = $true)]
        [Alias('User', 'UserName', 'Account')]
        [string]$Identity,

        [PSCredential]$Credential = (Get-Credential)
    )

    foreach ($Computer in $ComputerName){
        Write-Verbose "-->No password supplied, assuming Managed Service Account"
        Write-Verbose "-->Configuring CredSSP"
        Enable-WSManCredSSP Client -DelegateComputer $Computer -Force
        Invoke-Command -ComputerName $Computer -ScriptBlock {Enable-WSManCredSSP Server -Force}

        if(-not $Identity.EndsWith('$')){
            $Identity = "-->$Identity$"
        }

        try{
            if(Invoke-Command -ComputerName $Computer -Credential $Credential -Authentication Credssp -ScriptBlock {Test-AdServiceAccount -Identity $Using:Identity}){
                Write-Verbose "-->$Computer is allowed to retrieve password for $Identity"
                Invoke-Command -ComputerName $Computer -Credential $Credential -Authentication Credssp -ScriptBlock {Install-AdServiceAccount -Identity $using:Identity -Verbose}
            }
            else{
                Write-Error "-->$Computer is not allowed to retrieve managed password for $Identity. Please ensure AdServiceAccount is configured correctly and try again"
            }
        }
        catch{
            if($Error[0].Exception.ToString().Contains('Access Denied')){
                Write-Error "-->Access Denied: Ensure Server Principal is authorised to retrieve password and Server has been rebooted"
                break
            }
            else{ throw $_ }
        }

    }
}


text:
@interface ImageToolDemoItem ()

@end

@implementation ImageToolDemoItem

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

    self.IMGV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0,
                                                             self.frame.size.width,
                                                             self.frame.size.height-40)];
    self.IMGV.contentMode = UIViewContentModeScaleAspectFit;
    self.IMGV.backgroundColor = [UIColor colorWithWhite:0.737 alpha:1.000];

    [self addSubview:self.IMGV];

    self.titleStr = [[UILabel alloc]initWithFrame:CGRectMake(0,
                                                             self.frame.size.height-40,
                                                             self.frame.size.width,
                                                             40)];
    self.titleStr.font = [UIFont systemFontOfSize:15];
    self.titleStr.textAlignment = NSTextAlignmentCenter;
    self.titleStr.numberOfLines = 0;

    [self addSubview:self.titleStr];

    return self;
}

@end


text:
<?php

namespace Tutto\DataGridBundle\DataGrid\Grid\Column\Exceptions;

use Exception;

/**
 * Class BadPostAccessEventException
 * @package Tutto\DataGridBundle\DataGrid\Grid\Column\Exceptions
 */
class BadPostAccessEventException extends Exception {
}


text:
Mangareader::Mangareader()
{
    mWebFrame = mWebPage.mainFrame();
    mWebFrame->setParent(this);

    mDownloadManager = new QDownloadManager(this);
    mDownloadManager->addDownload("allMangas", "http://www.mangareader.net/alphabetical");
    connect(mDownloadManager, SIGNAL(downloadFinished(QString)), SLOT(on_downloadFinished(QString)));
    qDebug() << "PLUGINS/Mangareader: Initialized";
}

Mangareader::~Mangareader()
{
}

QList<Manga::baseManga> Mangareader::getAllMangas() const
{
    QList<Manga::baseManga> list;
    return list;
}

Manga::Manga Mangareader::getManga(QString name) const
{
    Manga::Manga manga;
    return manga;
}

void Mangareader::on_downloadFinished(QString download)
{
    qDebug() << "PLUGINS/Mangareader: request finished";
    if(download == "allMangas")
    {
        mWebFrame->setContent(mDownloadManager->retrieveDownloadedData(download));
        setMangaData();
    }
}

void Mangareader::setMangaData()
{
    QWebElement webElement = mWebFrame->documentElement();

    QWebElementCollection mangaList;
    mangaList = webElement.findAll(".series_alpha");
    qDebug() <<"BEFORE LOOP !!";
    if(mangaList.count() == 0)
        qDebug() << "List empty!";
    foreach (QWebElement currentManga, webElement.findAll(".series_alpha")) {
        qDebug() << currentManga.toPlainText();
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
net.hockeyapp.android.listeners
</TITLE>

<META NAME="date" CONTENT="2013-06-28">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../doclava-developer-docs.css" TITLE="Style">

net.hockeyapp.android.listeners

Classes

DownloadFileListener

SendFeedbackListener


text:
@implementation UIFont (Vibur)

+ (instancetype)viburFontOfSize:(CGFloat)size {
  static dispatch_once_t onceToken;
  [GFIFontLoader loadFontFile:@"Vibur-Regular"
                   fromBundle:@"Vibur"
                    onceToken:&onceToken];
  return [self fontWithName:@"Vibur" size:size];
}

@end


text:
<!DOCTYPE html>

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

    <title>Pueblos Magicos en el Estado de México</title>

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

    <link href="css/freelancer.min.css" rel="stylesheet">

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

                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
                    Toggle navigation Menu
                </button>

                        Inicio

                        El oro

                        Malinalco

                        Metepec

                        Tepotzotlán

                        Valle de bravo

Tradiciones de metepec

                    El 21 de marzo se realizará el tradicional Ritual del Fuego Nuevo, en el cerro de los Magueyes en Metepec, Estado de México. De acuerdo con la tradición el cerro de los Magueyes es el principal centro de energía pues concentra los 4 elementos; Agua, tierra, fuego y aire).

Desde temprano, los grupos indígenas se reúnen para realizar su tradicional festejo como parte de un ritual acompañado de danza y poesía, reviviendo la historia de un pueblo, que venera al sol para que este salga por otros 52 años, tiempo en el que el calendario civil y el lunar coinciden durante el año nuevo, de acuerdo con las creencias teológicas de los antiguos indígenas.

Gastronomía de metepec

                    Come una deliciosa ensalada de acociles, barbacoa o tacos de carnitas.

La garañona es una de las bebidas típicas de Metepec. Se trata de un compuesto de hierbas medicinales, que algunos han llamado afrodisíacas, de ahí la expresión: ¡Vamos a ponernos garañones!

Metepec tiene curados de pulque de frutas, que se pueden disfrutar en las tranquilas noches de locales del centro.

Arquitectura de metepec

                    En la plaza central de este Pueblo Mágico, el Parque Juárez destaca "La Sirena de Metepec: La Tlanchana", una antigua diosa del agua que, según la leyenda, se aparecía en los manantiales cercanos. Al pie del Cerro de los Magueyes está la Iglesia de San Juan Bautista del siglo XVI, una estructura barroca donde se venera al santo patrono de los cultivos: San Isidro Labrador. El Ex Convento de San Juan Bautista está ubicado a un costado de la parroquia, construcción que se caracteriza por su majestuosa decoración con bordes detallados en barro, una linda torre y campanario, lo que da vida a la fachada.

Desarrollo multimedia

FI UAEMex

Cerro de Coatepec S/N

Contacto

DESARROLLADO POR:

Jhonatan Saúl Ramírez Bravo.

                        Copyright © Desarrollo multimedia 2016